/* * 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 accountingExpenseReportsList$module: | Promise | undefined; const accountingExpenseReportsList = (( ...args: Parameters< typeof import("../funcs/accountingExpenseReportsList.js").accountingExpenseReportsList > ) => new APIPromise( (accountingExpenseReportsList$module ??= import( "../funcs/accountingExpenseReportsList.js" ).catch((error: unknown) => { accountingExpenseReportsList$module = undefined; throw error; })).then((module) => module.accountingExpenseReportsList(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseReportsList.js").accountingExpenseReportsList; let accountingExpenseReportsCreate$module: | Promise | undefined; const accountingExpenseReportsCreate = (( ...args: Parameters< typeof import("../funcs/accountingExpenseReportsCreate.js").accountingExpenseReportsCreate > ) => new APIPromise( (accountingExpenseReportsCreate$module ??= import( "../funcs/accountingExpenseReportsCreate.js" ).catch((error: unknown) => { accountingExpenseReportsCreate$module = undefined; throw error; })).then((module) => module.accountingExpenseReportsCreate(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseReportsCreate.js").accountingExpenseReportsCreate; let accountingExpenseReportsGet$module: | Promise | undefined; const accountingExpenseReportsGet = (( ...args: Parameters< typeof import("../funcs/accountingExpenseReportsGet.js").accountingExpenseReportsGet > ) => new APIPromise( (accountingExpenseReportsGet$module ??= import( "../funcs/accountingExpenseReportsGet.js" ).catch((error: unknown) => { accountingExpenseReportsGet$module = undefined; throw error; })).then((module) => module.accountingExpenseReportsGet(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseReportsGet.js").accountingExpenseReportsGet; let accountingExpenseReportsUpdate$module: | Promise | undefined; const accountingExpenseReportsUpdate = (( ...args: Parameters< typeof import("../funcs/accountingExpenseReportsUpdate.js").accountingExpenseReportsUpdate > ) => new APIPromise( (accountingExpenseReportsUpdate$module ??= import( "../funcs/accountingExpenseReportsUpdate.js" ).catch((error: unknown) => { accountingExpenseReportsUpdate$module = undefined; throw error; })).then((module) => module.accountingExpenseReportsUpdate(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseReportsUpdate.js").accountingExpenseReportsUpdate; let accountingExpenseReportsDelete$module: | Promise | undefined; const accountingExpenseReportsDelete = (( ...args: Parameters< typeof import("../funcs/accountingExpenseReportsDelete.js").accountingExpenseReportsDelete > ) => new APIPromise( (accountingExpenseReportsDelete$module ??= import( "../funcs/accountingExpenseReportsDelete.js" ).catch((error: unknown) => { accountingExpenseReportsDelete$module = undefined; throw error; })).then((module) => module.accountingExpenseReportsDelete(...args).$inspect() ), )) as typeof import("../funcs/accountingExpenseReportsDelete.js").accountingExpenseReportsDelete; export class ExpenseReports extends ClientSDK { /** * List Expense Reports * * @remarks * List Expense Reports */ async list( request: operations.AccountingExpenseReportsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingExpenseReportsAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingExpenseReportsList( this, request, options, )); } /** * Create Expense Report * * @remarks * Create Expense Report */ async create( request: operations.AccountingExpenseReportsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseReportsCreate( this, request, options, )); } /** * Get Expense Report * * @remarks * Get Expense Report */ async get( request: operations.AccountingExpenseReportsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseReportsGet( this, request, options, )); } /** * Update Expense Report * * @remarks * Update Expense Report */ async update( request: operations.AccountingExpenseReportsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseReportsUpdate( this, request, options, )); } /** * Delete Expense Report * * @remarks * Delete Expense Report */ async delete( request: operations.AccountingExpenseReportsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingExpenseReportsDelete( this, request, options, )); } }