import * as z from "zod/v3"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Currency } from "./currency.js"; /** * `account`: a ledger account. `unappropriated_result`: the result of earlier fiscal years not yet posted to an equity account, added by the connector. `unmapped`: a balance the accounting system reports without a ledger account. */ export declare const LineType: { readonly Account: "account"; readonly UnappropriatedResult: "unappropriated_result"; readonly Unmapped: "unmapped"; }; /** * `account`: a ledger account. `unappropriated_result`: the result of earlier fiscal years not yet posted to an equity account, added by the connector. `unmapped`: a balance the accounting system reports without a ledger account. */ export type LineType = OpenEnum; export type Accounts = { /** * `account`: a ledger account. `unappropriated_result`: the result of earlier fiscal years not yet posted to an equity account, added by the connector. `unmapped`: a balance the accounting system reports without a ledger account. */ lineType?: LineType | undefined; /** * The ledger account's id, the same id `GET /accounting/ledger-accounts/{id}` takes. Null when `line_type` is not `account`, or when the connector cannot resolve the ledger account. */ accountId?: string | null | undefined; /** * The ledger account's code (account number). */ code?: string | null | undefined; /** * The ledger account's name. */ name?: string | null | undefined; /** * The account's balance when it is a debit balance, otherwise 0. */ debit: number; /** * The account's balance when it is a credit balance, otherwise 0. */ credit: number; /** * The signed balance: debit minus credit. */ balance?: number | null | undefined; }; /** * The balance of every ledger account as of a date, split into debit and credit columns. Balance sheet accounts are cumulative to `end_date`; income and expense accounts are year-to-date within the fiscal year that contains `end_date`. */ export type TrialBalance = { /** * The name of the report as returned by the connector. */ reportName?: string | null | undefined; /** * The date income and expense balances accumulate from: the start of the fiscal year containing `end_date`, unless the connector notes say otherwise. Null when the connector does not report it. */ startDate?: string | null | undefined; /** * The date the balances are reported as of. Connectors that only report per period round the requested date up to the end of its period; this field returns the date actually used. */ endDate: string; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * One line per ledger account with a non-zero balance, plus any line the connector adds to make the report complete (see `line_type`). */ accounts: Array; /** * The sum of the debit column. */ totalDebit?: number | null | undefined; /** * The sum of the credit column. Equals total_debit, up to rounding of the individual lines: connectors return a 502 rather than a report whose debits and credits differ by half a cent or more. */ totalCredit?: number | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: { [k: string]: any; } | null | undefined; }; /** @internal */ export declare const LineType$inboundSchema: z.ZodType; /** @internal */ export declare const Accounts$inboundSchema: z.ZodType; export declare function accountsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TrialBalance$inboundSchema: z.ZodType; export declare function trialBalanceFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=trialbalance.d.ts.map