@tomtom-org/maps-sdk 0.63.0 → 0.64.0

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tomtom-org/maps-sdk",
3
3
  "author": "TomTom International B.V.",
4
4
  "license": "See in LICENSE.txt",
5
- "version": "0.63.0",
5
+ "version": "0.64.0",
6
6
  "description": "TomTom maps, search, geocoding, routing, isochrones, EV and traffic for JavaScript — typed GeoJSON services and a MapLibre GL JS map.",
7
7
  "homepage": "https://docs.tomtom.com/maps-sdk-js/introduction/overview",
8
8
  "repository": {
@@ -1,33 +1,6 @@
1
- import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, ChargingPark, ChargingParkWithAvailability, ChargingPoint, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GeopoliticalView, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceType, Places, PlugType, PolygonFeature, PolygonFeatures, ReachableRangeBudget, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SearchPlaceProps, StaticChargingPoint, TimeZone, TomTomAPIHeaders, TomTomHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, inputSectionTypes } from "@tomtom-org/maps-sdk/core";
2
- import { ZodError, ZodIssue, ZodObject } from "zod";
1
+ import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, ChargingPark, ChargingParkWithAvailability, ChargingPoint, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GeopoliticalView, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceType, Places, PlugType, PolygonFeature, PolygonFeatures, ReachableRangeBudget, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SDKErrorCode, SearchPlaceProps, StaticChargingPoint, TimeZone, TomTomAPIHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, inputSectionTypes } from "@tomtom-org/maps-sdk/core";
2
+ import { core } from "zod";
3
3
  //#region src/shared/types/apiResponseErrorTypes.d.ts
4
- /**
5
- * @ignore
6
- */
7
- interface BaseAPIResponseErrorBody {
8
- httpStatusCode: number;
9
- detailedError: {
10
- code: string;
11
- message: string;
12
- target: string;
13
- };
14
- }
15
- /**
16
- * @ignore
17
- */
18
- interface DefaultAPIResponseErrorBody extends BaseAPIResponseErrorBody {
19
- error?: string;
20
- errorText?: string;
21
- }
22
- /**
23
- * Error returned by an API.
24
- * @ignore
25
- */
26
- type APIErrorResponse<T = DefaultAPIResponseErrorBody> = {
27
- status?: number;
28
- message: string;
29
- data?: T;
30
- };
31
4
  /**
32
5
  * @ignore
33
6
  */
@@ -41,7 +14,7 @@ declare enum APICode {
41
14
  * GET object with URL and optional service-specific API headers.
42
15
  * @ignore
43
16
  */
44
- export type GetObject = {
17
+ type GetObject = {
45
18
  url: URL;
46
19
  headers?: TomTomAPIHeaders;
47
20
  };
@@ -49,7 +22,7 @@ export type GetObject = {
49
22
  * POST object with URL, optional payload, and optional service-specific API headers.
50
23
  * @ignore
51
24
  */
52
- export type PostObject<D> = {
25
+ type PostObject<D> = {
53
26
  url: URL;
54
27
  data?: D;
55
28
  headers?: TomTomAPIHeaders;
@@ -60,48 +33,11 @@ export type PostObject<D> = {
60
33
  * * POST method comes with a URL, optional POST data, and optional headers.
61
34
  * @ignore
62
35
  */
63
- export type FetchInput<PostData = void> = ({
36
+ type FetchInput<PostData = void> = ({
64
37
  method: 'GET';
65
38
  } & GetObject) | ({
66
39
  method: 'POST';
67
40
  } & PostObject<PostData>);
68
- /**
69
- * Per-call HTTP options threaded from service params down to `fetch`.
70
- * @ignore
71
- */
72
- export type RequestOptions = {
73
- signal?: AbortSignal;
74
- };
75
- export type ParsedFetchResponse<T> = Promise<{
76
- data: Promise<T>;
77
- status: number;
78
- }>;
79
- //#endregion
80
- //#region src/shared/types/validation.d.ts
81
- /**
82
- * @ignore
83
- */
84
- type SchemaRefinement<T = any> = {
85
- check: (data: T) => boolean;
86
- message: string;
87
- };
88
- /**
89
- * Configuration for services request validation.
90
- * @ignore
91
- */
92
- type RequestValidationConfig<Params = any> = {
93
- /**
94
- * Schema from Zod for validating input parameters.
95
- * This will be compiled and used for validation.
96
- * @see https://zod.dev/?id=basic-usage
97
- */
98
- schema: ZodObject<any>;
99
- /**
100
- * Optional refinements from Zod for schema.refine advanced calls.
101
- * @see ZodObject.refine
102
- */
103
- refinements?: SchemaRefinement<Params>[];
104
- };
105
41
  //#endregion
106
42
  //#region src/shared/serviceTypes.d.ts
107
43
  /**
@@ -116,7 +52,7 @@ type RequestValidationConfig<Params = any> = {
116
52
  *
117
53
  * @group Shared
118
54
  */
119
- export type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<GlobalConfig> & {
55
+ type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<GlobalConfig> & {
120
56
  /**
121
57
  * Controls whether input request schema validation is performed.
122
58
  *
@@ -170,95 +106,6 @@ export type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<G
170
106
  */
171
107
  signal?: AbortSignal;
172
108
  };
173
- /**
174
- * Function type for parsing API error responses into SDK service errors.
175
- *
176
- * @ignore
177
- *
178
- * @typeParam T - The type of the error response body (defaults to {@link DefaultAPIResponseErrorBody})
179
- *
180
- * @param apiError - The API error response received from the server
181
- * @param serviceName - The name of the service that encountered the error
182
- * @returns A structured {@link SDKServiceError} object
183
- */
184
- export type ParseResponseError<T = DefaultAPIResponseErrorBody> = (apiError: APIErrorResponse<T>, serviceName: string) => SDKServiceError;
185
- /**
186
- * Template interface defining the lifecycle methods for any service implementation.
187
- *
188
- * @ignore
189
- *
190
- * @remarks
191
- * This type provides a standardized structure for implementing service calls,
192
- * including request building, validation, sending, response parsing, and error handling.
193
- *
194
- * @typeParam Params - Service-specific parameters extending {@link CommonServiceParams}
195
- * @typeParam ApiRequest - The type of the API request object
196
- * @typeParam ApiResponse - The type of the raw API response object
197
- * @typeParam Response - The type of the parsed response returned to the caller
198
- */
199
- export type ServiceTemplate<Params extends CommonServiceParams<ApiRequest, ApiResponse>, ApiRequest, ApiResponse, Response> = {
200
- /**
201
- * Configuration for validating request parameters.
202
- *
203
- * @remarks
204
- * Defines the validation schema and rules applied to request parameters
205
- * before the request is built and sent.
206
- */
207
- requestValidation?: RequestValidationConfig<Params>;
208
- /**
209
- * Builds the API request from the provided parameters.
210
- *
211
- * @param params - The service call parameters
212
- * @returns The constructed API request object
213
- */
214
- buildRequest: (params: Params) => ApiRequest;
215
- /**
216
- * The API version the service calls. Callers cannot override it.
217
- *
218
- * @defaultValue 1
219
- */
220
- apiVersion?: number;
221
- /**
222
- * Sends the constructed request to the API server.
223
- *
224
- * @remarks
225
- * Handles the actual HTTP communication (e.g., GET or POST) with optional custom headers.
226
- *
227
- * @param request - The request object to send
228
- * @param headers - Custom TomTom headers to include in the request
229
- * @param options - Per-call HTTP options, such as the `AbortSignal` used to cancel the request
230
- * @returns A promise resolving to the parsed fetch response
231
- */
232
- sendRequest: (request: ApiRequest, headers: TomTomHeaders, options?: RequestOptions) => ParsedFetchResponse<ApiResponse>;
233
- /**
234
- * Parses the successful API response into the expected return type.
235
- *
236
- * @remarks
237
- * Transforms the raw API response into a structured format suitable for the caller.
238
- *
239
- * @param apiResponse - The raw API response received from the server
240
- * @param params - The original service call parameters
241
- * @returns The parsed response object
242
- */
243
- parseResponse: (apiResponse: ApiResponse, params: Params) => Response;
244
- /**
245
- * Parses an API error response before propagating it to the caller.
246
- *
247
- * @remarks
248
- * Allows custom error handling and transformation of API errors into SDK-specific error types.
249
- */
250
- parseResponseError?: ParseResponseError<any>;
251
- };
252
- //#endregion
253
- //#region src/shared/schema/validation.d.ts
254
- /**
255
- * Validate Error Class for validating params input, this will be used by SDKError class.
256
- * @ignore
257
- */
258
- declare class ValidationError extends Error {
259
- issues: ZodError['issues'];
260
- constructor(zodError: ZodError);
261
- }
262
109
  //#endregion
263
110
  //#region src/shared/types/servicesTypes.d.ts
264
111
  /**
@@ -281,8 +128,8 @@ export type ServiceName = string;
281
128
  * try {
282
129
  * // SDK operation
283
130
  * } catch (error) {
284
- * if (error instanceof SDKError) {
285
- * console.error(`Error in ${error.service}: ${error.message}`);
131
+ * if (error instanceof SDKError && error.code === 'API_KEY_REJECTED') {
132
+ * console.error(`Check the API key: ${error.service} rejected it`);
286
133
  * }
287
134
  * }
288
135
  * ```
@@ -291,15 +138,29 @@ export type ServiceName = string;
291
138
  */
292
139
  export declare class SDKError extends Error {
293
140
  readonly service: string;
294
- readonly issues?: ZodIssue[] | undefined;
141
+ /**
142
+ * What went wrong, as one of {@link SDKErrorCode}: the value to branch on, rather than the message.
143
+ */
144
+ readonly code: SDKErrorCode;
145
+ /**
146
+ * The version of the SDK that raised the error, for bug reports.
147
+ */
148
+ readonly sdkVersion: string;
149
+ /**
150
+ * The Zod issues of a failed request validation, for an `INVALID_REQUEST` the SDK raised itself.
151
+ */
152
+ readonly issues?: core.$ZodIssue[];
295
153
  /**
296
154
  * Creates a new SDKError instance.
297
155
  *
298
156
  * @param message - Human-readable error description
299
157
  * @param service - Name of the service where the error occurred
300
- * @param issues - Optional array of Zod validation issues for detailed error information
301
158
  */
302
- constructor(message: string, service: string, issues?: ZodIssue[] | undefined);
159
+ constructor(message: string, service: string, options: {
160
+ code: SDKErrorCode;
161
+ issues?: core.$ZodIssue[];
162
+ cause?: unknown;
163
+ });
303
164
  }
304
165
  /**
305
166
  * Mapping of API error codes to human-readable error messages.
@@ -378,27 +239,6 @@ export declare class SDKAbortError extends SDKError {
378
239
  */
379
240
  constructor(service: string, cause?: unknown);
380
241
  }
381
- /**
382
- * @ignore
383
- * @param error
384
- * @param serviceName
385
- */
386
- export declare const parseDefaultResponseError: ParseResponseError<DefaultAPIResponseErrorBody>;
387
- /**
388
- * @ignore
389
- * Generate error for APIResponse, any other error type will be returned as it is.
390
- * @param error The error captured by a catch function.
391
- * @param serviceName The name of the service.
392
- * @param parseResponseError
393
- * @param signal The signal given to the call, used to recognise a cancellation.
394
- */
395
- export declare const buildResponseError: (error: unknown, serviceName: ServiceName, parseResponseError?: ParseResponseError<unknown>, signal?: AbortSignal) => SDKError;
396
- /**
397
- * @ignore
398
- * @param error
399
- * @param serviceName
400
- */
401
- export declare const buildValidationError: (error: ValidationError, serviceName: ServiceName) => SDKError;
402
242
  //#endregion
403
243
  //#region src/shared/types/latestRequest.d.ts
404
244
  /**
@@ -3010,8 +2850,8 @@ export type SearchSummary = {
3010
2850
  *
3011
2851
  * @remarks
3012
2852
  * This reflects the position from:
3013
- * - The `at` parameter (explicit position bias)
3014
- * - The `in` parameter (area center, if applicable)
2853
+ * - The `geoBias.position` parameter (explicit position bias)
2854
+ * - The `geoBias.boundingBox` parameter (area center, if applicable)
3015
2855
  * - Automatic geolocation (if enabled)
3016
2856
  *
3017
2857
  * Results closer to this position are ranked higher.
@@ -3534,7 +3374,7 @@ type GeocodingIndexTypesAbbreviation = Exclude<SearchIndexType, 'POI'>;
3534
3374
  *
3535
3375
  * @remarks
3536
3376
  * This service is optimized for address lookups and does not return POIs.
3537
- * For POI search, use the search service instead.
3377
+ * For POI search, use {@link discoverPlaces} instead.
3538
3378
  *
3539
3379
  * **Features:**
3540
3380
  * - Tolerant of typos and incomplete addresses
@@ -3547,15 +3387,13 @@ type GeocodingIndexTypesAbbreviation = Exclude<SearchIndexType, 'POI'>;
3547
3387
  * ```typescript
3548
3388
  * // Geocode a complete address
3549
3389
  * const params: GeocodingParams = {
3550
- * key: 'your-api-key',
3551
3390
  * query: '1600 Pennsylvania Avenue NW, Washington, DC'
3552
3391
  * };
3553
3392
  *
3554
3393
  * // Geocode with bias toward a location
3555
3394
  * const biasedParams: GeocodingParams = {
3556
- * key: 'your-api-key',
3557
3395
  * query: 'Main Street',
3558
- * at: [4.9041, 52.3676], // Bias toward Amsterdam
3396
+ * geoBias: { position: [4.9041, 52.3676] }, // Bias toward Amsterdam
3559
3397
  * limit: 5
3560
3398
  * };
3561
3399
  * ```
@@ -3656,27 +3494,23 @@ type GeocodingParams = Omit<CommonPlacesParams<GetObject, GeocodingResponseAPI>
3656
3494
  * ```typescript
3657
3495
  * // Geocode a complete address
3658
3496
  * const result = await geocode({
3659
- * key: 'your-api-key',
3660
3497
  * query: '1600 Pennsylvania Avenue NW, Washington, DC'
3661
3498
  * });
3662
3499
  *
3663
3500
  * // Geocode with partial address
3664
3501
  * const partialResult = await geocode({
3665
- * key: 'your-api-key',
3666
3502
  * query: 'Amsterdam, Netherlands'
3667
3503
  * });
3668
3504
  *
3669
3505
  * // Geocode with bias towards specific location
3670
3506
  * const biasedResult = await geocode({
3671
- * key: 'your-api-key',
3672
3507
  * query: 'Main Street',
3673
- * at: [4.9041, 52.3676], // Bias toward Amsterdam
3508
+ * geoBias: { position: [4.9041, 52.3676] }, // Bias toward Amsterdam
3674
3509
  * limit: 5
3675
3510
  * });
3676
3511
  *
3677
3512
  * // Geocode an intersection
3678
3513
  * const intersection = await geocode({
3679
- * key: 'your-api-key',
3680
3514
  * query: '5th Avenue & 42nd Street, New York'
3681
3515
  * });
3682
3516
  * ```
@@ -3790,7 +3624,6 @@ type CommonServiceParamsWithZoom = CommonServiceParams<GetObject, GeometryDataRe
3790
3624
  * ```typescript
3791
3625
  * // Fetch geometries by ID
3792
3626
  * const params: GeometryDataParams = {
3793
- * key: 'your-api-key',
3794
3627
  * geometries: ['g1234567890', 'g0987654321'],
3795
3628
  * zoom: 12
3796
3629
  * };
@@ -3834,14 +3667,12 @@ type GeometryDataParams = CommonServiceParamsWithZoom & {
3834
3667
  * // From search results
3835
3668
  * const searchResults = await discoverPlaces({ query: 'Amsterdam' });
3836
3669
  * const params: GeometryPlaceParams = {
3837
- * key: 'your-api-key',
3838
3670
  * geometries: searchResults,
3839
3671
  * zoom: 10
3840
3672
  * };
3841
3673
  *
3842
3674
  * // From individual places
3843
3675
  * const params: GeometryPlaceParams = {
3844
- * key: 'your-api-key',
3845
3676
  * geometries: [place1, place2],
3846
3677
  * zoom: 12
3847
3678
  * };
@@ -3858,7 +3689,6 @@ type GeometryPlaceParams = CommonServiceParamsWithZoom & {
3858
3689
  * geometry IDs will be skipped.
3859
3690
  *
3860
3691
  * **Supported Formats:**
3861
- * - Single Place object
3862
3692
  * - Array of Place objects
3863
3693
  * - Places FeatureCollection
3864
3694
  *
@@ -3887,13 +3717,11 @@ type GeometryPlaceParams = CommonServiceParamsWithZoom & {
3887
3717
  * ```typescript
3888
3718
  * // Using IDs
3889
3719
  * const idParams: GeometryParams = {
3890
- * key: 'your-api-key',
3891
3720
  * geometries: ['g1234567890']
3892
3721
  * };
3893
3722
  *
3894
3723
  * // Using places
3895
3724
  * const placeParams: GeometryParams = {
3896
- * key: 'your-api-key',
3897
3725
  * geometries: searchResults
3898
3726
  * };
3899
3727
  * ```
@@ -3936,20 +3764,17 @@ type GeometryParams = GeometryDataParams | GeometryPlaceParams;
3936
3764
  * ```typescript
3937
3765
  * // Fetch geometry by ID
3938
3766
  * const cityBoundary = await geometryData({
3939
- * key: 'your-api-key',
3940
3767
  * geometries: ['geometry-id-123']
3941
3768
  * });
3942
3769
  *
3943
3770
  * // Fetch multiple geometries at once
3944
3771
  * const boundaries = await geometryData({
3945
- * key: 'your-api-key',
3946
3772
  * geometries: ['country-id-1', 'city-id-2', 'poi-id-3']
3947
3773
  * });
3948
3774
  *
3949
3775
  * // Fetch and merge with place data
3950
3776
  * const searchResults = await discoverPlaces({ query: 'Amsterdam' });
3951
3777
  * const withBoundaries = await geometryData({
3952
- * key: 'your-api-key',
3953
3778
  * geometries: searchResults // Places with geometry IDs
3954
3779
  * });
3955
3780
  * // Result includes both place properties and polygon boundaries
@@ -4102,13 +3927,11 @@ type PlaceDetailsMandatoryParams = {
4102
3927
  * ```typescript
4103
3928
  * // Basic lookup
4104
3929
  * const params: PlaceDetailsParams = {
4105
- * key: 'your-api-key',
4106
3930
  * entityId: '528009002822995'
4107
3931
  * };
4108
3932
  *
4109
3933
  * // With additional information
4110
3934
  * const detailedParams: PlaceDetailsParams = {
4111
- * key: 'your-api-key',
4112
3935
  * entityId: '528009002822995',
4113
3936
  * openingHours: 'nextSevenDays',
4114
3937
  * mapcodes: ['Local'],
@@ -4167,7 +3990,6 @@ type PlaceDetailsResponse = Place<SearchPlaceProps> | undefined;
4167
3990
  * const placeId = searchResult.features[0].id;
4168
3991
  *
4169
3992
  * const placeDetails = await getPlaceDetails({
4170
- * key: 'your-api-key',
4171
3993
  * entityId: placeId
4172
3994
  * });
4173
3995
  *
@@ -4177,7 +3999,6 @@ type PlaceDetailsResponse = Place<SearchPlaceProps> | undefined;
4177
3999
  *
4178
4000
  * if (poiDetailsId) {
4179
4001
  * const detailedPOI = await getPlaceDetails({
4180
- * key: 'your-api-key',
4181
4002
  * entityId: poiDetailsId
4182
4003
  * });
4183
4004
  * // May include additional photos, reviews, extended hours, etc.
@@ -4187,7 +4008,6 @@ type PlaceDetailsResponse = Place<SearchPlaceProps> | undefined;
4187
4008
  * const relatedPOI = place.properties.relatedPois?.[0];
4188
4009
  * if (relatedPOI) {
4189
4010
  * const parentPlace = await getPlaceDetails({
4190
- * key: 'your-api-key',
4191
4011
  * entityId: relatedPOI.id
4192
4012
  * });
4193
4013
  * console.log('Parent location:', parentPlace.properties.address);
@@ -5324,21 +5144,18 @@ export type ReverseGeocodingResponse = Place<RevGeoAddressProps>;
5324
5144
  * ```typescript
5325
5145
  * // Get address for coordinates
5326
5146
  * const address = await reverseGeocode({
5327
- * key: 'your-api-key',
5328
5147
  * position: [4.9041, 52.3676] // Amsterdam coordinates
5329
5148
  * });
5330
5149
  * // Returns: Dam, 1012 Amsterdam, Netherlands
5331
5150
  *
5332
5151
  * // Get the address matched along a given travel direction
5333
5152
  * const specificAddress = await reverseGeocode({
5334
- * key: 'your-api-key',
5335
5153
  * position: [-77.0369, 38.8977], // Washington DC
5336
5154
  * heading: 90 // Traveling east
5337
5155
  * });
5338
5156
  *
5339
5157
  * // Get the containing municipality instead of the street
5340
5158
  * const municipality = await reverseGeocode({
5341
- * key: 'your-api-key',
5342
5159
  * position: [-74.0060, 40.7128], // New York
5343
5160
  * geographyTypes: ['Municipality']
5344
5161
  * });
@@ -5492,7 +5309,7 @@ type InputSectionTypes = InputSectionType[];
5492
5309
  * The accepted values of {@link ChargingStopsStrategy}.
5493
5310
  * @group Routing
5494
5311
  */
5495
- declare const chargingStopsStrategies: readonly ["automaticFastest", "manualFastest", "automaticFastestWithFallbackToManual"];
5312
+ export declare const chargingStopsStrategies: readonly ["automaticFastest", "manualFastest", "automaticFastestWithFallbackToManual"];
5496
5313
  /**
5497
5314
  * How the routing service should plan charging stops on an electric route.
5498
5315
  *
@@ -5569,7 +5386,7 @@ type ComputeTravelTimeFor = 'none' | 'all';
5569
5386
  *
5570
5387
  * @group Routing
5571
5388
  */
5572
- declare const arrivalSides: readonly ["any", "curb"];
5389
+ export declare const arrivalSides: readonly ["any", "curb"];
5573
5390
  /**
5574
5391
  * Which side of the road the route should arrive on at each stop.
5575
5392
  *
@@ -5740,7 +5557,7 @@ type CalculateRouteParams = ({
5740
5557
  * - `main-when-available`: Use main entry point if available, otherwise use place center (recommended for routing)
5741
5558
  * - `ignore`: Always use place center position
5742
5559
  *
5743
- * @default 'main-when-available'
5560
+ * @default 'ignore' (a place's geometry is used)
5744
5561
  *
5745
5562
  * @example
5746
5563
  * ```typescript
@@ -6866,7 +6683,7 @@ type PlaceSuggestion = SuggestionBase & {
6866
6683
  id: string;
6867
6684
  /** Lines under the title that tell similar results apart, such as the address. */
6868
6685
  subtitles: string[];
6869
- /** Distance from `origin`, when one was given. */
6686
+ /** Distance from `geoBias.position`, when one was given. */
6870
6687
  distanceInMeters?: number;
6871
6688
  /**
6872
6689
  * The full place behind this suggestion.
@@ -6936,7 +6753,7 @@ type SearchSuggestion = PlaceSuggestion | RefinementSuggestion;
6936
6753
  *
6937
6754
  * @remarks
6938
6755
  * Shaped after Places Search v3's `suggest` body: `filters` for what narrows the result set, and
6939
- * `origin` for the point to search around.
6756
+ * `geoBias.position` for the point to search around.
6940
6757
  *
6941
6758
  * @group Places Search
6942
6759
  */
@@ -6949,7 +6766,7 @@ type SearchSuggestionsParams = CommonServiceParams & {
6949
6766
  * @defaultValue 5
6950
6767
  * @remarks Capped at 10.
6951
6768
  */
6952
- maxResults?: number;
6769
+ limit?: number;
6953
6770
  /** What the result set is restricted to. */
6954
6771
  filters?: {
6955
6772
  /** Which kinds of result to return. Omit it for every kind. */
@@ -6957,17 +6774,17 @@ type SearchSuggestionsParams = CommonServiceParams & {
6957
6774
  countries?: string[];
6958
6775
  areaTypes?: GeographyType[];
6959
6776
  poiTypes?: POICategory[];
6960
- /** Restricts results to a box. How it combines with `origin` is on {@link getSearchSuggestions}. */
6777
+ /** Restricts results to a box. How it combines with `geoBias` is on {@link getSearchSuggestions}. */
6961
6778
  boundingBox?: HasBBox;
6962
6779
  };
6963
6780
  /**
6964
6781
  * The point to search around.
6965
6782
  *
6966
6783
  * @remarks
6967
- * Ranks nearer results higher without excluding anything, and is what `distanceInMeters` is
6968
- * measured from.
6784
+ * `position` ranks nearer results higher without excluding anything, and is what `distanceInMeters`
6785
+ * is measured from. A point only: `filters.boundingBox` is what restricts the results.
6969
6786
  */
6970
- origin?: HasLngLat;
6787
+ geoBias?: Pick<PointGeoBias, 'position'>;
6971
6788
  };
6972
6789
  /**
6973
6790
  * The result of a {@link getSearchSuggestions} call.
@@ -6992,8 +6809,8 @@ type SearchSuggestionsResponse = {
6992
6809
  * when the whole query names it; places follow.
6993
6810
  * - **Cost**: two requests per call; narrowing `filters.kinds` to one side of {@link SearchSuggestionKind}
6994
6811
  * skips the other. No debouncing or caching, which belong in the caller's input loop.
6995
- * - **Geography**: `filters.boundingBox` restricts and `origin` measures distance. V2 takes one
6996
- * geographic input per request, so inside a box `origin` does not rank the places.
6812
+ * - **Geography**: `filters.boundingBox` restricts and `geoBias.position` measures distance. V2 takes one
6813
+ * geographic input per request, so inside a box `geoBias` does not rank the places.
6997
6814
  * - **Cancellation**: both requests share `signal`, so aborting drops the pair.
6998
6815
  *
6999
6816
  * @example
@@ -7026,7 +6843,7 @@ export declare const getSearchSuggestions: (parameters: SearchSuggestionsParams)
7026
6843
  *
7027
6844
  * @group Traffic
7028
6845
  */
7029
- declare const functionalRoadClasses: readonly ["MOTORWAY", "MAJOR_ROAD", "OTHER_MAJOR_ROAD", "SECONDARY_ROAD", "LOCAL_CONNECTING_ROAD", "LOCAL_ROAD_HIGH_IMPORTANCE", "LOCAL_ROAD", "LOCAL_ROAD_MINOR_IMPORTANCE", "OTHER_ROAD"];
6846
+ export declare const functionalRoadClasses: readonly ["MOTORWAY", "MAJOR_ROAD", "OTHER_MAJOR_ROAD", "SECONDARY_ROAD", "LOCAL_CONNECTING_ROAD", "LOCAL_ROAD_HIGH_IMPORTANCE", "LOCAL_ROAD", "LOCAL_ROAD_MINOR_IMPORTANCE", "OTHER_ROAD"];
7030
6847
  /**
7031
6848
  * A Functional Road Class (FRC) identifier — classifies road segments by their importance
7032
6849
  * in the road network.
@@ -7517,4 +7334,4 @@ type TrafficIncidentDetailsParams = TrafficIncidentDetailsByBBoxParams | Traffic
7517
7334
  */
7518
7335
  export declare const trafficIncidentDetails: (params: TrafficIncidentDetailsParams) => Promise<TrafficIncidentDetails>;
7519
7336
  //#endregion
7520
- export type { AdditionalDataAPI, AlongRouteSearchParams, AlongRouteSortBy, AreaAnalyticsDateInput, ArrivalSide, BookmarkIntent, BookmarkIntentDetails, BrandSuggestion, CalculateRouteParams, CategorySuggestion, ChargingStationsAvailabilityParams, ChargingStopsStrategy, Circle, CommonServiceParamsWithZoom, ComputeTravelTimeFor, CoordinateIntent, CoordinateIntentDetails, ExtendedRouteRepresentation, FunctionalRoadClass, FuzzySearchParams, GeocodingParams, GeocodingProps, GeocodingResponse, GeometriesInput, GeometryDataParams, GeometryDataResponseAPI, GeometryParams, GeometryPlaceParams, GeometrySearchParams, GuidanceParams, InputSectionType, InputSectionTypes, LegCostModel, MaxNumberOfAlternatives, NearbyIntent, NearbyIntentDetails, POICategoriesParams, POICategoriesResponse, POICategoryResult, PlaceDetailsMandatoryParams, PlaceDetailsOptionalParams, PlaceDetailsParams, PlaceDetailsResponse, PlaceDetailsResponseAPI, PlaceDetailsResultAPI, PlaceSuggestion, PlacesWithEVAvailabilityOptions, PoiCategoriesResponseAPI, PoiCategoryAPI, QueryIntent, RefinementSuggestion, ResolvePOICategoriesParams, ResolvedPOICategories, ReverseGeocodingMandatoryParams, ReverseGeocodingOptionalParams, ReverseGeocodingParams, RouteStopOptions, SearchGeometryInput, SearchSuggestion, SearchSuggestionKind, SearchSuggestionsParams, SearchSuggestionsResponse, TrafficAreaAnalyticsDateRange, TrafficAreaAnalyticsDays, TrafficAreaAnalyticsParams, TrafficIncidentDetailsByBBoxParams, TrafficIncidentDetailsByIdsParams, TrafficIncidentDetailsByPolygonParams, TrafficIncidentDetailsParams, W3WIntent, W3WIntentDetails, arrivalSides, chargingStopsStrategies, functionalRoadClasses };
7337
+ export type { AlongRouteSearchParams, AlongRouteSortBy, AreaAnalyticsDateInput, ArrivalSide, BookmarkIntent, BookmarkIntentDetails, BrandSuggestion, CalculateRouteParams, CategorySuggestion, ChargingStationsAvailabilityParams, ChargingStopsStrategy, Circle, CommonServiceParams, CommonServiceParamsWithZoom, ComputeTravelTimeFor, CoordinateIntent, CoordinateIntentDetails, ExtendedRouteRepresentation, FetchInput, FunctionalRoadClass, FuzzySearchParams, GeocodingParams, GeocodingProps, GeocodingResponse, GeometriesInput, GeometryDataParams, GeometryParams, GeometryPlaceParams, GeometrySearchParams, GetObject, GuidanceParams, InputSectionType, InputSectionTypes, LegCostModel, MaxNumberOfAlternatives, NearbyIntent, NearbyIntentDetails, POICategoriesParams, POICategoriesResponse, POICategoryResult, PlaceDetailsMandatoryParams, PlaceDetailsOptionalParams, PlaceDetailsParams, PlaceDetailsResponse, PlaceDetailsResponseAPI, PlaceDetailsResultAPI, PlaceSuggestion, PlacesWithEVAvailabilityOptions, PoiCategoriesResponseAPI, PoiCategoryAPI, PostObject, QueryIntent, RefinementSuggestion, ResolvePOICategoriesParams, ResolvedPOICategories, ReverseGeocodingMandatoryParams, ReverseGeocodingOptionalParams, ReverseGeocodingParams, RouteStopOptions, SearchGeometryInput, SearchSuggestion, SearchSuggestionKind, SearchSuggestionsParams, SearchSuggestionsResponse, TrafficAreaAnalyticsDateRange, TrafficAreaAnalyticsDays, TrafficAreaAnalyticsParams, TrafficIncidentDetailsByBBoxParams, TrafficIncidentDetailsByIdsParams, TrafficIncidentDetailsByPolygonParams, TrafficIncidentDetailsParams, W3WIntent, W3WIntentDetails };