/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import { auditLogListEntries } from "../funcs/auditLogListEntries.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import * as operations from "../models/operations/index.js";
import { unwrapAsync } from "../types/fp.js";

export class AuditLog extends ClientSDK {
  /**
   * List audit log entries
   *
   * @remarks
   * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query.
   *
   * LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor).
   */
  async listEntries(
    request: operations.GetAuditLogEntriesRequest,
    options?: RequestOptions,
  ): Promise<components.AuditLogEntryListingRepCollection> {
    return unwrapAsync(auditLogListEntries(
      this,
      request,
      options,
    ));
  }
}
