/** * Narrow tool inputs to the maps-sdk parameter types. * * Tool schemas accept plain strings and numbers so they stay small in * tools/list; the SDK types are unions of literals. These helpers check values * against the SDK's own runtime lists, so a bad value fails with a clear * message here instead of being cast through. */ import { type BBox, type ConnectorType, type Fuel, type GeographyType, type Language, type MapcodeType, type OpeningHoursMode, type POICategory } from "@tomtom-org/maps-sdk/core"; import type { DepartArriveParams, GeoBias, GeocodingParams, MaxNumberOfAlternatives, RelatedPoisRequest, SearchIndexType, TimeZoneRequest } from "@tomtom-org/maps-sdk/services"; /** Narrows a string to one of a closed list of values. */ export declare function isOneOf(allowed: readonly T[], value: string): value is T; export declare function toPOICategories(values: string[] | undefined): POICategory[] | undefined; type GeocodingIndexType = NonNullable[number]; export declare function toMapcodes(values: string[] | undefined): MapcodeType[] | undefined; export declare function toSearchIndexTypes(value: string | undefined, field?: string): SearchIndexType[] | undefined; /** Geocoding has no POI index. */ export declare function toGeocodingIndexTypes(value: string | undefined): GeocodingIndexType[] | undefined; export declare function toGeographyTypes(value: string | undefined, field: string): GeographyType[] | undefined; export declare function toFuelTypes(value: string | undefined): Fuel[] | undefined; /** Brand names are free text: split the comma-separated list, check only its length. */ export declare function toBrands(value: string | undefined): string[] | undefined; export declare function toOpeningHours(value: string | undefined): OpeningHoursMode | undefined; export declare function toTimeZone(value: string | undefined): TimeZoneRequest | undefined; export declare function toRelatedPois(value: string | undefined): RelatedPoisRequest | undefined; /** The search tools' comma-separated connectorSet. */ export declare function toConnectorTypes(value: string | undefined): ConnectorType[] | undefined; /** * The SDK sends the language tag as given and does not check it; its Language * type lists only the tags it documents. Pass the caller's tag through rather * than reject tags such as "en" that the type does not list. */ export declare function toLanguage(value: string | undefined): Language | undefined; export declare function toMaxAlternatives(value: number | undefined): MaxNumberOfAlternatives | undefined; /** [minLon, minLat, maxLon, maxLat]; the schemas already require four numbers. */ export declare function toBBox(values: number[] | undefined): BBox | undefined; /** * Where a search looks: around a position, within its radius when one is given, or * inside a bounding box. The Search API ignores a radius without a position, and the * SDK takes a position or a bounding box, not both. */ export declare function toGeoBias({ position, radius, boundingBox, }: { position?: number[]; radius?: number; boundingBox?: number[]; }): GeoBias | undefined; export declare function toDate(value: string, field: string): Date; /** The departure or arrival time; the API takes only one. */ export declare function toWhen({ departAt, arriveAt, }: { departAt?: string; arriveAt?: string; }): DepartArriveParams | undefined; export {}; //# sourceMappingURL=sdkInputs.d.ts.map