/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type PhoneNumberValidationInteractiveValidateGlobals = { source?: string | undefined; }; export type PhoneNumberValidationInteractiveValidateRequest = { /** * The key to use to authenticate to the service. */ key?: string | undefined; /** * The mobile/cell phone number to verify. This must be in international format (+447528471411 or 447528471411) if no country code is provided or national format with a Country parameter provided (07528471411 and GB as the Country parameter). */ phone: string; /** * The ISO2 or ISO3 country code of the number you are trying to validate (if provided in national format). */ country?: string | undefined; /** * The option to return the ISO3 country code in the response, if the input Iso3Country is "True" or "Yes" (case insensitive). */ iso3Country?: string | undefined; /** * The option to return additional fields listed as ‘(Optional)’ if the field value is “True” or “Yes” (case insensitive). */ additionalFields?: string | undefined; }; /** @internal */ export type PhoneNumberValidationInteractiveValidateRequest$Outbound = { Key?: string | undefined; Phone: string; Country?: string | undefined; Iso3Country?: string | undefined; AdditionalFields?: string | undefined; }; /** @internal */ export const PhoneNumberValidationInteractiveValidateRequest$outboundSchema: z.ZodType< PhoneNumberValidationInteractiveValidateRequest$Outbound, z.ZodTypeDef, PhoneNumberValidationInteractiveValidateRequest > = z.object({ key: z.string().optional(), phone: z.string(), country: z.string().optional(), iso3Country: z.string().optional(), additionalFields: z.string().optional(), }).transform((v) => { return remap$(v, { key: "Key", phone: "Phone", country: "Country", iso3Country: "Iso3Country", additionalFields: "AdditionalFields", }); }); export function phoneNumberValidationInteractiveValidateRequestToJSON( phoneNumberValidationInteractiveValidateRequest: PhoneNumberValidationInteractiveValidateRequest, ): string { return JSON.stringify( PhoneNumberValidationInteractiveValidateRequest$outboundSchema.parse( phoneNumberValidationInteractiveValidateRequest, ), ); }