@tomtom-org/maps-sdk 0.53.0 → 0.54.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/CHANGELOG.md +20 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +143 -1
- package/map/dist/index.d.ts +54 -8
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/package.json +29 -25
- package/services/dist/index.d.ts +173 -39
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
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.
|
|
5
|
+
"version": "0.54.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": {
|
|
@@ -36,10 +36,14 @@
|
|
|
36
36
|
"ev-charging",
|
|
37
37
|
"navigation"
|
|
38
38
|
],
|
|
39
|
+
"nx": {
|
|
40
|
+
"includedScripts": []
|
|
41
|
+
},
|
|
39
42
|
"devDependencies": {
|
|
40
43
|
"@biomejs/biome": "^2.5.10",
|
|
41
44
|
"@size-limit/file": "^13.0.3",
|
|
42
45
|
"@size-limit/preset-app": "^13.0.3",
|
|
46
|
+
"nx": "22.7.12",
|
|
43
47
|
"size-limit": "^13.0.3",
|
|
44
48
|
"typedoc": "^0.28.20",
|
|
45
49
|
"yaml": "^2.9.0"
|
|
@@ -94,41 +98,41 @@
|
|
|
94
98
|
},
|
|
95
99
|
"scripts": {
|
|
96
100
|
"build": "pnpm build:sdk",
|
|
97
|
-
"build:api-reference": "typedoc",
|
|
98
|
-
"build:examples": "
|
|
99
|
-
"build:examples:sandpack": "
|
|
100
|
-
"build:sdk": "
|
|
101
|
+
"build:api-reference": "nx run @tomtom-org/maps-sdk:typedoc",
|
|
102
|
+
"build:examples": "nx run-many -t build -p '@examples/*' --parallel=8 && nx run @tomtom-org/maps-sdk-examples:build",
|
|
103
|
+
"build:examples:sandpack": "nx run-many -t build:sandpack -p '@examples/*' --parallel=8",
|
|
104
|
+
"build:sdk": "nx run-many -t build -p core services map && pnpm build:third-party",
|
|
101
105
|
"build:third-party": "node shared-configs/aggregateThirdParty.ts",
|
|
102
106
|
"build:third-party:plugins": "node shared-configs/aggregateThirdParty.ts --plugins",
|
|
103
107
|
"eval:explorer": "pnpm -F @testing/ai-eval-explorer dev",
|
|
104
|
-
"eval:explorer:build": "
|
|
105
|
-
"build:agent-eval": "
|
|
106
|
-
"build:plugins": "
|
|
107
|
-
"clean": "pnpm -r --no-bail clean:dist && pnpm -r --no-bail clean:cache",
|
|
108
|
-
"e2e-test:agent-toolkit:sandbox": "
|
|
109
|
-
"e2e-test:examples": "
|
|
110
|
-
"e2e-test:examples:sandpack": "
|
|
111
|
-
"e2e-test:examples:prod": "
|
|
112
|
-
"eval-test:examples": "
|
|
108
|
+
"eval:explorer:build": "nx run @testing/ai-eval-explorer:build",
|
|
109
|
+
"build:agent-eval": "nx run agent-eval:build",
|
|
110
|
+
"build:plugins": "nx run-many -t build -p '@tomtom-org/maps-sdk-plugin-*' && pnpm build:third-party:plugins",
|
|
111
|
+
"clean": "pnpm -r --no-bail clean:dist && pnpm -r --no-bail clean:cache && nx reset",
|
|
112
|
+
"e2e-test:agent-toolkit:sandbox": "nx run @tomtom-org/maps-sdk-plugin-agent-toolkit:test:e2e",
|
|
113
|
+
"e2e-test:examples": "nx run @tomtom-org/maps-sdk-examples:test:e2e",
|
|
114
|
+
"e2e-test:examples:sandpack": "nx run @tomtom-org/maps-sdk-examples:test:e2e:sandpack",
|
|
115
|
+
"e2e-test:examples:prod": "nx run @tomtom-org/maps-sdk-examples:test:e2e:prod",
|
|
116
|
+
"eval-test:examples": "nx run @tomtom-org/maps-sdk-examples:test:eval",
|
|
113
117
|
"e2e-test:examples:update-all-snapshots": "pnpm -F @tomtom-org/maps-sdk-examples test:e2e:update-all-snapshots",
|
|
114
118
|
"e2e-test:examples:update-snapshot": "pnpm -F @tomtom-org/maps-sdk-examples test:e2e:update-snapshot",
|
|
115
|
-
"e2e-test:sdk": "
|
|
119
|
+
"e2e-test:sdk": "nx run map-integration-tests:test:e2e",
|
|
116
120
|
"generate-thumbnails:examples": "pnpm -F @tomtom-org/maps-sdk-examples generate-thumbnails",
|
|
117
121
|
"format": "biome format .",
|
|
118
122
|
"format:fix": "biome format . --write",
|
|
119
123
|
"lint": "biome lint .",
|
|
120
124
|
"lint:fix": "biome check . --write && biome lint . --write",
|
|
121
|
-
"agent-tool-calling-test:agent-toolkit": "
|
|
122
|
-
"agent-tool-calling-test:examples": "
|
|
125
|
+
"agent-tool-calling-test:agent-toolkit": "nx run @tomtom-org/maps-sdk-plugin-agent-toolkit:test:agent-tool-calling",
|
|
126
|
+
"agent-tool-calling-test:examples": "nx run-many -t test:agent-tool-calling -p '@examples/*' --parallel=1",
|
|
123
127
|
"sync-docs-package-version": "bash documentation/scripts/update-sdk-version-in-docs.sh",
|
|
124
128
|
"sync-examples-package-version": "bash examples/scripts/sync-examples-package-version.sh",
|
|
125
|
-
"test:agent-eval": "
|
|
126
|
-
"test:sdk": "
|
|
127
|
-
"test:sdk:coverage": "
|
|
128
|
-
"test:plugins": "
|
|
129
|
-
"test:examples": "
|
|
130
|
-
"type-check:examples": "
|
|
131
|
-
"type-check:plugins": "
|
|
132
|
-
"type-check:sdk": "
|
|
129
|
+
"test:agent-eval": "nx run agent-eval:test",
|
|
130
|
+
"test:sdk": "nx run-many -t test -p shared-configs core services map",
|
|
131
|
+
"test:sdk:coverage": "nx run-many -t test:coverage -p shared-configs core services map '@tomtom-org/maps-sdk-plugin-*'",
|
|
132
|
+
"test:plugins": "nx run-many -t test -p '@tomtom-org/maps-sdk-plugin-*'",
|
|
133
|
+
"test:examples": "nx run @tomtom-org/maps-sdk-examples:test",
|
|
134
|
+
"type-check:examples": "nx run-many -t type-check -p '@examples/*'",
|
|
135
|
+
"type-check:plugins": "nx run-many -t type-check -p '@tomtom-org/maps-sdk-plugin-*'",
|
|
136
|
+
"type-check:sdk": "nx run-many -t type-check -p core services map map-integration-tests"
|
|
133
137
|
}
|
|
134
138
|
}
|
package/services/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZodError, ZodIssue, ZodObject } from "zod";
|
|
2
|
-
import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, BBox, ChargingPark, ChargingParkWithAvailability, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat,
|
|
2
|
+
import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, BBox, ChargingPark, ChargingParkWithAvailability, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceType, Places, PlugType, PolygonFeature, PolygonFeatures, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SearchPlaceProps, TimeZone, TomTomAPIHeaders, TomTomHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, View, inputSectionTypes } from "@tomtom-org/maps-sdk/core";
|
|
3
3
|
//#region src/shared/types/apiResponseErrorTypes.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
@@ -65,6 +65,13 @@ export type FetchInput<PostData = void> = ({
|
|
|
65
65
|
} & GetObject) | ({
|
|
66
66
|
method: 'POST';
|
|
67
67
|
} & 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
|
+
};
|
|
68
75
|
export type ParsedFetchResponse<T> = Promise<{
|
|
69
76
|
data: Promise<T>;
|
|
70
77
|
status: number;
|
|
@@ -155,6 +162,36 @@ export type CommonServiceParams<ApiRequest = any, ApiResponse = any> = Partial<G
|
|
|
155
162
|
* @param apiResponse - The received raw (unparsed) API response
|
|
156
163
|
*/
|
|
157
164
|
onAPIResponse?: (apiRequest: ApiRequest, apiResponse: ApiResponse) => void;
|
|
165
|
+
/**
|
|
166
|
+
* An `AbortSignal` used to cancel the request.
|
|
167
|
+
*
|
|
168
|
+
* @remarks
|
|
169
|
+
* Aborting rejects the call with an {@link SDKAbortError} (its `name` is `'AbortError'`)
|
|
170
|
+
* and cancels the underlying HTTP request, including while the SDK is waiting to retry
|
|
171
|
+
* a rate-limited (429) response. Aborting a call that already completed has no effect.
|
|
172
|
+
*
|
|
173
|
+
* Compose signals to add a deadline: `AbortSignal.any([mine, AbortSignal.timeout(5000)])`.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* Cancel the previous search whenever a new one starts:
|
|
177
|
+
* ```ts
|
|
178
|
+
* let controller: AbortController | undefined;
|
|
179
|
+
*
|
|
180
|
+
* const searchForQuery = async (query: string) => {
|
|
181
|
+
* controller?.abort();
|
|
182
|
+
* controller = new AbortController();
|
|
183
|
+
* try {
|
|
184
|
+
* return await search({ query, signal: controller.signal });
|
|
185
|
+
* } catch (error) {
|
|
186
|
+
* if (error instanceof SDKAbortError) return;
|
|
187
|
+
* throw error;
|
|
188
|
+
* }
|
|
189
|
+
* };
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @defaultValue `undefined` (the request cannot be cancelled)
|
|
193
|
+
*/
|
|
194
|
+
signal?: AbortSignal;
|
|
158
195
|
};
|
|
159
196
|
/**
|
|
160
197
|
* Function type for parsing API error responses into SDK service errors.
|
|
@@ -217,9 +254,10 @@ export type ServiceTemplate<Params extends CommonServiceParams<ApiRequest, ApiRe
|
|
|
217
254
|
*
|
|
218
255
|
* @param request - The request object to send
|
|
219
256
|
* @param headers - Custom TomTom headers to include in the request
|
|
257
|
+
* @param options - Per-call HTTP options, such as the `AbortSignal` used to cancel the request
|
|
220
258
|
* @returns A promise resolving to the parsed fetch response
|
|
221
259
|
*/
|
|
222
|
-
sendRequest: (request: ApiRequest, headers: TomTomHeaders) => ParsedFetchResponse<ApiResponse>;
|
|
260
|
+
sendRequest: (request: ApiRequest, headers: TomTomHeaders, options?: RequestOptions) => ParsedFetchResponse<ApiResponse>;
|
|
223
261
|
/**
|
|
224
262
|
* Parses the successful API response into the expected return type.
|
|
225
263
|
*
|
|
@@ -336,6 +374,35 @@ export declare class SDKServiceError extends SDKError {
|
|
|
336
374
|
*/
|
|
337
375
|
constructor(message: string, service: string, status?: number);
|
|
338
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Error class for cancelled service calls.
|
|
379
|
+
*
|
|
380
|
+
* Thrown when the `signal` passed to a service call is aborted, either before the
|
|
381
|
+
* request is sent or while it is in flight. Its `name` is `'AbortError'`, matching
|
|
382
|
+
* the convention used by `fetch`, and the original abort reason — including a custom
|
|
383
|
+
* value passed to `AbortController.abort(reason)` — is available on `cause`.
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* ```typescript
|
|
387
|
+
* try {
|
|
388
|
+
* await search({ query: 'cafe', signal: controller.signal });
|
|
389
|
+
* } catch (error) {
|
|
390
|
+
* if (error instanceof SDKAbortError) return; // superseded by a newer search
|
|
391
|
+
* throw error;
|
|
392
|
+
* }
|
|
393
|
+
* ```
|
|
394
|
+
*
|
|
395
|
+
* @group Errors
|
|
396
|
+
*/
|
|
397
|
+
export declare class SDKAbortError extends SDKError {
|
|
398
|
+
/**
|
|
399
|
+
* Creates a new SDKAbortError instance.
|
|
400
|
+
*
|
|
401
|
+
* @param service - Name of the service whose call was cancelled
|
|
402
|
+
* @param cause - The abort reason carried by the signal
|
|
403
|
+
*/
|
|
404
|
+
constructor(service: string, cause?: unknown);
|
|
405
|
+
}
|
|
339
406
|
/**
|
|
340
407
|
* @ignore
|
|
341
408
|
* @param error
|
|
@@ -348,8 +415,9 @@ export declare const parseDefaultResponseError: ParseResponseError<DefaultAPIRes
|
|
|
348
415
|
* @param error The error captured by a catch function.
|
|
349
416
|
* @param serviceName The name of the service.
|
|
350
417
|
* @param parseResponseError
|
|
418
|
+
* @param signal The signal given to the call, used to recognise a cancellation.
|
|
351
419
|
*/
|
|
352
|
-
export declare const buildResponseError: (error: unknown, serviceName: ServiceName, parseResponseError?: ParseResponseError<unknown
|
|
420
|
+
export declare const buildResponseError: (error: unknown, serviceName: ServiceName, parseResponseError?: ParseResponseError<unknown>, signal?: AbortSignal) => SDKError;
|
|
353
421
|
/**
|
|
354
422
|
* @ignore
|
|
355
423
|
* @param error
|
|
@@ -5345,12 +5413,12 @@ type ReachableRangeRequestAPI = FetchInput;
|
|
|
5345
5413
|
//#endregion
|
|
5346
5414
|
//#region src/routing/types/apiResponseTypes.d.ts
|
|
5347
5415
|
/**
|
|
5348
|
-
*
|
|
5416
|
+
* Traffic section icon categories.
|
|
5349
5417
|
* @ignore
|
|
5350
5418
|
*/
|
|
5351
5419
|
type IconCategoryAPI = 'jam' | 'accident' | 'brokenDownVehicle' | 'dangerousConditions' | 'flooding' | 'fog' | 'ice' | 'laneClosed' | 'rain' | 'roadClosed' | 'roadWorks' | 'wind';
|
|
5352
5420
|
/**
|
|
5353
|
-
*
|
|
5421
|
+
* Delay magnitude values. `'undefined'` is the raw API value mapped to SDK `'indefinite'`.
|
|
5354
5422
|
* @ignore
|
|
5355
5423
|
*/
|
|
5356
5424
|
type DelayMagnitudeAPI = 'unknown' | 'minor' | 'moderate' | 'major' | 'undefined';
|
|
@@ -5395,7 +5463,7 @@ type ChargingStopAPI = Omit<ChargingStopProps, 'targetChargeInPCT' | 'chargingCo
|
|
|
5395
5463
|
};
|
|
5396
5464
|
};
|
|
5397
5465
|
/**
|
|
5398
|
-
*
|
|
5466
|
+
* Route summary as the API returns it.
|
|
5399
5467
|
* @ignore
|
|
5400
5468
|
*/
|
|
5401
5469
|
type SummaryAPI = {
|
|
@@ -5408,6 +5476,7 @@ type SummaryAPI = {
|
|
|
5408
5476
|
deviationDistanceInMeters?: number;
|
|
5409
5477
|
deviationDurationInSeconds?: number;
|
|
5410
5478
|
deviationPoint?: Point;
|
|
5479
|
+
originalWaypointIndexAtEndOfLeg?: number;
|
|
5411
5480
|
historicTrafficTravelTimeInSeconds?: number;
|
|
5412
5481
|
liveTrafficIncidentsTravelTimeInSeconds?: number;
|
|
5413
5482
|
noTrafficTravelTimeInSeconds?: number;
|
|
@@ -5419,7 +5488,7 @@ type SummaryAPI = {
|
|
|
5419
5488
|
chargingInformationAtEndOfLeg?: ChargingStopAPI;
|
|
5420
5489
|
};
|
|
5421
5490
|
/**
|
|
5422
|
-
*
|
|
5491
|
+
* Route leg. Its path is a GeoJSON LineString, not a points array.
|
|
5423
5492
|
* @ignore
|
|
5424
5493
|
*/
|
|
5425
5494
|
type LegAPI = {
|
|
@@ -5427,7 +5496,7 @@ type LegAPI = {
|
|
|
5427
5496
|
summary: SummaryAPI;
|
|
5428
5497
|
};
|
|
5429
5498
|
/**
|
|
5430
|
-
*
|
|
5499
|
+
* Basic section. Spans are expressed with pathIndex, not pointIndex.
|
|
5431
5500
|
* @ignore
|
|
5432
5501
|
*/
|
|
5433
5502
|
type BasicSectionAPI = {
|
|
@@ -5458,7 +5527,7 @@ type TrafficSectionAPI = BasicSectionAPI & {
|
|
|
5458
5527
|
eventId?: string;
|
|
5459
5528
|
};
|
|
5460
5529
|
/**
|
|
5461
|
-
*
|
|
5530
|
+
* Speed limit section — speed values live under `speedRestrictions` (typed maximum/minimum)
|
|
5462
5531
|
* instead of the V2 flat `maxSpeedLimitInKmh`.
|
|
5463
5532
|
* @ignore
|
|
5464
5533
|
*/
|
|
@@ -5469,7 +5538,7 @@ type SpeedLimitSectionAPI = BasicSectionAPI & {
|
|
|
5469
5538
|
}[];
|
|
5470
5539
|
};
|
|
5471
5540
|
/**
|
|
5472
|
-
*
|
|
5541
|
+
* Lanes section — directions/separators are camelCase strings (mapped to the SDK's
|
|
5473
5542
|
* UPPER_SNAKE enums during parsing), and lanes are objects rather than flat direction lists.
|
|
5474
5543
|
* @ignore
|
|
5475
5544
|
*/
|
|
@@ -5496,7 +5565,7 @@ type ImportantRoadStretchSectionAPI = BasicSectionAPI & {
|
|
|
5496
5565
|
}[];
|
|
5497
5566
|
};
|
|
5498
5567
|
/**
|
|
5499
|
-
*
|
|
5568
|
+
* Sections object, grouped by type rather than a flat array with a discriminator.
|
|
5500
5569
|
* @ignore
|
|
5501
5570
|
*/
|
|
5502
5571
|
type SectionsAPI = {
|
|
@@ -5518,11 +5587,12 @@ type SectionsAPI = {
|
|
|
5518
5587
|
roadShields?: (BasicSectionAPI & {
|
|
5519
5588
|
roadShieldReferences?: RoadShieldReference[];
|
|
5520
5589
|
})[];
|
|
5590
|
+
tollRoad?: BasicSectionAPI[];
|
|
5521
5591
|
tollVignette?: CountrySectionAPI[];
|
|
5522
5592
|
importantRoadStretch?: ImportantRoadStretchSectionAPI[];
|
|
5523
5593
|
};
|
|
5524
5594
|
/**
|
|
5525
|
-
*
|
|
5595
|
+
* Lat/lon point used in guidance instructions (different from the GeoJSON used elsewhere).
|
|
5526
5596
|
* @ignore
|
|
5527
5597
|
*/
|
|
5528
5598
|
type LatLonPointAPI = {
|
|
@@ -5530,7 +5600,7 @@ type LatLonPointAPI = {
|
|
|
5530
5600
|
longitude: number;
|
|
5531
5601
|
};
|
|
5532
5602
|
/**
|
|
5533
|
-
*
|
|
5603
|
+
* A point on the route path.
|
|
5534
5604
|
* @ignore
|
|
5535
5605
|
*/
|
|
5536
5606
|
type RoutePathPointAPI = {
|
|
@@ -5539,24 +5609,17 @@ type RoutePathPointAPI = {
|
|
|
5539
5609
|
travelTimeFromRouteStartInSeconds: number;
|
|
5540
5610
|
};
|
|
5541
5611
|
/**
|
|
5542
|
-
*
|
|
5543
|
-
*
|
|
5544
|
-
*/
|
|
5545
|
-
type PhoneticAPI = {
|
|
5546
|
-
lhp?: string;
|
|
5547
|
-
ipa?: string;
|
|
5548
|
-
};
|
|
5549
|
-
/**
|
|
5550
|
-
* V3 text-with-phonetics — `phonetic` is now an object (mapped to a flat string during parsing).
|
|
5612
|
+
* Text with phonetics. `phonetic` is a flat string, already transcribed in the alphabet the
|
|
5613
|
+
* request asked for via `instructionPhonetics` — there is no per-alphabet object to choose from.
|
|
5551
5614
|
* @ignore
|
|
5552
5615
|
*/
|
|
5553
5616
|
type TextWithPhoneticsAPI = {
|
|
5554
5617
|
text: string;
|
|
5555
|
-
phonetic?:
|
|
5618
|
+
phonetic?: string;
|
|
5556
5619
|
phoneticLanguageCode?: string;
|
|
5557
5620
|
};
|
|
5558
5621
|
/**
|
|
5559
|
-
*
|
|
5622
|
+
* Icon reference — same shape as the SDK's RoadShieldReference.
|
|
5560
5623
|
* @ignore
|
|
5561
5624
|
*/
|
|
5562
5625
|
type IconReferenceAPI = {
|
|
@@ -5565,7 +5628,7 @@ type IconReferenceAPI = {
|
|
|
5565
5628
|
affixes?: string[];
|
|
5566
5629
|
};
|
|
5567
5630
|
/**
|
|
5568
|
-
*
|
|
5631
|
+
* Road shield inside an instruction's road information. `iconReference` is EXPLICIT.
|
|
5569
5632
|
* @ignore
|
|
5570
5633
|
*/
|
|
5571
5634
|
type InstructionRoadShieldAPI = {
|
|
@@ -5575,7 +5638,25 @@ type InstructionRoadShieldAPI = {
|
|
|
5575
5638
|
iconReference?: IconReferenceAPI;
|
|
5576
5639
|
};
|
|
5577
5640
|
/**
|
|
5578
|
-
*
|
|
5641
|
+
* Side road. `side` is lowercase on the wire, mapped to the SDK's UPPER_SNAKE `SideRoadSide`.
|
|
5642
|
+
* @ignore
|
|
5643
|
+
*/
|
|
5644
|
+
type SideRoadAPI = {
|
|
5645
|
+
side: string;
|
|
5646
|
+
offsetFromManeuverInMeters: number;
|
|
5647
|
+
isDrivable?: boolean;
|
|
5648
|
+
};
|
|
5649
|
+
/**
|
|
5650
|
+
* Maneuver view. Both angle fields are relative-direction strings (`slightLeft`, `back`, …),
|
|
5651
|
+
* not degrees, and are mapped to the SDK's UPPER_SNAKE `ManeuverAngle`.
|
|
5652
|
+
* @ignore
|
|
5653
|
+
*/
|
|
5654
|
+
type ManeuverViewAPI = {
|
|
5655
|
+
onRouteAngle?: string;
|
|
5656
|
+
offRouteAngles?: string[];
|
|
5657
|
+
};
|
|
5658
|
+
/**
|
|
5659
|
+
* Road information inside an instruction.
|
|
5579
5660
|
* @ignore
|
|
5580
5661
|
*/
|
|
5581
5662
|
type InstructionRoadInformationAPI = {
|
|
@@ -5583,13 +5664,16 @@ type InstructionRoadInformationAPI = {
|
|
|
5583
5664
|
roadShields?: InstructionRoadShieldAPI[];
|
|
5584
5665
|
roadNames?: Array<{
|
|
5585
5666
|
identifier: TextWithPhoneticsAPI;
|
|
5667
|
+
source?: string;
|
|
5586
5668
|
}>;
|
|
5587
5669
|
roadNumbers?: Array<{
|
|
5588
5670
|
identifier: TextWithPhoneticsAPI;
|
|
5671
|
+
source?: string;
|
|
5589
5672
|
}>;
|
|
5673
|
+
countryCodeIso2?: string;
|
|
5590
5674
|
};
|
|
5591
5675
|
/**
|
|
5592
|
-
*
|
|
5676
|
+
* Signpost. Carries an EXPLICIT `exitIconReference`, mapped to signpostRoadShieldReferences.
|
|
5593
5677
|
* @ignore
|
|
5594
5678
|
*/
|
|
5595
5679
|
type SignpostAPI = {
|
|
@@ -5599,7 +5683,7 @@ type SignpostAPI = {
|
|
|
5599
5683
|
exitIconReference?: IconReferenceAPI;
|
|
5600
5684
|
};
|
|
5601
5685
|
/**
|
|
5602
|
-
*
|
|
5686
|
+
* Instruction — raw response shape. Coordinates are lat/lon (not GeoJSON), and several field
|
|
5603
5687
|
* names / value casings differ from the SDK's {@link Instruction}; the parser converts them.
|
|
5604
5688
|
* @ignore
|
|
5605
5689
|
*/
|
|
@@ -5625,10 +5709,14 @@ type InstructionAPI = {
|
|
|
5625
5709
|
countryCrossingFromCodeIso2?: string;
|
|
5626
5710
|
countryCrossingToName?: TextWithPhoneticsAPI;
|
|
5627
5711
|
countryCrossingToCodeIso2?: string;
|
|
5628
|
-
sideRoads?:
|
|
5712
|
+
sideRoads?: SideRoadAPI[];
|
|
5713
|
+
/** Generated, localised instruction text. Present on every instruction. */
|
|
5714
|
+
message?: string;
|
|
5715
|
+
maneuverView?: ManeuverViewAPI;
|
|
5716
|
+
roundaboutType?: string;
|
|
5629
5717
|
};
|
|
5630
5718
|
/**
|
|
5631
|
-
*
|
|
5719
|
+
* Progress point. Its field names differ from the SDK's RouteProgressPoint.
|
|
5632
5720
|
* @ignore
|
|
5633
5721
|
*/
|
|
5634
5722
|
type ProgressPointAPI = {
|
|
@@ -6294,7 +6382,7 @@ declare const customize$3: {
|
|
|
6294
6382
|
//#endregion
|
|
6295
6383
|
//#region src/routing/types/apiRequestTypes.d.ts
|
|
6296
6384
|
/**
|
|
6297
|
-
*
|
|
6385
|
+
* Charging model sent in the POST body of the LDEVR endpoint.
|
|
6298
6386
|
* @ignore
|
|
6299
6387
|
*/
|
|
6300
6388
|
type ChargingParametersAPI = {
|
|
@@ -6311,7 +6399,7 @@ type RoutePlanningLocationsAPI = {
|
|
|
6311
6399
|
waypoints?: MultiPoint;
|
|
6312
6400
|
};
|
|
6313
6401
|
/**
|
|
6314
|
-
*
|
|
6402
|
+
* Avoid area rectangle expressed as a GeoJSON Feature with a bbox.
|
|
6315
6403
|
* @ignore
|
|
6316
6404
|
*/
|
|
6317
6405
|
type AvoidRectangleAPI = {
|
|
@@ -6326,7 +6414,7 @@ type AvoidAreasAPI = {
|
|
|
6326
6414
|
rectangles: AvoidRectangleAPI[];
|
|
6327
6415
|
};
|
|
6328
6416
|
/**
|
|
6329
|
-
*
|
|
6417
|
+
* Per-stop request options, nested under the leg that arrives at the stop.
|
|
6330
6418
|
* @ignore
|
|
6331
6419
|
*/
|
|
6332
6420
|
type RouteStopRequestAPI = {
|
|
@@ -6335,7 +6423,7 @@ type RouteStopRequestAPI = {
|
|
|
6335
6423
|
preferredEntryPointIndex?: number;
|
|
6336
6424
|
};
|
|
6337
6425
|
/**
|
|
6338
|
-
*
|
|
6426
|
+
* Per-leg request, used in the `legs` array for route reconstruction and per-stop options.
|
|
6339
6427
|
* @ignore
|
|
6340
6428
|
*/
|
|
6341
6429
|
type LegRequestAPI = {
|
|
@@ -6347,7 +6435,7 @@ type LegRequestAPI = {
|
|
|
6347
6435
|
routeStop?: RouteStopRequestAPI;
|
|
6348
6436
|
};
|
|
6349
6437
|
/**
|
|
6350
|
-
*
|
|
6438
|
+
* POST body for /routing/routes/calculate and (partially) /routing/calculateLongDistanceEVRoute.
|
|
6351
6439
|
* Consumption model parameters are sent as URL query params, not in the POST body.
|
|
6352
6440
|
* @ignore
|
|
6353
6441
|
*/
|
|
@@ -6437,6 +6525,36 @@ type InputSectionType = (typeof inputSectionTypes)[number];
|
|
|
6437
6525
|
* @group Routing
|
|
6438
6526
|
*/
|
|
6439
6527
|
type InputSectionTypes = InputSectionType[];
|
|
6528
|
+
/**
|
|
6529
|
+
* The phonetic alphabet street names are transcribed in.
|
|
6530
|
+
*
|
|
6531
|
+
* @remarks
|
|
6532
|
+
* - `LHP`: Language-specific phonetic representation
|
|
6533
|
+
* - `IPA`: International Phonetic Alphabet
|
|
6534
|
+
*
|
|
6535
|
+
* @group Routing
|
|
6536
|
+
*/
|
|
6537
|
+
type Phonetics = 'LHP' | 'IPA';
|
|
6538
|
+
/**
|
|
6539
|
+
* The accepted values of {@link ChargingStopsStrategy}.
|
|
6540
|
+
* @group Routing
|
|
6541
|
+
*/
|
|
6542
|
+
declare const chargingStopsStrategies: readonly ["automaticFastest", "manualFastest", "automaticFastestWithFallbackToManual"];
|
|
6543
|
+
/**
|
|
6544
|
+
* How the routing service should plan charging stops on an electric route.
|
|
6545
|
+
*
|
|
6546
|
+
* @remarks
|
|
6547
|
+
* - `automaticFastest`: the service picks charging stops for the fastest journey. The default.
|
|
6548
|
+
* - `manualFastest`: the service plans no charging stops of its own; only stops you pass as
|
|
6549
|
+
* waypoints are charged at.
|
|
6550
|
+
* - `automaticFastestWithFallbackToManual`: automatic, falling back to manual when no chargeable
|
|
6551
|
+
* route exists.
|
|
6552
|
+
*
|
|
6553
|
+
* Requires `vehicle.preferences.chargingPreferences` to be set as well: the endpoint also needs a
|
|
6554
|
+
* minimum charge at the destination, which only the preferences supply.
|
|
6555
|
+
* @group Routing
|
|
6556
|
+
*/
|
|
6557
|
+
type ChargingStopsStrategy = (typeof chargingStopsStrategies)[number];
|
|
6440
6558
|
/**
|
|
6441
6559
|
* Configuration for turn-by-turn guidance instructions.
|
|
6442
6560
|
*
|
|
@@ -6469,7 +6587,7 @@ type GuidanceParams = {
|
|
|
6469
6587
|
*
|
|
6470
6588
|
* @default 'IPA'
|
|
6471
6589
|
*/
|
|
6472
|
-
phonetics?:
|
|
6590
|
+
phonetics?: Phonetics;
|
|
6473
6591
|
};
|
|
6474
6592
|
/**
|
|
6475
6593
|
* Extended route representation options.
|
|
@@ -6715,6 +6833,21 @@ type CalculateRouteParams = CommonServiceParams<CalculateRouteRequestAPI, Calcul
|
|
|
6715
6833
|
* ```
|
|
6716
6834
|
*/
|
|
6717
6835
|
computeTravelTimeFor?: ComputeTravelTimeFor;
|
|
6836
|
+
/**
|
|
6837
|
+
* How the service should plan charging stops on an electric route.
|
|
6838
|
+
*
|
|
6839
|
+
* Only applies to electric routes, so `vehicle.preferences.chargingPreferences` must be set
|
|
6840
|
+
* too — validation says so before the request is sent.
|
|
6841
|
+
*
|
|
6842
|
+
* @default 'automaticFastest' (the service's own default when unset)
|
|
6843
|
+
*
|
|
6844
|
+
* @example
|
|
6845
|
+
* ```typescript
|
|
6846
|
+
* // Plan the fastest journey, choosing charging stops along the way
|
|
6847
|
+
* chargingStopsStrategy: 'automaticFastest'
|
|
6848
|
+
* ```
|
|
6849
|
+
*/
|
|
6850
|
+
chargingStopsStrategy?: ChargingStopsStrategy;
|
|
6718
6851
|
/**
|
|
6719
6852
|
* Request extended progress information at route polyline points.
|
|
6720
6853
|
*
|
|
@@ -6809,7 +6942,7 @@ type CalculateRouteTemplate = ServiceTemplate<CalculateRouteParams, FetchInput<C
|
|
|
6809
6942
|
//#region src/routing/requestBuilder.d.ts
|
|
6810
6943
|
/**
|
|
6811
6944
|
* Default function for building calculate route request from {@link CalculateRouteParams}
|
|
6812
|
-
* targeting the
|
|
6945
|
+
* targeting the Orbis routing API.
|
|
6813
6946
|
* @param params The calculate route parameters, with global configuration already merged into them.
|
|
6814
6947
|
*/
|
|
6815
6948
|
declare const buildCalculateRouteRequest: (params: CalculateRouteParams) => FetchInput<CalculateRoutePOSTDataAPI>;
|
|
@@ -8476,7 +8609,8 @@ export declare const calculateReachableRange: (params: ReachableRangeParams, cus
|
|
|
8476
8609
|
* consider implementing your own parallel processing with appropriate throttling.
|
|
8477
8610
|
*
|
|
8478
8611
|
* @param paramsArray Array of reachable range parameters, one for each area to calculate
|
|
8479
|
-
* @param options.signal An `AbortSignal` to cancel in-flight
|
|
8612
|
+
* @param options.signal An `AbortSignal` to cancel the in-flight request and skip the remaining ones.
|
|
8613
|
+
* Composed with any per-entry `signal`, so either one cancels.
|
|
8480
8614
|
* @param customTemplate Advanced customization for request/response handling
|
|
8481
8615
|
*
|
|
8482
8616
|
* @returns Promise resolving to a FeatureCollection of reachable area polygons
|
|
@@ -9275,4 +9409,4 @@ export declare const trafficAreaAnalytics: (params: TrafficAreaAnalyticsParams,
|
|
|
9275
9409
|
*/
|
|
9276
9410
|
export declare const trafficIncidentDetails: (params: TrafficIncidentDetailsParams, customTemplate?: Partial<TrafficIncidentDetailsTemplate>) => Promise<TrafficIncidentDetails>;
|
|
9277
9411
|
//#endregion
|
|
9278
|
-
export type { AdditionalDataAPI, AlongRouteSearchParams, AlongRouteSearchPayloadAPI, AlongRouteSearchRequestAPI, AlongRouteSearchResponse, AlongRouteSearchResponseAPI, AlongRouteSearchResultAPI, AlongRouteSortBy, AreaAnalyticsDateInput, AreaTag, ArrivalSide, AutocompleteGenericSearchSegment, AutocompleteSearchBrandSegment, AutocompleteSearchCategorySegment, AutocompleteSearchCategorySegmentAPI, AutocompleteSearchContext, AutocompleteSearchContextAPI, AutocompleteSearchMatch, AutocompleteSearchMatches, AutocompleteSearchParams, AutocompleteSearchPlaintextSegment, AutocompleteSearchResponse, AutocompleteSearchResponseAPI, AutocompleteSearchResult, AutocompleteSearchResultAPI, AutocompleteSearchResultGeoBias, AutocompleteSearchResultGeoBiasAPI, AutocompleteSearchSegment, AutocompleteSearchSegmentAPI, AutocompleteSearchSegmentType, BookmarkIntent, BookmarkIntentDetails, CalculateRouteParams, CanonicalAreaTag, ChargingStationsAvailabilityParams, Circle, CircleAPI, CommonServiceParamsWithZoom, ComputeTravelTimeFor, CoordinateIntent, CoordinateIntentAPI, CoordinateIntentDetails, CoordinateIntentDetailsAPI, ExplorationBrandAPI, ExplorationChargingParkAPI, ExplorationClassificationAPI, ExplorationOpeningHoursAPI, ExplorationOpeningIntervalAPI, ExplorationPOIAPI, ExplorationPlaceProps, ExplorationRecordType, ExplorationSearchParams, ExplorationSearchPayloadAPI, ExplorationSearchRequestAPI, ExplorationSearchResponse, ExplorationSearchResponseAPI, ExplorationSearchResultAPI, ExplorationViewportAPI, ExtendedRouteRepresentation, FunctionalRoadClass, FuzzySearchParams, FuzzySearchResponse, FuzzySearchResponseAPI, FuzzySearchResultAPI, GeocodingParams, GeocodingProps, GeocodingResponse, GeometriesInput, GeometryAPI, GeometryDataParams, GeometryDataResponseAPI, GeometryParams, GeometryPlaceParams, GeometrySearchFeatureCollectionProps, GeometrySearchParams, GeometrySearchPayloadAPI, GeometrySearchRequestAPI, GeometrySearchResponse, GeometrySearchResponseAPI, GeometrySearchResultAPI, GuidanceParams, InputSectionType, InputSectionTypes, LegCostModel, MaxNumberOfAlternatives, NearAPI, NearbyIntent, NearbyIntentAPI, NearbyIntentDetails, NearbyIntentDetailsAPI, POICategoriesParams, POICategoriesResponse, POICategoryResult, PlaceByIdMandatoryParams, PlaceByIdOptionalParams, PlaceByIdParams, PlaceByIdResponse, PlaceByIdResponseAPI, PlaceByIdResultAPI, PoiCategoriesResponseAPI, PoiCategoryAPI, PolygonAPI, PopulatedAreaTag, QueryIntent, QueryIntentAPI, ReverseGeocodingMandatoryParams, ReverseGeocodingOptionalParams, ReverseGeocodingParams, RoutePointAPI, RouteStopOptions, SearchGeometryInput, TrafficAreaAnalyticsDateRange, TrafficAreaAnalyticsDays, TrafficAreaAnalyticsParams, TrafficIncidentDetailsByBBoxParams, TrafficIncidentDetailsByIdsParams, TrafficIncidentDetailsParams, W3WIntent, W3WIntentDetails, arrivalSides, functionalRoadClasses, metricKeyToApiDataType };
|
|
9412
|
+
export type { AdditionalDataAPI, AlongRouteSearchParams, AlongRouteSearchPayloadAPI, AlongRouteSearchRequestAPI, AlongRouteSearchResponse, AlongRouteSearchResponseAPI, AlongRouteSearchResultAPI, AlongRouteSortBy, AreaAnalyticsDateInput, AreaTag, ArrivalSide, AutocompleteGenericSearchSegment, AutocompleteSearchBrandSegment, AutocompleteSearchCategorySegment, AutocompleteSearchCategorySegmentAPI, AutocompleteSearchContext, AutocompleteSearchContextAPI, AutocompleteSearchMatch, AutocompleteSearchMatches, AutocompleteSearchParams, AutocompleteSearchPlaintextSegment, AutocompleteSearchResponse, AutocompleteSearchResponseAPI, AutocompleteSearchResult, AutocompleteSearchResultAPI, AutocompleteSearchResultGeoBias, AutocompleteSearchResultGeoBiasAPI, AutocompleteSearchSegment, AutocompleteSearchSegmentAPI, AutocompleteSearchSegmentType, BookmarkIntent, BookmarkIntentDetails, CalculateRouteParams, CanonicalAreaTag, ChargingStationsAvailabilityParams, ChargingStopsStrategy, Circle, CircleAPI, CommonServiceParamsWithZoom, ComputeTravelTimeFor, CoordinateIntent, CoordinateIntentAPI, CoordinateIntentDetails, CoordinateIntentDetailsAPI, ExplorationBrandAPI, ExplorationChargingParkAPI, ExplorationClassificationAPI, ExplorationOpeningHoursAPI, ExplorationOpeningIntervalAPI, ExplorationPOIAPI, ExplorationPlaceProps, ExplorationRecordType, ExplorationSearchParams, ExplorationSearchPayloadAPI, ExplorationSearchRequestAPI, ExplorationSearchResponse, ExplorationSearchResponseAPI, ExplorationSearchResultAPI, ExplorationViewportAPI, ExtendedRouteRepresentation, FunctionalRoadClass, FuzzySearchParams, FuzzySearchResponse, FuzzySearchResponseAPI, FuzzySearchResultAPI, GeocodingParams, GeocodingProps, GeocodingResponse, GeometriesInput, GeometryAPI, GeometryDataParams, GeometryDataResponseAPI, GeometryParams, GeometryPlaceParams, GeometrySearchFeatureCollectionProps, GeometrySearchParams, GeometrySearchPayloadAPI, GeometrySearchRequestAPI, GeometrySearchResponse, GeometrySearchResponseAPI, GeometrySearchResultAPI, GuidanceParams, InputSectionType, InputSectionTypes, LegCostModel, MaxNumberOfAlternatives, NearAPI, NearbyIntent, NearbyIntentAPI, NearbyIntentDetails, NearbyIntentDetailsAPI, POICategoriesParams, POICategoriesResponse, POICategoryResult, Phonetics, PlaceByIdMandatoryParams, PlaceByIdOptionalParams, PlaceByIdParams, PlaceByIdResponse, PlaceByIdResponseAPI, PlaceByIdResultAPI, PoiCategoriesResponseAPI, PoiCategoryAPI, PolygonAPI, PopulatedAreaTag, QueryIntent, QueryIntentAPI, ReverseGeocodingMandatoryParams, ReverseGeocodingOptionalParams, ReverseGeocodingParams, RoutePointAPI, RouteStopOptions, SearchGeometryInput, TrafficAreaAnalyticsDateRange, TrafficAreaAnalyticsDays, TrafficAreaAnalyticsParams, TrafficIncidentDetailsByBBoxParams, TrafficIncidentDetailsByIdsParams, TrafficIncidentDetailsParams, W3WIntent, W3WIntentDetails, arrivalSides, chargingStopsStrategies, functionalRoadClasses, metricKeyToApiDataType };
|