/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { V3CompleteAddressEntryRequest, V3CompleteAddressEntryRequest$inboundSchema, V3CompleteAddressEntryRequest$Outbound, V3CompleteAddressEntryRequest$outboundSchema, } from "./v3completeaddressentryrequest.js"; export type V3CompleteIndividualRequest = { /** * Address of the individual. Note that though this is an array, only the first address in the array will be processed. */ addresses?: Array | undefined; /** * The date of birth of the individual in one of these formats: YYYY-MM-DD, YYYY-MM, or MM-DD. Acceptable characters are: numeric with symbol '-'. */ dob?: string | undefined; /** * Email address of the individual. Note that though this is an array, only the first email address in the array will be processed. */ emailAddresses?: Array | undefined; /** * The first name of the individual. */ firstName?: string | undefined; /** * The last name of the individual. */ lastName?: string | undefined; /** * The social security number of the individual. */ ssn?: string | undefined; }; /** @internal */ export const V3CompleteIndividualRequest$inboundSchema: z.ZodType< V3CompleteIndividualRequest, z.ZodTypeDef, unknown > = z.object({ addresses: z.array(V3CompleteAddressEntryRequest$inboundSchema).optional(), dob: z.string().optional(), emailAddresses: z.array(z.string()).optional(), firstName: z.string().optional(), lastName: z.string().optional(), ssn: z.string().optional(), }); /** @internal */ export type V3CompleteIndividualRequest$Outbound = { addresses?: Array | undefined; dob?: string | undefined; emailAddresses?: Array | undefined; firstName?: string | undefined; lastName?: string | undefined; ssn?: string | undefined; }; /** @internal */ export const V3CompleteIndividualRequest$outboundSchema: z.ZodType< V3CompleteIndividualRequest$Outbound, z.ZodTypeDef, V3CompleteIndividualRequest > = z.object({ addresses: z.array(V3CompleteAddressEntryRequest$outboundSchema).optional(), dob: z.string().optional(), emailAddresses: z.array(z.string()).optional(), firstName: z.string().optional(), lastName: z.string().optional(), ssn: 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 V3CompleteIndividualRequest$ { /** @deprecated use `V3CompleteIndividualRequest$inboundSchema` instead. */ export const inboundSchema = V3CompleteIndividualRequest$inboundSchema; /** @deprecated use `V3CompleteIndividualRequest$outboundSchema` instead. */ export const outboundSchema = V3CompleteIndividualRequest$outboundSchema; /** @deprecated use `V3CompleteIndividualRequest$Outbound` instead. */ export type Outbound = V3CompleteIndividualRequest$Outbound; } export function v3CompleteIndividualRequestToJSON( v3CompleteIndividualRequest: V3CompleteIndividualRequest, ): string { return JSON.stringify( V3CompleteIndividualRequest$outboundSchema.parse( v3CompleteIndividualRequest, ), ); } export function v3CompleteIndividualRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3CompleteIndividualRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3CompleteIndividualRequest' from JSON`, ); }