/* * 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"; /** * **Field Dependencies:** * * @remarks * * Address is required for third party beneficiaries * * Required if `third_party` is `true`. */ export type Address = { /** * Required: Describes the city in which the entity is located. */ city?: string | undefined; /** * Required: The country code used for geolocation, identity verification, and/or mail delivery purposes. */ country?: string | undefined; /** * Required: The postal code used for geolocation, identity verification, and/or mail delivery purposes. */ postalCode?: string | undefined; /** * Required: The state code used for geolocation, identity verification, and/or mail delivery purposes. */ state?: string | undefined; /** * The street name and number relating to a party's legal or mailing address. */ streetAddress?: Array | undefined; }; /** * The Beneficiary of funds */ export type CheckWithdrawalScheduleBeneficiary = { /** * **Field Dependencies:** * * @remarks * * Account title is required for third party beneficiaries * * Required if `third_party` is `true`. */ accountTitle?: string | undefined; /** * **Field Dependencies:** * * @remarks * * Address is required for third party beneficiaries * * Required if `third_party` is `true`. */ address?: Address | null | undefined; /** * Indicates if this beneficiary is a third party beneficiary. A check transfer is considered third party if the beneficiary is not the exact same person and/or entity that the funds originated from. This includes check transfers where the originator account is an individual account and the beneficiary account is a joint account */ thirdParty?: boolean | undefined; }; /** * The Delivery method of check withdrawal */ export enum CheckWithdrawalScheduleDeliveryMethod { DeliveryMethodUnspecified = "DELIVERY_METHOD_UNSPECIFIED", Standard = "STANDARD", Overnight = "OVERNIGHT", OvernightToApex = "OVERNIGHT_TO_APEX", } /** * The Delivery method of check withdrawal */ export type CheckWithdrawalScheduleDeliveryMethodOpen = OpenEnum< typeof CheckWithdrawalScheduleDeliveryMethod >; /** * Fixed USD amount to withhold for taxes. */ export type CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount = { /** * 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 CheckWithdrawalSchedulePercentage = { /** * 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 CheckWithdrawalScheduleFederalTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: CheckWithdrawalSchedulePercentage | null | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type CheckWithdrawalScheduleRetirementDistributionAmount = { /** * 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 CheckWithdrawalScheduleRetirementDistributionPercentage = { /** * 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 CheckWithdrawalScheduleStateTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | CheckWithdrawalScheduleRetirementDistributionAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: | CheckWithdrawalScheduleRetirementDistributionPercentage | null | undefined; }; /** * The type of retirement distribution. */ export enum CheckWithdrawalScheduleType { 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 CheckWithdrawalScheduleTypeOpen = OpenEnum< typeof CheckWithdrawalScheduleType >; /** * The distribution info for a retirement account */ export type CheckWithdrawalScheduleRetirementDistribution = { /** * The federal tax withholding. */ federalTaxWithholding?: | CheckWithdrawalScheduleFederalTaxWithholding | 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?: | CheckWithdrawalScheduleStateTaxWithholding | 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?: CheckWithdrawalScheduleTypeOpen | undefined; }; /** * A cash amount in the format of decimal value (mutually exclusive with 'full_disbursement') */ export type CheckWithdrawalScheduleAmount = { /** * 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 CheckWithdrawalScheduleEndDate = { /** * 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 CheckWithdrawalScheduleStartDate = { /** * 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 CheckWithdrawalScheduleState { Active = "ACTIVE", Canceled = "CANCELED", Completed = "COMPLETED", } /** * The state of the represented schedule */ export type CheckWithdrawalScheduleStateOpen = OpenEnum< typeof CheckWithdrawalScheduleState >; /** * 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 CheckWithdrawalScheduleTimeUnit { 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 CheckWithdrawalScheduleTimeUnitOpen = OpenEnum< typeof CheckWithdrawalScheduleTimeUnit >; /** * Common schedule properties */ export type CheckWithdrawalScheduleScheduleProperties = { /** * The schedule end date if there is a finite number of occurrences */ endDate?: CheckWithdrawalScheduleEndDate | null | undefined; /** * The number of occurrences (empty or 0 indicates unlimited occurrences) */ occurrences?: number | undefined; /** * The schedule start date */ startDate?: CheckWithdrawalScheduleStartDate | null | undefined; /** * The state of the represented schedule */ state?: CheckWithdrawalScheduleStateOpen | 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?: CheckWithdrawalScheduleTimeUnitOpen | 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 transfer schedule details */ export type CheckWithdrawalScheduleScheduleDetails = { /** * A cash amount in the format of decimal value (mutually exclusive with 'full_disbursement') */ amount?: CheckWithdrawalScheduleAmount | 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?: | CheckWithdrawalScheduleScheduleProperties | null | undefined; }; /** * A withdrawal transfer schedule using the Check mechanism */ export type CheckWithdrawalSchedule = { /** * The Beneficiary of funds */ beneficiary?: CheckWithdrawalScheduleBeneficiary | null | undefined; /** * The Delivery method of check withdrawal */ deliveryMethod?: CheckWithdrawalScheduleDeliveryMethodOpen | undefined; /** * Memos on the check. The max number of lines is 3, with max of 30 characters per line */ memos?: Array | undefined; /** * The name of the Check Withdrawal transfer schedule */ name?: string | undefined; /** * The distribution info for a retirement account */ retirementDistribution?: | CheckWithdrawalScheduleRetirementDistribution | null | undefined; /** * The transfer schedule details */ scheduleDetails?: CheckWithdrawalScheduleScheduleDetails | null | undefined; }; /** @internal */ export const Address$inboundSchema: z.ZodType = z.object({ city: z.string().optional(), country: z.string().optional(), postal_code: z.string().optional(), state: z.string().optional(), streetAddress: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "postal_code": "postalCode", }); }); /** @internal */ export type Address$Outbound = { city?: string | undefined; country?: string | undefined; postal_code?: string | undefined; state?: string | undefined; streetAddress?: Array | undefined; }; /** @internal */ export const Address$outboundSchema: z.ZodType< Address$Outbound, z.ZodTypeDef, Address > = z.object({ city: z.string().optional(), country: z.string().optional(), postalCode: z.string().optional(), state: z.string().optional(), streetAddress: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { postalCode: "postal_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Address$ { /** @deprecated use `Address$inboundSchema` instead. */ export const inboundSchema = Address$inboundSchema; /** @deprecated use `Address$outboundSchema` instead. */ export const outboundSchema = Address$outboundSchema; /** @deprecated use `Address$Outbound` instead. */ export type Outbound = Address$Outbound; } export function addressToJSON(address: Address): string { return JSON.stringify(Address$outboundSchema.parse(address)); } export function addressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Address$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Address' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleBeneficiary$inboundSchema: z.ZodType< CheckWithdrawalScheduleBeneficiary, z.ZodTypeDef, unknown > = z.object({ account_title: z.string().optional(), address: z.nullable(z.lazy(() => Address$inboundSchema)).optional(), third_party: z.boolean().optional(), }).transform((v) => { return remap$(v, { "account_title": "accountTitle", "third_party": "thirdParty", }); }); /** @internal */ export type CheckWithdrawalScheduleBeneficiary$Outbound = { account_title?: string | undefined; address?: Address$Outbound | null | undefined; third_party?: boolean | undefined; }; /** @internal */ export const CheckWithdrawalScheduleBeneficiary$outboundSchema: z.ZodType< CheckWithdrawalScheduleBeneficiary$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleBeneficiary > = z.object({ accountTitle: z.string().optional(), address: z.nullable(z.lazy(() => Address$outboundSchema)).optional(), thirdParty: z.boolean().optional(), }).transform((v) => { return remap$(v, { accountTitle: "account_title", thirdParty: "third_party", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckWithdrawalScheduleBeneficiary$ { /** @deprecated use `CheckWithdrawalScheduleBeneficiary$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleBeneficiary$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleBeneficiary$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleBeneficiary$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleBeneficiary$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleBeneficiary$Outbound; } export function checkWithdrawalScheduleBeneficiaryToJSON( checkWithdrawalScheduleBeneficiary: CheckWithdrawalScheduleBeneficiary, ): string { return JSON.stringify( CheckWithdrawalScheduleBeneficiary$outboundSchema.parse( checkWithdrawalScheduleBeneficiary, ), ); } export function checkWithdrawalScheduleBeneficiaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleBeneficiary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleBeneficiary' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleDeliveryMethod$inboundSchema: z.ZodType< CheckWithdrawalScheduleDeliveryMethodOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CheckWithdrawalScheduleDeliveryMethod), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CheckWithdrawalScheduleDeliveryMethod$outboundSchema: z.ZodType< CheckWithdrawalScheduleDeliveryMethodOpen, z.ZodTypeDef, CheckWithdrawalScheduleDeliveryMethodOpen > = z.union([ z.nativeEnum(CheckWithdrawalScheduleDeliveryMethod), 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 CheckWithdrawalScheduleDeliveryMethod$ { /** @deprecated use `CheckWithdrawalScheduleDeliveryMethod$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleDeliveryMethod$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleDeliveryMethod$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleDeliveryMethod$outboundSchema; } /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount > = 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 CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$ { /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound; } export function checkWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmountToJSON( checkWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount: CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount, ): string { return JSON.stringify( CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema .parse( checkWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount, ), ); } export function checkWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmountFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount' from JSON`, ); } /** @internal */ export const CheckWithdrawalSchedulePercentage$inboundSchema: z.ZodType< CheckWithdrawalSchedulePercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CheckWithdrawalSchedulePercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const CheckWithdrawalSchedulePercentage$outboundSchema: z.ZodType< CheckWithdrawalSchedulePercentage$Outbound, z.ZodTypeDef, CheckWithdrawalSchedulePercentage > = 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 CheckWithdrawalSchedulePercentage$ { /** @deprecated use `CheckWithdrawalSchedulePercentage$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalSchedulePercentage$inboundSchema; /** @deprecated use `CheckWithdrawalSchedulePercentage$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalSchedulePercentage$outboundSchema; /** @deprecated use `CheckWithdrawalSchedulePercentage$Outbound` instead. */ export type Outbound = CheckWithdrawalSchedulePercentage$Outbound; } export function checkWithdrawalSchedulePercentageToJSON( checkWithdrawalSchedulePercentage: CheckWithdrawalSchedulePercentage, ): string { return JSON.stringify( CheckWithdrawalSchedulePercentage$outboundSchema.parse( checkWithdrawalSchedulePercentage, ), ); } export function checkWithdrawalSchedulePercentageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalSchedulePercentage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalSchedulePercentage' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleFederalTaxWithholding$inboundSchema: z.ZodType< CheckWithdrawalScheduleFederalTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CheckWithdrawalSchedulePercentage$inboundSchema), ).optional(), }); /** @internal */ export type CheckWithdrawalScheduleFederalTaxWithholding$Outbound = { amount?: | CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$Outbound | null | undefined; percentage?: CheckWithdrawalSchedulePercentage$Outbound | null | undefined; }; /** @internal */ export const CheckWithdrawalScheduleFederalTaxWithholding$outboundSchema: z.ZodType< CheckWithdrawalScheduleFederalTaxWithholding$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleFederalTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionFederalTaxWithholdingAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CheckWithdrawalSchedulePercentage$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 CheckWithdrawalScheduleFederalTaxWithholding$ { /** @deprecated use `CheckWithdrawalScheduleFederalTaxWithholding$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleFederalTaxWithholding$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleFederalTaxWithholding$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleFederalTaxWithholding$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleFederalTaxWithholding$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleFederalTaxWithholding$Outbound; } export function checkWithdrawalScheduleFederalTaxWithholdingToJSON( checkWithdrawalScheduleFederalTaxWithholding: CheckWithdrawalScheduleFederalTaxWithholding, ): string { return JSON.stringify( CheckWithdrawalScheduleFederalTaxWithholding$outboundSchema.parse( checkWithdrawalScheduleFederalTaxWithholding, ), ); } export function checkWithdrawalScheduleFederalTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleFederalTaxWithholding, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleFederalTaxWithholding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CheckWithdrawalScheduleFederalTaxWithholding' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionAmount$inboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CheckWithdrawalScheduleRetirementDistributionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionAmount$outboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionAmount$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleRetirementDistributionAmount > = 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 CheckWithdrawalScheduleRetirementDistributionAmount$ { /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionAmount$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleRetirementDistributionAmount$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionAmount$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleRetirementDistributionAmount$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionAmount$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleRetirementDistributionAmount$Outbound; } export function checkWithdrawalScheduleRetirementDistributionAmountToJSON( checkWithdrawalScheduleRetirementDistributionAmount: CheckWithdrawalScheduleRetirementDistributionAmount, ): string { return JSON.stringify( CheckWithdrawalScheduleRetirementDistributionAmount$outboundSchema.parse( checkWithdrawalScheduleRetirementDistributionAmount, ), ); } export function checkWithdrawalScheduleRetirementDistributionAmountFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleRetirementDistributionAmount, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleRetirementDistributionAmount$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CheckWithdrawalScheduleRetirementDistributionAmount' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionPercentage$inboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CheckWithdrawalScheduleRetirementDistributionPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const CheckWithdrawalScheduleRetirementDistributionPercentage$outboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistributionPercentage$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleRetirementDistributionPercentage > = 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 CheckWithdrawalScheduleRetirementDistributionPercentage$ { /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionPercentage$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleRetirementDistributionPercentage$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionPercentage$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleRetirementDistributionPercentage$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistributionPercentage$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleRetirementDistributionPercentage$Outbound; } export function checkWithdrawalScheduleRetirementDistributionPercentageToJSON( checkWithdrawalScheduleRetirementDistributionPercentage: CheckWithdrawalScheduleRetirementDistributionPercentage, ): string { return JSON.stringify( CheckWithdrawalScheduleRetirementDistributionPercentage$outboundSchema .parse(checkWithdrawalScheduleRetirementDistributionPercentage), ); } export function checkWithdrawalScheduleRetirementDistributionPercentageFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleRetirementDistributionPercentage, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleRetirementDistributionPercentage$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleRetirementDistributionPercentage' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleStateTaxWithholding$inboundSchema: z.ZodType = z.object({ amount: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionPercentage$inboundSchema ), ).optional(), }); /** @internal */ export type CheckWithdrawalScheduleStateTaxWithholding$Outbound = { amount?: | CheckWithdrawalScheduleRetirementDistributionAmount$Outbound | null | undefined; percentage?: | CheckWithdrawalScheduleRetirementDistributionPercentage$Outbound | null | undefined; }; /** @internal */ export const CheckWithdrawalScheduleStateTaxWithholding$outboundSchema: z.ZodType< CheckWithdrawalScheduleStateTaxWithholding$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleStateTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistributionPercentage$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 CheckWithdrawalScheduleStateTaxWithholding$ { /** @deprecated use `CheckWithdrawalScheduleStateTaxWithholding$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleStateTaxWithholding$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleStateTaxWithholding$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleStateTaxWithholding$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleStateTaxWithholding$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleStateTaxWithholding$Outbound; } export function checkWithdrawalScheduleStateTaxWithholdingToJSON( checkWithdrawalScheduleStateTaxWithholding: CheckWithdrawalScheduleStateTaxWithholding, ): string { return JSON.stringify( CheckWithdrawalScheduleStateTaxWithholding$outboundSchema.parse( checkWithdrawalScheduleStateTaxWithholding, ), ); } export function checkWithdrawalScheduleStateTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleStateTaxWithholding, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleStateTaxWithholding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CheckWithdrawalScheduleStateTaxWithholding' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleType$inboundSchema: z.ZodType< CheckWithdrawalScheduleTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CheckWithdrawalScheduleType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CheckWithdrawalScheduleType$outboundSchema: z.ZodType< CheckWithdrawalScheduleTypeOpen, z.ZodTypeDef, CheckWithdrawalScheduleTypeOpen > = z.union([ z.nativeEnum(CheckWithdrawalScheduleType), 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 CheckWithdrawalScheduleType$ { /** @deprecated use `CheckWithdrawalScheduleType$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleType$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleType$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleType$outboundSchema; } /** @internal */ export const CheckWithdrawalScheduleRetirementDistribution$inboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistribution, z.ZodTypeDef, unknown > = z.object({ federal_tax_withholding: z.nullable( z.lazy(() => CheckWithdrawalScheduleFederalTaxWithholding$inboundSchema), ).optional(), receiving_institution: z.string().optional(), state_tax_withholding: z.nullable( z.lazy(() => CheckWithdrawalScheduleStateTaxWithholding$inboundSchema), ).optional(), state_withholding_waiver: z.boolean().optional(), tax_year: z.number().int().optional(), type: CheckWithdrawalScheduleType$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 CheckWithdrawalScheduleRetirementDistribution$Outbound = { federal_tax_withholding?: | CheckWithdrawalScheduleFederalTaxWithholding$Outbound | null | undefined; receiving_institution?: string | undefined; state_tax_withholding?: | CheckWithdrawalScheduleStateTaxWithholding$Outbound | null | undefined; state_withholding_waiver?: boolean | undefined; tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const CheckWithdrawalScheduleRetirementDistribution$outboundSchema: z.ZodType< CheckWithdrawalScheduleRetirementDistribution$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleRetirementDistribution > = z.object({ federalTaxWithholding: z.nullable( z.lazy(() => CheckWithdrawalScheduleFederalTaxWithholding$outboundSchema), ).optional(), receivingInstitution: z.string().optional(), stateTaxWithholding: z.nullable( z.lazy(() => CheckWithdrawalScheduleStateTaxWithholding$outboundSchema), ).optional(), stateWithholdingWaiver: z.boolean().optional(), taxYear: z.number().int().optional(), type: CheckWithdrawalScheduleType$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 CheckWithdrawalScheduleRetirementDistribution$ { /** @deprecated use `CheckWithdrawalScheduleRetirementDistribution$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleRetirementDistribution$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistribution$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleRetirementDistribution$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleRetirementDistribution$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleRetirementDistribution$Outbound; } export function checkWithdrawalScheduleRetirementDistributionToJSON( checkWithdrawalScheduleRetirementDistribution: CheckWithdrawalScheduleRetirementDistribution, ): string { return JSON.stringify( CheckWithdrawalScheduleRetirementDistribution$outboundSchema.parse( checkWithdrawalScheduleRetirementDistribution, ), ); } export function checkWithdrawalScheduleRetirementDistributionFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleRetirementDistribution, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleRetirementDistribution$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CheckWithdrawalScheduleRetirementDistribution' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleAmount$inboundSchema: z.ZodType< CheckWithdrawalScheduleAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CheckWithdrawalScheduleAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const CheckWithdrawalScheduleAmount$outboundSchema: z.ZodType< CheckWithdrawalScheduleAmount$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleAmount > = 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 CheckWithdrawalScheduleAmount$ { /** @deprecated use `CheckWithdrawalScheduleAmount$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleAmount$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleAmount$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleAmount$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleAmount$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleAmount$Outbound; } export function checkWithdrawalScheduleAmountToJSON( checkWithdrawalScheduleAmount: CheckWithdrawalScheduleAmount, ): string { return JSON.stringify( CheckWithdrawalScheduleAmount$outboundSchema.parse( checkWithdrawalScheduleAmount, ), ); } export function checkWithdrawalScheduleAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleAmount' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleEndDate$inboundSchema: z.ZodType< CheckWithdrawalScheduleEndDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type CheckWithdrawalScheduleEndDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const CheckWithdrawalScheduleEndDate$outboundSchema: z.ZodType< CheckWithdrawalScheduleEndDate$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleEndDate > = 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 CheckWithdrawalScheduleEndDate$ { /** @deprecated use `CheckWithdrawalScheduleEndDate$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleEndDate$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleEndDate$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleEndDate$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleEndDate$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleEndDate$Outbound; } export function checkWithdrawalScheduleEndDateToJSON( checkWithdrawalScheduleEndDate: CheckWithdrawalScheduleEndDate, ): string { return JSON.stringify( CheckWithdrawalScheduleEndDate$outboundSchema.parse( checkWithdrawalScheduleEndDate, ), ); } export function checkWithdrawalScheduleEndDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleEndDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleEndDate' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleStartDate$inboundSchema: z.ZodType< CheckWithdrawalScheduleStartDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type CheckWithdrawalScheduleStartDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const CheckWithdrawalScheduleStartDate$outboundSchema: z.ZodType< CheckWithdrawalScheduleStartDate$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleStartDate > = 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 CheckWithdrawalScheduleStartDate$ { /** @deprecated use `CheckWithdrawalScheduleStartDate$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleStartDate$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleStartDate$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleStartDate$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleStartDate$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleStartDate$Outbound; } export function checkWithdrawalScheduleStartDateToJSON( checkWithdrawalScheduleStartDate: CheckWithdrawalScheduleStartDate, ): string { return JSON.stringify( CheckWithdrawalScheduleStartDate$outboundSchema.parse( checkWithdrawalScheduleStartDate, ), ); } export function checkWithdrawalScheduleStartDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleStartDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleStartDate' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleState$inboundSchema: z.ZodType< CheckWithdrawalScheduleStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CheckWithdrawalScheduleState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CheckWithdrawalScheduleState$outboundSchema: z.ZodType< CheckWithdrawalScheduleStateOpen, z.ZodTypeDef, CheckWithdrawalScheduleStateOpen > = z.union([ z.nativeEnum(CheckWithdrawalScheduleState), 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 CheckWithdrawalScheduleState$ { /** @deprecated use `CheckWithdrawalScheduleState$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleState$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleState$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleState$outboundSchema; } /** @internal */ export const CheckWithdrawalScheduleTimeUnit$inboundSchema: z.ZodType< CheckWithdrawalScheduleTimeUnitOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(CheckWithdrawalScheduleTimeUnit), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const CheckWithdrawalScheduleTimeUnit$outboundSchema: z.ZodType< CheckWithdrawalScheduleTimeUnitOpen, z.ZodTypeDef, CheckWithdrawalScheduleTimeUnitOpen > = z.union([ z.nativeEnum(CheckWithdrawalScheduleTimeUnit), 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 CheckWithdrawalScheduleTimeUnit$ { /** @deprecated use `CheckWithdrawalScheduleTimeUnit$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleTimeUnit$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleTimeUnit$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleTimeUnit$outboundSchema; } /** @internal */ export const CheckWithdrawalScheduleScheduleProperties$inboundSchema: z.ZodType< CheckWithdrawalScheduleScheduleProperties, z.ZodTypeDef, unknown > = z.object({ end_date: z.nullable( z.lazy(() => CheckWithdrawalScheduleEndDate$inboundSchema), ).optional(), occurrences: z.number().int().optional(), start_date: z.nullable( z.lazy(() => CheckWithdrawalScheduleStartDate$inboundSchema), ).optional(), state: CheckWithdrawalScheduleState$inboundSchema.optional(), time_unit: CheckWithdrawalScheduleTimeUnit$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 CheckWithdrawalScheduleScheduleProperties$Outbound = { end_date?: CheckWithdrawalScheduleEndDate$Outbound | null | undefined; occurrences?: number | undefined; start_date?: CheckWithdrawalScheduleStartDate$Outbound | null | undefined; state?: string | undefined; time_unit?: string | undefined; unit_multiplier?: number | undefined; }; /** @internal */ export const CheckWithdrawalScheduleScheduleProperties$outboundSchema: z.ZodType< CheckWithdrawalScheduleScheduleProperties$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleScheduleProperties > = z.object({ endDate: z.nullable( z.lazy(() => CheckWithdrawalScheduleEndDate$outboundSchema), ).optional(), occurrences: z.number().int().optional(), startDate: z.nullable( z.lazy(() => CheckWithdrawalScheduleStartDate$outboundSchema), ).optional(), state: CheckWithdrawalScheduleState$outboundSchema.optional(), timeUnit: CheckWithdrawalScheduleTimeUnit$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 CheckWithdrawalScheduleScheduleProperties$ { /** @deprecated use `CheckWithdrawalScheduleScheduleProperties$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleScheduleProperties$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleScheduleProperties$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleScheduleProperties$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleScheduleProperties$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleScheduleProperties$Outbound; } export function checkWithdrawalScheduleSchedulePropertiesToJSON( checkWithdrawalScheduleScheduleProperties: CheckWithdrawalScheduleScheduleProperties, ): string { return JSON.stringify( CheckWithdrawalScheduleScheduleProperties$outboundSchema.parse( checkWithdrawalScheduleScheduleProperties, ), ); } export function checkWithdrawalScheduleSchedulePropertiesFromJSON( jsonString: string, ): SafeParseResult< CheckWithdrawalScheduleScheduleProperties, SDKValidationError > { return safeParse( jsonString, (x) => CheckWithdrawalScheduleScheduleProperties$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CheckWithdrawalScheduleScheduleProperties' from JSON`, ); } /** @internal */ export const CheckWithdrawalScheduleScheduleDetails$inboundSchema: z.ZodType< CheckWithdrawalScheduleScheduleDetails, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable(z.lazy(() => CheckWithdrawalScheduleAmount$inboundSchema)) .optional(), client_schedule_id: z.string().optional(), full_disbursement: z.boolean().optional(), schedule_properties: z.nullable( z.lazy(() => CheckWithdrawalScheduleScheduleProperties$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { "client_schedule_id": "clientScheduleId", "full_disbursement": "fullDisbursement", "schedule_properties": "scheduleProperties", }); }); /** @internal */ export type CheckWithdrawalScheduleScheduleDetails$Outbound = { amount?: CheckWithdrawalScheduleAmount$Outbound | null | undefined; client_schedule_id?: string | undefined; full_disbursement?: boolean | undefined; schedule_properties?: | CheckWithdrawalScheduleScheduleProperties$Outbound | null | undefined; }; /** @internal */ export const CheckWithdrawalScheduleScheduleDetails$outboundSchema: z.ZodType< CheckWithdrawalScheduleScheduleDetails$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleScheduleDetails > = z.object({ amount: z.nullable(z.lazy(() => CheckWithdrawalScheduleAmount$outboundSchema)) .optional(), clientScheduleId: z.string().optional(), fullDisbursement: z.boolean().optional(), scheduleProperties: z.nullable( z.lazy(() => CheckWithdrawalScheduleScheduleProperties$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 CheckWithdrawalScheduleScheduleDetails$ { /** @deprecated use `CheckWithdrawalScheduleScheduleDetails$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleScheduleDetails$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleScheduleDetails$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleScheduleDetails$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleScheduleDetails$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleScheduleDetails$Outbound; } export function checkWithdrawalScheduleScheduleDetailsToJSON( checkWithdrawalScheduleScheduleDetails: CheckWithdrawalScheduleScheduleDetails, ): string { return JSON.stringify( CheckWithdrawalScheduleScheduleDetails$outboundSchema.parse( checkWithdrawalScheduleScheduleDetails, ), ); } export function checkWithdrawalScheduleScheduleDetailsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleScheduleDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleScheduleDetails' from JSON`, ); } /** @internal */ export const CheckWithdrawalSchedule$inboundSchema: z.ZodType< CheckWithdrawalSchedule, z.ZodTypeDef, unknown > = z.object({ beneficiary: z.nullable( z.lazy(() => CheckWithdrawalScheduleBeneficiary$inboundSchema), ).optional(), delivery_method: CheckWithdrawalScheduleDeliveryMethod$inboundSchema .optional(), memos: z.array(z.string()).optional(), name: z.string().optional(), retirement_distribution: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistribution$inboundSchema), ).optional(), schedule_details: z.nullable( z.lazy(() => CheckWithdrawalScheduleScheduleDetails$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { "delivery_method": "deliveryMethod", "retirement_distribution": "retirementDistribution", "schedule_details": "scheduleDetails", }); }); /** @internal */ export type CheckWithdrawalSchedule$Outbound = { beneficiary?: CheckWithdrawalScheduleBeneficiary$Outbound | null | undefined; delivery_method?: string | undefined; memos?: Array | undefined; name?: string | undefined; retirement_distribution?: | CheckWithdrawalScheduleRetirementDistribution$Outbound | null | undefined; schedule_details?: | CheckWithdrawalScheduleScheduleDetails$Outbound | null | undefined; }; /** @internal */ export const CheckWithdrawalSchedule$outboundSchema: z.ZodType< CheckWithdrawalSchedule$Outbound, z.ZodTypeDef, CheckWithdrawalSchedule > = z.object({ beneficiary: z.nullable( z.lazy(() => CheckWithdrawalScheduleBeneficiary$outboundSchema), ).optional(), deliveryMethod: CheckWithdrawalScheduleDeliveryMethod$outboundSchema .optional(), memos: z.array(z.string()).optional(), name: z.string().optional(), retirementDistribution: z.nullable( z.lazy(() => CheckWithdrawalScheduleRetirementDistribution$outboundSchema), ).optional(), scheduleDetails: z.nullable( z.lazy(() => CheckWithdrawalScheduleScheduleDetails$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { deliveryMethod: "delivery_method", retirementDistribution: "retirement_distribution", scheduleDetails: "schedule_details", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckWithdrawalSchedule$ { /** @deprecated use `CheckWithdrawalSchedule$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalSchedule$inboundSchema; /** @deprecated use `CheckWithdrawalSchedule$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalSchedule$outboundSchema; /** @deprecated use `CheckWithdrawalSchedule$Outbound` instead. */ export type Outbound = CheckWithdrawalSchedule$Outbound; } export function checkWithdrawalScheduleToJSON( checkWithdrawalSchedule: CheckWithdrawalSchedule, ): string { return JSON.stringify( CheckWithdrawalSchedule$outboundSchema.parse(checkWithdrawalSchedule), ); } export function checkWithdrawalScheduleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalSchedule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalSchedule' from JSON`, ); }