/* * 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 GeocodingUKRetrieveNearestPlacesGlobals = { source?: string | undefined; }; export type GeocodingUKRetrieveNearestPlacesRequest = { /** * The key to use to authenticate to the service. */ key?: string | undefined; /** * A postcode or coordinates (latitude, longitude or easting, nothing) of the centre of the search. Can also be a place name. */ centrePoint: string; /** * The maximum number of items to return. If 0, all items are returned. */ maximumItems?: number | undefined; /** * The maximum search distance in KM between the origin and a point of interest. If blank or 0, all items are returned. */ maximumRadius?: number | undefined; /** * The type of filter to apply where the search returns a list of towns. */ filterOptions?: string | undefined; }; /** @internal */ export type GeocodingUKRetrieveNearestPlacesRequest$Outbound = { Key?: string | undefined; CentrePoint: string; MaximumItems?: number | undefined; MaximumRadius?: number | undefined; FilterOptions?: string | undefined; }; /** @internal */ export const GeocodingUKRetrieveNearestPlacesRequest$outboundSchema: z.ZodType< GeocodingUKRetrieveNearestPlacesRequest$Outbound, z.ZodTypeDef, GeocodingUKRetrieveNearestPlacesRequest > = z.object({ key: z.string().optional(), centrePoint: z.string(), maximumItems: z.number().int().optional(), maximumRadius: z.number().optional(), filterOptions: z.string().optional(), }).transform((v) => { return remap$(v, { key: "Key", centrePoint: "CentrePoint", maximumItems: "MaximumItems", maximumRadius: "MaximumRadius", filterOptions: "FilterOptions", }); }); export function geocodingUKRetrieveNearestPlacesRequestToJSON( geocodingUKRetrieveNearestPlacesRequest: GeocodingUKRetrieveNearestPlacesRequest, ): string { return JSON.stringify( GeocodingUKRetrieveNearestPlacesRequest$outboundSchema.parse( geocodingUKRetrieveNearestPlacesRequest, ), ); }