/* * 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 { AccountGoalsCreate, AccountGoalsCreate$inboundSchema, AccountGoalsCreate$Outbound, AccountGoalsCreate$outboundSchema, } from "./accountgoalscreate.js"; import { CustomerProfileCreate, CustomerProfileCreate$inboundSchema, CustomerProfileCreate$Outbound, CustomerProfileCreate$outboundSchema, } from "./customerprofilecreate.js"; /** * Investor profile. */ export type InvestmentProfileCreate = { /** * The account goals on an investor profile. */ accountGoals?: AccountGoalsCreate | 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?: CustomerProfileCreate | undefined; }; /** @internal */ export const InvestmentProfileCreate$inboundSchema: z.ZodType< InvestmentProfileCreate, z.ZodTypeDef, unknown > = z.object({ account_goals: AccountGoalsCreate$inboundSchema.optional(), customer_profile: CustomerProfileCreate$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "account_goals": "accountGoals", "customer_profile": "customerProfile", }); }); /** @internal */ export type InvestmentProfileCreate$Outbound = { account_goals?: AccountGoalsCreate$Outbound | undefined; customer_profile?: CustomerProfileCreate$Outbound | undefined; }; /** @internal */ export const InvestmentProfileCreate$outboundSchema: z.ZodType< InvestmentProfileCreate$Outbound, z.ZodTypeDef, InvestmentProfileCreate > = z.object({ accountGoals: AccountGoalsCreate$outboundSchema.optional(), customerProfile: CustomerProfileCreate$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 InvestmentProfileCreate$ { /** @deprecated use `InvestmentProfileCreate$inboundSchema` instead. */ export const inboundSchema = InvestmentProfileCreate$inboundSchema; /** @deprecated use `InvestmentProfileCreate$outboundSchema` instead. */ export const outboundSchema = InvestmentProfileCreate$outboundSchema; /** @deprecated use `InvestmentProfileCreate$Outbound` instead. */ export type Outbound = InvestmentProfileCreate$Outbound; } export function investmentProfileCreateToJSON( investmentProfileCreate: InvestmentProfileCreate, ): string { return JSON.stringify( InvestmentProfileCreate$outboundSchema.parse(investmentProfileCreate), ); } export function investmentProfileCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InvestmentProfileCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvestmentProfileCreate' from JSON`, ); }