/* * 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 CaptureInteractiveGeoLocationGlobals = { source?: string | undefined; }; export type CaptureInteractiveGeoLocationRequest = { /** * The key used to authenticate with the service. For example: 'AA11-AA11-AA11-AA11' */ key?: string | undefined; /** * The latitude of the location you want to return an address for. We recommend using coordinates with up to six decimal degrees for as much granularity as possible. */ latitude: string; /** * The longitude of the location you want to return an address for. We recommend using coordinates with up to six decimal degrees for as much granularity as possible. */ longitude: string; /** * The maximum number of items to return. This can be set to a maximum of 50. */ items?: number | undefined; /** * The maximum radius of the geo-location search in metres. This can be set to a maximum of 200 metres. */ radius?: number | undefined; }; /** @internal */ export type CaptureInteractiveGeoLocationRequest$Outbound = { Key?: string | undefined; Latitude: string; Longitude: string; Items?: number | undefined; Radius?: number | undefined; }; /** @internal */ export const CaptureInteractiveGeoLocationRequest$outboundSchema: z.ZodType< CaptureInteractiveGeoLocationRequest$Outbound, z.ZodTypeDef, CaptureInteractiveGeoLocationRequest > = z.object({ key: z.string().optional(), latitude: z.string(), longitude: z.string(), items: z.number().int().optional(), radius: z.number().int().optional(), }).transform((v) => { return remap$(v, { key: "Key", latitude: "Latitude", longitude: "Longitude", items: "Items", radius: "Radius", }); }); export function captureInteractiveGeoLocationRequestToJSON( captureInteractiveGeoLocationRequest: CaptureInteractiveGeoLocationRequest, ): string { return JSON.stringify( CaptureInteractiveGeoLocationRequest$outboundSchema.parse( captureInteractiveGeoLocationRequest, ), ); }