/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Currency, Currency$inboundSchema, Currency$outboundSchema, } from "./currency.js"; import { CustomField, CustomField$inboundSchema, CustomField$Outbound, CustomField$outboundSchema, } from "./customfield.js"; import { CustomMappings, CustomMappings$inboundSchema, CustomMappings$Outbound, CustomMappings$outboundSchema, } from "./custommappings.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$inboundSchema, LinkedLedgerAccount$Outbound, LinkedLedgerAccount$outboundSchema, } from "./linkedledgeraccount.js"; import { LinkedLedgerAccountInput, LinkedLedgerAccountInput$inboundSchema, LinkedLedgerAccountInput$Outbound, LinkedLedgerAccountInput$outboundSchema, } from "./linkedledgeraccountinput.js"; import { LinkedSupplier, LinkedSupplier$inboundSchema, LinkedSupplier$Outbound, LinkedSupplier$outboundSchema, } from "./linkedsupplier.js"; import { LinkedSupplierInput, LinkedSupplierInput$inboundSchema, LinkedSupplierInput$Outbound, LinkedSupplierInput$outboundSchema, } from "./linkedsupplierinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$inboundSchema, LinkedTrackingCategory$Outbound, LinkedTrackingCategory$outboundSchema, } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$inboundSchema, PassThroughBody$Outbound, PassThroughBody$outboundSchema, } from "./passthroughbody.js"; import { PaymentStatus, PaymentStatus$inboundSchema, PaymentStatus$outboundSchema, } from "./paymentstatus.js"; /** * Type of payment */ export const BillPaymentType = { AccountsPayableCredit: "accounts_payable_credit", AccountsPayableOverpayment: "accounts_payable_overpayment", AccountsPayablePrepayment: "accounts_payable_prepayment", AccountsPayable: "accounts_payable", } as const; /** * Type of payment */ export type BillPaymentType = ClosedEnum; /** * Type of entity this payment should be attributed to. */ export const BillPaymentAllocationType = { Bill: "bill", Expense: "expense", CreditMemo: "credit_memo", OverPayment: "over_payment", PrePayment: "pre_payment", JournalEntry: "journal_entry", Other: "other", } as const; /** * Type of entity this payment should be attributed to. */ export type BillPaymentAllocationType = ClosedEnum< typeof BillPaymentAllocationType >; export type Allocations = { /** * A unique identifier for an object. */ id?: string | null | undefined; /** * Type of entity this payment should be attributed to. */ type?: BillPaymentAllocationType | 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 BillPayment = { /** * A unique identifier for an object. */ id: string; /** * The third-party API ID of original entity */ downstreamId?: 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; /** * The total amount of the transaction */ totalAmount: number | null; /** * Optional transaction reference message ie: Debit remittance detail. */ reference?: string | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Optional reference message returned by payment method on processing */ paymentMethodReference?: string | null | undefined; /** * A unique identifier for an object. */ paymentMethodId?: string | null | undefined; account?: LinkedLedgerAccount | null | undefined; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD */ transactionDate: Date | null; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplier | null | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; /** * Indicates if the transaction has been reconciled. */ reconciled?: boolean | null | undefined; /** * Status of payment */ status?: PaymentStatus | undefined; /** * Type of payment */ type?: BillPaymentType | undefined; allocations?: Array | undefined; /** * Note associated with the transaction */ note?: string | null | undefined; /** * Number associated with the transaction */ number?: string | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; 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; /** * Id to be displayed. */ displayId?: string | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | 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 created. */ createdAt?: Date | null | undefined; /** * The date and time when the object was last updated. */ updatedAt?: 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 | undefined; }; export type BillPaymentAllocations = { /** * A unique identifier for an object. */ id?: string | null | undefined; /** * Type of entity this payment should be attributed to. */ type?: BillPaymentAllocationType | 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 BillPaymentInput = { /** * 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 total amount of the transaction */ totalAmount: number | null; /** * Optional transaction reference message ie: Debit remittance detail. */ reference?: string | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Optional reference message returned by payment method on processing */ paymentMethodReference?: string | null | undefined; /** * A unique identifier for an object. */ paymentMethodId?: string | null | undefined; account?: LinkedLedgerAccountInput | null | undefined; /** * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD */ transactionDate: Date | null; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplierInput | null | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; /** * Indicates if the transaction has been reconciled. */ reconciled?: boolean | null | undefined; /** * Status of payment */ status?: PaymentStatus | undefined; /** * Type of payment */ type?: BillPaymentType | undefined; allocations?: Array | undefined; /** * Note associated with the transaction */ note?: string | null | undefined; /** * Number associated with the transaction */ number?: string | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; 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; /** * Id to be displayed. */ displayId?: 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 const BillPaymentType$inboundSchema: z.ZodNativeEnum< typeof BillPaymentType > = z.nativeEnum(BillPaymentType); /** @internal */ export const BillPaymentType$outboundSchema: z.ZodNativeEnum< typeof BillPaymentType > = BillPaymentType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BillPaymentType$ { /** @deprecated use `BillPaymentType$inboundSchema` instead. */ export const inboundSchema = BillPaymentType$inboundSchema; /** @deprecated use `BillPaymentType$outboundSchema` instead. */ export const outboundSchema = BillPaymentType$outboundSchema; } /** @internal */ export const BillPaymentAllocationType$inboundSchema: z.ZodNativeEnum< typeof BillPaymentAllocationType > = z.nativeEnum(BillPaymentAllocationType); /** @internal */ export const BillPaymentAllocationType$outboundSchema: z.ZodNativeEnum< typeof BillPaymentAllocationType > = BillPaymentAllocationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BillPaymentAllocationType$ { /** @deprecated use `BillPaymentAllocationType$inboundSchema` instead. */ export const inboundSchema = BillPaymentAllocationType$inboundSchema; /** @deprecated use `BillPaymentAllocationType$outboundSchema` instead. */ export const outboundSchema = BillPaymentAllocationType$outboundSchema; } /** @internal */ export const Allocations$inboundSchema: z.ZodType< Allocations, z.ZodTypeDef, unknown > = z.object({ id: z.nullable(z.string()).optional(), type: BillPaymentAllocationType$inboundSchema.optional(), code: z.string().optional(), amount: z.nullable(z.number()).optional(), allocation_id: z.string().optional(), }).transform((v) => { return remap$(v, { "allocation_id": "allocationId", }); }); /** @internal */ export type Allocations$Outbound = { id?: string | null | undefined; type?: string | undefined; code?: string | undefined; amount?: number | null | undefined; allocation_id?: string | undefined; }; /** @internal */ export const Allocations$outboundSchema: z.ZodType< Allocations$Outbound, z.ZodTypeDef, Allocations > = z.object({ id: z.nullable(z.string()).optional(), type: BillPaymentAllocationType$outboundSchema.optional(), code: z.string().optional(), amount: z.nullable(z.number()).optional(), allocationId: z.string().optional(), }).transform((v) => { return remap$(v, { allocationId: "allocation_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Allocations$ { /** @deprecated use `Allocations$inboundSchema` instead. */ export const inboundSchema = Allocations$inboundSchema; /** @deprecated use `Allocations$outboundSchema` instead. */ export const outboundSchema = Allocations$outboundSchema; /** @deprecated use `Allocations$Outbound` instead. */ export type Outbound = Allocations$Outbound; } export function allocationsToJSON(allocations: Allocations): string { return JSON.stringify(Allocations$outboundSchema.parse(allocations)); } export function allocationsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Allocations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Allocations' from JSON`, ); } /** @internal */ export const BillPayment$inboundSchema: z.ZodType< BillPayment, z.ZodTypeDef, unknown > = z.object({ id: z.string(), downstream_id: z.nullable(z.string()).optional(), currency: z.nullable(Currency$inboundSchema).optional(), currency_rate: z.nullable(z.number()).optional(), total_amount: z.nullable(z.number()), reference: z.nullable(z.string()).optional(), payment_method: z.nullable(z.string()).optional(), payment_method_reference: z.nullable(z.string()).optional(), payment_method_id: z.nullable(z.string()).optional(), account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(), transaction_date: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ), supplier: z.nullable(LinkedSupplier$inboundSchema).optional(), company_id: z.nullable(z.string()).optional(), reconciled: z.nullable(z.boolean()).optional(), status: PaymentStatus$inboundSchema.optional(), type: BillPaymentType$inboundSchema.optional(), allocations: z.array(z.lazy(() => Allocations$inboundSchema)).optional(), note: z.nullable(z.string()).optional(), number: z.nullable(z.string()).optional(), tracking_categories: z.nullable(z.array(LinkedTrackingCategory$inboundSchema)) .optional(), custom_fields: z.array(CustomField$inboundSchema).optional(), row_version: z.nullable(z.string()).optional(), display_id: z.nullable(z.string()).optional(), custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(), updated_by: z.nullable(z.string()).optional(), created_by: z.nullable(z.string()).optional(), created_at: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), updated_at: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), pass_through: z.array(PassThroughBody$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "downstream_id": "downstreamId", "currency_rate": "currencyRate", "total_amount": "totalAmount", "payment_method": "paymentMethod", "payment_method_reference": "paymentMethodReference", "payment_method_id": "paymentMethodId", "transaction_date": "transactionDate", "company_id": "companyId", "tracking_categories": "trackingCategories", "custom_fields": "customFields", "row_version": "rowVersion", "display_id": "displayId", "custom_mappings": "customMappings", "updated_by": "updatedBy", "created_by": "createdBy", "created_at": "createdAt", "updated_at": "updatedAt", "pass_through": "passThrough", }); }); /** @internal */ export type BillPayment$Outbound = { id: string; downstream_id?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; total_amount: number | null; reference?: string | null | undefined; payment_method?: string | null | undefined; payment_method_reference?: string | null | undefined; payment_method_id?: string | null | undefined; account?: LinkedLedgerAccount$Outbound | null | undefined; transaction_date: string | null; supplier?: LinkedSupplier$Outbound | null | undefined; company_id?: string | null | undefined; reconciled?: boolean | null | undefined; status?: string | undefined; type?: string | undefined; allocations?: Array | undefined; note?: string | null | undefined; number?: string | null | undefined; tracking_categories?: | Array | null | undefined; custom_fields?: Array | undefined; row_version?: string | null | undefined; display_id?: string | null | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; updated_by?: string | null | undefined; created_by?: string | null | undefined; created_at?: string | null | undefined; updated_at?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export const BillPayment$outboundSchema: z.ZodType< BillPayment$Outbound, z.ZodTypeDef, BillPayment > = z.object({ id: z.string(), downstreamId: z.nullable(z.string()).optional(), currency: z.nullable(Currency$outboundSchema).optional(), currencyRate: z.nullable(z.number()).optional(), totalAmount: z.nullable(z.number()), reference: z.nullable(z.string()).optional(), paymentMethod: z.nullable(z.string()).optional(), paymentMethodReference: z.nullable(z.string()).optional(), paymentMethodId: z.nullable(z.string()).optional(), account: z.nullable(LinkedLedgerAccount$outboundSchema).optional(), transactionDate: z.nullable(z.date().transform(v => v.toISOString())), supplier: z.nullable(LinkedSupplier$outboundSchema).optional(), companyId: z.nullable(z.string()).optional(), reconciled: z.nullable(z.boolean()).optional(), status: PaymentStatus$outboundSchema.optional(), type: BillPaymentType$outboundSchema.optional(), allocations: z.array(z.lazy(() => Allocations$outboundSchema)).optional(), note: z.nullable(z.string()).optional(), number: z.nullable(z.string()).optional(), trackingCategories: z.nullable(z.array(LinkedTrackingCategory$outboundSchema)) .optional(), customFields: z.array(CustomField$outboundSchema).optional(), rowVersion: z.nullable(z.string()).optional(), displayId: z.nullable(z.string()).optional(), customMappings: z.nullable(CustomMappings$outboundSchema).optional(), updatedBy: z.nullable(z.string()).optional(), createdBy: z.nullable(z.string()).optional(), createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), passThrough: z.array(PassThroughBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { downstreamId: "downstream_id", currencyRate: "currency_rate", totalAmount: "total_amount", paymentMethod: "payment_method", paymentMethodReference: "payment_method_reference", paymentMethodId: "payment_method_id", transactionDate: "transaction_date", companyId: "company_id", trackingCategories: "tracking_categories", customFields: "custom_fields", rowVersion: "row_version", displayId: "display_id", customMappings: "custom_mappings", updatedBy: "updated_by", createdBy: "created_by", createdAt: "created_at", updatedAt: "updated_at", passThrough: "pass_through", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BillPayment$ { /** @deprecated use `BillPayment$inboundSchema` instead. */ export const inboundSchema = BillPayment$inboundSchema; /** @deprecated use `BillPayment$outboundSchema` instead. */ export const outboundSchema = BillPayment$outboundSchema; /** @deprecated use `BillPayment$Outbound` instead. */ export type Outbound = BillPayment$Outbound; } export function billPaymentToJSON(billPayment: BillPayment): string { return JSON.stringify(BillPayment$outboundSchema.parse(billPayment)); } export function billPaymentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BillPayment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BillPayment' from JSON`, ); } /** @internal */ export const BillPaymentAllocations$inboundSchema: z.ZodType< BillPaymentAllocations, z.ZodTypeDef, unknown > = z.object({ id: z.nullable(z.string()).optional(), type: BillPaymentAllocationType$inboundSchema.optional(), amount: z.nullable(z.number()).optional(), allocation_id: z.string().optional(), }).transform((v) => { return remap$(v, { "allocation_id": "allocationId", }); }); /** @internal */ export type BillPaymentAllocations$Outbound = { id?: string | null | undefined; type?: string | undefined; amount?: number | null | undefined; allocation_id?: string | undefined; }; /** @internal */ export const BillPaymentAllocations$outboundSchema: z.ZodType< BillPaymentAllocations$Outbound, z.ZodTypeDef, BillPaymentAllocations > = z.object({ id: z.nullable(z.string()).optional(), type: BillPaymentAllocationType$outboundSchema.optional(), amount: z.nullable(z.number()).optional(), allocationId: z.string().optional(), }).transform((v) => { return remap$(v, { allocationId: "allocation_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BillPaymentAllocations$ { /** @deprecated use `BillPaymentAllocations$inboundSchema` instead. */ export const inboundSchema = BillPaymentAllocations$inboundSchema; /** @deprecated use `BillPaymentAllocations$outboundSchema` instead. */ export const outboundSchema = BillPaymentAllocations$outboundSchema; /** @deprecated use `BillPaymentAllocations$Outbound` instead. */ export type Outbound = BillPaymentAllocations$Outbound; } export function billPaymentAllocationsToJSON( billPaymentAllocations: BillPaymentAllocations, ): string { return JSON.stringify( BillPaymentAllocations$outboundSchema.parse(billPaymentAllocations), ); } export function billPaymentAllocationsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BillPaymentAllocations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BillPaymentAllocations' from JSON`, ); } /** @internal */ export const BillPaymentInput$inboundSchema: z.ZodType< BillPaymentInput, z.ZodTypeDef, unknown > = z.object({ currency: z.nullable(Currency$inboundSchema).optional(), currency_rate: z.nullable(z.number()).optional(), total_amount: z.nullable(z.number()), reference: z.nullable(z.string()).optional(), payment_method: z.nullable(z.string()).optional(), payment_method_reference: z.nullable(z.string()).optional(), payment_method_id: z.nullable(z.string()).optional(), account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(), transaction_date: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ), supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(), company_id: z.nullable(z.string()).optional(), reconciled: z.nullable(z.boolean()).optional(), status: PaymentStatus$inboundSchema.optional(), type: BillPaymentType$inboundSchema.optional(), allocations: z.array(z.lazy(() => BillPaymentAllocations$inboundSchema)) .optional(), note: z.nullable(z.string()).optional(), number: z.nullable(z.string()).optional(), tracking_categories: z.nullable(z.array(LinkedTrackingCategory$inboundSchema)) .optional(), custom_fields: z.array(CustomField$inboundSchema).optional(), row_version: z.nullable(z.string()).optional(), display_id: z.nullable(z.string()).optional(), pass_through: z.array(PassThroughBody$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "currency_rate": "currencyRate", "total_amount": "totalAmount", "payment_method": "paymentMethod", "payment_method_reference": "paymentMethodReference", "payment_method_id": "paymentMethodId", "transaction_date": "transactionDate", "company_id": "companyId", "tracking_categories": "trackingCategories", "custom_fields": "customFields", "row_version": "rowVersion", "display_id": "displayId", "pass_through": "passThrough", }); }); /** @internal */ export type BillPaymentInput$Outbound = { currency?: string | null | undefined; currency_rate?: number | null | undefined; total_amount: number | null; reference?: string | null | undefined; payment_method?: string | null | undefined; payment_method_reference?: string | null | undefined; payment_method_id?: string | null | undefined; account?: LinkedLedgerAccountInput$Outbound | null | undefined; transaction_date: string | null; supplier?: LinkedSupplierInput$Outbound | null | undefined; company_id?: string | null | undefined; reconciled?: boolean | null | undefined; status?: string | undefined; type?: string | undefined; allocations?: Array | undefined; note?: string | null | undefined; number?: string | null | undefined; tracking_categories?: | Array | null | undefined; custom_fields?: Array | undefined; row_version?: string | null | undefined; display_id?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export const BillPaymentInput$outboundSchema: z.ZodType< BillPaymentInput$Outbound, z.ZodTypeDef, BillPaymentInput > = z.object({ currency: z.nullable(Currency$outboundSchema).optional(), currencyRate: z.nullable(z.number()).optional(), totalAmount: z.nullable(z.number()), reference: z.nullable(z.string()).optional(), paymentMethod: z.nullable(z.string()).optional(), paymentMethodReference: z.nullable(z.string()).optional(), paymentMethodId: z.nullable(z.string()).optional(), account: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(), transactionDate: z.nullable(z.date().transform(v => v.toISOString())), supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(), companyId: z.nullable(z.string()).optional(), reconciled: z.nullable(z.boolean()).optional(), status: PaymentStatus$outboundSchema.optional(), type: BillPaymentType$outboundSchema.optional(), allocations: z.array(z.lazy(() => BillPaymentAllocations$outboundSchema)) .optional(), note: z.nullable(z.string()).optional(), number: z.nullable(z.string()).optional(), trackingCategories: z.nullable(z.array(LinkedTrackingCategory$outboundSchema)) .optional(), customFields: z.array(CustomField$outboundSchema).optional(), rowVersion: z.nullable(z.string()).optional(), displayId: z.nullable(z.string()).optional(), passThrough: z.array(PassThroughBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { currencyRate: "currency_rate", totalAmount: "total_amount", paymentMethod: "payment_method", paymentMethodReference: "payment_method_reference", paymentMethodId: "payment_method_id", transactionDate: "transaction_date", companyId: "company_id", trackingCategories: "tracking_categories", customFields: "custom_fields", rowVersion: "row_version", displayId: "display_id", passThrough: "pass_through", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BillPaymentInput$ { /** @deprecated use `BillPaymentInput$inboundSchema` instead. */ export const inboundSchema = BillPaymentInput$inboundSchema; /** @deprecated use `BillPaymentInput$outboundSchema` instead. */ export const outboundSchema = BillPaymentInput$outboundSchema; /** @deprecated use `BillPaymentInput$Outbound` instead. */ export type Outbound = BillPaymentInput$Outbound; } export function billPaymentInputToJSON( billPaymentInput: BillPaymentInput, ): string { return JSON.stringify( BillPaymentInput$outboundSchema.parse(billPaymentInput), ); } export function billPaymentInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BillPaymentInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BillPaymentInput' from JSON`, ); }