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 { BankAccount, BankAccount$Outbound } from "./bankaccount.js"; import { Currency } from "./currency.js"; import { CustomField, CustomField$Outbound } from "./customfield.js"; import { LinkedTaxRate } from "./linkedtaxrate.js"; import { LinkedTaxRateInput, LinkedTaxRateInput$Outbound } from "./linkedtaxrateinput.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * The classification of account. */ export declare const LedgerAccountClassification: { readonly Asset: "asset"; readonly Equity: "equity"; readonly Expense: "expense"; readonly Liability: "liability"; readonly Revenue: "revenue"; readonly Income: "income"; readonly OtherIncome: "other_income"; readonly OtherExpense: "other_expense"; readonly CostsOfSales: "costs_of_sales"; readonly Other: "other"; }; /** * The classification of account. */ export type LedgerAccountClassification = OpenEnum; /** * The type of account. */ export declare const LedgerAccountType: { readonly AccountsPayable: "accounts_payable"; readonly AccountsReceivable: "accounts_receivable"; readonly Balancesheet: "balancesheet"; readonly Bank: "bank"; readonly CostsOfSales: "costs_of_sales"; readonly CreditCard: "credit_card"; readonly CurrentAsset: "current_asset"; readonly CurrentLiability: "current_liability"; readonly Equity: "equity"; readonly Expense: "expense"; readonly FixedAsset: "fixed_asset"; readonly NonCurrentAsset: "non_current_asset"; readonly NonCurrentLiability: "non_current_liability"; readonly OtherAsset: "other_asset"; readonly OtherExpense: "other_expense"; readonly OtherIncome: "other_income"; readonly OtherLiability: "other_liability"; readonly Revenue: "revenue"; readonly Sales: "sales"; readonly Other: "other"; }; /** * The type of account. */ export type LedgerAccountType = OpenEnum; /** * The depreciation method of the assets, normalised across accounting systems: declining-balance variants (for example 150% or 200%) are all `declining_balance`, and the accounting system's own value is in `downstream_depreciation_method`. Set only when every asset recorded in the account uses the same method. */ export declare const DepreciationMethod: { readonly Other: "other"; readonly StraightLine: "straight_line"; readonly DecliningBalance: "declining_balance"; readonly None: "none"; }; /** * The depreciation method of the assets, normalised across accounting systems: declining-balance variants (for example 150% or 200%) are all `declining_balance`, and the accounting system's own value is in `downstream_depreciation_method`. Set only when every asset recorded in the account uses the same method. */ export type DepreciationMethod = OpenEnum; /** * For an account that holds the cost of fixed assets, the fixed-asset register's figures for the assets recorded in it. Null for other accounts, including accumulated-depreciation accounts, and when the accounting system does not provide them. */ export type FixedAsset = { /** * The total cost of the fixed assets recorded in the account. */ cost?: number | null | undefined; /** * The depreciation accumulated so far on the fixed assets recorded in the account, as a positive amount. */ accumulatedDepreciation?: number | null | undefined; /** * The date the assets were purchased - YYYY-MM-DD. Set only when every asset recorded in the account shares the same date. */ acquisitionDate?: Date | null | undefined; /** * The depreciation method of the assets, normalised across accounting systems: declining-balance variants (for example 150% or 200%) are all `declining_balance`, and the accounting system's own value is in `downstream_depreciation_method`. Set only when every asset recorded in the account uses the same method. */ depreciationMethod?: DepreciationMethod | null | undefined; /** * The depreciation method exactly as the accounting system names it, under the same condition as `depreciation_method`. */ downstreamDepreciationMethod?: string | null | undefined; /** * The useful life of the assets, in months. Set only when every asset recorded in the account has the same useful life. */ usefulLifeMonths?: number | null | undefined; }; /** * The status of the account. */ export declare const AccountStatus: { readonly Active: "active"; readonly Inactive: "inactive"; readonly Archived: "archived"; }; /** * The status of the account. */ export type AccountStatus = OpenEnum; export type Categories = { id?: string | undefined; /** * The name of the category. */ name?: string | undefined; }; export type ParentAccount = { /** * The ID of the parent account. */ id?: string | undefined; /** * The name of the parent account. */ name?: string | undefined; /** * The human readable display ID used when displaying the parent account */ displayId?: string | undefined; }; export type SubAccounts = { /** * The ID of the sub account. */ id?: string | undefined; /** * The name of the sub account. */ accountSubName?: string | undefined; }; export type LedgerAccountSubsidiaries = { /** * The ID of the subsidiary. */ id?: string | undefined; }; export type LedgerAccount = { /** * A unique identifier for an object. */ id?: string | undefined; /** * The human readable display ID used when displaying the account */ displayId?: string | undefined; /** * The nominal code of the ledger account. * * @deprecated field: This field is deprecated and may be removed in a future version.. */ nominalCode?: string | null | undefined; /** * The code assigned to the account. */ code?: string | null | undefined; /** * The classification of account. */ classification?: LedgerAccountClassification | null | undefined; /** * The type of account. */ type?: LedgerAccountType | undefined; /** * The sub type of account. */ subType?: string | null | undefined; /** * The name of the account. */ name?: string | null | undefined; /** * The fully qualified name of the account. */ fullyQualifiedName?: string | null | undefined; /** * The description of the account. */ description?: string | null | undefined; /** * The opening balance of the account. */ openingBalance?: number | null | undefined; /** * The current balance of the account. */ currentBalance?: number | null | undefined; /** * For an account that holds the cost of fixed assets, the fixed-asset register's figures for the assets recorded in it. Null for other accounts, including accumulated-depreciation accounts, and when the accounting system does not provide them. */ fixedAsset?: FixedAsset | null | undefined; /** * 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; /** * The tax type of the account. */ taxType?: string | null | undefined; taxRate?: LinkedTaxRate | undefined; level?: number | null | undefined; /** * Whether the account is active or not. */ active?: boolean | null | undefined; /** * The status of the account. */ status?: AccountStatus | null | undefined; /** * Whether the account is a header or not. */ header?: boolean | null | undefined; bankAccount?: BankAccount | undefined; /** * The categories of the account. */ categories?: Array | undefined; parentAccount?: ParentAccount | undefined; /** * Whether the account is a sub account or not. */ subAccount?: boolean | null | undefined; /** * The sub accounts of the account. */ subAccounts?: Array | undefined; /** * Reconciliation Date means the last calendar day of each Reconciliation Period. */ lastReconciliationDate?: Date | null | undefined; /** * The subsidiaries the account belongs to. */ subsidiaries?: Array | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: { [k: string]: any; } | null | undefined; customFields?: Array | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The user who last updated the object. */ updatedBy?: string | null | undefined; /** * The user who created the object. */ createdBy?: string | null | undefined; /** * The date and time when the object was last updated. */ updatedAt?: Date | null | undefined; /** * The date and time when the object was created. */ createdAt?: Date | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; export type LedgerAccountInput = { /** * The human readable display ID used when displaying the account */ displayId?: string | undefined; /** * The nominal code of the ledger account. * * @deprecated field: This field is deprecated and may be removed in a future version.. */ nominalCode?: string | null | undefined; /** * The code assigned to the account. */ code?: string | null | undefined; /** * The classification of account. */ classification?: LedgerAccountClassification | null | undefined; /** * The type of account. */ type?: LedgerAccountType | undefined; /** * The sub type of account. */ subType?: string | null | undefined; /** * The name of the account. */ name?: string | null | undefined; /** * The fully qualified name of the account. */ fullyQualifiedName?: string | null | undefined; /** * The description of the account. */ description?: string | null | undefined; /** * The opening balance of the account. */ openingBalance?: number | null | undefined; /** * The current balance of the account. */ currentBalance?: number | null | undefined; /** * 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; /** * The tax type of the account. */ taxType?: string | null | undefined; taxRate?: LinkedTaxRateInput | undefined; level?: number | null | undefined; /** * Whether the account is active or not. */ active?: boolean | null | undefined; /** * The status of the account. */ status?: AccountStatus | null | undefined; /** * Whether the account is a header or not. */ header?: boolean | null | undefined; bankAccount?: BankAccount | undefined; parentAccount?: ParentAccount | undefined; /** * Whether the account is a sub account or not. */ subAccount?: boolean | null | undefined; /** * Reconciliation Date means the last calendar day of each Reconciliation Period. */ lastReconciliationDate?: Date | null | undefined; /** * The subsidiaries the account belongs to. */ subsidiaries?: Array | undefined; customFields?: Array | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export declare const LedgerAccountClassification$inboundSchema: z.ZodType; /** @internal */ export declare const LedgerAccountClassification$outboundSchema: z.ZodType; /** @internal */ export declare const LedgerAccountType$inboundSchema: z.ZodType; /** @internal */ export declare const LedgerAccountType$outboundSchema: z.ZodType; /** @internal */ export declare const DepreciationMethod$inboundSchema: z.ZodType; /** @internal */ export declare const FixedAsset$inboundSchema: z.ZodType; export declare function fixedAssetFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AccountStatus$inboundSchema: z.ZodType; /** @internal */ export declare const AccountStatus$outboundSchema: z.ZodType; /** @internal */ export declare const Categories$inboundSchema: z.ZodType; export declare function categoriesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ParentAccount$inboundSchema: z.ZodType; /** @internal */ export type ParentAccount$Outbound = { id?: string | undefined; name?: string | undefined; display_id?: string | undefined; }; /** @internal */ export declare const ParentAccount$outboundSchema: z.ZodType; export declare function parentAccountToJSON(parentAccount: ParentAccount): string; export declare function parentAccountFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SubAccounts$inboundSchema: z.ZodType; export declare function subAccountsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LedgerAccountSubsidiaries$inboundSchema: z.ZodType; /** @internal */ export type LedgerAccountSubsidiaries$Outbound = { id?: string | undefined; }; /** @internal */ export declare const LedgerAccountSubsidiaries$outboundSchema: z.ZodType; export declare function ledgerAccountSubsidiariesToJSON(ledgerAccountSubsidiaries: LedgerAccountSubsidiaries): string; export declare function ledgerAccountSubsidiariesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const LedgerAccount$inboundSchema: z.ZodType; export declare function ledgerAccountFromJSON(jsonString: string): SafeParseResult; /** @internal */ export type LedgerAccountInput$Outbound = { display_id?: string | undefined; nominal_code?: string | null | undefined; code?: string | null | undefined; classification?: string | null | undefined; type?: string | undefined; sub_type?: string | null | undefined; name?: string | null | undefined; fully_qualified_name?: string | null | undefined; description?: string | null | undefined; opening_balance?: number | null | undefined; current_balance?: number | null | undefined; currency?: string | null | undefined; tax_type?: string | null | undefined; tax_rate?: LinkedTaxRateInput$Outbound | undefined; level?: number | null | undefined; active?: boolean | null | undefined; status?: string | null | undefined; header?: boolean | null | undefined; bank_account?: BankAccount$Outbound | undefined; parent_account?: ParentAccount$Outbound | undefined; sub_account?: boolean | null | undefined; last_reconciliation_date?: string | null | undefined; subsidiaries?: Array | undefined; custom_fields?: Array | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const LedgerAccountInput$outboundSchema: z.ZodType; export declare function ledgerAccountInputToJSON(ledgerAccountInput: LedgerAccountInput): string; //# sourceMappingURL=ledgeraccount.d.ts.map