/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import * as models from "../index.js"; export type CleansingInternationalBatchGlobals = { source?: string | undefined; }; export type VerifyServiceRequest = { /** * The key you want to use to authenticate with the service (you can request we create one for you or create one in your [account section](https://account.loqate.com/account#/)). */ key?: string | undefined; /** * Whether you want geo-coordinates to be appended to your results (if available). There is an additional cost associated with enabling this option. */ geoCode?: boolean | undefined; /** * An array of addresses that you want to verify. The country field must contain a valid ISO2 or ISO3 country code. We recommend that you use the structured fields (i.e. building/thoroughfare etc) over the address line input fields if the data you are cleansing is already structured. The list of available input address fields are the ['Primary Address Fields'](https://support.loqate.com/documentation/fielddescrip/addfields/). */ addresses: Array; options?: models.CleansingInternationalBatchServiceRequestOptions | undefined; }; /** @internal */ export type VerifyServiceRequest$Outbound = { Key: string; GeoCode: boolean; Addresses: Array< models.CleansingInternationalBatchServiceRequestAddress$Outbound >; Options?: | models.CleansingInternationalBatchServiceRequestOptions$Outbound | undefined; }; /** @internal */ export const VerifyServiceRequest$outboundSchema: z.ZodType< VerifyServiceRequest$Outbound, z.ZodTypeDef, VerifyServiceRequest > = z.object({ key: z.string().default("AA11-AA11-AA11-AA11"), geoCode: z.boolean().default(false), addresses: z.array( models.CleansingInternationalBatchServiceRequestAddress$outboundSchema, ), options: models .CleansingInternationalBatchServiceRequestOptions$outboundSchema.optional(), }).transform((v) => { return remap$(v, { key: "Key", geoCode: "GeoCode", addresses: "Addresses", options: "Options", }); }); export function verifyServiceRequestToJSON( verifyServiceRequest: VerifyServiceRequest, ): string { return JSON.stringify( VerifyServiceRequest$outboundSchema.parse(verifyServiceRequest), ); }