import * as z from "zod"; import { ClosedEnum } 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 { CustomMappings, CustomMappings$Outbound } from "./custommappings.js"; import { ExpenseLineItem, ExpenseLineItem$Outbound } from "./expenselineitem.js"; import { ExpenseLineItemInput, ExpenseLineItemInput$Outbound } from "./expenselineiteminput.js"; import { LinkedTaxRate, LinkedTaxRate$Outbound } from "./linkedtaxrate.js"; import { LinkedTaxRateInput, LinkedTaxRateInput$Outbound } from "./linkedtaxrateinput.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * The type of expense. */ export declare const ExpenseType: { readonly Expense: "expense"; readonly Refund: "refund"; }; /** * The type of expense. */ export type ExpenseType = ClosedEnum; export type Expense = { /** * A unique identifier for an object. */ id?: string | 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. */ accountId: string; /** * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. */ customerId?: string | undefined; /** * The ID of the supplier this entity is linked to. */ supplierId?: string | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; /** * The ID of the department this expense is linked to. */ departmentId?: string | 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; /** * The total amount of the expense line item. */ totalAmount?: number | null | undefined; /** * Expense line items linked to this expense. */ lineItems: Array; customFields?: Array | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | 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 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 = { /** * 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. */ accountId: string; /** * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers. */ customerId?: string | undefined; /** * The ID of the supplier this entity is linked to. */ supplierId?: string | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; /** * The ID of the department this expense is linked to. */ departmentId?: string | 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; /** * The total amount of the expense line item. */ totalAmount?: number | null | undefined; /** * Expense line items linked to this expense. */ lineItems: Array; 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 ExpenseType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ExpenseType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ExpenseType$ { /** @deprecated use `ExpenseType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Expense: "expense"; readonly Refund: "refund"; }>; /** @deprecated use `ExpenseType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Expense: "expense"; readonly Refund: "refund"; }>; } /** @internal */ export declare const Expense$inboundSchema: z.ZodType; /** @internal */ export type Expense$Outbound = { id?: string | undefined; number?: string | null | undefined; transaction_date: string | null; account_id: string; customer_id?: string | undefined; supplier_id?: string | undefined; company_id?: string | null | undefined; department_id?: string | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; type?: string | null | undefined; memo?: string | null | undefined; tax_rate?: LinkedTaxRate$Outbound | undefined; total_amount?: number | null | undefined; line_items: Array; custom_fields?: Array | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; updated_at?: string | null | undefined; created_at?: string | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const Expense$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Expense$ { /** @deprecated use `Expense$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Expense$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Expense$Outbound` instead. */ type Outbound = Expense$Outbound; } export declare function expenseToJSON(expense: Expense): string; export declare function expenseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ExpenseInput$inboundSchema: z.ZodType; /** @internal */ export type ExpenseInput$Outbound = { number?: string | null | undefined; transaction_date: string | null; account_id: string; customer_id?: string | undefined; supplier_id?: string | undefined; company_id?: string | null | undefined; department_id?: string | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; type?: string | null | undefined; memo?: string | null | undefined; tax_rate?: LinkedTaxRateInput$Outbound | undefined; total_amount?: number | null | undefined; line_items: Array; custom_fields?: Array | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const ExpenseInput$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ExpenseInput$ { /** @deprecated use `ExpenseInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ExpenseInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ExpenseInput$Outbound` instead. */ type Outbound = ExpenseInput$Outbound; } export declare function expenseInputToJSON(expenseInput: ExpenseInput): string; export declare function expenseInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=expense.d.ts.map