/* * 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 accountingProjectsList$module: | Promise | undefined; const accountingProjectsList = (( ...args: Parameters< typeof import("../funcs/accountingProjectsList.js").accountingProjectsList > ) => new APIPromise( (accountingProjectsList$module ??= import( "../funcs/accountingProjectsList.js" ).catch((error: unknown) => { accountingProjectsList$module = undefined; throw error; })).then((module) => module.accountingProjectsList(...args).$inspect()), )) as typeof import("../funcs/accountingProjectsList.js").accountingProjectsList; let accountingProjectsCreate$module: | Promise | undefined; const accountingProjectsCreate = (( ...args: Parameters< typeof import("../funcs/accountingProjectsCreate.js").accountingProjectsCreate > ) => new APIPromise( (accountingProjectsCreate$module ??= import( "../funcs/accountingProjectsCreate.js" ).catch((error: unknown) => { accountingProjectsCreate$module = undefined; throw error; })).then((module) => module.accountingProjectsCreate(...args).$inspect()), )) as typeof import("../funcs/accountingProjectsCreate.js").accountingProjectsCreate; let accountingProjectsGet$module: | Promise | undefined; const accountingProjectsGet = (( ...args: Parameters< typeof import("../funcs/accountingProjectsGet.js").accountingProjectsGet > ) => new APIPromise( (accountingProjectsGet$module ??= import( "../funcs/accountingProjectsGet.js" ).catch((error: unknown) => { accountingProjectsGet$module = undefined; throw error; })).then((module) => module.accountingProjectsGet(...args).$inspect()), )) as typeof import("../funcs/accountingProjectsGet.js").accountingProjectsGet; let accountingProjectsUpdate$module: | Promise | undefined; const accountingProjectsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingProjectsUpdate.js").accountingProjectsUpdate > ) => new APIPromise( (accountingProjectsUpdate$module ??= import( "../funcs/accountingProjectsUpdate.js" ).catch((error: unknown) => { accountingProjectsUpdate$module = undefined; throw error; })).then((module) => module.accountingProjectsUpdate(...args).$inspect()), )) as typeof import("../funcs/accountingProjectsUpdate.js").accountingProjectsUpdate; let accountingProjectsDelete$module: | Promise | undefined; const accountingProjectsDelete = (( ...args: Parameters< typeof import("../funcs/accountingProjectsDelete.js").accountingProjectsDelete > ) => new APIPromise( (accountingProjectsDelete$module ??= import( "../funcs/accountingProjectsDelete.js" ).catch((error: unknown) => { accountingProjectsDelete$module = undefined; throw error; })).then((module) => module.accountingProjectsDelete(...args).$inspect()), )) as typeof import("../funcs/accountingProjectsDelete.js").accountingProjectsDelete; export class Projects extends ClientSDK { /** * List projects * * @remarks * List projects */ async list( request: operations.AccountingProjectsAllRequest, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(accountingProjectsList( this, request, options, )); } /** * Create project * * @remarks * Create project */ async create( request: operations.AccountingProjectsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingProjectsCreate( this, request, options, )); } /** * Get project * * @remarks * Get project */ async get( request: operations.AccountingProjectsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingProjectsGet( this, request, options, )); } /** * Update project * * @remarks * Update project */ async update( request: operations.AccountingProjectsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingProjectsUpdate( this, request, options, )); } /** * Delete project * * @remarks * Delete project */ async delete( request: operations.AccountingProjectsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingProjectsDelete( this, request, options, )); } }