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 { Address, Address$Outbound } from "./address.js";
import { BankAccount, BankAccount$Outbound } from "./bankaccount.js";
import { Currency } from "./currency.js";
import { CustomField, CustomField$Outbound } from "./customfield.js";
import { DeprecatedLinkedTrackingCategory, DeprecatedLinkedTrackingCategory$Outbound } from "./deprecatedlinkedtrackingcategory.js";
import { InvoiceLineItem, InvoiceLineItemInput, InvoiceLineItemInput$Outbound } from "./invoicelineitem.js";
import { LinkedCustomer } from "./linkedcustomer.js";
import { LinkedCustomerInput, LinkedCustomerInput$Outbound } from "./linkedcustomerinput.js";
import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js";
import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js";
import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js";
/**
 * Invoice type
 */
export declare const InvoiceType: {
    readonly Standard: "standard";
    readonly Credit: "credit";
    readonly Service: "service";
    readonly Product: "product";
    readonly Supplier: "supplier";
    readonly Other: "other";
};
/**
 * Invoice type
 */
export type InvoiceType = OpenEnum<typeof InvoiceType>;
/**
 * Invoice status
 */
export declare const InvoiceStatus: {
    readonly Draft: "draft";
    readonly Submitted: "submitted";
    readonly Authorised: "authorised";
    readonly PartiallyPaid: "partially_paid";
    readonly Paid: "paid";
    readonly Unpaid: "unpaid";
    readonly Void: "void";
    readonly Credit: "credit";
    readonly Deleted: "deleted";
    readonly Posted: "posted";
};
/**
 * Invoice status
 */
export type InvoiceStatus = OpenEnum<typeof InvoiceStatus>;
export type PaymentAllocations = {
    /**
     * ID of the payment
     */
    id?: string | undefined;
    /**
     * Amount of the payment allocated to the invoice
     */
    allocatedAmount?: number | null | undefined;
    /**
     * Date of the payment
     */
    date?: Date | null | undefined;
};
export type Invoice = {
    /**
     * 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;
    /**
     * Invoice type
     */
    type?: InvoiceType | null | undefined;
    /**
     * Invoice number.
     */
    number?: string | null | undefined;
    /**
     * The customer this entity is linked to.
     */
    customer?: LinkedCustomer | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the location
     */
    locationId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: string | null | undefined;
    /**
     * Date invoice was issued - YYYY-MM-DD.
     */
    invoiceDate?: Date | null | undefined;
    /**
     * The invoice due date is the date on which a payment or invoice is scheduled to be received by the seller - YYYY-MM-DD.
     */
    dueDate?: Date | null | undefined;
    /**
     * Terms of payment.
     */
    terms?: string | null | undefined;
    /**
     * The ID of the payment terms
     */
    termsId?: string | 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;
    /**
     * Invoice status
     */
    status?: InvoiceStatus | null | undefined;
    /**
     * Invoice sent to contact/customer.
     */
    invoiceSent?: boolean | 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;
    /**
     * Sub-total amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Total tax amount applied to this invoice.
     */
    totalTax?: number | null | undefined;
    /**
     * Applicable tax id/code override if tax is not supplied on a line item basis.
     */
    taxCode?: string | null | undefined;
    /**
     * Discount percentage applied to this invoice.
     */
    discountPercentage?: number | null | undefined;
    /**
     * Discount amount applied to this invoice.
     */
    discountAmount?: number | null | undefined;
    /**
     * Total amount of invoice, including tax.
     */
    total?: number | null | undefined;
    /**
     * Balance of invoice due.
     */
    balance?: number | null | undefined;
    /**
     * Amount of deposit made to this invoice.
     */
    deposit?: number | null | undefined;
    /**
     * Customer memo
     */
    customerMemo?: string | null | undefined;
    /**
     * @deprecated field: This field is deprecated and may be removed in a future version..
     */
    trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined;
    /**
     * A list of linked tracking categories.
     */
    trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
    lineItems?: Array<InvoiceLineItem> | undefined;
    billingAddress?: Address | undefined;
    shippingAddress?: Address | undefined;
    /**
     * Optional invoice template
     */
    templateId?: string | 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;
    /**
     * IDs of payments made on the invoice
     */
    paymentAllocations?: Array<PaymentAllocations> | 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;
    ledgerAccount?: LinkedLedgerAccount | null | undefined;
    /**
     * When custom mappings are configured on the resource, the result is included here.
     */
    customMappings?: {
        [k: string]: any;
    } | null | undefined;
    customFields?: Array<CustomField> | 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<PassThroughBody> | undefined;
};
export type InvoiceInput = {
    /**
     * Id to be displayed.
     */
    displayId?: string | null | undefined;
    /**
     * Invoice type
     */
    type?: InvoiceType | null | undefined;
    /**
     * Invoice number.
     */
    number?: string | null | undefined;
    /**
     * The customer this entity is linked to.
     */
    customer?: LinkedCustomerInput | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the location
     */
    locationId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: string | null | undefined;
    /**
     * Date invoice was issued - YYYY-MM-DD.
     */
    invoiceDate?: Date | null | undefined;
    /**
     * The invoice due date is the date on which a payment or invoice is scheduled to be received by the seller - YYYY-MM-DD.
     */
    dueDate?: Date | null | undefined;
    /**
     * Terms of payment.
     */
    terms?: string | null | undefined;
    /**
     * The ID of the payment terms
     */
    termsId?: string | 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;
    /**
     * Invoice status
     */
    status?: InvoiceStatus | null | undefined;
    /**
     * Invoice sent to contact/customer.
     */
    invoiceSent?: boolean | 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;
    /**
     * Sub-total amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Total tax amount applied to this invoice.
     */
    totalTax?: number | null | undefined;
    /**
     * Applicable tax id/code override if tax is not supplied on a line item basis.
     */
    taxCode?: string | null | undefined;
    /**
     * Discount percentage applied to this invoice.
     */
    discountPercentage?: number | null | undefined;
    /**
     * Discount amount applied to this invoice.
     */
    discountAmount?: number | null | undefined;
    /**
     * Total amount of invoice, including tax.
     */
    total?: number | null | undefined;
    /**
     * Balance of invoice due.
     */
    balance?: number | null | undefined;
    /**
     * Amount of deposit made to this invoice.
     */
    deposit?: number | null | undefined;
    /**
     * Customer memo
     */
    customerMemo?: string | null | undefined;
    /**
     * @deprecated field: This field is deprecated and may be removed in a future version..
     */
    trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined;
    /**
     * A list of linked tracking categories.
     */
    trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
    lineItems?: Array<InvoiceLineItemInput> | undefined;
    billingAddress?: Address | undefined;
    shippingAddress?: Address | undefined;
    /**
     * Optional invoice template
     */
    templateId?: string | 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;
    /**
     * IDs of payments made on the invoice
     */
    paymentAllocations?: Array<PaymentAllocations> | 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;
    ledgerAccount?: LinkedLedgerAccount | null | undefined;
    customFields?: Array<CustomField> | 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<PassThroughBody> | undefined;
};
/** @internal */
export declare const InvoiceType$inboundSchema: z.ZodType<InvoiceType, z.ZodTypeDef, unknown>;
/** @internal */
export declare const InvoiceType$outboundSchema: z.ZodType<string, z.ZodTypeDef, InvoiceType>;
/** @internal */
export declare const InvoiceStatus$inboundSchema: z.ZodType<InvoiceStatus, z.ZodTypeDef, unknown>;
/** @internal */
export declare const InvoiceStatus$outboundSchema: z.ZodType<string, z.ZodTypeDef, InvoiceStatus>;
/** @internal */
export declare const PaymentAllocations$inboundSchema: z.ZodType<PaymentAllocations, z.ZodTypeDef, unknown>;
/** @internal */
export type PaymentAllocations$Outbound = {
    id?: string | undefined;
    allocated_amount?: number | null | undefined;
    date?: string | null | undefined;
};
/** @internal */
export declare const PaymentAllocations$outboundSchema: z.ZodType<PaymentAllocations$Outbound, z.ZodTypeDef, PaymentAllocations>;
export declare function paymentAllocationsToJSON(paymentAllocations: PaymentAllocations): string;
export declare function paymentAllocationsFromJSON(jsonString: string): SafeParseResult<PaymentAllocations, SDKValidationError>;
/** @internal */
export declare const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown>;
export declare function invoiceFromJSON(jsonString: string): SafeParseResult<Invoice, SDKValidationError>;
/** @internal */
export type InvoiceInput$Outbound = {
    display_id?: string | null | undefined;
    type?: string | null | undefined;
    number?: string | null | undefined;
    customer?: LinkedCustomerInput$Outbound | null | undefined;
    company_id?: string | null | undefined;
    location_id?: string | null | undefined;
    department_id?: string | null | undefined;
    invoice_date?: string | null | undefined;
    due_date?: string | null | undefined;
    terms?: string | null | undefined;
    terms_id?: string | null | undefined;
    po_number?: string | null | undefined;
    reference?: string | null | undefined;
    status?: string | null | undefined;
    invoice_sent?: boolean | undefined;
    currency?: string | null | undefined;
    currency_rate?: number | null | undefined;
    tax_inclusive?: boolean | null | undefined;
    sub_total?: number | null | undefined;
    total_tax?: number | null | undefined;
    tax_code?: string | null | undefined;
    discount_percentage?: number | null | undefined;
    discount_amount?: number | null | undefined;
    total?: number | null | undefined;
    balance?: number | null | undefined;
    deposit?: number | null | undefined;
    customer_memo?: string | null | undefined;
    tracking_category?: DeprecatedLinkedTrackingCategory$Outbound | null | undefined;
    tracking_categories?: Array<LinkedTrackingCategory$Outbound | null> | null | undefined;
    line_items?: Array<InvoiceLineItemInput$Outbound> | undefined;
    billing_address?: Address$Outbound | undefined;
    shipping_address?: Address$Outbound | undefined;
    template_id?: string | null | undefined;
    source_document_url?: string | null | undefined;
    payment_allocations?: Array<PaymentAllocations$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;
    ledger_account?: LinkedLedgerAccount$Outbound | null | undefined;
    custom_fields?: Array<CustomField$Outbound> | undefined;
    row_version?: string | null | undefined;
    pass_through?: Array<PassThroughBody$Outbound> | undefined;
};
/** @internal */
export declare const InvoiceInput$outboundSchema: z.ZodType<InvoiceInput$Outbound, z.ZodTypeDef, InvoiceInput>;
export declare function invoiceInputToJSON(invoiceInput: InvoiceInput): string;
//# sourceMappingURL=invoice.d.ts.map