/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { secretsCreateApiKey } from "../funcs/secrets-create-api-key.js"; import { secretsDeleteApiKey } from "../funcs/secrets-delete-api-key.js"; import { secretsListApiKeys } from "../funcs/secrets-list-api-keys.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; import * as models from "./models/index.js"; export class Secrets extends ClientSDK { /** * List API keys * * @remarks * Use when listing API keys (e.g. admin view or rotating keys). Returns a paginated list. */ async listApiKeys( limit?: number | undefined, offset?: number | undefined, status?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(secretsListApiKeys( this, limit, offset, status, options, )); } /** * Create a new API key * * @remarks * Use when issuing a new API key (e.g. for a service account or for the current user). Provide service_account_id to create for a service account. */ async createApiKey( request: models.CreateAPIKeyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(secretsCreateApiKey( this, request, options, )); } /** * Delete an API key * * @remarks * Use when revoking an API key (e.g. rotation or compromise). Permanently invalidates the key. */ async deleteApiKey( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(secretsDeleteApiKey( this, id, options, )); } }