/* * 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 V3CompleteAddressEntryRequest = { /** * 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 V3CompleteAddressEntryRequest$inboundSchema: z.ZodType< V3CompleteAddressEntryRequest, 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 V3CompleteAddressEntryRequest$Outbound = { address?: string | undefined; city?: string | undefined; extendedAddress?: string | undefined; postalCode?: string | undefined; region?: string | undefined; }; /** @internal */ export const V3CompleteAddressEntryRequest$outboundSchema: z.ZodType< V3CompleteAddressEntryRequest$Outbound, z.ZodTypeDef, V3CompleteAddressEntryRequest > = 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 V3CompleteAddressEntryRequest$ { /** @deprecated use `V3CompleteAddressEntryRequest$inboundSchema` instead. */ export const inboundSchema = V3CompleteAddressEntryRequest$inboundSchema; /** @deprecated use `V3CompleteAddressEntryRequest$outboundSchema` instead. */ export const outboundSchema = V3CompleteAddressEntryRequest$outboundSchema; /** @deprecated use `V3CompleteAddressEntryRequest$Outbound` instead. */ export type Outbound = V3CompleteAddressEntryRequest$Outbound; } export function v3CompleteAddressEntryRequestToJSON( v3CompleteAddressEntryRequest: V3CompleteAddressEntryRequest, ): string { return JSON.stringify( V3CompleteAddressEntryRequest$outboundSchema.parse( v3CompleteAddressEntryRequest, ), ); } export function v3CompleteAddressEntryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3CompleteAddressEntryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3CompleteAddressEntryRequest' from JSON`, ); }