/* * 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"; /** * A cash amount in the format of decimal value. An unset or empty value represents a full disbursement */ export type TransferScheduleSummaryAmount = { /** * 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; }; /** * Flag indicating whether this is a deposit or withdrawal transfer */ export enum Direction { DirectionUnspecified = "DIRECTION_UNSPECIFIED", Deposit = "DEPOSIT", Withdrawal = "WITHDRAWAL", Journal = "JOURNAL", } /** * Flag indicating whether this is a deposit or withdrawal transfer */ export type DirectionOpen = OpenEnum; /** * The mechanism used for this transfer schedule */ export enum TransferScheduleSummaryMechanism { Ach = "ACH", CashJournal = "CASH_JOURNAL", Check = "CHECK", Wire = "WIRE", } /** * The mechanism used for this transfer schedule */ export type TransferScheduleSummaryMechanismOpen = OpenEnum< typeof TransferScheduleSummaryMechanism >; /** * A temporal tax year value. This will always evaluate to a year based on the date the transfer was initiated. */ export enum TransferScheduleSummaryTemporalTaxYear { TemporalTaxYearUnspecified = "TEMPORAL_TAX_YEAR_UNSPECIFIED", CurrentCalendarYear = "CURRENT_CALENDAR_YEAR", MinimumTaxYear = "MINIMUM_TAX_YEAR", } /** * A temporal tax year value. This will always evaluate to a year based on the date the transfer was initiated. */ export type TransferScheduleSummaryTemporalTaxYearOpen = OpenEnum< typeof TransferScheduleSummaryTemporalTaxYear >; /** * The type of retirement contribution. */ export enum TransferScheduleSummaryType { 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 TransferScheduleSummaryTypeOpen = OpenEnum< typeof TransferScheduleSummaryType >; /** * The contribution info for a retirement account */ export type TransferScheduleSummaryRetirementContribution = { /** * An explicit tax year value. The current year is always valid; and the prior year is valid only before the tax deadline. Must be in "YYYY" format. */ taxYear?: number | undefined; /** * A temporal tax year value. This will always evaluate to a year based on the date the transfer was initiated. */ temporalTaxYear?: TransferScheduleSummaryTemporalTaxYearOpen | undefined; /** * The type of retirement contribution. */ type?: TransferScheduleSummaryTypeOpen | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type TransferScheduleSummaryRetirementDistributionAmount = { /** * 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 TransferScheduleSummaryPercentage = { /** * 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 TransferScheduleSummaryFederalTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | TransferScheduleSummaryRetirementDistributionAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: TransferScheduleSummaryPercentage | null | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount = { /** * 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 TransferScheduleSummaryRetirementDistributionPercentage = { /** * 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 TransferScheduleSummaryStateTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: | TransferScheduleSummaryRetirementDistributionPercentage | null | undefined; }; /** * The type of retirement distribution. */ export enum TransferScheduleSummaryRetirementDistributionType { 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 TransferScheduleSummaryRetirementDistributionTypeOpen = OpenEnum< typeof TransferScheduleSummaryRetirementDistributionType >; /** * The distribution info for a retirement account */ export type TransferScheduleSummaryRetirementDistribution = { /** * The federal tax withholding. */ federalTaxWithholding?: | TransferScheduleSummaryFederalTaxWithholding | 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?: | TransferScheduleSummaryStateTaxWithholding | 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?: TransferScheduleSummaryRetirementDistributionTypeOpen | undefined; }; /** * The schedule end date if there is a finite number of occurrences */ export type TransferScheduleSummaryEndDate = { /** * 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 StartDate = { /** * 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 TransferScheduleSummaryState { Active = "ACTIVE", Canceled = "CANCELED", Completed = "COMPLETED", } /** * The state of the represented schedule */ export type TransferScheduleSummaryStateOpen = OpenEnum< typeof TransferScheduleSummaryState >; /** * 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 TransferScheduleSummaryTimeUnit { 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 TransferScheduleSummaryTimeUnitOpen = OpenEnum< typeof TransferScheduleSummaryTimeUnit >; /** * Common schedule properties */ export type ScheduleProperties = { /** * The schedule end date if there is a finite number of occurrences */ endDate?: TransferScheduleSummaryEndDate | null | undefined; /** * The number of occurrences (empty or 0 indicates unlimited occurrences) */ occurrences?: number | undefined; /** * The schedule start date */ startDate?: StartDate | null | undefined; /** * The state of the represented schedule */ state?: TransferScheduleSummaryStateOpen | 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?: TransferScheduleSummaryTimeUnitOpen | 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; }; /** * A transfer schedule summary that contains all of the common properties a schedules across rails */ export type TransferScheduleSummary = { /** * A cash amount in the format of decimal value. An unset or empty value represents a full disbursement */ amount?: TransferScheduleSummaryAmount | 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 indicating whether this is a deposit or withdrawal transfer */ direction?: DirectionOpen | undefined; /** * The mechanism used for this transfer schedule */ mechanism?: TransferScheduleSummaryMechanismOpen | undefined; /** * The contribution info for a retirement account */ retirementContribution?: | TransferScheduleSummaryRetirementContribution | null | undefined; /** * The distribution info for a retirement account */ retirementDistribution?: | TransferScheduleSummaryRetirementDistribution | null | undefined; /** * Common schedule properties */ scheduleProperties?: ScheduleProperties | null | undefined; /** * The name of the schedule resource this detail represents */ transferSchedule?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryAmount$inboundSchema: z.ZodType< TransferScheduleSummaryAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type TransferScheduleSummaryAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryAmount$outboundSchema: z.ZodType< TransferScheduleSummaryAmount$Outbound, z.ZodTypeDef, TransferScheduleSummaryAmount > = 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 TransferScheduleSummaryAmount$ { /** @deprecated use `TransferScheduleSummaryAmount$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryAmount$inboundSchema; /** @deprecated use `TransferScheduleSummaryAmount$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryAmount$outboundSchema; /** @deprecated use `TransferScheduleSummaryAmount$Outbound` instead. */ export type Outbound = TransferScheduleSummaryAmount$Outbound; } export function transferScheduleSummaryAmountToJSON( transferScheduleSummaryAmount: TransferScheduleSummaryAmount, ): string { return JSON.stringify( TransferScheduleSummaryAmount$outboundSchema.parse( transferScheduleSummaryAmount, ), ); } export function transferScheduleSummaryAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferScheduleSummaryAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummaryAmount' from JSON`, ); } /** @internal */ export const Direction$inboundSchema: z.ZodType< DirectionOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(Direction), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const Direction$outboundSchema: z.ZodType< DirectionOpen, z.ZodTypeDef, DirectionOpen > = z.union([ z.nativeEnum(Direction), 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 Direction$ { /** @deprecated use `Direction$inboundSchema` instead. */ export const inboundSchema = Direction$inboundSchema; /** @deprecated use `Direction$outboundSchema` instead. */ export const outboundSchema = Direction$outboundSchema; } /** @internal */ export const TransferScheduleSummaryMechanism$inboundSchema: z.ZodType< TransferScheduleSummaryMechanismOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryMechanism), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryMechanism$outboundSchema: z.ZodType< TransferScheduleSummaryMechanismOpen, z.ZodTypeDef, TransferScheduleSummaryMechanismOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryMechanism), 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 TransferScheduleSummaryMechanism$ { /** @deprecated use `TransferScheduleSummaryMechanism$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryMechanism$inboundSchema; /** @deprecated use `TransferScheduleSummaryMechanism$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryMechanism$outboundSchema; } /** @internal */ export const TransferScheduleSummaryTemporalTaxYear$inboundSchema: z.ZodType< TransferScheduleSummaryTemporalTaxYearOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryTemporalTaxYear), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryTemporalTaxYear$outboundSchema: z.ZodType< TransferScheduleSummaryTemporalTaxYearOpen, z.ZodTypeDef, TransferScheduleSummaryTemporalTaxYearOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryTemporalTaxYear), 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 TransferScheduleSummaryTemporalTaxYear$ { /** @deprecated use `TransferScheduleSummaryTemporalTaxYear$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryTemporalTaxYear$inboundSchema; /** @deprecated use `TransferScheduleSummaryTemporalTaxYear$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryTemporalTaxYear$outboundSchema; } /** @internal */ export const TransferScheduleSummaryType$inboundSchema: z.ZodType< TransferScheduleSummaryTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryType$outboundSchema: z.ZodType< TransferScheduleSummaryTypeOpen, z.ZodTypeDef, TransferScheduleSummaryTypeOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryType), 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 TransferScheduleSummaryType$ { /** @deprecated use `TransferScheduleSummaryType$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryType$inboundSchema; /** @deprecated use `TransferScheduleSummaryType$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryType$outboundSchema; } /** @internal */ export const TransferScheduleSummaryRetirementContribution$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementContribution, z.ZodTypeDef, unknown > = z.object({ tax_year: z.number().int().optional(), temporal_tax_year: TransferScheduleSummaryTemporalTaxYear$inboundSchema .optional(), type: TransferScheduleSummaryType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tax_year": "taxYear", "temporal_tax_year": "temporalTaxYear", }); }); /** @internal */ export type TransferScheduleSummaryRetirementContribution$Outbound = { tax_year?: number | undefined; temporal_tax_year?: string | undefined; type?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryRetirementContribution$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementContribution$Outbound, z.ZodTypeDef, TransferScheduleSummaryRetirementContribution > = z.object({ taxYear: z.number().int().optional(), temporalTaxYear: TransferScheduleSummaryTemporalTaxYear$outboundSchema .optional(), type: TransferScheduleSummaryType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { taxYear: "tax_year", temporalTaxYear: "temporal_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 TransferScheduleSummaryRetirementContribution$ { /** @deprecated use `TransferScheduleSummaryRetirementContribution$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementContribution$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementContribution$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementContribution$outboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementContribution$Outbound` instead. */ export type Outbound = TransferScheduleSummaryRetirementContribution$Outbound; } export function transferScheduleSummaryRetirementContributionToJSON( transferScheduleSummaryRetirementContribution: TransferScheduleSummaryRetirementContribution, ): string { return JSON.stringify( TransferScheduleSummaryRetirementContribution$outboundSchema.parse( transferScheduleSummaryRetirementContribution, ), ); } export function transferScheduleSummaryRetirementContributionFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryRetirementContribution, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryRetirementContribution$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TransferScheduleSummaryRetirementContribution' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryRetirementDistributionAmount$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type TransferScheduleSummaryRetirementDistributionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryRetirementDistributionAmount$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionAmount$Outbound, z.ZodTypeDef, TransferScheduleSummaryRetirementDistributionAmount > = 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 TransferScheduleSummaryRetirementDistributionAmount$ { /** @deprecated use `TransferScheduleSummaryRetirementDistributionAmount$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementDistributionAmount$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionAmount$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementDistributionAmount$outboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionAmount$Outbound` instead. */ export type Outbound = TransferScheduleSummaryRetirementDistributionAmount$Outbound; } export function transferScheduleSummaryRetirementDistributionAmountToJSON( transferScheduleSummaryRetirementDistributionAmount: TransferScheduleSummaryRetirementDistributionAmount, ): string { return JSON.stringify( TransferScheduleSummaryRetirementDistributionAmount$outboundSchema.parse( transferScheduleSummaryRetirementDistributionAmount, ), ); } export function transferScheduleSummaryRetirementDistributionAmountFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryRetirementDistributionAmount, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryRetirementDistributionAmount$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TransferScheduleSummaryRetirementDistributionAmount' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryPercentage$inboundSchema: z.ZodType< TransferScheduleSummaryPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type TransferScheduleSummaryPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryPercentage$outboundSchema: z.ZodType< TransferScheduleSummaryPercentage$Outbound, z.ZodTypeDef, TransferScheduleSummaryPercentage > = 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 TransferScheduleSummaryPercentage$ { /** @deprecated use `TransferScheduleSummaryPercentage$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryPercentage$inboundSchema; /** @deprecated use `TransferScheduleSummaryPercentage$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryPercentage$outboundSchema; /** @deprecated use `TransferScheduleSummaryPercentage$Outbound` instead. */ export type Outbound = TransferScheduleSummaryPercentage$Outbound; } export function transferScheduleSummaryPercentageToJSON( transferScheduleSummaryPercentage: TransferScheduleSummaryPercentage, ): string { return JSON.stringify( TransferScheduleSummaryPercentage$outboundSchema.parse( transferScheduleSummaryPercentage, ), ); } export function transferScheduleSummaryPercentageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferScheduleSummaryPercentage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummaryPercentage' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryFederalTaxWithholding$inboundSchema: z.ZodType< TransferScheduleSummaryFederalTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => TransferScheduleSummaryPercentage$inboundSchema), ).optional(), }); /** @internal */ export type TransferScheduleSummaryFederalTaxWithholding$Outbound = { amount?: | TransferScheduleSummaryRetirementDistributionAmount$Outbound | null | undefined; percentage?: TransferScheduleSummaryPercentage$Outbound | null | undefined; }; /** @internal */ export const TransferScheduleSummaryFederalTaxWithholding$outboundSchema: z.ZodType< TransferScheduleSummaryFederalTaxWithholding$Outbound, z.ZodTypeDef, TransferScheduleSummaryFederalTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => TransferScheduleSummaryPercentage$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 TransferScheduleSummaryFederalTaxWithholding$ { /** @deprecated use `TransferScheduleSummaryFederalTaxWithholding$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryFederalTaxWithholding$inboundSchema; /** @deprecated use `TransferScheduleSummaryFederalTaxWithholding$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryFederalTaxWithholding$outboundSchema; /** @deprecated use `TransferScheduleSummaryFederalTaxWithholding$Outbound` instead. */ export type Outbound = TransferScheduleSummaryFederalTaxWithholding$Outbound; } export function transferScheduleSummaryFederalTaxWithholdingToJSON( transferScheduleSummaryFederalTaxWithholding: TransferScheduleSummaryFederalTaxWithholding, ): string { return JSON.stringify( TransferScheduleSummaryFederalTaxWithholding$outboundSchema.parse( transferScheduleSummaryFederalTaxWithholding, ), ); } export function transferScheduleSummaryFederalTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryFederalTaxWithholding, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryFederalTaxWithholding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TransferScheduleSummaryFederalTaxWithholding' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$Outbound, z.ZodTypeDef, TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount > = 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 TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$ { /** @deprecated use `TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$outboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$Outbound` instead. */ export type Outbound = TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$Outbound; } export function transferScheduleSummaryRetirementDistributionStateTaxWithholdingAmountToJSON( transferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount: TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount, ): string { return JSON.stringify( TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$outboundSchema .parse( transferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount, ), ); } export function transferScheduleSummaryRetirementDistributionStateTaxWithholdingAmountFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryRetirementDistributionPercentage$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type TransferScheduleSummaryRetirementDistributionPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryRetirementDistributionPercentage$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionPercentage$Outbound, z.ZodTypeDef, TransferScheduleSummaryRetirementDistributionPercentage > = 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 TransferScheduleSummaryRetirementDistributionPercentage$ { /** @deprecated use `TransferScheduleSummaryRetirementDistributionPercentage$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementDistributionPercentage$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionPercentage$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementDistributionPercentage$outboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionPercentage$Outbound` instead. */ export type Outbound = TransferScheduleSummaryRetirementDistributionPercentage$Outbound; } export function transferScheduleSummaryRetirementDistributionPercentageToJSON( transferScheduleSummaryRetirementDistributionPercentage: TransferScheduleSummaryRetirementDistributionPercentage, ): string { return JSON.stringify( TransferScheduleSummaryRetirementDistributionPercentage$outboundSchema .parse(transferScheduleSummaryRetirementDistributionPercentage), ); } export function transferScheduleSummaryRetirementDistributionPercentageFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryRetirementDistributionPercentage, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryRetirementDistributionPercentage$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummaryRetirementDistributionPercentage' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryStateTaxWithholding$inboundSchema: z.ZodType = z.object({ amount: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionPercentage$inboundSchema ), ).optional(), }); /** @internal */ export type TransferScheduleSummaryStateTaxWithholding$Outbound = { amount?: | TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$Outbound | null | undefined; percentage?: | TransferScheduleSummaryRetirementDistributionPercentage$Outbound | null | undefined; }; /** @internal */ export const TransferScheduleSummaryStateTaxWithholding$outboundSchema: z.ZodType< TransferScheduleSummaryStateTaxWithholding$Outbound, z.ZodTypeDef, TransferScheduleSummaryStateTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionStateTaxWithholdingAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistributionPercentage$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 TransferScheduleSummaryStateTaxWithholding$ { /** @deprecated use `TransferScheduleSummaryStateTaxWithholding$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryStateTaxWithholding$inboundSchema; /** @deprecated use `TransferScheduleSummaryStateTaxWithholding$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryStateTaxWithholding$outboundSchema; /** @deprecated use `TransferScheduleSummaryStateTaxWithholding$Outbound` instead. */ export type Outbound = TransferScheduleSummaryStateTaxWithholding$Outbound; } export function transferScheduleSummaryStateTaxWithholdingToJSON( transferScheduleSummaryStateTaxWithholding: TransferScheduleSummaryStateTaxWithholding, ): string { return JSON.stringify( TransferScheduleSummaryStateTaxWithholding$outboundSchema.parse( transferScheduleSummaryStateTaxWithholding, ), ); } export function transferScheduleSummaryStateTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryStateTaxWithholding, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryStateTaxWithholding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TransferScheduleSummaryStateTaxWithholding' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryRetirementDistributionType$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryRetirementDistributionType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryRetirementDistributionType$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistributionTypeOpen, z.ZodTypeDef, TransferScheduleSummaryRetirementDistributionTypeOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryRetirementDistributionType), 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 TransferScheduleSummaryRetirementDistributionType$ { /** @deprecated use `TransferScheduleSummaryRetirementDistributionType$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementDistributionType$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistributionType$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementDistributionType$outboundSchema; } /** @internal */ export const TransferScheduleSummaryRetirementDistribution$inboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistribution, z.ZodTypeDef, unknown > = z.object({ federal_tax_withholding: z.nullable( z.lazy(() => TransferScheduleSummaryFederalTaxWithholding$inboundSchema), ).optional(), receiving_institution: z.string().optional(), state_tax_withholding: z.nullable( z.lazy(() => TransferScheduleSummaryStateTaxWithholding$inboundSchema), ).optional(), state_withholding_waiver: z.boolean().optional(), tax_year: z.number().int().optional(), type: TransferScheduleSummaryRetirementDistributionType$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 TransferScheduleSummaryRetirementDistribution$Outbound = { federal_tax_withholding?: | TransferScheduleSummaryFederalTaxWithholding$Outbound | null | undefined; receiving_institution?: string | undefined; state_tax_withholding?: | TransferScheduleSummaryStateTaxWithholding$Outbound | null | undefined; state_withholding_waiver?: boolean | undefined; tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const TransferScheduleSummaryRetirementDistribution$outboundSchema: z.ZodType< TransferScheduleSummaryRetirementDistribution$Outbound, z.ZodTypeDef, TransferScheduleSummaryRetirementDistribution > = z.object({ federalTaxWithholding: z.nullable( z.lazy(() => TransferScheduleSummaryFederalTaxWithholding$outboundSchema), ).optional(), receivingInstitution: z.string().optional(), stateTaxWithholding: z.nullable( z.lazy(() => TransferScheduleSummaryStateTaxWithholding$outboundSchema), ).optional(), stateWithholdingWaiver: z.boolean().optional(), taxYear: z.number().int().optional(), type: TransferScheduleSummaryRetirementDistributionType$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 TransferScheduleSummaryRetirementDistribution$ { /** @deprecated use `TransferScheduleSummaryRetirementDistribution$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryRetirementDistribution$inboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistribution$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryRetirementDistribution$outboundSchema; /** @deprecated use `TransferScheduleSummaryRetirementDistribution$Outbound` instead. */ export type Outbound = TransferScheduleSummaryRetirementDistribution$Outbound; } export function transferScheduleSummaryRetirementDistributionToJSON( transferScheduleSummaryRetirementDistribution: TransferScheduleSummaryRetirementDistribution, ): string { return JSON.stringify( TransferScheduleSummaryRetirementDistribution$outboundSchema.parse( transferScheduleSummaryRetirementDistribution, ), ); } export function transferScheduleSummaryRetirementDistributionFromJSON( jsonString: string, ): SafeParseResult< TransferScheduleSummaryRetirementDistribution, SDKValidationError > { return safeParse( jsonString, (x) => TransferScheduleSummaryRetirementDistribution$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TransferScheduleSummaryRetirementDistribution' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryEndDate$inboundSchema: z.ZodType< TransferScheduleSummaryEndDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type TransferScheduleSummaryEndDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const TransferScheduleSummaryEndDate$outboundSchema: z.ZodType< TransferScheduleSummaryEndDate$Outbound, z.ZodTypeDef, TransferScheduleSummaryEndDate > = 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 TransferScheduleSummaryEndDate$ { /** @deprecated use `TransferScheduleSummaryEndDate$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryEndDate$inboundSchema; /** @deprecated use `TransferScheduleSummaryEndDate$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryEndDate$outboundSchema; /** @deprecated use `TransferScheduleSummaryEndDate$Outbound` instead. */ export type Outbound = TransferScheduleSummaryEndDate$Outbound; } export function transferScheduleSummaryEndDateToJSON( transferScheduleSummaryEndDate: TransferScheduleSummaryEndDate, ): string { return JSON.stringify( TransferScheduleSummaryEndDate$outboundSchema.parse( transferScheduleSummaryEndDate, ), ); } export function transferScheduleSummaryEndDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferScheduleSummaryEndDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummaryEndDate' from JSON`, ); } /** @internal */ export const StartDate$inboundSchema: z.ZodType< StartDate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type StartDate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const StartDate$outboundSchema: z.ZodType< StartDate$Outbound, z.ZodTypeDef, StartDate > = 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 StartDate$ { /** @deprecated use `StartDate$inboundSchema` instead. */ export const inboundSchema = StartDate$inboundSchema; /** @deprecated use `StartDate$outboundSchema` instead. */ export const outboundSchema = StartDate$outboundSchema; /** @deprecated use `StartDate$Outbound` instead. */ export type Outbound = StartDate$Outbound; } export function startDateToJSON(startDate: StartDate): string { return JSON.stringify(StartDate$outboundSchema.parse(startDate)); } export function startDateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StartDate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StartDate' from JSON`, ); } /** @internal */ export const TransferScheduleSummaryState$inboundSchema: z.ZodType< TransferScheduleSummaryStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryState$outboundSchema: z.ZodType< TransferScheduleSummaryStateOpen, z.ZodTypeDef, TransferScheduleSummaryStateOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryState), 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 TransferScheduleSummaryState$ { /** @deprecated use `TransferScheduleSummaryState$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryState$inboundSchema; /** @deprecated use `TransferScheduleSummaryState$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryState$outboundSchema; } /** @internal */ export const TransferScheduleSummaryTimeUnit$inboundSchema: z.ZodType< TransferScheduleSummaryTimeUnitOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TransferScheduleSummaryTimeUnit), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TransferScheduleSummaryTimeUnit$outboundSchema: z.ZodType< TransferScheduleSummaryTimeUnitOpen, z.ZodTypeDef, TransferScheduleSummaryTimeUnitOpen > = z.union([ z.nativeEnum(TransferScheduleSummaryTimeUnit), 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 TransferScheduleSummaryTimeUnit$ { /** @deprecated use `TransferScheduleSummaryTimeUnit$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummaryTimeUnit$inboundSchema; /** @deprecated use `TransferScheduleSummaryTimeUnit$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummaryTimeUnit$outboundSchema; } /** @internal */ export const ScheduleProperties$inboundSchema: z.ZodType< ScheduleProperties, z.ZodTypeDef, unknown > = z.object({ end_date: z.nullable( z.lazy(() => TransferScheduleSummaryEndDate$inboundSchema), ).optional(), occurrences: z.number().int().optional(), start_date: z.nullable(z.lazy(() => StartDate$inboundSchema)).optional(), state: TransferScheduleSummaryState$inboundSchema.optional(), time_unit: TransferScheduleSummaryTimeUnit$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 ScheduleProperties$Outbound = { end_date?: TransferScheduleSummaryEndDate$Outbound | null | undefined; occurrences?: number | undefined; start_date?: StartDate$Outbound | null | undefined; state?: string | undefined; time_unit?: string | undefined; unit_multiplier?: number | undefined; }; /** @internal */ export const ScheduleProperties$outboundSchema: z.ZodType< ScheduleProperties$Outbound, z.ZodTypeDef, ScheduleProperties > = z.object({ endDate: z.nullable( z.lazy(() => TransferScheduleSummaryEndDate$outboundSchema), ).optional(), occurrences: z.number().int().optional(), startDate: z.nullable(z.lazy(() => StartDate$outboundSchema)).optional(), state: TransferScheduleSummaryState$outboundSchema.optional(), timeUnit: TransferScheduleSummaryTimeUnit$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 ScheduleProperties$ { /** @deprecated use `ScheduleProperties$inboundSchema` instead. */ export const inboundSchema = ScheduleProperties$inboundSchema; /** @deprecated use `ScheduleProperties$outboundSchema` instead. */ export const outboundSchema = ScheduleProperties$outboundSchema; /** @deprecated use `ScheduleProperties$Outbound` instead. */ export type Outbound = ScheduleProperties$Outbound; } export function schedulePropertiesToJSON( scheduleProperties: ScheduleProperties, ): string { return JSON.stringify( ScheduleProperties$outboundSchema.parse(scheduleProperties), ); } export function schedulePropertiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ScheduleProperties$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduleProperties' from JSON`, ); } /** @internal */ export const TransferScheduleSummary$inboundSchema: z.ZodType< TransferScheduleSummary, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable(z.lazy(() => TransferScheduleSummaryAmount$inboundSchema)) .optional(), client_schedule_id: z.string().optional(), direction: Direction$inboundSchema.optional(), mechanism: TransferScheduleSummaryMechanism$inboundSchema.optional(), retirement_contribution: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementContribution$inboundSchema), ).optional(), retirement_distribution: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistribution$inboundSchema), ).optional(), schedule_properties: z.nullable( z.lazy(() => ScheduleProperties$inboundSchema), ).optional(), transfer_schedule: z.string().optional(), }).transform((v) => { return remap$(v, { "client_schedule_id": "clientScheduleId", "retirement_contribution": "retirementContribution", "retirement_distribution": "retirementDistribution", "schedule_properties": "scheduleProperties", "transfer_schedule": "transferSchedule", }); }); /** @internal */ export type TransferScheduleSummary$Outbound = { amount?: TransferScheduleSummaryAmount$Outbound | null | undefined; client_schedule_id?: string | undefined; direction?: string | undefined; mechanism?: string | undefined; retirement_contribution?: | TransferScheduleSummaryRetirementContribution$Outbound | null | undefined; retirement_distribution?: | TransferScheduleSummaryRetirementDistribution$Outbound | null | undefined; schedule_properties?: ScheduleProperties$Outbound | null | undefined; transfer_schedule?: string | undefined; }; /** @internal */ export const TransferScheduleSummary$outboundSchema: z.ZodType< TransferScheduleSummary$Outbound, z.ZodTypeDef, TransferScheduleSummary > = z.object({ amount: z.nullable(z.lazy(() => TransferScheduleSummaryAmount$outboundSchema)) .optional(), clientScheduleId: z.string().optional(), direction: Direction$outboundSchema.optional(), mechanism: TransferScheduleSummaryMechanism$outboundSchema.optional(), retirementContribution: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementContribution$outboundSchema), ).optional(), retirementDistribution: z.nullable( z.lazy(() => TransferScheduleSummaryRetirementDistribution$outboundSchema), ).optional(), scheduleProperties: z.nullable( z.lazy(() => ScheduleProperties$outboundSchema), ).optional(), transferSchedule: z.string().optional(), }).transform((v) => { return remap$(v, { clientScheduleId: "client_schedule_id", retirementContribution: "retirement_contribution", retirementDistribution: "retirement_distribution", scheduleProperties: "schedule_properties", transferSchedule: "transfer_schedule", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransferScheduleSummary$ { /** @deprecated use `TransferScheduleSummary$inboundSchema` instead. */ export const inboundSchema = TransferScheduleSummary$inboundSchema; /** @deprecated use `TransferScheduleSummary$outboundSchema` instead. */ export const outboundSchema = TransferScheduleSummary$outboundSchema; /** @deprecated use `TransferScheduleSummary$Outbound` instead. */ export type Outbound = TransferScheduleSummary$Outbound; } export function transferScheduleSummaryToJSON( transferScheduleSummary: TransferScheduleSummary, ): string { return JSON.stringify( TransferScheduleSummary$outboundSchema.parse(transferScheduleSummary), ); } export function transferScheduleSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferScheduleSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferScheduleSummary' from JSON`, ); }