/* * 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 DistancesAndDirectionsInteractiveDistanceGlobals = { source?: string | undefined; }; export type DistancesAndDirectionsInteractiveDistanceRequest = { /** * The key to use to authenticate to the service. */ key?: string | undefined; /** * The coordinates (latitude, longitude or easting, northing) of the start of the route. A postcode is also valid. */ start: string; /** * The coordinates (latitude, longitude or easting, northing) of the finish of the route. A postcode is also valid. */ finish: string; /** * The coordinates (latitude, longitude or easting, northing) of any waypoints. Postcodes are also valid. */ wayPoints?: Array | undefined; /** * Specifies how the distances between the stores are calculated. */ distanceType?: string | undefined; }; /** @internal */ export type DistancesAndDirectionsInteractiveDistanceRequest$Outbound = { Key?: string | undefined; Start: string; Finish: string; WayPoints?: Array | undefined; DistanceType?: string | undefined; }; /** @internal */ export const DistancesAndDirectionsInteractiveDistanceRequest$outboundSchema: z.ZodType< DistancesAndDirectionsInteractiveDistanceRequest$Outbound, z.ZodTypeDef, DistancesAndDirectionsInteractiveDistanceRequest > = z.object({ key: z.string().optional(), start: z.string(), finish: z.string(), wayPoints: z.array(z.string()).optional(), distanceType: z.string().optional(), }).transform((v) => { return remap$(v, { key: "Key", start: "Start", finish: "Finish", wayPoints: "WayPoints", distanceType: "DistanceType", }); }); export function distancesAndDirectionsInteractiveDistanceRequestToJSON( distancesAndDirectionsInteractiveDistanceRequest: DistancesAndDirectionsInteractiveDistanceRequest, ): string { return JSON.stringify( DistancesAndDirectionsInteractiveDistanceRequest$outboundSchema.parse( distancesAndDirectionsInteractiveDistanceRequest, ), ); }