/* * 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 { catchUnrecognizedEnum, OpenEnum, Unrecognized, } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of retirement contribution. */ export enum CashJournalScheduleType { TypeUnspecified = "TYPE_UNSPECIFIED", Regular = "REGULAR", Employee = "EMPLOYEE", Employer = "EMPLOYER", Recharacterization = "RECHARACTERIZATION", Rollover60Day = "ROLLOVER_60_DAY", RolloverDirect = "ROLLOVER_DIRECT", Transfer = "TRANSFER", TrusteeFee = "TRUSTEE_FEE", Conversion = "CONVERSION", Repayment = "REPAYMENT", ContributionNonReportable = "CONTRIBUTION_NON_REPORTABLE", } /** * The type of retirement contribution. */ export type CashJournalScheduleTypeOpen = OpenEnum< typeof CashJournalScheduleType >; /** * The retirement contribution info for a retirement account. This must be provided when the destination account is a retirement account */ export type CashJournalScheduleRetirementContribution = { /** * Tax year for which the contribution is applied. Current year is always valid; prior year is only valid before tax deadline. Must be in "YYYY" format. */ taxYear?: number | undefined; /** * The type of retirement contribution. */ type?: CashJournalScheduleTypeOpen | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * Percentage of total disbursement amount to withhold for taxes. */ export type CashJournalSchedulePercentage = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The federal tax withholding. */ export type CashJournalScheduleFederalTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: CashJournalSchedulePercentage | null | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type CashJournalScheduleRetirementDistributionAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * Percentage of total disbursement amount to withhold for taxes. */ export type CashJournalScheduleRetirementDistributionPercentage = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The state tax withholding. */ export type CashJournalScheduleStateTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: CashJournalScheduleRetirementDistributionAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: | CashJournalScheduleRetirementDistributionPercentage | null | undefined; }; /** * The type of retirement distribution. */ export enum CashJournalScheduleRetirementDistributionType { TypeUnspecified = "TYPE_UNSPECIFIED", Normal = "NORMAL", Disability = "DISABILITY", Sosepp = "SOSEPP", Premature = "PREMATURE", Death = "DEATH", ExcessContributionRemovalBeforeTaxDeadline = "EXCESS_CONTRIBUTION_REMOVAL_BEFORE_TAX_DEADLINE", ExcessContributionRemovalAfterTaxDeadline = "EXCESS_CONTRIBUTION_REMOVAL_AFTER_TAX_DEADLINE", RolloverToQualifiedPlan = "ROLLOVER_TO_QUALIFIED_PLAN", RolloverToIra = "ROLLOVER_TO_IRA", DistributionTransfer = "DISTRIBUTION_TRANSFER", RecharacterizationPriorYear = "RECHARACTERIZATION_PRIOR_YEAR", RecharacterizationCurrentYear = "RECHARACTERIZATION_CURRENT_YEAR", DistributionConversion = "DISTRIBUTION_CONVERSION", ManagementFee = "MANAGEMENT_FEE", PlanLoan401K = "PLAN_LOAN_401K", PrematureSimpleIraLessThan2Years = "PREMATURE_SIMPLE_IRA_LESS_THAN_2_YEARS", NormalRothIraGreaterThan5Years = "NORMAL_ROTH_IRA_GREATER_THAN_5_YEARS", NetIncomeAttributable = "NET_INCOME_ATTRIBUTABLE", Revocation = "REVOCATION", NonReportable = "NON_REPORTABLE", QualifiedCharitableDistribution = "QUALIFIED_CHARITABLE_DISTRIBUTION", } /** * The type of retirement distribution. */ export type CashJournalScheduleRetirementDistributionTypeOpen = OpenEnum< typeof CashJournalScheduleRetirementDistributionType >; /** * The retirement distribution info for a retirement account. This must be provided when the source account is a retirement account */ export type CashJournalScheduleRetirementDistribution = { /** * The federal tax withholding. */ federalTaxWithholding?: | CashJournalScheduleFederalTaxWithholding | null | undefined; /** * The institution receiving retirement funds when performing a transfer to an identical retirement account type at a different financial institution. This is required for check and wire withdrawals because we can't always identify the institution using the transfer instructions. For cash journals this value will default to "Apex Clearing", regardless of what is passed in here */ receivingInstitution?: string | undefined; /** * The state tax withholding. */ stateTaxWithholding?: | CashJournalScheduleStateTaxWithholding | null | undefined; /** * Whether or not this distribution has a state withholding waiver. */ stateWithholdingWaiver?: boolean | undefined; /** * Tax year for which the distribution is applied. */ taxYear?: number | undefined; /** * The type of retirement distribution. */ type?: CashJournalScheduleRetirementDistributionTypeOpen | undefined; }; /** * A cash amount in the format of decimal value (mutually exclusive with 'full_disbursement') */ export type CashJournalScheduleAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The schedule end date if there is a finite number of occurrences */ export type CashJournalScheduleEndDate = { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ day?: number | undefined; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ month?: number | undefined; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ year?: number | undefined; }; /** * The schedule start date */ export type CashJournalScheduleStartDate = { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ day?: number | undefined; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ month?: number | undefined; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ year?: number | undefined; }; /** * The state of the represented schedule */ export enum CashJournalScheduleState { Active = "ACTIVE", Canceled = "CANCELED", Completed = "COMPLETED", } /** * The state of the represented schedule */ export type CashJournalScheduleStateOpen = OpenEnum< typeof CashJournalScheduleState >; /** * The time unit used to calculate the interval between transfers. The time period between transfers in a scheduled series is the unit of time times the multiplier */ export enum CashJournalScheduleTimeUnit { Day = "DAY", Week = "WEEK", Month = "MONTH", } /** * The time unit used to calculate the interval between transfers. The time period between transfers in a scheduled series is the unit of time times the multiplier */ export type CashJournalScheduleTimeUnitOpen = OpenEnum< typeof CashJournalScheduleTimeUnit >; /** * Common schedule properties */ export type CashJournalScheduleScheduleProperties = { /** * The schedule end date if there is a finite number of occurrences */ endDate?: CashJournalScheduleEndDate | null | undefined; /** * The number of occurrences (empty or 0 indicates unlimited occurrences) */ occurrences?: number | undefined; /** * The schedule start date */ startDate?: CashJournalScheduleStartDate | null | undefined; /** * The state of the represented schedule */ state?: CashJournalScheduleStateOpen | undefined; /** * The time unit used to calculate the interval between transfers. The time period between transfers in a scheduled series is the unit of time times the multiplier */ timeUnit?: CashJournalScheduleTimeUnitOpen | undefined; /** * The multiplier used to determine the length of the interval between transfers. The time period between transfers in a scheduled series is the unit of time times the multiplier */ unitMultiplier?: number | undefined; }; /** * The schedule details. This uses the WithdrawalScheduleDetails object in order to also support full disbursement journals. The source_account is the account debited and would be completely drawn down when schedule_details.full_disbursement == true */ export type CashJournalScheduleScheduleDetails = { /** * A cash amount in the format of decimal value (mutually exclusive with 'full_disbursement') */ amount?: CashJournalScheduleAmount | null | undefined; /** * External identifier supplied by the API caller. Each request must have a unique pairing of client_schedule_id and account */ clientScheduleId?: string | undefined; /** * Flag to indicate a full disbursement transfer (mutually exclusive with 'amount') */ fullDisbursement?: boolean | undefined; /** * Common schedule properties */ scheduleProperties?: CashJournalScheduleScheduleProperties | null | undefined; }; /** * A Cash Journal transfer schedule */ export type CashJournalSchedule = { /** * The destination account for the Cash Journal */ destinationAccount?: string | undefined; /** * The name of the Cash Journal transfer schedule */ name?: string | undefined; /** * The retirement contribution info for a retirement account. This must be provided when the destination account is a retirement account */ retirementContribution?: | CashJournalScheduleRetirementContribution | null | undefined; /** * The retirement distribution info for a retirement account. This must be provided when the source account is a retirement account */ retirementDistribution?: | CashJournalScheduleRetirementDistribution | null | undefined; /** * The schedule details. This uses the WithdrawalScheduleDetails object in order to also support full disbursement journals. The source_account is the account debited and would be completely drawn down when schedule_details.full_disbursement == true */ scheduleDetails?: CashJournalScheduleScheduleDetails | null | undefined; /** * The source account for the Cash Journal */ sourceAccount?: string | undefined; }; /** @internal */ export const CashJournalScheduleType$inboundSchema: z.ZodType< CashJournalScheduleTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CashJournalScheduleType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CashJournalScheduleType$outboundSchema: z.ZodType< CashJournalScheduleTypeOpen, z.ZodTypeDef, CashJournalScheduleTypeOpen > = z.union([ z.nativeEnum(CashJournalScheduleType), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleType$ { /** @deprecated use `CashJournalScheduleType$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleType$inboundSchema; /** @deprecated use `CashJournalScheduleType$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleType$outboundSchema; } /** @internal */ export const CashJournalScheduleRetirementContribution$inboundSchema: z.ZodType< CashJournalScheduleRetirementContribution, z.ZodTypeDef, unknown > = z.object({ tax_year: z.number().int().optional(), type: CashJournalScheduleType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tax_year": "taxYear", }); }); /** @internal */ export type CashJournalScheduleRetirementContribution$Outbound = { tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const CashJournalScheduleRetirementContribution$outboundSchema: z.ZodType< CashJournalScheduleRetirementContribution$Outbound, z.ZodTypeDef, CashJournalScheduleRetirementContribution > = z.object({ taxYear: z.number().int().optional(), type: CashJournalScheduleType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { taxYear: "tax_year", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementContribution$ { /** @deprecated use `CashJournalScheduleRetirementContribution$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementContribution$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementContribution$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementContribution$outboundSchema; /** @deprecated use `CashJournalScheduleRetirementContribution$Outbound` instead. */ export type Outbound = CashJournalScheduleRetirementContribution$Outbound; } export function cashJournalScheduleRetirementContributionToJSON( cashJournalScheduleRetirementContribution: CashJournalScheduleRetirementContribution, ): string { return JSON.stringify( CashJournalScheduleRetirementContribution$outboundSchema.parse( cashJournalScheduleRetirementContribution, ), ); } export function cashJournalScheduleRetirementContributionFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleRetirementContribution, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleRetirementContribution$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CashJournalScheduleRetirementContribution' from JSON`, ); } /** @internal */ export const CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound, z.ZodTypeDef, CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount > = z.object({ value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$ { /** @deprecated use `CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound` instead. */ export type Outbound = CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound; } export function cashJournalScheduleRetirementDistributionFederalTaxWithholdingAmountToJSON( cashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount: CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount, ): string { return JSON.stringify( CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema .parse( cashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount, ), ); } export function cashJournalScheduleRetirementDistributionFederalTaxWithholdingAmountFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount' from JSON`, ); } /** @internal */ export const CashJournalSchedulePercentage$inboundSchema: z.ZodType< CashJournalSchedulePercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CashJournalSchedulePercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const CashJournalSchedulePercentage$outboundSchema: z.ZodType< CashJournalSchedulePercentage$Outbound, z.ZodTypeDef, CashJournalSchedulePercentage > = z.object({ value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalSchedulePercentage$ { /** @deprecated use `CashJournalSchedulePercentage$inboundSchema` instead. */ export const inboundSchema = CashJournalSchedulePercentage$inboundSchema; /** @deprecated use `CashJournalSchedulePercentage$outboundSchema` instead. */ export const outboundSchema = CashJournalSchedulePercentage$outboundSchema; /** @deprecated use `CashJournalSchedulePercentage$Outbound` instead. */ export type Outbound = CashJournalSchedulePercentage$Outbound; } export function cashJournalSchedulePercentageToJSON( cashJournalSchedulePercentage: CashJournalSchedulePercentage, ): string { return JSON.stringify( CashJournalSchedulePercentage$outboundSchema.parse( cashJournalSchedulePercentage, ), ); } export function cashJournalSchedulePercentageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalSchedulePercentage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalSchedulePercentage' from JSON`, ); } /** @internal */ export const CashJournalScheduleFederalTaxWithholding$inboundSchema: z.ZodType< CashJournalScheduleFederalTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CashJournalSchedulePercentage$inboundSchema), ).optional(), }); /** @internal */ export type CashJournalScheduleFederalTaxWithholding$Outbound = { amount?: | CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound | null | undefined; percentage?: CashJournalSchedulePercentage$Outbound | null | undefined; }; /** @internal */ export const CashJournalScheduleFederalTaxWithholding$outboundSchema: z.ZodType< CashJournalScheduleFederalTaxWithholding$Outbound, z.ZodTypeDef, CashJournalScheduleFederalTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CashJournalSchedulePercentage$outboundSchema), ).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleFederalTaxWithholding$ { /** @deprecated use `CashJournalScheduleFederalTaxWithholding$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleFederalTaxWithholding$inboundSchema; /** @deprecated use `CashJournalScheduleFederalTaxWithholding$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleFederalTaxWithholding$outboundSchema; /** @deprecated use `CashJournalScheduleFederalTaxWithholding$Outbound` instead. */ export type Outbound = CashJournalScheduleFederalTaxWithholding$Outbound; } export function cashJournalScheduleFederalTaxWithholdingToJSON( cashJournalScheduleFederalTaxWithholding: CashJournalScheduleFederalTaxWithholding, ): string { return JSON.stringify( CashJournalScheduleFederalTaxWithholding$outboundSchema.parse( cashJournalScheduleFederalTaxWithholding, ), ); } export function cashJournalScheduleFederalTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleFederalTaxWithholding, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleFederalTaxWithholding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CashJournalScheduleFederalTaxWithholding' from JSON`, ); } /** @internal */ export const CashJournalScheduleRetirementDistributionAmount$inboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CashJournalScheduleRetirementDistributionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CashJournalScheduleRetirementDistributionAmount$outboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionAmount$Outbound, z.ZodTypeDef, CashJournalScheduleRetirementDistributionAmount > = z.object({ value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementDistributionAmount$ { /** @deprecated use `CashJournalScheduleRetirementDistributionAmount$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementDistributionAmount$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionAmount$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementDistributionAmount$outboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionAmount$Outbound` instead. */ export type Outbound = CashJournalScheduleRetirementDistributionAmount$Outbound; } export function cashJournalScheduleRetirementDistributionAmountToJSON( cashJournalScheduleRetirementDistributionAmount: CashJournalScheduleRetirementDistributionAmount, ): string { return JSON.stringify( CashJournalScheduleRetirementDistributionAmount$outboundSchema.parse( cashJournalScheduleRetirementDistributionAmount, ), ); } export function cashJournalScheduleRetirementDistributionAmountFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleRetirementDistributionAmount, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleRetirementDistributionAmount$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CashJournalScheduleRetirementDistributionAmount' from JSON`, ); } /** @internal */ export const CashJournalScheduleRetirementDistributionPercentage$inboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CashJournalScheduleRetirementDistributionPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const CashJournalScheduleRetirementDistributionPercentage$outboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionPercentage$Outbound, z.ZodTypeDef, CashJournalScheduleRetirementDistributionPercentage > = z.object({ value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementDistributionPercentage$ { /** @deprecated use `CashJournalScheduleRetirementDistributionPercentage$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementDistributionPercentage$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionPercentage$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementDistributionPercentage$outboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionPercentage$Outbound` instead. */ export type Outbound = CashJournalScheduleRetirementDistributionPercentage$Outbound; } export function cashJournalScheduleRetirementDistributionPercentageToJSON( cashJournalScheduleRetirementDistributionPercentage: CashJournalScheduleRetirementDistributionPercentage, ): string { return JSON.stringify( CashJournalScheduleRetirementDistributionPercentage$outboundSchema.parse( cashJournalScheduleRetirementDistributionPercentage, ), ); } export function cashJournalScheduleRetirementDistributionPercentageFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleRetirementDistributionPercentage, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleRetirementDistributionPercentage$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CashJournalScheduleRetirementDistributionPercentage' from JSON`, ); } /** @internal */ export const CashJournalScheduleStateTaxWithholding$inboundSchema: z.ZodType< CashJournalScheduleStateTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionAmount$inboundSchema), ).optional(), percentage: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionPercentage$inboundSchema ), ).optional(), }); /** @internal */ export type CashJournalScheduleStateTaxWithholding$Outbound = { amount?: | CashJournalScheduleRetirementDistributionAmount$Outbound | null | undefined; percentage?: | CashJournalScheduleRetirementDistributionPercentage$Outbound | null | undefined; }; /** @internal */ export const CashJournalScheduleStateTaxWithholding$outboundSchema: z.ZodType< CashJournalScheduleStateTaxWithholding$Outbound, z.ZodTypeDef, CashJournalScheduleStateTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistributionPercentage$outboundSchema ), ).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleStateTaxWithholding$ { /** @deprecated use `CashJournalScheduleStateTaxWithholding$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleStateTaxWithholding$inboundSchema; /** @deprecated use `CashJournalScheduleStateTaxWithholding$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleStateTaxWithholding$outboundSchema; /** @deprecated use `CashJournalScheduleStateTaxWithholding$Outbound` instead. */ export type Outbound = CashJournalScheduleStateTaxWithholding$Outbound; } export function cashJournalScheduleStateTaxWithholdingToJSON( cashJournalScheduleStateTaxWithholding: CashJournalScheduleStateTaxWithholding, ): string { return JSON.stringify( CashJournalScheduleStateTaxWithholding$outboundSchema.parse( cashJournalScheduleStateTaxWithholding, ), ); } export function cashJournalScheduleStateTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleStateTaxWithholding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleStateTaxWithholding' from JSON`, ); } /** @internal */ export const CashJournalScheduleRetirementDistributionType$inboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CashJournalScheduleRetirementDistributionType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CashJournalScheduleRetirementDistributionType$outboundSchema: z.ZodType< CashJournalScheduleRetirementDistributionTypeOpen, z.ZodTypeDef, CashJournalScheduleRetirementDistributionTypeOpen > = z.union([ z.nativeEnum(CashJournalScheduleRetirementDistributionType), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementDistributionType$ { /** @deprecated use `CashJournalScheduleRetirementDistributionType$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementDistributionType$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistributionType$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementDistributionType$outboundSchema; } /** @internal */ export const CashJournalScheduleRetirementDistribution$inboundSchema: z.ZodType< CashJournalScheduleRetirementDistribution, z.ZodTypeDef, unknown > = z.object({ federal_tax_withholding: z.nullable( z.lazy(() => CashJournalScheduleFederalTaxWithholding$inboundSchema), ).optional(), receiving_institution: z.string().optional(), state_tax_withholding: z.nullable( z.lazy(() => CashJournalScheduleStateTaxWithholding$inboundSchema), ).optional(), state_withholding_waiver: z.boolean().optional(), tax_year: z.number().int().optional(), type: CashJournalScheduleRetirementDistributionType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "federal_tax_withholding": "federalTaxWithholding", "receiving_institution": "receivingInstitution", "state_tax_withholding": "stateTaxWithholding", "state_withholding_waiver": "stateWithholdingWaiver", "tax_year": "taxYear", }); }); /** @internal */ export type CashJournalScheduleRetirementDistribution$Outbound = { federal_tax_withholding?: | CashJournalScheduleFederalTaxWithholding$Outbound | null | undefined; receiving_institution?: string | undefined; state_tax_withholding?: | CashJournalScheduleStateTaxWithholding$Outbound | null | undefined; state_withholding_waiver?: boolean | undefined; tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const CashJournalScheduleRetirementDistribution$outboundSchema: z.ZodType< CashJournalScheduleRetirementDistribution$Outbound, z.ZodTypeDef, CashJournalScheduleRetirementDistribution > = z.object({ federalTaxWithholding: z.nullable( z.lazy(() => CashJournalScheduleFederalTaxWithholding$outboundSchema), ).optional(), receivingInstitution: z.string().optional(), stateTaxWithholding: z.nullable( z.lazy(() => CashJournalScheduleStateTaxWithholding$outboundSchema), ).optional(), stateWithholdingWaiver: z.boolean().optional(), taxYear: z.number().int().optional(), type: CashJournalScheduleRetirementDistributionType$outboundSchema .optional(), }).transform((v) => { return remap$(v, { federalTaxWithholding: "federal_tax_withholding", receivingInstitution: "receiving_institution", stateTaxWithholding: "state_tax_withholding", stateWithholdingWaiver: "state_withholding_waiver", taxYear: "tax_year", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleRetirementDistribution$ { /** @deprecated use `CashJournalScheduleRetirementDistribution$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleRetirementDistribution$inboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistribution$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleRetirementDistribution$outboundSchema; /** @deprecated use `CashJournalScheduleRetirementDistribution$Outbound` instead. */ export type Outbound = CashJournalScheduleRetirementDistribution$Outbound; } export function cashJournalScheduleRetirementDistributionToJSON( cashJournalScheduleRetirementDistribution: CashJournalScheduleRetirementDistribution, ): string { return JSON.stringify( CashJournalScheduleRetirementDistribution$outboundSchema.parse( cashJournalScheduleRetirementDistribution, ), ); } export function cashJournalScheduleRetirementDistributionFromJSON( jsonString: string, ): SafeParseResult< CashJournalScheduleRetirementDistribution, SDKValidationError > { return safeParse( jsonString, (x) => CashJournalScheduleRetirementDistribution$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CashJournalScheduleRetirementDistribution' from JSON`, ); } /** @internal */ export const CashJournalScheduleAmount$inboundSchema: z.ZodType< CashJournalScheduleAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CashJournalScheduleAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CashJournalScheduleAmount$outboundSchema: z.ZodType< CashJournalScheduleAmount$Outbound, z.ZodTypeDef, CashJournalScheduleAmount > = z.object({ value: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleAmount$ { /** @deprecated use `CashJournalScheduleAmount$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleAmount$inboundSchema; /** @deprecated use `CashJournalScheduleAmount$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleAmount$outboundSchema; /** @deprecated use `CashJournalScheduleAmount$Outbound` instead. */ export type Outbound = CashJournalScheduleAmount$Outbound; } export function cashJournalScheduleAmountToJSON( cashJournalScheduleAmount: CashJournalScheduleAmount, ): string { return JSON.stringify( CashJournalScheduleAmount$outboundSchema.parse(cashJournalScheduleAmount), ); } export function cashJournalScheduleAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleAmount' from JSON`, ); } /** @internal */ export const CashJournalScheduleEndDate$inboundSchema: z.ZodType< CashJournalScheduleEndDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type CashJournalScheduleEndDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const CashJournalScheduleEndDate$outboundSchema: z.ZodType< CashJournalScheduleEndDate$Outbound, z.ZodTypeDef, CashJournalScheduleEndDate > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleEndDate$ { /** @deprecated use `CashJournalScheduleEndDate$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleEndDate$inboundSchema; /** @deprecated use `CashJournalScheduleEndDate$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleEndDate$outboundSchema; /** @deprecated use `CashJournalScheduleEndDate$Outbound` instead. */ export type Outbound = CashJournalScheduleEndDate$Outbound; } export function cashJournalScheduleEndDateToJSON( cashJournalScheduleEndDate: CashJournalScheduleEndDate, ): string { return JSON.stringify( CashJournalScheduleEndDate$outboundSchema.parse(cashJournalScheduleEndDate), ); } export function cashJournalScheduleEndDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleEndDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleEndDate' from JSON`, ); } /** @internal */ export const CashJournalScheduleStartDate$inboundSchema: z.ZodType< CashJournalScheduleStartDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type CashJournalScheduleStartDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const CashJournalScheduleStartDate$outboundSchema: z.ZodType< CashJournalScheduleStartDate$Outbound, z.ZodTypeDef, CashJournalScheduleStartDate > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleStartDate$ { /** @deprecated use `CashJournalScheduleStartDate$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleStartDate$inboundSchema; /** @deprecated use `CashJournalScheduleStartDate$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleStartDate$outboundSchema; /** @deprecated use `CashJournalScheduleStartDate$Outbound` instead. */ export type Outbound = CashJournalScheduleStartDate$Outbound; } export function cashJournalScheduleStartDateToJSON( cashJournalScheduleStartDate: CashJournalScheduleStartDate, ): string { return JSON.stringify( CashJournalScheduleStartDate$outboundSchema.parse( cashJournalScheduleStartDate, ), ); } export function cashJournalScheduleStartDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleStartDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleStartDate' from JSON`, ); } /** @internal */ export const CashJournalScheduleState$inboundSchema: z.ZodType< CashJournalScheduleStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CashJournalScheduleState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CashJournalScheduleState$outboundSchema: z.ZodType< CashJournalScheduleStateOpen, z.ZodTypeDef, CashJournalScheduleStateOpen > = z.union([ z.nativeEnum(CashJournalScheduleState), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleState$ { /** @deprecated use `CashJournalScheduleState$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleState$inboundSchema; /** @deprecated use `CashJournalScheduleState$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleState$outboundSchema; } /** @internal */ export const CashJournalScheduleTimeUnit$inboundSchema: z.ZodType< CashJournalScheduleTimeUnitOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CashJournalScheduleTimeUnit), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CashJournalScheduleTimeUnit$outboundSchema: z.ZodType< CashJournalScheduleTimeUnitOpen, z.ZodTypeDef, CashJournalScheduleTimeUnitOpen > = z.union([ z.nativeEnum(CashJournalScheduleTimeUnit), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleTimeUnit$ { /** @deprecated use `CashJournalScheduleTimeUnit$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleTimeUnit$inboundSchema; /** @deprecated use `CashJournalScheduleTimeUnit$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleTimeUnit$outboundSchema; } /** @internal */ export const CashJournalScheduleScheduleProperties$inboundSchema: z.ZodType< CashJournalScheduleScheduleProperties, z.ZodTypeDef, unknown > = z.object({ end_date: z.nullable(z.lazy(() => CashJournalScheduleEndDate$inboundSchema)) .optional(), occurrences: z.number().int().optional(), start_date: z.nullable( z.lazy(() => CashJournalScheduleStartDate$inboundSchema), ).optional(), state: CashJournalScheduleState$inboundSchema.optional(), time_unit: CashJournalScheduleTimeUnit$inboundSchema.optional(), unit_multiplier: z.number().int().optional(), }).transform((v) => { return remap$(v, { "end_date": "endDate", "start_date": "startDate", "time_unit": "timeUnit", "unit_multiplier": "unitMultiplier", }); }); /** @internal */ export type CashJournalScheduleScheduleProperties$Outbound = { end_date?: CashJournalScheduleEndDate$Outbound | null | undefined; occurrences?: number | undefined; start_date?: CashJournalScheduleStartDate$Outbound | null | undefined; state?: string | undefined; time_unit?: string | undefined; unit_multiplier?: number | undefined; }; /** @internal */ export const CashJournalScheduleScheduleProperties$outboundSchema: z.ZodType< CashJournalScheduleScheduleProperties$Outbound, z.ZodTypeDef, CashJournalScheduleScheduleProperties > = z.object({ endDate: z.nullable(z.lazy(() => CashJournalScheduleEndDate$outboundSchema)) .optional(), occurrences: z.number().int().optional(), startDate: z.nullable( z.lazy(() => CashJournalScheduleStartDate$outboundSchema), ).optional(), state: CashJournalScheduleState$outboundSchema.optional(), timeUnit: CashJournalScheduleTimeUnit$outboundSchema.optional(), unitMultiplier: z.number().int().optional(), }).transform((v) => { return remap$(v, { endDate: "end_date", startDate: "start_date", timeUnit: "time_unit", unitMultiplier: "unit_multiplier", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleScheduleProperties$ { /** @deprecated use `CashJournalScheduleScheduleProperties$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleScheduleProperties$inboundSchema; /** @deprecated use `CashJournalScheduleScheduleProperties$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleScheduleProperties$outboundSchema; /** @deprecated use `CashJournalScheduleScheduleProperties$Outbound` instead. */ export type Outbound = CashJournalScheduleScheduleProperties$Outbound; } export function cashJournalScheduleSchedulePropertiesToJSON( cashJournalScheduleScheduleProperties: CashJournalScheduleScheduleProperties, ): string { return JSON.stringify( CashJournalScheduleScheduleProperties$outboundSchema.parse( cashJournalScheduleScheduleProperties, ), ); } export function cashJournalScheduleSchedulePropertiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleScheduleProperties$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleScheduleProperties' from JSON`, ); } /** @internal */ export const CashJournalScheduleScheduleDetails$inboundSchema: z.ZodType< CashJournalScheduleScheduleDetails, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable(z.lazy(() => CashJournalScheduleAmount$inboundSchema)) .optional(), client_schedule_id: z.string().optional(), full_disbursement: z.boolean().optional(), schedule_properties: z.nullable( z.lazy(() => CashJournalScheduleScheduleProperties$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { "client_schedule_id": "clientScheduleId", "full_disbursement": "fullDisbursement", "schedule_properties": "scheduleProperties", }); }); /** @internal */ export type CashJournalScheduleScheduleDetails$Outbound = { amount?: CashJournalScheduleAmount$Outbound | null | undefined; client_schedule_id?: string | undefined; full_disbursement?: boolean | undefined; schedule_properties?: | CashJournalScheduleScheduleProperties$Outbound | null | undefined; }; /** @internal */ export const CashJournalScheduleScheduleDetails$outboundSchema: z.ZodType< CashJournalScheduleScheduleDetails$Outbound, z.ZodTypeDef, CashJournalScheduleScheduleDetails > = z.object({ amount: z.nullable(z.lazy(() => CashJournalScheduleAmount$outboundSchema)) .optional(), clientScheduleId: z.string().optional(), fullDisbursement: z.boolean().optional(), scheduleProperties: z.nullable( z.lazy(() => CashJournalScheduleScheduleProperties$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { clientScheduleId: "client_schedule_id", fullDisbursement: "full_disbursement", scheduleProperties: "schedule_properties", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalScheduleScheduleDetails$ { /** @deprecated use `CashJournalScheduleScheduleDetails$inboundSchema` instead. */ export const inboundSchema = CashJournalScheduleScheduleDetails$inboundSchema; /** @deprecated use `CashJournalScheduleScheduleDetails$outboundSchema` instead. */ export const outboundSchema = CashJournalScheduleScheduleDetails$outboundSchema; /** @deprecated use `CashJournalScheduleScheduleDetails$Outbound` instead. */ export type Outbound = CashJournalScheduleScheduleDetails$Outbound; } export function cashJournalScheduleScheduleDetailsToJSON( cashJournalScheduleScheduleDetails: CashJournalScheduleScheduleDetails, ): string { return JSON.stringify( CashJournalScheduleScheduleDetails$outboundSchema.parse( cashJournalScheduleScheduleDetails, ), ); } export function cashJournalScheduleScheduleDetailsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalScheduleScheduleDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalScheduleScheduleDetails' from JSON`, ); } /** @internal */ export const CashJournalSchedule$inboundSchema: z.ZodType< CashJournalSchedule, z.ZodTypeDef, unknown > = z.object({ destination_account: z.string().optional(), name: z.string().optional(), retirement_contribution: z.nullable( z.lazy(() => CashJournalScheduleRetirementContribution$inboundSchema), ).optional(), retirement_distribution: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistribution$inboundSchema), ).optional(), schedule_details: z.nullable( z.lazy(() => CashJournalScheduleScheduleDetails$inboundSchema), ).optional(), source_account: z.string().optional(), }).transform((v) => { return remap$(v, { "destination_account": "destinationAccount", "retirement_contribution": "retirementContribution", "retirement_distribution": "retirementDistribution", "schedule_details": "scheduleDetails", "source_account": "sourceAccount", }); }); /** @internal */ export type CashJournalSchedule$Outbound = { destination_account?: string | undefined; name?: string | undefined; retirement_contribution?: | CashJournalScheduleRetirementContribution$Outbound | null | undefined; retirement_distribution?: | CashJournalScheduleRetirementDistribution$Outbound | null | undefined; schedule_details?: | CashJournalScheduleScheduleDetails$Outbound | null | undefined; source_account?: string | undefined; }; /** @internal */ export const CashJournalSchedule$outboundSchema: z.ZodType< CashJournalSchedule$Outbound, z.ZodTypeDef, CashJournalSchedule > = z.object({ destinationAccount: z.string().optional(), name: z.string().optional(), retirementContribution: z.nullable( z.lazy(() => CashJournalScheduleRetirementContribution$outboundSchema), ).optional(), retirementDistribution: z.nullable( z.lazy(() => CashJournalScheduleRetirementDistribution$outboundSchema), ).optional(), scheduleDetails: z.nullable( z.lazy(() => CashJournalScheduleScheduleDetails$outboundSchema), ).optional(), sourceAccount: z.string().optional(), }).transform((v) => { return remap$(v, { destinationAccount: "destination_account", retirementContribution: "retirement_contribution", retirementDistribution: "retirement_distribution", scheduleDetails: "schedule_details", sourceAccount: "source_account", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CashJournalSchedule$ { /** @deprecated use `CashJournalSchedule$inboundSchema` instead. */ export const inboundSchema = CashJournalSchedule$inboundSchema; /** @deprecated use `CashJournalSchedule$outboundSchema` instead. */ export const outboundSchema = CashJournalSchedule$outboundSchema; /** @deprecated use `CashJournalSchedule$Outbound` instead. */ export type Outbound = CashJournalSchedule$Outbound; } export function cashJournalScheduleToJSON( cashJournalSchedule: CashJournalSchedule, ): string { return JSON.stringify( CashJournalSchedule$outboundSchema.parse(cashJournalSchedule), ); } export function cashJournalScheduleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CashJournalSchedule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CashJournalSchedule' from JSON`, ); }