/* * 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"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let crmCustomObjectSchemasList$module: | Promise | undefined; const crmCustomObjectSchemasList = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectSchemasList.js").crmCustomObjectSchemasList > ) => new APIPromise( (crmCustomObjectSchemasList$module ??= import( "../funcs/crmCustomObjectSchemasList.js" ).catch((error: unknown) => { crmCustomObjectSchemasList$module = undefined; throw error; })).then((module) => module.crmCustomObjectSchemasList(...args).$inspect() ), )) as typeof import("../funcs/crmCustomObjectSchemasList.js").crmCustomObjectSchemasList; let crmCustomObjectSchemasCreate$module: | Promise | undefined; const crmCustomObjectSchemasCreate = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectSchemasCreate.js").crmCustomObjectSchemasCreate > ) => new APIPromise( (crmCustomObjectSchemasCreate$module ??= import( "../funcs/crmCustomObjectSchemasCreate.js" ).catch((error: unknown) => { crmCustomObjectSchemasCreate$module = undefined; throw error; })).then((module) => module.crmCustomObjectSchemasCreate(...args).$inspect() ), )) as typeof import("../funcs/crmCustomObjectSchemasCreate.js").crmCustomObjectSchemasCreate; let crmCustomObjectSchemasGet$module: | Promise | undefined; const crmCustomObjectSchemasGet = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectSchemasGet.js").crmCustomObjectSchemasGet > ) => new APIPromise( (crmCustomObjectSchemasGet$module ??= import( "../funcs/crmCustomObjectSchemasGet.js" ).catch((error: unknown) => { crmCustomObjectSchemasGet$module = undefined; throw error; })).then((module) => module.crmCustomObjectSchemasGet(...args).$inspect() ), )) as typeof import("../funcs/crmCustomObjectSchemasGet.js").crmCustomObjectSchemasGet; let crmCustomObjectSchemasUpdate$module: | Promise | undefined; const crmCustomObjectSchemasUpdate = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectSchemasUpdate.js").crmCustomObjectSchemasUpdate > ) => new APIPromise( (crmCustomObjectSchemasUpdate$module ??= import( "../funcs/crmCustomObjectSchemasUpdate.js" ).catch((error: unknown) => { crmCustomObjectSchemasUpdate$module = undefined; throw error; })).then((module) => module.crmCustomObjectSchemasUpdate(...args).$inspect() ), )) as typeof import("../funcs/crmCustomObjectSchemasUpdate.js").crmCustomObjectSchemasUpdate; let crmCustomObjectSchemasDelete$module: | Promise | undefined; const crmCustomObjectSchemasDelete = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectSchemasDelete.js").crmCustomObjectSchemasDelete > ) => new APIPromise( (crmCustomObjectSchemasDelete$module ??= import( "../funcs/crmCustomObjectSchemasDelete.js" ).catch((error: unknown) => { crmCustomObjectSchemasDelete$module = undefined; throw error; })).then((module) => module.crmCustomObjectSchemasDelete(...args).$inspect() ), )) as typeof import("../funcs/crmCustomObjectSchemasDelete.js").crmCustomObjectSchemasDelete; export class CustomObjectSchemas extends ClientSDK { /** * List custom object schemas * * @remarks * List custom object schemas */ async list( request: operations.CrmCustomObjectSchemasAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.CrmCustomObjectSchemasAllResponse, { cursor: string } > > { return unwrapResultIterator(crmCustomObjectSchemasList( this, request, options, )); } /** * Create custom object schema * * @remarks * Create custom object schema */ async create( request: operations.CrmCustomObjectSchemasAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectSchemasCreate( this, request, options, )); } /** * Get custom object schema * * @remarks * Get custom object schema */ async get( request: operations.CrmCustomObjectSchemasOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectSchemasGet( this, request, options, )); } /** * Update custom object schema * * @remarks * Update custom object schema */ async update( request: operations.CrmCustomObjectSchemasUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectSchemasUpdate( this, request, options, )); } /** * Delete custom object schema * * @remarks * Delete custom object schema */ async delete( request: operations.CrmCustomObjectSchemasDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectSchemasDelete( this, request, options, )); } }