/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { apiKeyPairsCreate } from "../funcs/apiKeyPairsCreate.js"; import { apiKeyPairsDelete } from "../funcs/apiKeyPairsDelete.js"; import { apiKeyPairsGet } from "../funcs/apiKeyPairsGet.js"; import { apiKeyPairsList } from "../funcs/apiKeyPairsList.js"; import { apiKeyPairsUpdate } from "../funcs/apiKeyPairsUpdate.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"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class ApiKeyPairs extends ClientSDK { /** * List all API key pairs * * @remarks * List all API key pairs. */ async list( cursor?: string | null | undefined, limit?: number | undefined, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(apiKeyPairsList( this, cursor, limit, options, )); } /** * Create an API key pair * * @remarks * Create a new API key pair. */ async create( request: components.APIKeyPairCreate, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeyPairsCreate( this, request, options, )); } /** * Get an API key pair * * @remarks * Fetches an API key pair by its ID. */ async get( apiKeyPairId: string, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeyPairsGet( this, apiKeyPairId, options, )); } /** * Update an API key pair * * @remarks * Updates an API key pair. */ async update( apiKeyPairUpdate: components.APIKeyPairUpdate, apiKeyPairId: string, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeyPairsUpdate( this, apiKeyPairUpdate, apiKeyPairId, options, )); } /** * Delete an API key pair * * @remarks * Permanently removes an API key pair. */ async delete( apiKeyPairId: string, options?: RequestOptions, ): Promise { return unwrapAsync(apiKeyPairsDelete( this, apiKeyPairId, options, )); } }