/* * 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 { V3ChallengeAddressEntryRequest, V3ChallengeAddressEntryRequest$inboundSchema, V3ChallengeAddressEntryRequest$Outbound, V3ChallengeAddressEntryRequest$outboundSchema, } from "./v3challengeaddressentryrequest.js"; export type V3ChallengeIndividualRequest = { /** * An array of addresses that belong to the individual. */ addresses?: Array | undefined; /** * The date of birth of the individual. */ dob?: string | undefined; /** * An array of email addresses that belong to the individual. */ 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 V3ChallengeIndividualRequest$inboundSchema: z.ZodType< V3ChallengeIndividualRequest, z.ZodTypeDef, unknown > = z.object({ addresses: z.array(V3ChallengeAddressEntryRequest$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 V3ChallengeIndividualRequest$Outbound = { addresses?: Array | undefined; dob?: string | undefined; emailAddresses?: Array | undefined; firstName?: string | undefined; lastName?: string | undefined; ssn?: string | undefined; }; /** @internal */ export const V3ChallengeIndividualRequest$outboundSchema: z.ZodType< V3ChallengeIndividualRequest$Outbound, z.ZodTypeDef, V3ChallengeIndividualRequest > = z.object({ addresses: z.array(V3ChallengeAddressEntryRequest$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 V3ChallengeIndividualRequest$ { /** @deprecated use `V3ChallengeIndividualRequest$inboundSchema` instead. */ export const inboundSchema = V3ChallengeIndividualRequest$inboundSchema; /** @deprecated use `V3ChallengeIndividualRequest$outboundSchema` instead. */ export const outboundSchema = V3ChallengeIndividualRequest$outboundSchema; /** @deprecated use `V3ChallengeIndividualRequest$Outbound` instead. */ export type Outbound = V3ChallengeIndividualRequest$Outbound; } export function v3ChallengeIndividualRequestToJSON( v3ChallengeIndividualRequest: V3ChallengeIndividualRequest, ): string { return JSON.stringify( V3ChallengeIndividualRequest$outboundSchema.parse( v3ChallengeIndividualRequest, ), ); } export function v3ChallengeIndividualRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3ChallengeIndividualRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3ChallengeIndividualRequest' from JSON`, ); }