/* * 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"; /** * Option to auto-enroll in Dividend Reinvestment; defaults to DIVIDEND_REINVESTMENT_ENROLL */ export enum JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan { AutoEnrollDividendReinvestmentUnspecified = "AUTO_ENROLL_DIVIDEND_REINVESTMENT_UNSPECIFIED", DividendReinvestmentEnroll = "DIVIDEND_REINVESTMENT_ENROLL", DividendReinvestmentDecline = "DIVIDEND_REINVESTMENT_DECLINE", } /** * Option to auto-enroll in Dividend Reinvestment; defaults to DIVIDEND_REINVESTMENT_ENROLL */ export type JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlanOpen = OpenEnum< typeof JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan >; /** * Option to auto-enroll in FDIC cash sweep; defaults to FDIC_CASH_SWEEP_ENROLL */ export enum JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep { AutoEnrollFdicCashSweepUnspecified = "AUTO_ENROLL_FDIC_CASH_SWEEP_UNSPECIFIED", FdicCashSweepEnroll = "FDIC_CASH_SWEEP_ENROLL", FdicCashSweepDecline = "FDIC_CASH_SWEEP_DECLINE", } /** * Option to auto-enroll in FDIC cash sweep; defaults to FDIC_CASH_SWEEP_ENROLL */ export type JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweepOpen = OpenEnum; /** * The legal residency state of a married couple */ export enum LegalResidencyStateOfMarriedCouple { LegalResidencyStateOfMarriedCoupleUnspecified = "LEGAL_RESIDENCY_STATE_OF_MARRIED_COUPLE_UNSPECIFIED", Ak = "AK", Az = "AZ", Ar = "AR", Ca = "CA", De = "DE", Fl = "FL", Hi = "HI", Id = "ID", Il = "IL", In = "IN", Ky = "KY", La = "LA", Md = "MD", Ma = "MA", Mi = "MI", Ms = "MS", Mo = "MO", Nv = "NV", Nj = "NJ", Nm = "NM", Ny = "NY", Nc = "NC", Oh = "OH", Ok = "OK", Or = "OR", Pa = "PA", Ri = "RI", Tn = "TN", Tx = "TX", Vt = "VT", Va = "VA", Wa = "WA", Wi = "WI", Wy = "WY", } /** * The legal residency state of a married couple */ export type LegalResidencyStateOfMarriedCoupleOpen = OpenEnum< typeof LegalResidencyStateOfMarriedCouple >; /** * Enrollment metadata for the Joint Community Property Registration enrollment type */ export type JointCommunityPropertyEnrollmentMetadataCreate = { /** * Option to auto-enroll in Dividend Reinvestment; defaults to DIVIDEND_REINVESTMENT_ENROLL */ dividendReinvestmentPlan?: | JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlanOpen | undefined; /** * Option to auto-enroll in FDIC cash sweep; defaults to FDIC_CASH_SWEEP_ENROLL */ fdicCashSweep?: | JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweepOpen | undefined; /** * The legal residency state of a married couple */ legalResidencyStateOfMarriedCouple: LegalResidencyStateOfMarriedCoupleOpen; }; /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$inboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlanOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum( JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan, ), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$outboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlanOpen, z.ZodTypeDef, JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlanOpen > = z.union([ z.nativeEnum( JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan, ), 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 JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$ { /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$inboundSchema` instead. */ export const inboundSchema = JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$inboundSchema; /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$outboundSchema` instead. */ export const outboundSchema = JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$outboundSchema; } /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$inboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweepOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$outboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweepOpen, z.ZodTypeDef, JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweepOpen > = z.union([ z.nativeEnum(JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep), 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 JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$ { /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$inboundSchema` instead. */ export const inboundSchema = JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$inboundSchema; /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$outboundSchema` instead. */ export const outboundSchema = JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$outboundSchema; } /** @internal */ export const LegalResidencyStateOfMarriedCouple$inboundSchema: z.ZodType< LegalResidencyStateOfMarriedCoupleOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(LegalResidencyStateOfMarriedCouple), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const LegalResidencyStateOfMarriedCouple$outboundSchema: z.ZodType< LegalResidencyStateOfMarriedCoupleOpen, z.ZodTypeDef, LegalResidencyStateOfMarriedCoupleOpen > = z.union([ z.nativeEnum(LegalResidencyStateOfMarriedCouple), 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 LegalResidencyStateOfMarriedCouple$ { /** @deprecated use `LegalResidencyStateOfMarriedCouple$inboundSchema` instead. */ export const inboundSchema = LegalResidencyStateOfMarriedCouple$inboundSchema; /** @deprecated use `LegalResidencyStateOfMarriedCouple$outboundSchema` instead. */ export const outboundSchema = LegalResidencyStateOfMarriedCouple$outboundSchema; } /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreate$inboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreate, z.ZodTypeDef, unknown > = z.object({ dividend_reinvestment_plan: JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$inboundSchema .optional(), fdic_cash_sweep: JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$inboundSchema .optional(), legal_residency_state_of_married_couple: LegalResidencyStateOfMarriedCouple$inboundSchema, }).transform((v) => { return remap$(v, { "dividend_reinvestment_plan": "dividendReinvestmentPlan", "fdic_cash_sweep": "fdicCashSweep", "legal_residency_state_of_married_couple": "legalResidencyStateOfMarriedCouple", }); }); /** @internal */ export type JointCommunityPropertyEnrollmentMetadataCreate$Outbound = { dividend_reinvestment_plan?: string | undefined; fdic_cash_sweep?: string | undefined; legal_residency_state_of_married_couple: string; }; /** @internal */ export const JointCommunityPropertyEnrollmentMetadataCreate$outboundSchema: z.ZodType< JointCommunityPropertyEnrollmentMetadataCreate$Outbound, z.ZodTypeDef, JointCommunityPropertyEnrollmentMetadataCreate > = z.object({ dividendReinvestmentPlan: JointCommunityPropertyEnrollmentMetadataCreateDividendReinvestmentPlan$outboundSchema .optional(), fdicCashSweep: JointCommunityPropertyEnrollmentMetadataCreateFdicCashSweep$outboundSchema .optional(), legalResidencyStateOfMarriedCouple: LegalResidencyStateOfMarriedCouple$outboundSchema, }).transform((v) => { return remap$(v, { dividendReinvestmentPlan: "dividend_reinvestment_plan", fdicCashSweep: "fdic_cash_sweep", legalResidencyStateOfMarriedCouple: "legal_residency_state_of_married_couple", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace JointCommunityPropertyEnrollmentMetadataCreate$ { /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreate$inboundSchema` instead. */ export const inboundSchema = JointCommunityPropertyEnrollmentMetadataCreate$inboundSchema; /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreate$outboundSchema` instead. */ export const outboundSchema = JointCommunityPropertyEnrollmentMetadataCreate$outboundSchema; /** @deprecated use `JointCommunityPropertyEnrollmentMetadataCreate$Outbound` instead. */ export type Outbound = JointCommunityPropertyEnrollmentMetadataCreate$Outbound; } export function jointCommunityPropertyEnrollmentMetadataCreateToJSON( jointCommunityPropertyEnrollmentMetadataCreate: JointCommunityPropertyEnrollmentMetadataCreate, ): string { return JSON.stringify( JointCommunityPropertyEnrollmentMetadataCreate$outboundSchema.parse( jointCommunityPropertyEnrollmentMetadataCreate, ), ); } export function jointCommunityPropertyEnrollmentMetadataCreateFromJSON( jsonString: string, ): SafeParseResult< JointCommunityPropertyEnrollmentMetadataCreate, SDKValidationError > { return safeParse( jsonString, (x) => JointCommunityPropertyEnrollmentMetadataCreate$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'JointCommunityPropertyEnrollmentMetadataCreate' from JSON`, ); }