/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomerReferralSourceUpdate, CustomerReferralSourceUpdate$inboundSchema, CustomerReferralSourceUpdate$Outbound, CustomerReferralSourceUpdate$outboundSchema, } from "./customerreferralsourceupdate.js"; import { NegativeNewsUpdate, NegativeNewsUpdate$inboundSchema, NegativeNewsUpdate$Outbound, NegativeNewsUpdate$outboundSchema, } from "./negativenewsupdate.js"; import { OtherSourcesOfWealthUpdate, OtherSourcesOfWealthUpdate$inboundSchema, OtherSourcesOfWealthUpdate$Outbound, OtherSourcesOfWealthUpdate$outboundSchema, } from "./othersourcesofwealthupdate.js"; /** * Foreign Due Diligence for Legal Natural Persons required when a Legal Natural Person is the Primary Owner on a non-resident/non-citizen Account. */ export type NaturalPersonFddUpdate = { /** * Customer Non-referral Source */ customerNonReferralSource?: string | undefined; /** * Customer Referral Source */ customerReferralSource?: CustomerReferralSourceUpdate | undefined; /** * The description of the applicant's source of wealth */ employmentAndEmployerDescription?: string | undefined; /** * Negative News detail. */ negativeNews?: NegativeNewsUpdate | undefined; /** * Applicant's other source of wealth */ otherSourcesOfWealth?: OtherSourcesOfWealthUpdate | undefined; }; /** @internal */ export const NaturalPersonFddUpdate$inboundSchema: z.ZodType< NaturalPersonFddUpdate, z.ZodTypeDef, unknown > = z.object({ customer_non_referral_source: z.string().optional(), customer_referral_source: CustomerReferralSourceUpdate$inboundSchema .optional(), employment_and_employer_description: z.string().optional(), negative_news: NegativeNewsUpdate$inboundSchema.optional(), other_sources_of_wealth: OtherSourcesOfWealthUpdate$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "customer_non_referral_source": "customerNonReferralSource", "customer_referral_source": "customerReferralSource", "employment_and_employer_description": "employmentAndEmployerDescription", "negative_news": "negativeNews", "other_sources_of_wealth": "otherSourcesOfWealth", }); }); /** @internal */ export type NaturalPersonFddUpdate$Outbound = { customer_non_referral_source?: string | undefined; customer_referral_source?: CustomerReferralSourceUpdate$Outbound | undefined; employment_and_employer_description?: string | undefined; negative_news?: NegativeNewsUpdate$Outbound | undefined; other_sources_of_wealth?: OtherSourcesOfWealthUpdate$Outbound | undefined; }; /** @internal */ export const NaturalPersonFddUpdate$outboundSchema: z.ZodType< NaturalPersonFddUpdate$Outbound, z.ZodTypeDef, NaturalPersonFddUpdate > = z.object({ customerNonReferralSource: z.string().optional(), customerReferralSource: CustomerReferralSourceUpdate$outboundSchema .optional(), employmentAndEmployerDescription: z.string().optional(), negativeNews: NegativeNewsUpdate$outboundSchema.optional(), otherSourcesOfWealth: OtherSourcesOfWealthUpdate$outboundSchema.optional(), }).transform((v) => { return remap$(v, { customerNonReferralSource: "customer_non_referral_source", customerReferralSource: "customer_referral_source", employmentAndEmployerDescription: "employment_and_employer_description", negativeNews: "negative_news", otherSourcesOfWealth: "other_sources_of_wealth", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NaturalPersonFddUpdate$ { /** @deprecated use `NaturalPersonFddUpdate$inboundSchema` instead. */ export const inboundSchema = NaturalPersonFddUpdate$inboundSchema; /** @deprecated use `NaturalPersonFddUpdate$outboundSchema` instead. */ export const outboundSchema = NaturalPersonFddUpdate$outboundSchema; /** @deprecated use `NaturalPersonFddUpdate$Outbound` instead. */ export type Outbound = NaturalPersonFddUpdate$Outbound; } export function naturalPersonFddUpdateToJSON( naturalPersonFddUpdate: NaturalPersonFddUpdate, ): string { return JSON.stringify( NaturalPersonFddUpdate$outboundSchema.parse(naturalPersonFddUpdate), ); } export function naturalPersonFddUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NaturalPersonFddUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NaturalPersonFddUpdate' from JSON`, ); }