/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { authenticatorsCreate } from "../funcs/authenticatorsCreate.js"; import { authenticatorsCreateAuthenticatorConnection } from "../funcs/authenticatorsCreateAuthenticatorConnection.js"; import { authenticatorsDeleteAuthenticatorConnection } from "../funcs/authenticatorsDeleteAuthenticatorConnection.js"; import { authenticatorsList } from "../funcs/authenticatorsList.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 Authenticators extends ClientSDK { /** * Create Authenticator * * @remarks * Create White labeled connector credentials */ async create( request: operations.CreateAuthenticatorPayload, options?: RequestOptions, ): Promise { return unwrapAsync(authenticatorsCreate( this, request, options, )); } /** * List Authenticators * * @remarks * List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. */ async list( request?: operations.ListAuthenticatorsRequest | undefined, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(authenticatorsList( this, request, options, )); } /** * Create Authenticator Connection * * @remarks * Create a connector for a given authenticator. This requires credentials dependent on the provider. For google drive it is a refresh token. */ async createAuthenticatorConnection( request: operations.CreateAuthenticatorConnectionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(authenticatorsCreateAuthenticatorConnection( this, request, options, )); } /** * Delete Authenticator * * @remarks * Delete an authenticator. This requires all connections created by that authenticator to be deleted first. */ async deleteAuthenticatorConnection( request: operations.DeleteAuthenticatorConnectionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(authenticatorsDeleteAuthenticatorConnection( this, request, options, )); } }