/* * 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 { AccountGoalsUpdate, AccountGoalsUpdate$inboundSchema, AccountGoalsUpdate$Outbound, AccountGoalsUpdate$outboundSchema, } from "./accountgoalsupdate.js"; import { CustomerProfileUpdate, CustomerProfileUpdate$inboundSchema, CustomerProfileUpdate$Outbound, CustomerProfileUpdate$outboundSchema, } from "./customerprofileupdate.js"; /** * Investor profile. */ export type InvestmentProfileUpdate = { /** * The account goals on an investor profile. */ accountGoals?: AccountGoalsUpdate | undefined; /** * A detailed summary of financial and personal details of an investor, to help understand the investor's financial standing, investment experience and risk tolerance. */ customerProfile?: CustomerProfileUpdate | undefined; }; /** @internal */ export const InvestmentProfileUpdate$inboundSchema: z.ZodType< InvestmentProfileUpdate, z.ZodTypeDef, unknown > = z.object({ account_goals: AccountGoalsUpdate$inboundSchema.optional(), customer_profile: CustomerProfileUpdate$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "account_goals": "accountGoals", "customer_profile": "customerProfile", }); }); /** @internal */ export type InvestmentProfileUpdate$Outbound = { account_goals?: AccountGoalsUpdate$Outbound | undefined; customer_profile?: CustomerProfileUpdate$Outbound | undefined; }; /** @internal */ export const InvestmentProfileUpdate$outboundSchema: z.ZodType< InvestmentProfileUpdate$Outbound, z.ZodTypeDef, InvestmentProfileUpdate > = z.object({ accountGoals: AccountGoalsUpdate$outboundSchema.optional(), customerProfile: CustomerProfileUpdate$outboundSchema.optional(), }).transform((v) => { return remap$(v, { accountGoals: "account_goals", customerProfile: "customer_profile", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InvestmentProfileUpdate$ { /** @deprecated use `InvestmentProfileUpdate$inboundSchema` instead. */ export const inboundSchema = InvestmentProfileUpdate$inboundSchema; /** @deprecated use `InvestmentProfileUpdate$outboundSchema` instead. */ export const outboundSchema = InvestmentProfileUpdate$outboundSchema; /** @deprecated use `InvestmentProfileUpdate$Outbound` instead. */ export type Outbound = InvestmentProfileUpdate$Outbound; } export function investmentProfileUpdateToJSON( investmentProfileUpdate: InvestmentProfileUpdate, ): string { return JSON.stringify( InvestmentProfileUpdate$outboundSchema.parse(investmentProfileUpdate), ); } export function investmentProfileUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InvestmentProfileUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvestmentProfileUpdate' from JSON`, ); }