@tomtom-org/maps-sdk 1.0.0-rc.5 → 1.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, BBox, ChargingPoint, ChargingStation, CommonPlaceProps, Connector, ConnectorType, CurveDetectionOptions, EntryPoint, Fuel, GeographyType, GeopoliticalView, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceDataSources, PlaceType, Places, PolygonFeature, PolygonFeatures, ReachableRangeBudget, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SDKErrorCode, SearchPlaceProps, TimeZone, TomTomAPIHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, inputSectionTypesWithGuidance } from "@tomtom-org/maps-sdk/core";
1
+ import { APIErrorDetails, AddressProperties, AreaAnalyticsMetricKey, Avoidable, BBox, ChargingPoint, ChargingStation, CommonPlaceProps, Connector, ConnectorType, CurveDetectionOptions, EntryPoint, Fuel, GeographyType, GeopoliticalView, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, PathLike, Place, PlaceDataSources, PlaceType, Places, PolygonFeature, PolygonFeatures, PrivatePreviewAccess, ReachableRangeBudget, RevGeoAddressProps, RoadShieldReference, RoutePlanningLocation, Routes, SDKErrorCode, SearchPlaceProps, TimeZone, TomTomAPIHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, inputSectionTypesWithGuidance } from "@tomtom-org/maps-sdk/core";
2
2
  import { core } from "zod";
3
3
  //#region src/along-route-search/types/alongRoutePlaceProps.d.ts
4
4
  /**
@@ -210,9 +210,7 @@ interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonPro
210
210
  /**
211
211
  * @ignore
212
212
  */
213
- declare enum APICode {
214
- TOO_MANY_REQUESTS = 429
215
- }
213
+ type APICode = 429;
216
214
  //#endregion
217
215
  //#region src/shared/types/fetch.d.ts
218
216
  /**
@@ -244,23 +242,6 @@ type FetchInput<PostData = void> = ({
244
242
  method: 'POST';
245
243
  } & PostObject<PostData>);
246
244
  //#endregion
247
- //#region src/shared/types/privatePreviewAccess.d.ts
248
- /**
249
- * The access a Private Preview API needs on the API key, and where to request it.
250
- *
251
- * @group Errors
252
- */
253
- export type PrivatePreviewAccess = {
254
- /**
255
- * The API the key needs access to, as TomTom Sales names it, such as `'Calculate Reachable Range'`.
256
- */
257
- product: string;
258
- /**
259
- * Where to request that access.
260
- */
261
- requestAccessURL: string;
262
- };
263
- //#endregion
264
245
  //#region src/shared/types/servicesTypes.d.ts
265
246
  /**
266
247
  * The name of a service the SDK calls, as an {@link SDKError}'s `service` reports it.
@@ -294,7 +275,8 @@ type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<Omit<Glo
294
275
  * Whether the SDK validates the request parameters against the expected schema before sending them.
295
276
  *
296
277
  * @remarks
297
- * Validation also rejects a parameter the service doesn't know, and names it. To skip validation,
278
+ * Validation also rejects a parameter the service doesn't know, and names it. Only top-level names
279
+ * are checked: an unknown key inside an object parameter, such as `filters`, goes unreported. To skip validation,
298
280
  * set it to `false`, which then drops an unknown parameter silently. The `commonBaseURL` check
299
281
  * (`INSECURE_BASE_URL`) runs either way.
300
282
  *
@@ -306,9 +288,6 @@ type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<Omit<Glo
306
288
  *
307
289
  * @ignore
308
290
  *
309
- * @remarks
310
- * Useful for tracking, logging, or debugging API requests before they are sent to the server.
311
- *
312
291
  * @param apiRequest - The API request to be sent (usually a URL for GET requests or URL with body for POST requests)
313
292
  */
314
293
  onAPIRequest?: (apiRequest: ApiRequest) => void;
@@ -320,7 +299,6 @@ type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<Omit<Glo
320
299
  * @remarks
321
300
  * Called as soon as the API response is received, before parsing.
322
301
  * The request object is the same reference as provided to {@link onAPIRequest}.
323
- * Useful for tracking, logging, or debugging API request-response pairs.
324
302
  *
325
303
  * A failed request calls it too, with the error the request threw in place of the body, such as
326
304
  * one carrying the HTTP `status`. Check the argument before reading it as a body.
@@ -359,8 +337,8 @@ type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<Omit<Glo
359
337
  * The SDK handles two distinct categories of errors:
360
338
  * 1. Programming errors are configuration or usage errors in your application,
361
339
  * such as passing incorrect types to parameters or functions.
362
- * 2. API errors are recoverable errors that occur during SDK operations,
363
- * such as network failures or invalid API responses.
340
+ * 2. API errors occur during SDK operations, such as network failures or invalid API responses.
341
+ * `code` says which, and `canRetry` whether the same call is likely to succeed later.
364
342
  *
365
343
  * A service call rejects with one, even for a request it cannot build at all, such as one with a geometry type
366
344
  * that geometry search does not support sent with `validateRequest: false`. That one is an `INVALID_REQUEST`.
@@ -432,7 +410,7 @@ export declare const APIErrorCode: { readonly [K in APICode as number]: string;
432
410
  *
433
411
  * @group Errors
434
412
  */
435
- export declare class SDKServiceError extends SDKError {
413
+ export declare class SDKServiceError extends SDKError implements APIErrorDetails {
436
414
  /**
437
415
  * HTTP status code of the failed API request.
438
416
  *
@@ -444,17 +422,7 @@ export declare class SDKServiceError extends SDKError {
444
422
  * - `500`: Internal Server Error
445
423
  */
446
424
  readonly status?: number;
447
- /**
448
- * The API's own name for the error, from its `detailedError.code`, when its response carries one.
449
- *
450
- * On an `INSUFFICIENT_PERMISSIONS` it tells the causes apart: `'Forbidden'` when the API is not enabled for
451
- * the key, `'InvalidReferer'` when the key's domain restriction refused the page.
452
- */
453
425
  readonly apiErrorCode?: string;
454
- /**
455
- * The access the API key lacks, on an `INSUFFICIENT_PERMISSIONS` from a Private Preview API that did not
456
- * name another cause. The message names it too.
457
- */
458
426
  readonly privatePreviewAccess?: PrivatePreviewAccess;
459
427
  /**
460
428
  * Creates a new SDKServiceError instance.
@@ -466,10 +434,7 @@ export declare class SDKServiceError extends SDKError {
466
434
  * @param service - Name of the service that generated the error.
467
435
  * @param status - HTTP status code of the failed request.
468
436
  */
469
- constructor(message: string, service: ServiceName, status?: number, options?: {
470
- apiErrorCode?: string;
471
- privatePreviewAccess?: PrivatePreviewAccess;
472
- });
437
+ constructor(message: string, service: ServiceName, status?: number, options?: APIErrorDetails);
473
438
  }
474
439
  /**
475
440
  * Error class for cancelled service calls.
@@ -664,7 +629,7 @@ export type BoundingBoxGeoBias = {
664
629
  * const within2km: GeoBias = { position: [4.9, 52.3], radiusMeters: 2000 };
665
630
  *
666
631
  * // Inside the visible map area
667
- * const inViewport: GeoBias = { boundingBox: map.getBounds().toArray().flat() as BBox };
632
+ * const inViewport: GeoBias = { boundingBox: map.getBBox() };
668
633
  * ```
669
634
  *
670
635
  * @group Places Search
@@ -691,43 +656,32 @@ export type GeoBias = (PointGeoBias & {
691
656
  * - `XStr`: Cross Streets - Intersections of two streets
692
657
  * - `POI`: Points of Interest (businesses, landmarks, facilities)
693
658
  *
694
- * By default, `extendedPostalCodesFor` includes extended postal codes for all indexes except `Geo`.
695
- * Use this type to request them explicitly for specific indexes.
696
- *
697
- * @example
698
- * ```typescript
699
- * // Request extended postal codes for addresses and POIs
700
- * const indexes: SearchIndexType[] = ['PAD', 'Addr', 'POI'];
701
- * ```
702
- *
703
659
  * @group Places Search
704
660
  */
705
661
  export type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' | 'POI';
706
662
  /**
707
663
  * The parameters the places services share.
708
664
  *
709
- * Search, geocoding, and reverse geocoding use them to customise query behaviour, filter results,
665
+ * Search and geocoding use them to customise query behaviour, filter results,
710
666
  * and control response formatting.
711
667
  *
712
- * @typeParam ApiRequest - The API request type (typically URL or FetchInput)
668
+ * @typeParam ApiRequest - The API request type (`GetObject` or `PostObject`)
713
669
  * @typeParam ApiResponse - The API response type
714
670
  *
715
671
  * @remarks
716
672
  * They apply to:
717
673
  * - {@link discoverPlaces}
718
674
  * - {@link geocode}
719
- * - {@link reverseGeocode}
720
675
  *
721
676
  * They cover:
722
677
  * - Result limits and pagination
723
- * - Geographic biasing for location-aware results
724
678
  * - Additional data inclusion (mapcodes, extended postal codes)
725
679
  * - Geopolitical view context for disputed territories
726
680
  *
727
681
  * @example
728
682
  * ```typescript
729
683
  * // Search with mapcodes and specific geopolitical view
730
- * const detailedSearch: CommonPlacesParams<URL, Response> = {
684
+ * const detailedSearch: CommonPlacesParams<GetObject, Response> = {
731
685
  * geopoliticalView: 'IN', // India's perspective
732
686
  * mapcodes: ['Local', 'International'],
733
687
  * extendedPostalCodesFor: ['PAD', 'POI'],
@@ -735,7 +689,7 @@ export type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' | 'POI';
735
689
  * };
736
690
  *
737
691
  * // Address search with extended postal codes
738
- * const addressSearch: CommonPlacesParams<URL, Response> = {
692
+ * const addressSearch: CommonPlacesParams<GetObject, Response> = {
739
693
  * extendedPostalCodesFor: ['Geo', 'PAD', 'Addr'],
740
694
  * limit: 15
741
695
  * };
@@ -775,7 +729,7 @@ export type CommonPlacesParams<ApiRequest, ApiResponse> = CommonServiceParams<Ap
775
729
  *
776
730
  * A regular postal code is "10001" (basic ZIP code), and an extended one "10001-1234" (ZIP+4 format).
777
731
  *
778
- * Note that including them for geographies can significantly increase response size.
732
+ * Including them for geographies can significantly increase response size.
779
733
  *
780
734
  * @example
781
735
  * ```typescript
@@ -1054,10 +1008,7 @@ export type VehicleModel = {
1054
1008
  //#endregion
1055
1009
  //#region src/shared/types/vehicleRestrictionParams.d.ts
1056
1010
  /**
1057
- * Whether the vehicle carries an electronic toll collection transponder.
1058
- *
1059
- * It determines which toll roads the routing engine may use. Some tolls can only be paid by
1060
- * transponder, others only without one.
1011
+ * The values {@link TollTransponder} takes.
1061
1012
  *
1062
1013
  * @group Vehicle
1063
1014
  */
@@ -1080,6 +1031,8 @@ export declare const tollTransponderOptions: readonly ["all", "unknown", "none"]
1080
1031
  export type TollTransponder = (typeof tollTransponderOptions)[number];
1081
1032
  /**
1082
1033
  * The vehicle parameters for the restrictions applied during route planning.
1034
+ *
1035
+ * @group Vehicle
1083
1036
  */
1084
1037
  export type VehicleRestrictions = {
1085
1038
  /**
@@ -1142,7 +1095,7 @@ export type VehicleState = {
1142
1095
  * It improves the initial route calculation by considering the vehicle's current direction of
1143
1096
  * travel.
1144
1097
  *
1145
- * Allowed values are 0-359.
1098
+ * Allowed values run from 0 up to, but not including, 360.
1146
1099
  *
1147
1100
  * @example
1148
1101
  * ```typescript
@@ -1215,12 +1168,8 @@ export type VehicleParameters = {
1215
1168
  //#endregion
1216
1169
  //#region src/shared/types/commonRoutingParams.d.ts
1217
1170
  /**
1218
- * The available route types, each naming the optimisation that route calculation uses:
1219
- * * `fast` optimises for travel time, while keeping the routes sensible. For example, the calculation may avoid shortcuts along inconvenient side roads or long detours that only save very little time.
1220
- * * `short` finds a good compromise between small travel time and short travel distance.
1221
- * * `efficient` finds a good compromise between small travel time and low fuel or energy consumption.
1222
- * * `thrilling` includes interesting or challenging roads and uses as few motorways as possible.
1223
- * Routes planned with routeType=thrilling are limited to 900km.
1171
+ * The available route types, each naming the optimisation that route calculation uses, as {@link RouteType}
1172
+ * describes.
1224
1173
  *
1225
1174
  * @group Routing
1226
1175
  */
@@ -1242,8 +1191,7 @@ export declare const routeTypes: readonly ["fast", "short", "efficient", "thrill
1242
1191
  * - May use smaller roads to save distance
1243
1192
  * - Useful for short trips or when fuel costs matter
1244
1193
  *
1245
- * - `efficient` minimises fuel or energy consumption.
1246
- * - Optimizes for least energy use
1194
+ * - `efficient` balances travel time against fuel or energy consumption.
1247
1195
  * - Avoids rapid acceleration/deceleration
1248
1196
  *
1249
1197
  * - `thrilling` plans scenic and engaging routes.
@@ -1380,14 +1328,7 @@ export type CostModel = {
1380
1328
  */
1381
1329
  traffic?: TrafficInput;
1382
1330
  /**
1383
- * The type of optimisation that route calculation uses.
1384
- * The values are:
1385
- *
1386
- * * `fast` optimises for travel time, while keeping the routes sensible. For example, the calculation may avoid shortcuts along inconvenient side roads or long detours that only save very little time.
1387
- * * `short` finds a good compromise between small travel time and short travel distance.
1388
- * * `efficient` finds a good compromise between small travel time and low fuel or energy consumption.
1389
- * * `thrilling` includes interesting or challenging roads and uses as few motorways as possible.
1390
- * Routes planned with routeType=thrilling are limited to 900km.
1331
+ * The type of optimisation that route calculation uses, as {@link RouteType} describes.
1391
1332
  * @default fast
1392
1333
  */
1393
1334
  routeType?: RouteType;
@@ -1430,7 +1371,7 @@ export type LocalDateTime = `${number}-${number}-${number}T${number}:${number}:$
1430
1371
  *
1431
1372
  * @example
1432
1373
  * ```typescript
1433
- * // Depart at 08:15 in Tokyo, wherever the code runs
1374
+ * // Depart at 08:15 local time at the origin, wherever the code runs
1434
1375
  * const departParams: DepartArriveParams = {
1435
1376
  * option: 'departAt',
1436
1377
  * localDateTime: '2026-10-19T08:15:00'
@@ -1665,13 +1606,10 @@ export type CommonSearchParams<ApiRequest, ApiResponse> = CommonPlacesParams<Api
1665
1606
  * The format and detail level of the POI opening hours data that the response includes.
1666
1607
  *
1667
1608
  * @remarks
1668
- * Each mode gives a different level of detail about when a POI is open for business.
1669
- *
1670
1609
  * Use it to:
1671
1610
  * - Display "Open Now" status
1672
1611
  * - Show full weekly schedule
1673
1612
  * - Plan visits during open hours
1674
- * - Filter to currently open locations
1675
1613
  *
1676
1614
  * @example
1677
1615
  * ```typescript
@@ -1856,18 +1794,12 @@ export type SearchSummary = {
1856
1794
  */
1857
1795
  totalResults?: number;
1858
1796
  /**
1859
- * The maximum fuzzy matching level used to find results.
1797
+ * The maximum fuzzy level used to find results, one of the levels {@link FuzzyLevel} describes.
1860
1798
  *
1861
1799
  * It shows how much the search relaxed exact matching. Higher values mean more tolerance for
1862
1800
  * typos and variations.
1863
1801
  *
1864
1802
  * @remarks
1865
- * Fuzzy levels (typically 1-4):
1866
- * - 1: Single character variation (typo, insertion, deletion)
1867
- * - 2: Two character variations
1868
- * - 3: Three character variations
1869
- * - 4: Four character variations
1870
- *
1871
1803
  * It is low when exact or near-exact matching finds the results, and increases to find matches
1872
1804
  * when the query has typos.
1873
1805
  *
@@ -1877,7 +1809,7 @@ export type SearchSummary = {
1877
1809
  * @example
1878
1810
  * ```typescript
1879
1811
  * // Query: "amstrdam" (typo)
1880
- * fuzzyLevel: 2 // Needed 2-character correction to match "amsterdam"
1812
+ * fuzzyLevel: 2 // Needed spell checking to match "amsterdam"
1881
1813
  *
1882
1814
  * // Query: "amsterdam" (correct)
1883
1815
  * fuzzyLevel: 1 // Exact match, no fuzzy matching needed
@@ -2081,11 +2013,17 @@ type CommonSearchPlaceResultAPI = Omit<SearchPlaceProps, 'distance' | 'position'
2081
2013
  dist?: number;
2082
2014
  viewport?: ViewportAPI;
2083
2015
  boundingBox?: BoundingBoxAPI;
2016
+ entityType?: string;
2084
2017
  entryPoints?: EntryPointAPI[];
2085
- address?: AddressProperties;
2018
+ addressRanges?: AddressRangesAPI;
2086
2019
  poi?: POIAPI;
2087
2020
  chargingStations?: ChargingStationAPI[];
2088
2021
  };
2022
+ /**
2023
+ * The fields every places result maps alike, whether a search or a geocoding one.
2024
+ * @ignore
2025
+ */
2026
+ type PlaceResultFieldsAPI = Pick<CommonSearchPlaceResultAPI, 'id' | 'position' | 'dist' | 'boundingBox' | 'viewport' | 'entityType' | 'entryPoints' | 'addressRanges'>;
2089
2027
  /**
2090
2028
  * A places response holding only the summary and the results, as geometry search, along-route search and place
2091
2029
  * details answer.
@@ -2214,7 +2152,7 @@ type AlongRouteSearchParams = CommonSearchParams<AlongRouteSearchRequestAPI, Alo
2214
2152
  * route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]]
2215
2153
  * ```
2216
2154
  */
2217
- route: LineString | Route | Position[];
2155
+ route: LineString | PathLike;
2218
2156
  /**
2219
2157
  * Maximum allowed detour time in seconds, a positive integer up to `3600` (one hour);
2220
2158
  * request validation rejects a larger one.
@@ -2242,6 +2180,15 @@ type AlongRouteSearchParams = CommonSearchParams<AlongRouteSearchRequestAPI, Alo
2242
2180
  };
2243
2181
  //#endregion
2244
2182
  //#region src/fuzzy-search/types/fuzzySearchResponse.d.ts
2183
+ /**
2184
+ * Response from the fuzzy search service.
2185
+ *
2186
+ * The places matching the search query, with metadata about the detected query intents
2187
+ * (coordinates, nearby searches, what3words or bookmarks).
2188
+ *
2189
+ * @group Fuzzy Search
2190
+ */
2191
+ type FuzzySearchResponse = Places<SearchPlaceProps, FuzzySearchFeatureCollectionProps>;
2245
2192
  /**
2246
2193
  * Additional properties for fuzzy search feature collection.
2247
2194
  *
@@ -2556,7 +2503,7 @@ type FuzzySearchParams = CommonSearchParams<GetObject, FuzzySearchResponseAPI> &
2556
2503
  /**
2557
2504
  * Maximum fuzziness level to use.
2558
2505
  *
2559
- * It sets the last spell-checking level the search tries, of those `minFuzzyLevel` lists.
2506
+ * It sets the last spell-checking level the search tries, of those {@link FuzzyLevel} lists.
2560
2507
  * Higher values allow more variations but may include irrelevant results.
2561
2508
  *
2562
2509
  * @remarks
@@ -2626,16 +2573,7 @@ type GeocodingResponse = Places<GeocodingProps, SearchSummary>;
2626
2573
  /**
2627
2574
  * @ignore
2628
2575
  */
2629
- type GeocodingResultAPI = Omit<GeocodingProps, 'distance' | 'position' | 'boundingBox' | 'addressRanges' | 'geographyType' | 'entryPoints'> & {
2630
- id: string;
2631
- position: LatLonAPI;
2632
- dist?: number;
2633
- boundingBox?: BoundingBoxAPI;
2634
- viewport?: ViewportAPI;
2635
- entityType?: string;
2636
- entryPoints?: EntryPointAPI[];
2637
- addressRanges?: AddressRangesAPI;
2638
- };
2576
+ type GeocodingResultAPI = Omit<GeocodingProps, 'distance' | 'position' | 'boundingBox' | 'addressRanges' | 'geographyType' | 'entryPoints'> & PlaceResultFieldsAPI;
2639
2577
  /**
2640
2578
  * @ignore
2641
2579
  */
@@ -2659,12 +2597,7 @@ type GeocodingIndexTypesAbbreviation = Exclude<SearchIndexType, 'POI'>;
2659
2597
  * can place markers on maps or perform spatial operations.
2660
2598
  *
2661
2599
  * @remarks
2662
- * This service is optimized for address lookups and does not return POIs.
2663
- * For POI search, use {@link discoverPlaces} instead.
2664
- *
2665
- * It tolerates typos and incomplete addresses, handles various address formats and supports
2666
- * street addresses, intersections and cross streets. It works with geographies (cities,
2667
- * counties, states, countries) and returns structured address components.
2600
+ * What geocoding finds, and what it tolerates, is on {@link geocode}.
2668
2601
  *
2669
2602
  * @example
2670
2603
  * ```typescript
@@ -2860,7 +2793,7 @@ type GeometryDataResponseAPI = {
2860
2793
  * const ids: GeometriesInput = ['g1234567890', 'g0987654321'];
2861
2794
  * ```
2862
2795
  *
2863
- * @group Geometry
2796
+ * @group Geometry Data
2864
2797
  */
2865
2798
  type GeometriesInput = string[];
2866
2799
  /**
@@ -2868,7 +2801,7 @@ type GeometriesInput = string[];
2868
2801
  *
2869
2802
  * Extended by {@link GeometryDataParams} and {@link GeometryPlaceParams}.
2870
2803
  *
2871
- * @group Geometry
2804
+ * @group Geometry Data
2872
2805
  */
2873
2806
  type CommonServiceParamsWithZoom = CommonServiceParams<GetObject, GeometryDataResponseAPI> & {
2874
2807
  /**
@@ -2911,7 +2844,7 @@ type CommonServiceParamsWithZoom = CommonServiceParams<GetObject, GeometryDataRe
2911
2844
  * };
2912
2845
  * ```
2913
2846
  *
2914
- * @group Geometry
2847
+ * @group Geometry Data
2915
2848
  */
2916
2849
  type GeometryDataParams = CommonServiceParamsWithZoom & {
2917
2850
  /**
@@ -2958,7 +2891,7 @@ type GeometryDataParams = CommonServiceParamsWithZoom & {
2958
2891
  * };
2959
2892
  * ```
2960
2893
  *
2961
- * @group Geometry
2894
+ * @group Geometry Data
2962
2895
  */
2963
2896
  type GeometryPlaceParams = CommonServiceParamsWithZoom & {
2964
2897
  /**
@@ -3003,7 +2936,7 @@ type GeometryPlaceParams = CommonServiceParamsWithZoom & {
3003
2936
  * };
3004
2937
  * ```
3005
2938
  *
3006
- * @group Geometry
2939
+ * @group Geometry Data
3007
2940
  */
3008
2941
  type GeometryParams = GeometryDataParams | GeometryPlaceParams;
3009
2942
  //#endregion
@@ -3015,7 +2948,7 @@ type GeometryParams = GeometryDataParams | GeometryPlaceParams;
3015
2948
  *
3016
2949
  * @typeParam P - The properties of the places passed in.
3017
2950
  *
3018
- * @group Geometry
2951
+ * @group Geometry Data
3019
2952
  */
3020
2953
  type PlaceGeometryProps<P extends CommonPlaceProps = CommonPlaceProps> = P & {
3021
2954
  /**
@@ -3037,21 +2970,17 @@ type PlaceGeometryProps<P extends CommonPlaceProps = CommonPlaceProps> = P & {
3037
2970
  * You can fetch up to 20 geometries in a single call, at scales from countries down to building
3038
2971
  * footprints, as standard GeoJSON Polygon/MultiPolygon features.
3039
2972
  *
3040
- * Use it to display city or country boundaries on maps, show POI building footprints, create
3041
- * geofences for spatial queries, visualise administrative divisions, or calculate areas and
3042
- * spatial relationships.
3043
- *
3044
2973
  * It returns polygons, not places, so pass the result to `GeometriesModule.show()`, not
3045
2974
  * `PlacesModule.show()`. The `geometryId` comes from a prior search result.
3046
2975
  *
3047
2976
  * A `Places` collection gets each polygon its place's properties, as {@link PlaceGeometryProps}.
2977
+ * Places that share a footprint give it the properties of the first of them, the best ranked.
3048
2978
  * A polygon the service returns for no place of the collection has `null` properties. A `Place[]`
3049
- * or geometry IDs return the polygons with the service's own properties.
2979
+ * or geometry IDs return the polygons with the service's own properties. A geometry the service
2980
+ * can't return, such as one with an unknown ID, is left out of the result.
3050
2981
  *
3051
2982
  * @param params - The geometry IDs or places to fetch boundaries for.
3052
2983
  *
3053
- * @returns Polygon features of the area boundaries.
3054
- *
3055
2984
  * @example
3056
2985
  * ```typescript
3057
2986
  * // Fetch geometry by ID
@@ -3077,7 +3006,7 @@ type PlaceGeometryProps<P extends CommonPlaceProps = CommonPlaceProps> = P & {
3077
3006
  * @see [Places Quickstart Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/quickstart)
3078
3007
  * @see [Geometry Data Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/geometry-data)
3079
3008
  *
3080
- * @group Geometry
3009
+ * @group Geometry Data
3081
3010
  */
3082
3011
  export declare function geometryData<P extends CommonPlaceProps>(params: GeometryPlaceParams & {
3083
3012
  geometries: Places<P>;
@@ -3132,9 +3061,7 @@ type GeometrySearchResponseAPI = SearchResultsResponseAPI;
3132
3061
  * such as "restaurants in this neighborhood" or "hotels within these city boundaries".
3133
3062
  *
3134
3063
  * @remarks
3135
- * Pass these to {@link discoverPlaces}, which picks the request variant from the params you give it.
3136
- * A `route` property selects along-route search, a `geometries` property selects geometry search,
3137
- * and neither selects fuzzy search.
3064
+ * Pass these to {@link discoverPlaces}, which runs a geometry search when given `geometries`.
3138
3065
  *
3139
3066
  * Geometry search searches within multiple geometries at once and supports polygons, multipolygons
3140
3067
  * and circles. It can use geometries from previous search results, and combines with text queries
@@ -3192,7 +3119,7 @@ type GeometrySearchParams = CommonSearchParams<GeometrySearchRequestAPI, Geometr
3192
3119
  * - `PolygonFeatures` - Feature collection with polygon geometries
3193
3120
  *
3194
3121
  * Only a polygon's outer ring is sent, so holes are ignored. The ring is sampled down to 50 vertices,
3195
- * and a `MultiPolygon` of more than 50 polygons keeps its 50 largest.
3122
+ * and a `MultiPolygon` of more than 50 polygons keeps the 50 with the largest bounding boxes.
3196
3123
  *
3197
3124
  * @example
3198
3125
  * ```typescript
@@ -3289,7 +3216,6 @@ type SearchGeometryInput = Polygon | MultiPolygon | Circle | PolygonFeatures;
3289
3216
  //#endregion
3290
3217
  //#region src/place-details/types/placeDetailsResponseAPI.d.ts
3291
3218
  /**
3292
- * Its results are sorted in descending order by score.
3293
3219
  * @ignore
3294
3220
  */
3295
3221
  type PlaceDetailsResponseAPI = SearchResultsResponseAPI;
@@ -3397,11 +3323,12 @@ type PlaceDetailsResponse = Place<SearchPlaceProps> | undefined;
3397
3323
  *
3398
3324
  * const placeDetails = await getPlaceDetails({
3399
3325
  * entityId: place.id,
3400
- * openingHours: 'nextSevenDays'
3326
+ * openingHours: 'nextSevenDays',
3327
+ * relatedPois: 'parent'
3401
3328
  * });
3402
3329
  *
3403
3330
  * // Navigate to related POI
3404
- * const relatedPOI = place.properties.relatedPois?.[0];
3331
+ * const relatedPOI = placeDetails?.properties.relatedPois?.[0];
3405
3332
  * if (relatedPOI) {
3406
3333
  * const parentPlace = await getPlaceDetails({
3407
3334
  * entityId: relatedPOI.id
@@ -3712,17 +3639,18 @@ export type ReachableRangeOwnParams = {
3712
3639
  * Location where the range calculation starts.
3713
3640
  *
3714
3641
  * @remarks
3715
- * It is the center point from which reachability is calculated, either:
3716
- * - An object with `lon` and `lat` properties
3717
- * - An array `[longitude, latitude]`
3642
+ * It is the center point from which reachability is calculated, as any {@link HasLngLat}:
3643
+ * - A `[longitude, latitude]` position
3644
+ * - A GeoJSON `Point`
3645
+ * - A GeoJSON `Feature` with a `Point` geometry, such as a place from a search
3718
3646
  *
3719
3647
  * @example
3720
3648
  * ```typescript
3721
- * // Object format
3722
- * origin: { lon: 4.9, lat: 52.3 }
3723
- *
3724
- * // Array format
3649
+ * // Position
3725
3650
  * origin: [4.9, 52.3]
3651
+ *
3652
+ * // A place from a search
3653
+ * origin: await geocodeOne('Amsterdam Centraal')
3726
3654
  * ```
3727
3655
  */
3728
3656
  origin: HasLngLat;
@@ -3765,11 +3693,8 @@ export type ReachableRangeOwnParams = {
3765
3693
  * When to depart, as an instant (`date`) or a wall-clock time at the origin (`localDateTime`).
3766
3694
  *
3767
3695
  * @remarks
3768
- * If you supply past dates or dates that are impossible to achieve, it
3769
- * defaults to departing now.
3770
- *
3771
- * Future departure times use predictive traffic, the current time uses live
3772
- * traffic, and historic times use historical patterns.
3696
+ * Future departure times use predictive traffic, and the current time live traffic. A past date
3697
+ * departs now, as {@link DepartArriveParams} explains.
3773
3698
  *
3774
3699
  * @default Depart now
3775
3700
  *
@@ -3899,10 +3824,6 @@ export declare const calculateReachableRange: (params: ReachableRangeParams) =>
3899
3824
  * @remarks
3900
3825
  * **[Private Preview](https://docs.tomtom.com/legal/private-preview)**. It needs the same API key access as {@link calculateReachableRange}.
3901
3826
  *
3902
- * Use it to compare the service areas of different store locations, create 15/30/45 minute drive
3903
- * time rings from one origin, compare ranges for different vehicle types or times of day, or find
3904
- * optimal facility locations with minimal overlap.
3905
- *
3906
3827
  * Note that ranges are calculated sequentially to avoid rate limiting. For large batches,
3907
3828
  * consider implementing your own parallel processing with appropriate throttling.
3908
3829
  *
@@ -3945,6 +3866,19 @@ export declare const calculateReachableRanges: (paramsArray: ReachableRangeParam
3945
3866
  signal?: AbortSignal;
3946
3867
  }) => Promise<PolygonFeatures<ReachableRangeProperties>>;
3947
3868
  //#endregion
3869
+ //#region src/revgeo/requestBuilder.d.ts
3870
+ declare const AREA_TYPE_BY_GEOGRAPHY_TYPE: {
3871
+ readonly Country: "country";
3872
+ readonly CountrySubdivision: "countrySubdivision";
3873
+ readonly CountrySecondarySubdivision: "countrySecondarySubdivision";
3874
+ readonly CountryTertiarySubdivision: "countryTertiarySubdivision";
3875
+ readonly Municipality: "municipality";
3876
+ readonly MunicipalitySubdivision: "municipalitySubdivision";
3877
+ readonly MunicipalitySecondarySubdivision: "municipalitySecondarySubdivision";
3878
+ readonly Neighbourhood: "neighborhood";
3879
+ readonly PostalCodeArea: "postalCode";
3880
+ };
3881
+ //#endregion
3948
3882
  //#region src/revgeo/types/apiTypes.d.ts
3949
3883
  /** Orbis Reverse Geocoding v2 top-level result type.
3950
3884
  * (geocode v2 also has `'intersection'`; reverse geocoding does not.)
@@ -3954,7 +3888,7 @@ type ReverseGeocodingResultTypeAPI = 'address' | 'street' | 'area';
3954
3888
  /** Orbis Reverse Geocoding v2 area sub-type.
3955
3889
  * @ignore
3956
3890
  */
3957
- type ReverseGeocodingAreaTypeAPI = 'country' | 'countrySubdivision' | 'countrySecondarySubdivision' | 'countryTertiarySubdivision' | 'municipality' | 'municipalitySubdivision' | 'municipalitySecondarySubdivision' | 'neighborhood' | 'postalCode';
3891
+ type ReverseGeocodingAreaTypeAPI = (typeof AREA_TYPE_BY_GEOGRAPHY_TYPE)[GeographyType];
3958
3892
  /**
3959
3893
  * Address object as returned by the Orbis Reverse Geocoding v2 API.
3960
3894
  * @ignore
@@ -4016,8 +3950,7 @@ type ReverseGeocodingMandatoryParams = {
4016
3950
  * Optional parameters for customizing reverse geocoding requests.
4017
3951
  *
4018
3952
  * @remarks
4019
- * They fine-tune the reverse geocoding behaviour, including filtering,
4020
- * formatting and additional data retrieval.
3953
+ * They set the geography types to return, the heading, the search radius and the geopolitical view.
4021
3954
  *
4022
3955
  * @group Reverse Geocoding
4023
3956
  */
@@ -4045,7 +3978,7 @@ type ReverseGeocodingOptionalParams = {
4045
3978
  *
4046
3979
  * @example
4047
3980
  * ```ts
4048
- * heading: 90.5 // Traveling east-northeast
3981
+ * heading: 67.5 // Traveling east-northeast
4049
3982
  * ```
4050
3983
  *
4051
3984
  * @minimum -360
@@ -4204,7 +4137,6 @@ type LegRequestAPI = {
4204
4137
  */
4205
4138
  type CalculateRoutePOSTDataAPI = CommonRoutingBodyAPI & CommonVehicleBodyAPI & {
4206
4139
  routePlanningLocations: RoutePlanningLocationsAPI;
4207
- path?: LineString;
4208
4140
  legs?: LegRequestAPI[];
4209
4141
  maxPathAlternativeRoutes?: number;
4210
4142
  arrivalDateTime?: string;
@@ -4518,28 +4450,7 @@ type InputSectionType = (typeof inputSectionTypesWithGuidance)[number];
4518
4450
  * display additional context like toll roads, ferry crossings or traffic incidents.
4519
4451
  *
4520
4452
  * @remarks
4521
- * Available section types:
4522
- * - `carTrain`: Sections requiring car train transport
4523
- * - `ferry`: Water crossings requiring ferry
4524
- * - `tunnel`: Underground tunnel sections
4525
- * - `motorway`: Highway/freeway sections
4526
- * - `pedestrian`: Pedestrian-only sections
4527
- * - `toll`: Sections requiring toll payment
4528
- * - `tollRoad`: Toll roads
4529
- * - `tollVignette`: Sections requiring toll vignette
4530
- * - `country`: Different countries traversed
4531
- * - `traffic`: Sections with traffic incidents
4532
- * - `vehicleRestricted`: Sections with vehicle restrictions
4533
- * - `carpool`: HOV/carpool lane sections
4534
- * - `urban`: Urban area sections
4535
- * - `unpaved`: Unpaved road sections
4536
- * - `lowEmissionZone`: Low emission zones
4537
- * - `speedLimit`: Speed limit changes
4538
- * - `roadShields`: Road shield information
4539
- * - `importantRoadStretch`: Named important road stretches along the route
4540
- * - `lanes`: Lane guidance
4541
- * - `curve`: Curves, with their heading change and radius, which the SDK finds in the route's geometry
4542
- * - `curvyStretch`: Stretches where curves follow one another closely, which the SDK groups the curves into
4453
+ * {@link SectionsProps} describes each section type.
4543
4454
  *
4544
4455
  * A requested section type is only present in the response if the route actually traverses it
4545
4456
  * (e.g. `ferry` is omitted on a route with no water crossing). The `lanes` section is returned only
@@ -4849,15 +4760,12 @@ type CalculateRouteParams = CommonServiceParams<CalculateRouteRequestAPI, Calcul
4849
4760
  */
4850
4761
  guidance?: GuidanceParams;
4851
4762
  /**
4852
- * Route section types to include in the response.
4763
+ * Route section types to include in the response, as {@link InputSectionTypes} describes.
4853
4764
  *
4854
4765
  * Sections help you display route characteristics like tolls, ferries, or traffic.
4855
4766
  * Leg sections are always included regardless of this parameter, and so are distinct sections
4856
- * when two or more routes come back. A section type is only present in the response if the
4857
- * route actually traverses it. The `lanes` section is returned only when
4858
- * {@link GuidanceParams | `guidance`} is also requested, and, when a list is given, only if it
4859
- * includes `lanes`. The SDK finds `curve` and `curvyStretch` in the route's geometry, with
4860
- * the thresholds of `curveDetection`, and only when the list names them.
4767
+ * when two or more routes come back. The SDK finds `curve` and `curvyStretch` in the route's
4768
+ * geometry, with the thresholds of `curveDetection`, and only when the list names them.
4861
4769
  *
4862
4770
  * @default When omitted, core's `defaultSectionTypes`: every type but `curve` and `curvyStretch`.
4863
4771
  *
@@ -4896,7 +4804,6 @@ type CalculateRouteParams = CommonServiceParams<CalculateRouteRequestAPI, Calcul
4896
4804
  * Maximum number of alternative routes to calculate.
4897
4805
  *
4898
4806
  * Alternative routes provide different travel options between the same origin and destination.
4899
- * Each alternative is optimized differently (e.g., avoiding highways, minimizing tolls).
4900
4807
  *
4901
4808
  * @remarks
4902
4809
  * More alternatives increase response time. Alternatives are returned in order of
@@ -5088,7 +4995,7 @@ export type DiscoverPlacesParams = {
5088
4995
  *
5089
4996
  * @group Places Search
5090
4997
  */
5091
- export type DiscoverPlacesResponse = Places<SearchPlaceProps, FuzzySearchFeatureCollectionProps>;
4998
+ export type DiscoverPlacesResponse = FuzzySearchResponse;
5092
4999
  /**
5093
5000
  * Finds places by text query, within geometries or along a route, from one universal function.
5094
5001
  *
@@ -5156,8 +5063,8 @@ export declare function discoverPlaces(queryOrParams: string | DiscoverPlacesPar
5156
5063
  /**
5157
5064
  * Searches for a single place by text query.
5158
5065
  *
5159
- * It calls {@link discoverPlaces} and returns the first result. It throws an error if no
5160
- * results are found.
5066
+ * It runs the fuzzy search {@link discoverPlaces} runs for params without `route` or `geometries`, and returns
5067
+ * the first result. It throws an error if no results are found.
5161
5068
  *
5162
5069
  * @param queryOrParams - The search query, or the full {@link FuzzySearchParams} without `limit`.
5163
5070
  * Pass the params form to set any other option, `signal` included.
@@ -5297,8 +5204,8 @@ type SearchSuggestionsParams = CommonServiceParams & {
5297
5204
  /**
5298
5205
  * Maximum results in the list.
5299
5206
  *
5300
- * @defaultValue 5
5301
- * @remarks Capped at 10.
5207
+ * @default 5
5208
+ * @remarks At least 1 and at most 10: a value outside that range is raised or capped to it.
5302
5209
  */
5303
5210
  limit?: number;
5304
5211
  /** What the result set is restricted to. */
@@ -5307,9 +5214,17 @@ type SearchSuggestionsParams = CommonServiceParams & {
5307
5214
  kinds?: SearchSuggestionKind[];
5308
5215
  /** Countries to restrict to, as ISO 3166-1 alpha-2 or alpha-3 codes. */
5309
5216
  countries?: NonNullable<GeographicFilters['countries']>;
5310
- /** Geography types to restrict `area` results to. */
5217
+ /**
5218
+ * Geography types to restrict `area` results to.
5219
+ *
5220
+ * @remarks Setting it leaves only areas among the search results: no `place`, `address` or `street`.
5221
+ */
5311
5222
  areaTypes?: NonNullable<PlaceFilters['geographyTypes']>;
5312
- /** POI categories to restrict `place` results to. A parent code also matches its sub-categories. */
5223
+ /**
5224
+ * POI categories to restrict `place` results to. A parent code also matches its sub-categories.
5225
+ *
5226
+ * @remarks Setting it leaves only places among the search results: no `address`, `street` or `area`.
5227
+ */
5313
5228
  poiTypes?: NonNullable<PlaceFilters['poiCategories']>;
5314
5229
  /** Restricts results to a box. How it combines with `geoBias` is on {@link getSearchSuggestions}. */
5315
5230
  boundingBox?: HasBBox;
@@ -5319,7 +5234,8 @@ type SearchSuggestionsParams = CommonServiceParams & {
5319
5234
  *
5320
5235
  * @remarks
5321
5236
  * `position` ranks nearer results higher without excluding anything, and is what `distanceInMeters`
5322
- * is measured from. It is only a point. `filters.boundingBox` restricts the results.
5237
+ * is measured from. It is only a point. `filters.boundingBox` restricts the results, and with a box
5238
+ * set the position ranks no places, it only measures them.
5323
5239
  */
5324
5240
  geoBias?: Pick<PointGeoBias, 'position'>;
5325
5241
  };
@@ -5469,6 +5385,7 @@ type TrafficAreaAnalyticsDays = {
5469
5385
  * ```typescript
5470
5386
  * // Continuous range
5471
5387
  * const result = await trafficAreaAnalytics({
5388
+ * apiKey: 'YOUR_MOVE_PORTAL_KEY', // this service only
5472
5389
  * startDate: '2024-08-01',
5473
5390
  * endDate: '2024-08-07',
5474
5391
  * functionalRoadClasses: ['MOTORWAY', 'MAJOR_ROAD', 'OTHER_MAJOR_ROAD', 'SECONDARY_ROAD', 'LOCAL_CONNECTING_ROAD', 'LOCAL_ROAD_HIGH_IMPORTANCE'],
@@ -5485,6 +5402,7 @@ type TrafficAreaAnalyticsDays = {
5485
5402
  * ```typescript
5486
5403
  * // Specific dates
5487
5404
  * const result = await trafficAreaAnalytics({
5405
+ * apiKey: 'YOUR_MOVE_PORTAL_KEY', // this service only
5488
5406
  * days: ['2024-08-05', '2024-08-12', '2024-08-19', '2024-08-26'],
5489
5407
  * functionalRoadClasses: ['MOTORWAY', 'MAJOR_ROAD', 'OTHER_MAJOR_ROAD'],
5490
5408
  * hours: [8, 9, 17, 18],
@@ -5578,12 +5496,11 @@ type TrafficAreaAnalyticsBaseParams = {
5578
5496
  * - `travelTime`: average travel time per 10 km (minutes)
5579
5497
  * - `networkLength`: total length of road segments with data (meters)
5580
5498
  *
5581
- * @returns Promise resolving to a {@link TrafficAreaAnalytics} FeatureCollection
5582
- *
5583
5499
  * @example
5584
5500
  * ```typescript
5585
5501
  * // Basic speed and congestion analysis for Amsterdam
5586
5502
  * const result = await trafficAreaAnalytics({
5503
+ * apiKey: 'YOUR_MOVE_PORTAL_KEY', // this service only
5587
5504
  * days: ['2024-08-06'],
5588
5505
  * functionalRoadClasses: ['MOTORWAY', 'MAJOR_ROAD', 'OTHER_MAJOR_ROAD', 'SECONDARY_ROAD', 'LOCAL_CONNECTING_ROAD', 'LOCAL_ROAD_HIGH_IMPORTANCE'],
5589
5506
  * hours: [7, 8, 9, 17, 18],
@@ -5606,6 +5523,7 @@ type TrafficAreaAnalyticsBaseParams = {
5606
5523
  * ```typescript
5607
5524
  * // Full metrics over a multi-day period
5608
5525
  * const result = await trafficAreaAnalytics({
5526
+ * apiKey: 'YOUR_MOVE_PORTAL_KEY', // this service only
5609
5527
  * startDate: new Date('2024-08-01'),
5610
5528
  * endDate: new Date('2024-08-07'),
5611
5529
  * functionalRoadClasses: 'all',
@@ -5795,10 +5713,6 @@ type TrafficIncidentDetailsParams = TrafficIncidentDetailsByBBoxParams | Traffic
5795
5713
  * - Time information: start/end times and whether the incident is `present` or `future`
5796
5714
  * - Events: one or more detailed event descriptions
5797
5715
  *
5798
- * @param params - Traffic Incident Details parameters (bbox, polygon or ids)
5799
- *
5800
- * @returns Promise resolving to a {@link TrafficIncidentDetails} object containing the matching incidents
5801
- *
5802
5716
  * @example
5803
5717
  * ```typescript
5804
5718
  * // Query by bounding box (Amsterdam area)