export interface QBRef { value: string; name?: string; } export interface QBError { Fault?: { Error?: Array<{ code?: string; Code?: string; message?: string; Message?: string; Detail?: string; detail?: string; }>; }; fault?: { error?: Array<{ code?: string; Code?: string; message?: string; Message?: string; Detail?: string; detail?: string; }>; }; } /** * Whether `error` carries a QuickBooks Fault anywhere reachable. * * Deliberately not a type predicate: the Fault is usually *not* on the error * itself. node-quickbooks rejects with the axios error, which leaves the Fault * at `response.data`, so narrowing the rejection to QBError would be a lie. * Detection is delegated to extractQboFault so every caller agrees on where a * Fault can hide. */ export declare function isQBError(error: unknown): boolean; export declare function extractQBErrorInfo(error: unknown): { code?: string; message?: string; detail?: string; }; export interface QBEntity { Id: string; SyncToken?: string; TxnDate?: string; DocNumber?: string; PrivateNote?: string; TotalAmt?: number; Line?: QBLine[]; } export interface QBLine { Id: string; Amount: number; Description?: string; DetailType: string; JournalEntryLineDetail?: { PostingType: string; AccountRef: QBRef; DepartmentRef?: QBRef; }; AccountBasedExpenseLineDetail?: { AccountRef: QBRef; DepartmentRef?: QBRef; }; DepositLineDetail?: { AccountRef?: QBRef; DepartmentRef?: QBRef; }; SalesItemLineDetail?: { ItemRef?: QBRef; Qty?: number; UnitPrice?: number; }; ItemBasedExpenseLineDetail?: { ItemRef: QBRef; Qty?: number; UnitPrice?: number; }; } export interface QBJournalEntry extends QBEntity { Line: Array; } export interface QBPurchase extends QBEntity { PaymentType: string; AccountRef?: QBRef; EntityRef?: QBRef & { type?: string; }; } export interface QBBill extends QBEntity { DueDate?: string; VendorRef: QBRef; APAccountRef?: QBRef; } export interface QBDeposit extends QBEntity { DepositToAccountRef?: QBRef; } export interface QBSalesReceipt extends QBEntity { DepositToAccountRef?: QBRef; DepartmentRef?: QBRef; } export interface QBPayment extends QBEntity { DepositToAccountRef?: QBRef; } export interface QBQueryResponse { QueryResponse?: { [key: string]: T[]; }; } export interface QBReportColData { value?: string; id?: string; } export interface QBReportRow { type?: string; group?: string; Header?: { ColData?: QBReportColData[]; }; Summary?: { ColData?: QBReportColData[]; }; ColData?: QBReportColData[]; Rows?: { Row?: QBReportRow[]; }; } export interface QBReport { Header?: { ReportName?: string; StartPeriod?: string; EndPeriod?: string; DateMacro?: string; ReportBasis?: string; Currency?: string; Option?: Array<{ Name: string; Value: string; }>; }; Columns?: { Column?: Array<{ ColTitle?: string; ColType?: string; }>; }; Rows?: { Row?: QBReportRow[]; }; } export interface TransactionLine { date: string; type: string; txnId: string; docNumber?: string; lineId: string; amount: number; description?: string; department?: string; qboLink: string; accountId: string; accountName: string; isMatchingLine: boolean; } //# sourceMappingURL=quickbooks.d.ts.map