/* * 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 accountingExpenseCategoriesList$module: | Promise | undefined; const accountingExpenseCategoriesList = (( ...args: Parameters< typeof import("../funcs/accountingExpenseCategoriesList.js").accountingExpenseCategoriesList > ) => new APIPromise( (accountingExpenseCategoriesList$module ??= import( "../funcs/accountingExpenseCategoriesList.js" ).catch((error: unknown) => { accountingExpenseCategoriesList$module = undefined; throw error; })).then((module) => module.accountingExpenseCategoriesList(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseCategoriesList.js").accountingExpenseCategoriesList; let accountingExpenseCategoriesCreate$module: | Promise | undefined; const accountingExpenseCategoriesCreate = (( ...args: Parameters< typeof import("../funcs/accountingExpenseCategoriesCreate.js").accountingExpenseCategoriesCreate > ) => new APIPromise( (accountingExpenseCategoriesCreate$module ??= import( "../funcs/accountingExpenseCategoriesCreate.js" ).catch((error: unknown) => { accountingExpenseCategoriesCreate$module = undefined; throw error; })).then((module) => module.accountingExpenseCategoriesCreate(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseCategoriesCreate.js").accountingExpenseCategoriesCreate; let accountingExpenseCategoriesGet$module: | Promise | undefined; const accountingExpenseCategoriesGet = (( ...args: Parameters< typeof import("../funcs/accountingExpenseCategoriesGet.js").accountingExpenseCategoriesGet > ) => new APIPromise( (accountingExpenseCategoriesGet$module ??= import( "../funcs/accountingExpenseCategoriesGet.js" ).catch((error: unknown) => { accountingExpenseCategoriesGet$module = undefined; throw error; })).then((module) => module.accountingExpenseCategoriesGet(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseCategoriesGet.js").accountingExpenseCategoriesGet; let accountingExpenseCategoriesUpdate$module: | Promise | undefined; const accountingExpenseCategoriesUpdate = (( ...args: Parameters< typeof import("../funcs/accountingExpenseCategoriesUpdate.js").accountingExpenseCategoriesUpdate > ) => new APIPromise( (accountingExpenseCategoriesUpdate$module ??= import( "../funcs/accountingExpenseCategoriesUpdate.js" ).catch((error: unknown) => { accountingExpenseCategoriesUpdate$module = undefined; throw error; })).then((module) => module.accountingExpenseCategoriesUpdate(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseCategoriesUpdate.js").accountingExpenseCategoriesUpdate; let accountingExpenseCategoriesDelete$module: | Promise | undefined; const accountingExpenseCategoriesDelete = (( ...args: Parameters< typeof import("../funcs/accountingExpenseCategoriesDelete.js").accountingExpenseCategoriesDelete > ) => new APIPromise( (accountingExpenseCategoriesDelete$module ??= import( "../funcs/accountingExpenseCategoriesDelete.js" ).catch((error: unknown) => { accountingExpenseCategoriesDelete$module = undefined; throw error; })).then((module) => module.accountingExpenseCategoriesDelete(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseCategoriesDelete.js").accountingExpenseCategoriesDelete; export class ExpenseCategories extends ClientSDK { /** * List Expense Categories * * @remarks * List Expense Categories */ async list( request: operations.AccountingExpenseCategoriesAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingExpenseCategoriesAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingExpenseCategoriesList( this, request, options, )); } /** * Create Expense Category * * @remarks * Create Expense Category */ async create( request: operations.AccountingExpenseCategoriesAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseCategoriesCreate( this, request, options, )); } /** * Get Expense Category * * @remarks * Get Expense Category */ async get( request: operations.AccountingExpenseCategoriesOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseCategoriesGet( this, request, options, )); } /** * Update Expense Category * * @remarks * Update Expense Category */ async update( request: operations.AccountingExpenseCategoriesUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseCategoriesUpdate( this, request, options, )); } /** * Delete Expense Category * * @remarks * Delete Expense Category */ async delete( request: operations.AccountingExpenseCategoriesDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseCategoriesDelete( this, request, options, )); } }