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"; /** * Type of entity this payment should be attributed to. */ export declare const AllocationType: { readonly Invoice: "invoice"; readonly Order: "order"; readonly Expense: "expense"; readonly CreditMemo: "credit_memo"; readonly OverPayment: "over_payment"; readonly PrePayment: "pre_payment"; readonly JournalEntry: "journal_entry"; readonly Other: "other"; readonly Bill: "bill"; }; /** * Type of entity this payment should be attributed to. */ export type AllocationType = ClosedEnum; export type Allocation = { /** * Unique identifier of entity this payment should be attributed to. */ id?: string | undefined; /** * Type of entity this payment should be attributed to. */ type?: AllocationType | undefined; code?: string | undefined; /** * Amount of payment that should be attributed to this allocation. If null, the total_amount will be used. */ amount?: number | null | undefined; /** * Unique identifier of the allocation */ allocationId?: string | undefined; }; export type AllocationInput = { /** * Unique identifier of entity this payment should be attributed to. */ id?: string | undefined; /** * Type of entity this payment should be attributed to. */ type?: AllocationType | undefined; /** * Amount of payment that should be attributed to this allocation. If null, the total_amount will be used. */ amount?: number | null | undefined; /** * Unique identifier of the allocation */ allocationId?: string | undefined; }; /** @internal */ export declare const AllocationType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AllocationType$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 AllocationType$ { /** @deprecated use `AllocationType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Invoice: "invoice"; readonly Order: "order"; readonly Expense: "expense"; readonly CreditMemo: "credit_memo"; readonly OverPayment: "over_payment"; readonly PrePayment: "pre_payment"; readonly JournalEntry: "journal_entry"; readonly Other: "other"; readonly Bill: "bill"; }>; /** @deprecated use `AllocationType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Invoice: "invoice"; readonly Order: "order"; readonly Expense: "expense"; readonly CreditMemo: "credit_memo"; readonly OverPayment: "over_payment"; readonly PrePayment: "pre_payment"; readonly JournalEntry: "journal_entry"; readonly Other: "other"; readonly Bill: "bill"; }>; } /** @internal */ export declare const Allocation$inboundSchema: z.ZodType; /** @internal */ export type Allocation$Outbound = { id?: string | undefined; type?: string | undefined; code?: string | undefined; amount?: number | null | undefined; allocation_id?: string | undefined; }; /** @internal */ export declare const Allocation$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 Allocation$ { /** @deprecated use `Allocation$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Allocation$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Allocation$Outbound` instead. */ type Outbound = Allocation$Outbound; } export declare function allocationToJSON(allocation: Allocation): string; export declare function allocationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AllocationInput$inboundSchema: z.ZodType; /** @internal */ export type AllocationInput$Outbound = { id?: string | undefined; type?: string | undefined; amount?: number | null | undefined; allocation_id?: string | undefined; }; /** @internal */ export declare const AllocationInput$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 AllocationInput$ { /** @deprecated use `AllocationInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AllocationInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AllocationInput$Outbound` instead. */ type Outbound = AllocationInput$Outbound; } export declare function allocationInputToJSON(allocationInput: AllocationInput): string; export declare function allocationInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=allocation.d.ts.map