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";
import { CustomField } from "./customfield.js";
import { GeneralLedgerTransactionLineItem } from "./generalledgertransactionlineitem.js";
import { PassThroughBody } from "./passthroughbody.js";
/**
 * The originating transaction type that produced this posting in the general ledger. Discriminates whether the entry came from an invoice, a bill, a payment, a manual journal, etc. This is the key field that distinguishes general-ledger-transactions from journal-entries (which only covers manually-captured entries). May be `null` when the upstream connector did not return an origin discriminator (e.g. Xero's single-record endpoint strips `SourceType` for every record; certain historical records also omit it). To recover a populated value, query the list endpoint.
 */
export declare const GeneralLedgerTransactionSourceType: {
    readonly Other: "other";
    readonly Invoice: "invoice";
    readonly Bill: "bill";
    readonly CreditNote: "credit_note";
    readonly Payment: "payment";
    readonly Refund: "refund";
    readonly Expense: "expense";
    readonly JournalEntry: "journal_entry";
    readonly Payroll: "payroll";
};
/**
 * The originating transaction type that produced this posting in the general ledger. Discriminates whether the entry came from an invoice, a bill, a payment, a manual journal, etc. This is the key field that distinguishes general-ledger-transactions from journal-entries (which only covers manually-captured entries). May be `null` when the upstream connector did not return an origin discriminator (e.g. Xero's single-record endpoint strips `SourceType` for every record; certain historical records also omit it). To recover a populated value, query the list endpoint.
 */
export type GeneralLedgerTransactionSourceType = OpenEnum<typeof GeneralLedgerTransactionSourceType>;
export type GeneralLedgerTransaction = {
    /**
     * A unique identifier for an object.
     */
    id?: string | undefined;
    /**
     * The originating transaction type that produced this posting in the general ledger. Discriminates whether the entry came from an invoice, a bill, a payment, a manual journal, etc. This is the key field that distinguishes general-ledger-transactions from journal-entries (which only covers manually-captured entries). May be `null` when the upstream connector did not return an origin discriminator (e.g. Xero's single-record endpoint strips `SourceType` for every record; certain historical records also omit it). To recover a populated value, query the list endpoint.
     */
    sourceType: GeneralLedgerTransactionSourceType | null;
    /**
     * Identifier of the originating document in the vendor system. For example, when source_type is 'invoice', this is the id of the invoice that produced this posting. Use this id together with source_type to fetch the source document via its dedicated unified resource.
     */
    sourceId?: string | null | undefined;
    /**
     * The date on which the transaction was posted to the general ledger. This is the accounting date — it is what determines the period the transaction belongs to and can be earlier than the creation date for backdated postings.
     */
    postedAt?: Date | undefined;
    /**
     * Optional reference identifier for the transaction.
     */
    reference?: string | null | undefined;
    /**
     * Sequential number auto-assigned by the vendor system to the transaction (e.g. Xero JournalNumber). Unique per company.
     */
    number?: string | 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;
    /**
     * Currency Exchange Rate at the time entity was recorded/generated.
     */
    currencyRate?: number | null | undefined;
    /**
     * Free-text description at the header level. Typically populated when the transaction originates from a manual journal — for system-generated postings (invoice, payment, etc.) the source document carries the descriptive text.
     */
    memo?: string | null | undefined;
    /**
     * Lines of the transaction. Each line affects one ledger account with either a debit or a credit. The signed sum of net_amount across all lines must equal zero (double-entry invariant).
     */
    lineItems: Array<GeneralLedgerTransactionLineItem>;
    customFields?: Array<CustomField> | 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;
    /**
     * When custom mappings are configured on the resource, the result is included here.
     */
    customMappings?: {
        [k: string]: any;
    } | 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<PassThroughBody> | undefined;
};
/** @internal */
export declare const GeneralLedgerTransactionSourceType$inboundSchema: z.ZodType<GeneralLedgerTransactionSourceType, z.ZodTypeDef, unknown>;
/** @internal */
export declare const GeneralLedgerTransaction$inboundSchema: z.ZodType<GeneralLedgerTransaction, z.ZodTypeDef, unknown>;
export declare function generalLedgerTransactionFromJSON(jsonString: string): SafeParseResult<GeneralLedgerTransaction, SDKValidationError>;
//# sourceMappingURL=generalledgertransaction.d.ts.map