/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; let vaultCreateCallbackState$module: | Promise | undefined; const vaultCreateCallbackState = (( ...args: Parameters< typeof import("../funcs/vaultCreateCallbackState.js").vaultCreateCallbackState > ) => new APIPromise( (vaultCreateCallbackState$module ??= import( "../funcs/vaultCreateCallbackState.js" ).catch((error: unknown) => { vaultCreateCallbackState$module = undefined; throw error; })).then((module) => module.vaultCreateCallbackState(...args).$inspect()), )) as typeof import("../funcs/vaultCreateCallbackState.js").vaultCreateCallbackState; export class CreateCallback extends ClientSDK { /** * Create Callback State * * @remarks * This endpoint creates a callback state that can be used to issue requests to the callback endpoint. * * Call it with your API key. For an application with `enforced` OAuth protection, a Vault session token (`x-apideck-auth-type: JWT`) gets a `401`, because a callback state skips the browser binding. */ async state( request: operations.VaultCreateCallbackStateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(vaultCreateCallbackState( this, request, options, )); } }