/* * 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"; export type V3ChallengeAddressEntryRequest = { /** * The street address of the individual. */ address?: string | undefined; /** * The city of the individual. */ city?: string | undefined; /** * The apartment number or other extended address information. */ extendedAddress?: string | undefined; /** * The zip code of the individual. It can be either 5 digits (XXXXX) or ZIP+4 (XXXXX-XXXX). */ postalCode?: string | undefined; /** * The state or locality of the individual. */ region?: string | undefined; }; /** @internal */ export const V3ChallengeAddressEntryRequest$inboundSchema: z.ZodType< V3ChallengeAddressEntryRequest, z.ZodTypeDef, unknown > = z.object({ address: z.string().optional(), city: z.string().optional(), extendedAddress: z.string().optional(), postalCode: z.string().optional(), region: z.string().optional(), }); /** @internal */ export type V3ChallengeAddressEntryRequest$Outbound = { address?: string | undefined; city?: string | undefined; extendedAddress?: string | undefined; postalCode?: string | undefined; region?: string | undefined; }; /** @internal */ export const V3ChallengeAddressEntryRequest$outboundSchema: z.ZodType< V3ChallengeAddressEntryRequest$Outbound, z.ZodTypeDef, V3ChallengeAddressEntryRequest > = z.object({ address: z.string().optional(), city: z.string().optional(), extendedAddress: z.string().optional(), postalCode: z.string().optional(), region: 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 V3ChallengeAddressEntryRequest$ { /** @deprecated use `V3ChallengeAddressEntryRequest$inboundSchema` instead. */ export const inboundSchema = V3ChallengeAddressEntryRequest$inboundSchema; /** @deprecated use `V3ChallengeAddressEntryRequest$outboundSchema` instead. */ export const outboundSchema = V3ChallengeAddressEntryRequest$outboundSchema; /** @deprecated use `V3ChallengeAddressEntryRequest$Outbound` instead. */ export type Outbound = V3ChallengeAddressEntryRequest$Outbound; } export function v3ChallengeAddressEntryRequestToJSON( v3ChallengeAddressEntryRequest: V3ChallengeAddressEntryRequest, ): string { return JSON.stringify( V3ChallengeAddressEntryRequest$outboundSchema.parse( v3ChallengeAddressEntryRequest, ), ); } export function v3ChallengeAddressEntryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3ChallengeAddressEntryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3ChallengeAddressEntryRequest' from JSON`, ); }