/* * 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 crmCustomObjectsList$module: | Promise | undefined; const crmCustomObjectsList = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectsList.js").crmCustomObjectsList > ) => new APIPromise( (crmCustomObjectsList$module ??= import( "../funcs/crmCustomObjectsList.js" ).catch((error: unknown) => { crmCustomObjectsList$module = undefined; throw error; })).then((module) => module.crmCustomObjectsList(...args).$inspect()), )) as typeof import("../funcs/crmCustomObjectsList.js").crmCustomObjectsList; let crmCustomObjectsCreate$module: | Promise | undefined; const crmCustomObjectsCreate = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectsCreate.js").crmCustomObjectsCreate > ) => new APIPromise( (crmCustomObjectsCreate$module ??= import( "../funcs/crmCustomObjectsCreate.js" ).catch((error: unknown) => { crmCustomObjectsCreate$module = undefined; throw error; })).then((module) => module.crmCustomObjectsCreate(...args).$inspect()), )) as typeof import("../funcs/crmCustomObjectsCreate.js").crmCustomObjectsCreate; let crmCustomObjectsGet$module: | Promise | undefined; const crmCustomObjectsGet = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectsGet.js").crmCustomObjectsGet > ) => new APIPromise( (crmCustomObjectsGet$module ??= import("../funcs/crmCustomObjectsGet.js") .catch((error: unknown) => { crmCustomObjectsGet$module = undefined; throw error; })).then((module) => module.crmCustomObjectsGet(...args).$inspect()), )) as typeof import("../funcs/crmCustomObjectsGet.js").crmCustomObjectsGet; let crmCustomObjectsUpdate$module: | Promise | undefined; const crmCustomObjectsUpdate = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectsUpdate.js").crmCustomObjectsUpdate > ) => new APIPromise( (crmCustomObjectsUpdate$module ??= import( "../funcs/crmCustomObjectsUpdate.js" ).catch((error: unknown) => { crmCustomObjectsUpdate$module = undefined; throw error; })).then((module) => module.crmCustomObjectsUpdate(...args).$inspect()), )) as typeof import("../funcs/crmCustomObjectsUpdate.js").crmCustomObjectsUpdate; let crmCustomObjectsDelete$module: | Promise | undefined; const crmCustomObjectsDelete = (( ...args: Parameters< typeof import("../funcs/crmCustomObjectsDelete.js").crmCustomObjectsDelete > ) => new APIPromise( (crmCustomObjectsDelete$module ??= import( "../funcs/crmCustomObjectsDelete.js" ).catch((error: unknown) => { crmCustomObjectsDelete$module = undefined; throw error; })).then((module) => module.crmCustomObjectsDelete(...args).$inspect()), )) as typeof import("../funcs/crmCustomObjectsDelete.js").crmCustomObjectsDelete; export class CustomObjects extends ClientSDK { /** * List custom objects * * @remarks * List custom objects */ async list( request: operations.CrmCustomObjectsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(crmCustomObjectsList( this, request, options, )); } /** * Create custom object * * @remarks * Create custom object */ async create( request: operations.CrmCustomObjectsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectsCreate( this, request, options, )); } /** * Get custom object * * @remarks * Get custom object */ async get( request: operations.CrmCustomObjectsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectsGet( this, request, options, )); } /** * Update custom object * * @remarks * Update custom object */ async update( request: operations.CrmCustomObjectsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectsUpdate( this, request, options, )); } /** * Delete custom object * * @remarks * Delete custom object */ async delete( request: operations.CrmCustomObjectsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(crmCustomObjectsDelete( this, request, options, )); } }