/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d6aff0ff5cc8 */ import { apiKeysCreate } from "../funcs/apiKeysCreate.js"; import { apiKeysDeleteMultiple } from "../funcs/apiKeysDeleteMultiple.js"; import { apiKeysGet } from "../funcs/apiKeysGet.js"; import { apiKeysList } from "../funcs/apiKeysList.js"; import { apiKeysRevoke } from "../funcs/apiKeysRevoke.js"; import { apiKeysUpdate } from "../funcs/apiKeysUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ApiKeys extends ClientSDK { /** * Retrieve all API keys for the current workspace. */ async list( request?: operations.ListAPIKeysRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysList( this, request, options, )); } /** * Create a new API key. */ async create( request?: models.CreateAPIKeyRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysCreate( this, request, options, )); } /** * Retrieve a specific API key. */ async get( request: operations.GetAPIKeyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysGet( this, request, options, )); } /** * Update an API key (enable/disable, change description). */ async update( request: operations.UpdateAPIKeyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysUpdate( this, request, options, )); } /** * Revoke (soft delete) an API key. */ async revoke( request: operations.RevokeAPIKeyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysRevoke( this, request, options, )); } /** * Permanently delete multiple API keys. */ async deleteMultiple( request?: models.DeleteAPIKeysRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeysDeleteMultiple( this, request, options, )); } }