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, CustomField$Outbound } from "./customfield.js"; import { ExpenseLineItem } from "./expenselineitem.js"; import { ExpenseLineItemInput, ExpenseLineItemInput$Outbound } from "./expenselineiteminput.js"; import { LinkedDepartment } from "./linkeddepartment.js"; import { LinkedDepartmentInput, LinkedDepartmentInput$Outbound } from "./linkeddepartmentinput.js"; import { LinkedFinancialAccount, LinkedFinancialAccountInput, LinkedFinancialAccountInput$Outbound } from "./linkedfinancialaccount.js"; import { LinkedLocation } from "./linkedlocation.js"; import { LinkedLocationInput, LinkedLocationInput$Outbound } from "./linkedlocationinput.js"; import { LinkedSupplier } from "./linkedsupplier.js"; import { LinkedSupplierInput, LinkedSupplierInput$Outbound } from "./linkedsupplierinput.js"; import { LinkedTaxRate } from "./linkedtaxrate.js"; import { LinkedTaxRateInput, LinkedTaxRateInput$Outbound } from "./linkedtaxrateinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * The type of payment for the expense. */ export declare const ExpensePaymentType: { readonly Cash: "cash"; readonly Check: "check"; readonly CreditCard: "credit_card"; readonly Other: "other"; }; /** * The type of payment for the expense. */ export type ExpensePaymentType = OpenEnum; /** * The type of expense. */ export declare const ExpenseType: { readonly Expense: "expense"; readonly Refund: "refund"; }; /** * The type of expense. */ export type ExpenseType = OpenEnum; /** * Expense status */ export declare const ExpenseStatus: { readonly Draft: "draft"; readonly Posted: "posted"; readonly Voided: "voided"; }; /** * Expense status */ export type ExpenseStatus = OpenEnum; export type Expense = { /** * A unique identifier for an object. */ id?: string | undefined; /** * Id to be displayed. */ displayId?: string | null | undefined; /** * Number. */ number?: string | null | undefined; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD */ transactionDate: Date | null; /** * The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. * * @deprecated field: Deprecated. Use account instead.. */ accountId?: string | undefined; /** * A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements. */ account?: LinkedFinancialAccount | null | undefined; /** * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. * * @deprecated field: Deprecated. Use supplier instead.. */ supplierId?: string | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplier | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; location?: LinkedLocation | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; department?: LinkedDepartment | null | undefined; /** * The type of payment for the expense. */ paymentType?: ExpensePaymentType | 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; /** * The type of expense. */ type?: ExpenseType | null | undefined; /** * The memo of the expense. */ memo?: string | null | undefined; taxRate?: LinkedTaxRate | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Subtotal amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this transaction. */ totalTax?: number | null | undefined; /** * The total amount of the expense line item. */ totalAmount?: number | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * Expense line items linked to this expense. */ lineItems: Array; /** * Optional reference identifier for the transaction. */ reference?: 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; customFields?: Array | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: { [k: string]: any; } | null | undefined; /** * Expense status */ status?: ExpenseStatus | 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; /** * The user who last updated the object. */ updatedBy?: string | null | undefined; /** * The user who created the object. */ createdBy?: 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; }; export type ExpenseInput = { /** * Id to be displayed. */ displayId?: string | null | undefined; /** * Number. */ number?: string | null | undefined; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD */ transactionDate: Date | null; /** * The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. * * @deprecated field: Deprecated. Use account instead.. */ accountId?: string | undefined; /** * A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements. */ account?: LinkedFinancialAccountInput | null | undefined; /** * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. * * @deprecated field: Deprecated. Use supplier instead.. */ supplierId?: string | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplierInput | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; location?: LinkedLocationInput | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; department?: LinkedDepartmentInput | null | undefined; /** * The type of payment for the expense. */ paymentType?: ExpensePaymentType | 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; /** * The type of expense. */ type?: ExpenseType | null | undefined; /** * The memo of the expense. */ memo?: string | null | undefined; taxRate?: LinkedTaxRateInput | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Subtotal amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this transaction. */ totalTax?: number | null | undefined; /** * The total amount of the expense line item. */ totalAmount?: number | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * Expense line items linked to this expense. */ lineItems: Array; /** * Optional reference identifier for the transaction. */ reference?: 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; customFields?: Array | undefined; /** * Expense status */ status?: ExpenseStatus | 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; /** * 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 ExpensePaymentType$inboundSchema: z.ZodType; /** @internal */ export declare const ExpensePaymentType$outboundSchema: z.ZodType; /** @internal */ export declare const ExpenseType$inboundSchema: z.ZodType; /** @internal */ export declare const ExpenseType$outboundSchema: z.ZodType; /** @internal */ export declare const ExpenseStatus$inboundSchema: z.ZodType; /** @internal */ export declare const ExpenseStatus$outboundSchema: z.ZodType; /** @internal */ export declare const Expense$inboundSchema: z.ZodType; export declare function expenseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export type ExpenseInput$Outbound = { display_id?: string | null | undefined; number?: string | null | undefined; transaction_date: string | null; account_id?: string | undefined; account?: LinkedFinancialAccountInput$Outbound | null | undefined; supplier_id?: string | undefined; supplier?: LinkedSupplierInput$Outbound | null | undefined; company_id?: string | null | undefined; location?: LinkedLocationInput$Outbound | null | undefined; department_id?: string | null | undefined; department?: LinkedDepartmentInput$Outbound | null | undefined; payment_type?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; type?: string | null | undefined; memo?: string | null | undefined; tax_rate?: LinkedTaxRateInput$Outbound | undefined; tax_inclusive?: boolean | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total_amount?: number | null | undefined; tracking_categories?: Array | null | undefined; line_items: Array; reference?: string | null | undefined; source_document_url?: string | null | undefined; custom_fields?: Array | undefined; status?: string | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const ExpenseInput$outboundSchema: z.ZodType; export declare function expenseInputToJSON(expenseInput: ExpenseInput): string; //# sourceMappingURL=expense.d.ts.map