/* * 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 GeocodingInternationalRetrieveNearestPlacesGlobals = { source?: string | undefined; }; export type GeocodingInternationalRetrieveNearestPlacesRequest = { /** * The key to use to authenticate to the service. */ key?: string | undefined; /** * The ISO3 character code for the country to search in. This parameter is optional, but if you wish to use a place for the centre point the country code must be provided. */ country?: string | undefined; /** * A postcode or coordinates (latitude, longitude) of the centre of the search. Can also be a place name (corresponding country code must be provided). */ 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 GeocodingInternationalRetrieveNearestPlacesRequest$Outbound = { Key?: string | undefined; Country?: string | undefined; CentrePoint: string; MaximumItems?: number | undefined; MaximumRadius?: number | undefined; FilterOptions?: string | undefined; }; /** @internal */ export const GeocodingInternationalRetrieveNearestPlacesRequest$outboundSchema: z.ZodType< GeocodingInternationalRetrieveNearestPlacesRequest$Outbound, z.ZodTypeDef, GeocodingInternationalRetrieveNearestPlacesRequest > = z.object({ key: z.string().optional(), country: 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", country: "Country", centrePoint: "CentrePoint", maximumItems: "MaximumItems", maximumRadius: "MaximumRadius", filterOptions: "FilterOptions", }); }); export function geocodingInternationalRetrieveNearestPlacesRequestToJSON( geocodingInternationalRetrieveNearestPlacesRequest: GeocodingInternationalRetrieveNearestPlacesRequest, ): string { return JSON.stringify( GeocodingInternationalRetrieveNearestPlacesRequest$outboundSchema.parse( geocodingInternationalRetrieveNearestPlacesRequest, ), ); }