/* * 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 { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type StoreFinderInteractiveRetrieveCoordinatesResponseItem = { /** * The ID for this company. This is not the URN. */ id?: string | undefined; /** * The name of the place. */ place?: string | undefined; /** * The easting coordinate of the location. Represents a distance in meters east from the most south westerly position of the GB mapping grid. */ easting?: number | undefined; /** * The northing coordinate of the location. Represents a distance in meters north from the most south westerly position of the GB mapping grid. */ northing?: number | undefined; /** * The WGS84 latitude coordinate of the location. */ latitude?: number | undefined; /** * The WGS84 longitude coordinate of the location. */ longitude?: number | undefined; }; export type StoreFinderInteractiveRetrieveCoordinatesResponse = { items?: | Array | undefined; }; /** @internal */ export const StoreFinderInteractiveRetrieveCoordinatesResponseItem$inboundSchema: z.ZodType< StoreFinderInteractiveRetrieveCoordinatesResponseItem, z.ZodTypeDef, unknown > = z.object({ Id: z.string().optional(), Place: z.string().optional(), Easting: z.number().int().optional(), Northing: z.number().int().optional(), Latitude: z.number().optional(), Longitude: z.number().optional(), }).transform((v) => { return remap$(v, { "Id": "id", "Place": "place", "Easting": "easting", "Northing": "northing", "Latitude": "latitude", "Longitude": "longitude", }); }); export function storeFinderInteractiveRetrieveCoordinatesResponseItemFromJSON( jsonString: string, ): SafeParseResult< StoreFinderInteractiveRetrieveCoordinatesResponseItem, SDKValidationError > { return safeParse( jsonString, (x) => StoreFinderInteractiveRetrieveCoordinatesResponseItem$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'StoreFinderInteractiveRetrieveCoordinatesResponseItem' from JSON`, ); } /** @internal */ export const StoreFinderInteractiveRetrieveCoordinatesResponse$inboundSchema: z.ZodType< StoreFinderInteractiveRetrieveCoordinatesResponse, z.ZodTypeDef, unknown > = z.object({ Items: z.array( z.lazy(() => StoreFinderInteractiveRetrieveCoordinatesResponseItem$inboundSchema ), ).optional(), }).transform((v) => { return remap$(v, { "Items": "items", }); }); export function storeFinderInteractiveRetrieveCoordinatesResponseFromJSON( jsonString: string, ): SafeParseResult< StoreFinderInteractiveRetrieveCoordinatesResponse, SDKValidationError > { return safeParse( jsonString, (x) => StoreFinderInteractiveRetrieveCoordinatesResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'StoreFinderInteractiveRetrieveCoordinatesResponse' from JSON`, ); }