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 { BillLineItem } from "./billlineitem.js"; import { BillLineItemInput, BillLineItemInput$Outbound } from "./billlineiteminput.js"; import { Currency } from "./currency.js"; import { CustomField, CustomField$Outbound } from "./customfield.js"; import { LinkedAttachment, LinkedAttachment$Outbound } from "./linkedattachment.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js"; import { LinkedPaymentAllocations, LinkedPaymentAllocations$Outbound } from "./linkedpaymentallocations.js"; import { LinkedSubsidiary } from "./linkedsubsidiary.js"; import { LinkedSubsidiaryInput, LinkedSubsidiaryInput$Outbound } from "./linkedsubsidiaryinput.js"; import { LinkedSupplier } from "./linkedsupplier.js"; import { LinkedSupplierInput, LinkedSupplierInput$Outbound } from "./linkedsupplierinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * Invoice status */ export declare const BillStatus: { readonly Draft: "draft"; readonly Submitted: "submitted"; readonly Authorised: "authorised"; readonly PartiallyPaid: "partially_paid"; readonly Paid: "paid"; readonly Void: "void"; readonly Credit: "credit"; readonly Deleted: "deleted"; readonly Posted: "posted"; }; /** * Invoice status */ export type BillStatus = OpenEnum; /** * Type of amortization */ export declare const AmortizationType: { readonly Manual: "manual"; readonly Receipt: "receipt"; readonly Schedule: "schedule"; readonly Other: "other"; }; /** * Type of amortization */ export type AmortizationType = OpenEnum; export type Bill = { /** * A unique identifier for an object. */ id?: string | undefined; /** * The third-party API ID of original entity */ downstreamId?: string | null | undefined; /** * Id to be displayed. */ displayId?: string | null | undefined; /** * Reference to supplier bill number */ billNumber?: string | null | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplier | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; subsidiary?: LinkedSubsidiary | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The ID of the department */ departmentId?: 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; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Date bill was issued - YYYY-MM-DD. */ billDate?: Date | null | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: Date | null | undefined; /** * The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD. */ paidDate?: Date | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional reference identifier for the transaction. */ reference?: string | null | undefined; lineItems?: Array | undefined; /** * Terms of payment. */ terms?: string | null | undefined; /** * The ID of the payment terms */ termsId?: string | null | undefined; /** * Balance of bill due. */ balance?: number | null | undefined; /** * Amount of deposit made to this bill. */ deposit?: number | null | undefined; /** * Subtotal amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this transaction. */ totalTax?: number | null | undefined; /** * Total amount of bill, including tax. */ total?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; notes?: string | null | undefined; /** * Invoice status */ status?: BillStatus | null | undefined; /** * Whether the bill is on payment hold. A bill on hold is not ready to pay, whatever its status. Not returned by connectors that do not report a payment hold. */ paymentHold?: boolean | null | undefined; ledgerAccount?: LinkedLedgerAccount | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * language code according to ISO 639-1. For the United States - EN */ language?: string | null | undefined; /** * Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row. */ accountingByRow?: boolean | null | undefined; bankAccount?: BankAccount | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | null | undefined; /** * Optional bill template */ templateId?: string | null | undefined; /** * The user who approved the bill */ approvedBy?: string | null | undefined; /** * Type of amortization */ amortizationType?: AmortizationType | null | undefined; /** * Method of tax calculation */ taxMethod?: string | null | undefined; /** * Whether the document has been received */ documentReceived?: boolean | null | undefined; /** * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. */ sourceDocumentUrl?: string | null | undefined; /** * A list of linked payment allocations. */ paymentAllocations?: Array | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | 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; /** * 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; customFields?: Array | 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 | undefined; /** * Accounting period */ accountingPeriod?: string | null | undefined; attachments?: Array | undefined; }; export type BillInput = { /** * Id to be displayed. */ displayId?: string | null | undefined; /** * Reference to supplier bill number */ billNumber?: string | null | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplierInput | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; subsidiary?: LinkedSubsidiaryInput | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The ID of the department */ departmentId?: 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; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Date bill was issued - YYYY-MM-DD. */ billDate?: Date | null | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: Date | null | undefined; /** * The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD. */ paidDate?: Date | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional reference identifier for the transaction. */ reference?: string | null | undefined; lineItems?: Array | undefined; /** * Terms of payment. */ terms?: string | null | undefined; /** * The ID of the payment terms */ termsId?: string | null | undefined; /** * Balance of bill due. */ balance?: number | null | undefined; /** * Amount of deposit made to this bill. */ deposit?: number | null | undefined; /** * Subtotal amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this transaction. */ totalTax?: number | null | undefined; /** * Total amount of bill, including tax. */ total?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; notes?: string | null | undefined; /** * Invoice status */ status?: BillStatus | null | undefined; ledgerAccount?: LinkedLedgerAccount | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * language code according to ISO 639-1. For the United States - EN */ language?: string | null | undefined; /** * Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row. */ accountingByRow?: boolean | null | undefined; bankAccount?: BankAccount | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | null | undefined; /** * Optional bill template */ templateId?: string | null | undefined; /** * The user who approved the bill */ approvedBy?: string | null | undefined; /** * Type of amortization */ amortizationType?: AmortizationType | null | undefined; /** * Method of tax calculation */ taxMethod?: string | null | undefined; /** * Whether the document has been received */ documentReceived?: boolean | null | undefined; /** * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. */ sourceDocumentUrl?: string | null | undefined; /** * A list of linked payment allocations. */ paymentAllocations?: Array | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | 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; customFields?: Array | 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; /** * Accounting period */ accountingPeriod?: string | null | undefined; attachments?: Array | undefined; }; /** @internal */ export declare const BillStatus$inboundSchema: z.ZodType; /** @internal */ export declare const BillStatus$outboundSchema: z.ZodType; /** @internal */ export declare const AmortizationType$inboundSchema: z.ZodType; /** @internal */ export declare const AmortizationType$outboundSchema: z.ZodType; /** @internal */ export declare const Bill$inboundSchema: z.ZodType; export declare function billFromJSON(jsonString: string): SafeParseResult; /** @internal */ export type BillInput$Outbound = { display_id?: string | null | undefined; bill_number?: string | null | undefined; supplier?: LinkedSupplierInput$Outbound | null | undefined; company_id?: string | null | undefined; subsidiary?: LinkedSubsidiaryInput$Outbound | null | undefined; location_id?: string | null | undefined; department_id?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; tax_inclusive?: boolean | null | undefined; bill_date?: string | null | undefined; due_date?: string | null | undefined; paid_date?: string | null | undefined; po_number?: string | null | undefined; reference?: string | null | undefined; line_items?: Array | undefined; terms?: string | null | undefined; terms_id?: string | null | undefined; balance?: number | null | undefined; deposit?: number | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total?: number | null | undefined; tax_code?: string | null | undefined; notes?: string | null | undefined; status?: string | null | undefined; ledger_account?: LinkedLedgerAccount$Outbound | null | undefined; payment_method?: string | null | undefined; channel?: string | null | undefined; language?: string | null | undefined; accounting_by_row?: boolean | null | undefined; bank_account?: BankAccount$Outbound | undefined; discount_percentage?: number | null | undefined; template_id?: string | null | undefined; approved_by?: string | null | undefined; amortization_type?: string | null | undefined; tax_method?: string | null | undefined; document_received?: boolean | null | undefined; source_document_url?: string | null | undefined; payment_allocations?: Array | null | undefined; tracking_categories?: Array | null | undefined; row_version?: string | null | undefined; custom_fields?: Array | undefined; pass_through?: Array | undefined; accounting_period?: string | null | undefined; attachments?: Array | undefined; }; /** @internal */ export declare const BillInput$outboundSchema: z.ZodType; export declare function billInputToJSON(billInput: BillInput): string; //# sourceMappingURL=bill.d.ts.map