@tomtom-org/maps-sdk 0.48.2 → 0.49.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 +53 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +14 -0
- package/map/dist/index.d.ts +31 -2
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/package.json +10 -6
- package/services/dist/index.d.ts +351 -107
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/services/dist/index.d.ts
CHANGED
|
@@ -19,16 +19,14 @@ import { GeographyType } from '@tomtom-org/maps-sdk/core';
|
|
|
19
19
|
import { GeoJSON as GeoJSON_2 } from 'geojson';
|
|
20
20
|
import { GetPositionEntryPointOption } from '@tomtom-org/maps-sdk/core';
|
|
21
21
|
import { GlobalConfig } from '@tomtom-org/maps-sdk/core';
|
|
22
|
-
import { Guidance } from '@tomtom-org/maps-sdk/core';
|
|
23
22
|
import { HasBBox } from '@tomtom-org/maps-sdk/core';
|
|
24
23
|
import { HasLngLat } from '@tomtom-org/maps-sdk/core';
|
|
25
24
|
import { inputSectionTypes } from '@tomtom-org/maps-sdk/core';
|
|
26
25
|
import { Instruction } from '@tomtom-org/maps-sdk/core';
|
|
27
|
-
import { LaneDirection } from '@tomtom-org/maps-sdk/core';
|
|
28
|
-
import { LegSummary } from '@tomtom-org/maps-sdk/core';
|
|
29
26
|
import { LineString } from 'geojson';
|
|
30
27
|
import { Mapcode } from '@tomtom-org/maps-sdk/core';
|
|
31
28
|
import { MapcodeType } from '@tomtom-org/maps-sdk/core';
|
|
29
|
+
import { MultiPoint } from 'geojson';
|
|
32
30
|
import { MultiPolygon } from 'geojson';
|
|
33
31
|
import { OpeningHours } from '@tomtom-org/maps-sdk/core';
|
|
34
32
|
import { OpeningHoursMode } from '@tomtom-org/maps-sdk/core';
|
|
@@ -47,19 +45,16 @@ import { PolygonFeature } from '@tomtom-org/maps-sdk/core';
|
|
|
47
45
|
import { PolygonFeatures } from '@tomtom-org/maps-sdk/core';
|
|
48
46
|
import { PolygonFeatures as PolygonFeatures_2 } from '@tomtom-org/maps-sdk/core';
|
|
49
47
|
import { Position } from 'geojson';
|
|
50
|
-
import { PossibleLaneSeparator } from '@tomtom-org/maps-sdk/core';
|
|
51
48
|
import { RevGeoAddressProps } from '@tomtom-org/maps-sdk/core';
|
|
52
49
|
import { RoadShieldReference } from '@tomtom-org/maps-sdk/core';
|
|
53
50
|
import { Route } from '@tomtom-org/maps-sdk/core';
|
|
54
|
-
import { RoutePathPoint } from '@tomtom-org/maps-sdk/core';
|
|
55
51
|
import { RoutePlanningLocation } from '@tomtom-org/maps-sdk/core';
|
|
56
|
-
import { RouteProgressPoint } from '@tomtom-org/maps-sdk/core';
|
|
57
52
|
import { Routes } from '@tomtom-org/maps-sdk/core';
|
|
58
|
-
import { RouteSummary } from '@tomtom-org/maps-sdk/core';
|
|
59
53
|
import { SearchPlaceProps } from '@tomtom-org/maps-sdk/core';
|
|
60
54
|
import { SearchPlaceProps as SearchPlaceProps_2 } from '@tomtom-org/maps-sdk/core';
|
|
61
55
|
import { SideOfStreet } from '@tomtom-org/maps-sdk/core';
|
|
62
56
|
import { TimeZone } from '@tomtom-org/maps-sdk/core';
|
|
57
|
+
import { TomTomAPIHeaders } from '@tomtom-org/maps-sdk/core';
|
|
63
58
|
import { TomTomHeaders } from '@tomtom-org/maps-sdk/core';
|
|
64
59
|
import { TrafficAreaAnalytics } from '@tomtom-org/maps-sdk/core';
|
|
65
60
|
import { TrafficIncidentDetails } from '@tomtom-org/maps-sdk/core';
|
|
@@ -959,11 +954,13 @@ declare type AvoidAreasAPI = {
|
|
|
959
954
|
};
|
|
960
955
|
|
|
961
956
|
/**
|
|
957
|
+
* V3 avoid area rectangle expressed as a GeoJSON Feature with a bbox.
|
|
962
958
|
* @ignore
|
|
963
959
|
*/
|
|
964
960
|
declare type AvoidRectangleAPI = {
|
|
965
|
-
|
|
966
|
-
|
|
961
|
+
type: 'Feature';
|
|
962
|
+
bbox: [number, number, number, number];
|
|
963
|
+
geometry: null;
|
|
967
964
|
};
|
|
968
965
|
|
|
969
966
|
/**
|
|
@@ -978,6 +975,15 @@ declare interface BaseAPIResponseErrorBody {
|
|
|
978
975
|
};
|
|
979
976
|
}
|
|
980
977
|
|
|
978
|
+
/**
|
|
979
|
+
* V3 basic section — uses pathIndex instead of pointIndex.
|
|
980
|
+
* @ignore
|
|
981
|
+
*/
|
|
982
|
+
declare type BasicSectionAPI = {
|
|
983
|
+
startPathIndex: number;
|
|
984
|
+
endPathIndex: number;
|
|
985
|
+
};
|
|
986
|
+
|
|
981
987
|
declare type BatteryCurve = {
|
|
982
988
|
/**
|
|
983
989
|
* Minimum: 0
|
|
@@ -1101,6 +1107,7 @@ declare const buildAutocompleteSearchRequest: (params: AutocompleteSearchParams)
|
|
|
1101
1107
|
|
|
1102
1108
|
/**
|
|
1103
1109
|
* Default function for building calculate route request from {@link CalculateRouteParams}
|
|
1110
|
+
* targeting the OrbisV3 routing API.
|
|
1104
1111
|
* @param params The calculate route parameters, with global configuration already merged into them.
|
|
1105
1112
|
*/
|
|
1106
1113
|
declare const buildCalculateRouteRequest: (params: CalculateRouteParams) => FetchInput<CalculateRoutePOSTDataAPI>;
|
|
@@ -1505,9 +1512,12 @@ export declare type CalculateRouteParams = CommonServiceParams<CalculateRouteReq
|
|
|
1505
1512
|
* Route section types to include in the response.
|
|
1506
1513
|
*
|
|
1507
1514
|
* Sections help you display route characteristics like tolls, ferries, or traffic.
|
|
1508
|
-
* Leg sections are always included regardless of this parameter.
|
|
1515
|
+
* Leg sections are always included regardless of this parameter. A section type is only
|
|
1516
|
+
* present in the response if the route actually traverses it. The `lanes` section is
|
|
1517
|
+
* guidance-only and is returned solely when {@link GuidanceParams | `guidance`} is also
|
|
1518
|
+
* requested.
|
|
1509
1519
|
*
|
|
1510
|
-
* @default
|
|
1520
|
+
* @default When omitted, all section types are requested.
|
|
1511
1521
|
*
|
|
1512
1522
|
* @example
|
|
1513
1523
|
* ```typescript
|
|
@@ -1542,12 +1552,28 @@ export declare type CalculateRouteParams = CommonServiceParams<CalculateRouteReq
|
|
|
1542
1552
|
};
|
|
1543
1553
|
|
|
1544
1554
|
/**
|
|
1555
|
+
* V3 POST body for /routing/routes/calculate and (partially) /routing/calculateLongDistanceEVRoute.
|
|
1556
|
+
* Consumption model parameters are sent as URL query params, not in the POST body.
|
|
1545
1557
|
* @ignore
|
|
1546
1558
|
*/
|
|
1547
1559
|
declare type CalculateRoutePOSTDataAPI = {
|
|
1548
|
-
|
|
1549
|
-
|
|
1560
|
+
routePlanningLocations: RoutePlanningLocationsAPI;
|
|
1561
|
+
path?: LineString;
|
|
1562
|
+
legs?: LegRequestAPI[];
|
|
1563
|
+
routeType?: string;
|
|
1564
|
+
traffic?: string;
|
|
1565
|
+
avoids?: string[];
|
|
1566
|
+
travelMode?: string;
|
|
1567
|
+
maxPathAlternativeRoutes?: number;
|
|
1568
|
+
departureDateTime?: string;
|
|
1569
|
+
arrivalDateTime?: string;
|
|
1570
|
+
vehicleEngineType?: string;
|
|
1571
|
+
vehicleWeightInKilograms?: number;
|
|
1572
|
+
vehicleMaxSpeedInKilometersPerHour?: number;
|
|
1573
|
+
vehicleHeadingInDegrees?: number;
|
|
1550
1574
|
chargingParameters?: ChargingParametersAPI;
|
|
1575
|
+
guidance?: 'none' | 'instructions';
|
|
1576
|
+
instructionPhonetics?: 'ipa' | 'lhp';
|
|
1551
1577
|
avoidAreas?: AvoidAreasAPI;
|
|
1552
1578
|
};
|
|
1553
1579
|
|
|
@@ -1560,13 +1586,11 @@ declare type CalculateRouteRequestAPI = FetchInput<CalculateRoutePOSTDataAPI>;
|
|
|
1560
1586
|
* @ignore
|
|
1561
1587
|
*/
|
|
1562
1588
|
declare type CalculateRouteResponseAPI = {
|
|
1563
|
-
formatVersion: string;
|
|
1564
1589
|
routes: RouteAPI[];
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
report?: ReportAPI;
|
|
1590
|
+
/**
|
|
1591
|
+
* Base URL of the Road Shields service (EXPLICIT, top-level). Applied to every instruction's
|
|
1592
|
+
* `roadShieldAtlasReference`. Requested via the top-level `roadShieldAtlasReference` attribute.
|
|
1593
|
+
*/
|
|
1570
1594
|
roadShieldAtlasReference?: string;
|
|
1571
1595
|
};
|
|
1572
1596
|
|
|
@@ -1677,7 +1701,15 @@ declare type ChargingModel = {
|
|
|
1677
1701
|
chargingTimeOffsetInSec?: number;
|
|
1678
1702
|
};
|
|
1679
1703
|
|
|
1680
|
-
|
|
1704
|
+
/**
|
|
1705
|
+
* V3 charging model sent in the POST body of the LDEVR endpoint.
|
|
1706
|
+
* @ignore
|
|
1707
|
+
*/
|
|
1708
|
+
declare type ChargingParametersAPI = {
|
|
1709
|
+
batteryCurve?: BatteryCurve[];
|
|
1710
|
+
chargingConnectors?: ChargingConnector[];
|
|
1711
|
+
chargingTimeOffsetInSec?: number;
|
|
1712
|
+
};
|
|
1681
1713
|
|
|
1682
1714
|
/**
|
|
1683
1715
|
* @ignore
|
|
@@ -1690,7 +1722,10 @@ declare type ChargingParkAPI = {
|
|
|
1690
1722
|
* @ignore
|
|
1691
1723
|
*/
|
|
1692
1724
|
declare type ChargingParkLocationAPI = {
|
|
1693
|
-
coordinate:
|
|
1725
|
+
coordinate: {
|
|
1726
|
+
latitude: number;
|
|
1727
|
+
longitude: number;
|
|
1728
|
+
};
|
|
1694
1729
|
street?: string;
|
|
1695
1730
|
houseNumber?: string;
|
|
1696
1731
|
city?: string;
|
|
@@ -3418,6 +3453,13 @@ export declare type CostModel = {
|
|
|
3418
3453
|
routeType?: RouteType;
|
|
3419
3454
|
};
|
|
3420
3455
|
|
|
3456
|
+
/**
|
|
3457
|
+
* @ignore
|
|
3458
|
+
*/
|
|
3459
|
+
declare type CountrySectionAPI = BasicSectionAPI & {
|
|
3460
|
+
countryCodeIso2?: string;
|
|
3461
|
+
};
|
|
3462
|
+
|
|
3421
3463
|
/**
|
|
3422
3464
|
* @ignore
|
|
3423
3465
|
*/
|
|
@@ -3563,6 +3605,12 @@ declare interface DefaultAPIResponseErrorBody extends BaseAPIResponseErrorBody {
|
|
|
3563
3605
|
errorText?: string;
|
|
3564
3606
|
}
|
|
3565
3607
|
|
|
3608
|
+
/**
|
|
3609
|
+
* V3 delay magnitude values. `'undefined'` is the raw API value mapped to SDK `'indefinite'`.
|
|
3610
|
+
* @ignore
|
|
3611
|
+
*/
|
|
3612
|
+
declare type DelayMagnitudeAPI = 'unknown' | 'minor' | 'moderate' | 'major' | 'undefined';
|
|
3613
|
+
|
|
3566
3614
|
declare type DepartArriveOption = 'departAt' | 'arriveBy';
|
|
3567
3615
|
|
|
3568
3616
|
/**
|
|
@@ -4486,14 +4534,13 @@ declare type FeaturePropertiesAPI = {
|
|
|
4486
4534
|
|
|
4487
4535
|
/**
|
|
4488
4536
|
* Hybrid HTTP fetch input, supporting different HTTP methods such as GET and POST.
|
|
4489
|
-
* * GET method comes with a URL.
|
|
4490
|
-
* * POST method comes with a URL
|
|
4537
|
+
* * GET method comes with a URL and optional headers.
|
|
4538
|
+
* * POST method comes with a URL, optional POST data, and optional headers.
|
|
4491
4539
|
* @ignore
|
|
4492
4540
|
*/
|
|
4493
|
-
export declare type FetchInput<PostData = void> = {
|
|
4541
|
+
export declare type FetchInput<PostData = void> = ({
|
|
4494
4542
|
method: 'GET';
|
|
4495
|
-
|
|
4496
|
-
} | ({
|
|
4543
|
+
} & GetObject) | ({
|
|
4497
4544
|
method: 'POST';
|
|
4498
4545
|
} & PostObject<PostData>);
|
|
4499
4546
|
|
|
@@ -5555,6 +5602,15 @@ export declare type GeometrySearchResultAPI = CommonSearchPlaceResultAPI;
|
|
|
5555
5602
|
*/
|
|
5556
5603
|
declare type GeometrySearchTemplate = ServiceTemplate<GeometrySearchParams, GeometrySearchRequestAPI, GeometrySearchResponseAPI, GeometrySearchResponse>;
|
|
5557
5604
|
|
|
5605
|
+
/**
|
|
5606
|
+
* GET object with URL and optional service-specific API headers.
|
|
5607
|
+
* @ignore
|
|
5608
|
+
*/
|
|
5609
|
+
export declare type GetObject = {
|
|
5610
|
+
url: URL;
|
|
5611
|
+
headers?: TomTomAPIHeaders;
|
|
5612
|
+
};
|
|
5613
|
+
|
|
5558
5614
|
/**
|
|
5559
5615
|
* Enhance multiple places with real-time EV charging availability data.
|
|
5560
5616
|
*
|
|
@@ -5567,7 +5623,7 @@ declare type GeometrySearchTemplate = ServiceTemplate<GeometrySearchParams, Geom
|
|
|
5567
5623
|
* take some time.
|
|
5568
5624
|
*
|
|
5569
5625
|
* @param places - Collection of places to enhance
|
|
5570
|
-
* @param options - Configuration options
|
|
5626
|
+
* @param options - Configuration options, including common service parameters (e.g. `key`, `customServiceBaseURL`, `onAPIRequest`) forwarded to each availability request
|
|
5571
5627
|
*
|
|
5572
5628
|
* @returns Promise resolving to places collection with merged availability
|
|
5573
5629
|
*
|
|
@@ -5593,10 +5649,18 @@ declare type GeometrySearchTemplate = ServiceTemplate<GeometrySearchParams, Geom
|
|
|
5593
5649
|
*
|
|
5594
5650
|
* @group EV Charging
|
|
5595
5651
|
*/
|
|
5596
|
-
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places_2<P>, options?: {
|
|
5652
|
+
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places_2<P>, options?: Omit<ChargingStationsAvailabilityParams, 'id'> & {
|
|
5597
5653
|
excludeIfAvailabilityUnknown: true;
|
|
5598
5654
|
}): Promise<Places_2<EVChargingStationWithAvailabilityPlaceProps>>;
|
|
5599
5655
|
|
|
5656
|
+
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places_2<P>, options?: Omit<ChargingStationsAvailabilityParams, 'id'> & {
|
|
5657
|
+
/**
|
|
5658
|
+
* If true, places with unknown availability will be filtered out. Otherwise, they will be included.
|
|
5659
|
+
* @default false
|
|
5660
|
+
*/
|
|
5661
|
+
excludeIfAvailabilityUnknown?: false;
|
|
5662
|
+
}): Promise<Places_2<P | EVChargingStationWithAvailabilityPlaceProps>>;
|
|
5663
|
+
|
|
5600
5664
|
/**
|
|
5601
5665
|
* Enhance a place with real-time EV charging availability data.
|
|
5602
5666
|
*
|
|
@@ -5604,6 +5668,7 @@ export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps =
|
|
|
5604
5668
|
* the place properties.
|
|
5605
5669
|
*
|
|
5606
5670
|
* @param place - The place to enhance with availability data
|
|
5671
|
+
* @param commonParams - Common service parameters (e.g. `key`, `customServiceBaseURL`, `onAPIRequest`) forwarded to the availability request
|
|
5607
5672
|
*
|
|
5608
5673
|
* @returns Promise resolving to the place with merged availability information
|
|
5609
5674
|
* @returns undefined if no availability data is present for the `place` input parameter.
|
|
@@ -5624,7 +5689,7 @@ export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps =
|
|
|
5624
5689
|
*
|
|
5625
5690
|
* @group EV Charging
|
|
5626
5691
|
*/
|
|
5627
|
-
export declare const getPlaceWithEVAvailability: <P extends CommonPlaceProps = CommonPlaceProps>(place: Place<P>) => Promise<Place<EVChargingStationWithAvailabilityPlaceProps> | undefined>;
|
|
5692
|
+
export declare const getPlaceWithEVAvailability: <P extends CommonPlaceProps = CommonPlaceProps>(place: Place<P>, commonParams?: Omit<ChargingStationsAvailabilityParams, "id">) => Promise<Place<EVChargingStationWithAvailabilityPlaceProps> | undefined>;
|
|
5628
5693
|
|
|
5629
5694
|
/**
|
|
5630
5695
|
* Retrieve the list of POI category types supported by the TomTom Search API.
|
|
@@ -5680,13 +5745,6 @@ export declare const getPOICategories: (params?: POICategoriesParams) => Promise
|
|
|
5680
5745
|
*/
|
|
5681
5746
|
export declare const getPOICategoryCodes: (params?: POICategoriesParams) => Promise<POICategory_2[]>;
|
|
5682
5747
|
|
|
5683
|
-
/**
|
|
5684
|
-
* @ignore
|
|
5685
|
-
*/
|
|
5686
|
-
declare type GuidanceAPI = Omit<Guidance, 'instructions'> & {
|
|
5687
|
-
instructions: InstructionAPI[];
|
|
5688
|
-
};
|
|
5689
|
-
|
|
5690
5748
|
/**
|
|
5691
5749
|
* Configuration for turn-by-turn guidance instructions.
|
|
5692
5750
|
*
|
|
@@ -5739,6 +5797,35 @@ export declare type GuidanceParams = {
|
|
|
5739
5797
|
*/
|
|
5740
5798
|
export declare const hasChargingAvailability: (chargingPark: ChargingPark | ChargingParkWithAvailability | undefined) => chargingPark is ChargingParkWithAvailability;
|
|
5741
5799
|
|
|
5800
|
+
/**
|
|
5801
|
+
* V3 traffic section icon categories.
|
|
5802
|
+
* @ignore
|
|
5803
|
+
*/
|
|
5804
|
+
declare type IconCategoryAPI = 'jam' | 'accident' | 'brokenDownVehicle' | 'dangerousConditions' | 'flooding' | 'fog' | 'ice' | 'laneClosed' | 'rain' | 'roadClosed' | 'roadWorks' | 'wind';
|
|
5805
|
+
|
|
5806
|
+
/**
|
|
5807
|
+
* V3 icon reference — same shape as the SDK's RoadShieldReference.
|
|
5808
|
+
* @ignore
|
|
5809
|
+
*/
|
|
5810
|
+
declare type IconReferenceAPI = {
|
|
5811
|
+
reference: string;
|
|
5812
|
+
shieldContent?: string;
|
|
5813
|
+
affixes?: string[];
|
|
5814
|
+
};
|
|
5815
|
+
|
|
5816
|
+
/**
|
|
5817
|
+
* @ignore
|
|
5818
|
+
*/
|
|
5819
|
+
declare type ImportantRoadStretchSectionAPI = BasicSectionAPI & {
|
|
5820
|
+
importantRoadStretchIndex: number;
|
|
5821
|
+
streetName?: {
|
|
5822
|
+
text: string;
|
|
5823
|
+
};
|
|
5824
|
+
roadNumbers?: {
|
|
5825
|
+
text: string;
|
|
5826
|
+
}[];
|
|
5827
|
+
};
|
|
5828
|
+
|
|
5742
5829
|
/**
|
|
5743
5830
|
* @ignore
|
|
5744
5831
|
*/
|
|
@@ -5844,6 +5931,7 @@ export declare type InputSectionType = (typeof inputSectionTypes)[number];
|
|
|
5844
5931
|
* - `lowEmissionZone`: Low emission zones
|
|
5845
5932
|
* - `speedLimit`: Speed limit changes
|
|
5846
5933
|
* - `roadShields`: Road shield information
|
|
5934
|
+
* - `importantRoadStretch`: Named important road stretches along the route
|
|
5847
5935
|
*
|
|
5848
5936
|
* @example
|
|
5849
5937
|
* ```typescript
|
|
@@ -5857,23 +5945,93 @@ export declare type InputSectionType = (typeof inputSectionTypes)[number];
|
|
|
5857
5945
|
* const sectionTypes: InputSectionTypes = [];
|
|
5858
5946
|
* ```
|
|
5859
5947
|
*
|
|
5860
|
-
* @
|
|
5948
|
+
* @remarks
|
|
5949
|
+
* A requested section type is only present in the response if the route actually traverses it
|
|
5950
|
+
* (e.g. `ferry` is omitted on a route with no water crossing). The `lanes` section is guidance-only:
|
|
5951
|
+
* it is returned solely when {@link GuidanceParams | `guidance`} is also requested, and is therefore
|
|
5952
|
+
* not part of this input list.
|
|
5953
|
+
*
|
|
5954
|
+
* @default When omitted, all section types are requested (equivalent to `inputSectionTypes`).
|
|
5861
5955
|
*
|
|
5862
5956
|
* @group Routing
|
|
5863
5957
|
*/
|
|
5864
5958
|
export declare type InputSectionTypes = InputSectionType[];
|
|
5865
5959
|
|
|
5866
5960
|
/**
|
|
5961
|
+
* V3 instruction — raw response shape. Coordinates are lat/lon (not GeoJSON), and several field
|
|
5962
|
+
* names / value casings differ from the SDK's {@link Instruction}; the parser converts them.
|
|
5867
5963
|
* @ignore
|
|
5868
5964
|
*/
|
|
5869
|
-
declare type InstructionAPI =
|
|
5870
|
-
|
|
5871
|
-
|
|
5965
|
+
declare type InstructionAPI = {
|
|
5966
|
+
routeOffsetInMeters: number;
|
|
5967
|
+
maneuver?: string;
|
|
5968
|
+
maneuverPoint: LatLonPointAPI;
|
|
5969
|
+
routePath?: RoutePathPointAPI[];
|
|
5970
|
+
nextRoadInformation?: InstructionRoadInformationAPI;
|
|
5971
|
+
previousRoadInformation?: InstructionRoadInformationAPI;
|
|
5972
|
+
signpost?: SignpostAPI;
|
|
5973
|
+
intersectionName?: TextWithPhoneticsAPI;
|
|
5974
|
+
drivingSide?: 'left' | 'right';
|
|
5975
|
+
landmark?: string;
|
|
5976
|
+
distanceToPreviousTrafficLightInMeters?: number;
|
|
5977
|
+
ambiguousExitOffsetFromManeuverInMeters?: number;
|
|
5978
|
+
roundaboutExitNumber?: number;
|
|
5979
|
+
isManeuverObligatory?: boolean;
|
|
5980
|
+
changeOfAngleInDegrees?: number;
|
|
5981
|
+
tollgateName?: TextWithPhoneticsAPI;
|
|
5982
|
+
tollPaymentTypes?: string[];
|
|
5983
|
+
countryCrossingFromName?: TextWithPhoneticsAPI;
|
|
5984
|
+
countryCrossingFromCodeIso2?: string;
|
|
5985
|
+
countryCrossingToName?: TextWithPhoneticsAPI;
|
|
5986
|
+
countryCrossingToCodeIso2?: string;
|
|
5987
|
+
sideRoads?: Instruction['sideRoads'];
|
|
5872
5988
|
};
|
|
5873
5989
|
|
|
5874
5990
|
/**
|
|
5991
|
+
* V3 road information inside an instruction — field names changed from V2.
|
|
5992
|
+
* @ignore
|
|
5993
|
+
*/
|
|
5994
|
+
declare type InstructionRoadInformationAPI = {
|
|
5995
|
+
properties?: string[];
|
|
5996
|
+
roadShields?: InstructionRoadShieldAPI[];
|
|
5997
|
+
roadNames?: Array<{
|
|
5998
|
+
identifier: TextWithPhoneticsAPI;
|
|
5999
|
+
}>;
|
|
6000
|
+
roadNumbers?: Array<{
|
|
6001
|
+
identifier: TextWithPhoneticsAPI;
|
|
6002
|
+
}>;
|
|
6003
|
+
};
|
|
6004
|
+
|
|
6005
|
+
/**
|
|
6006
|
+
* V3 road shield inside an instruction's road information. `iconReference` is EXPLICIT.
|
|
6007
|
+
* @ignore
|
|
6008
|
+
*/
|
|
6009
|
+
declare type InstructionRoadShieldAPI = {
|
|
6010
|
+
roadNumber?: TextWithPhoneticsAPI;
|
|
6011
|
+
countryCodeIso2?: string;
|
|
6012
|
+
countrySubdivisionCodeIso?: string;
|
|
6013
|
+
iconReference?: IconReferenceAPI;
|
|
6014
|
+
};
|
|
6015
|
+
|
|
6016
|
+
/**
|
|
6017
|
+
* V3 lanes section — directions/separators are camelCase strings (mapped to the SDK's
|
|
6018
|
+
* UPPER_SNAKE enums during parsing), and lanes are objects rather than flat direction lists.
|
|
6019
|
+
* @ignore
|
|
6020
|
+
*/
|
|
6021
|
+
declare type LanesSectionAPI = BasicSectionAPI & {
|
|
6022
|
+
lanes?: {
|
|
6023
|
+
directions: string[];
|
|
6024
|
+
follow?: string;
|
|
6025
|
+
laneType?: string;
|
|
6026
|
+
tollPaymentTypes?: string[];
|
|
6027
|
+
}[];
|
|
6028
|
+
laneSeparators?: string[];
|
|
6029
|
+
properties?: string[];
|
|
6030
|
+
};
|
|
6031
|
+
|
|
6032
|
+
/**
|
|
6033
|
+
* Lat/lon point used by non-routing services (e.g. reachable-range).
|
|
5875
6034
|
* @ignore
|
|
5876
|
-
* @see {@link https://docs.tomtom.com/routing-api/documentation/routing/common-routing-parameters point}
|
|
5877
6035
|
*/
|
|
5878
6036
|
declare type LatitudeLongitudePointAPI = {
|
|
5879
6037
|
latitude: number;
|
|
@@ -5895,13 +6053,31 @@ declare type LatLonAPI = {
|
|
|
5895
6053
|
};
|
|
5896
6054
|
|
|
5897
6055
|
/**
|
|
6056
|
+
* V3 lat/lon point used in guidance instructions (different from GeoJSON used elsewhere).
|
|
6057
|
+
* @ignore
|
|
6058
|
+
*/
|
|
6059
|
+
declare type LatLonPointAPI = {
|
|
6060
|
+
latitude: number;
|
|
6061
|
+
longitude: number;
|
|
6062
|
+
};
|
|
6063
|
+
|
|
6064
|
+
/**
|
|
6065
|
+
* V3 leg — path is now a GeoJSON LineString instead of a points array.
|
|
5898
6066
|
* @ignore
|
|
5899
6067
|
*/
|
|
5900
6068
|
declare type LegAPI = {
|
|
5901
|
-
|
|
6069
|
+
path: LineString;
|
|
5902
6070
|
summary: SummaryAPI_2;
|
|
5903
6071
|
};
|
|
5904
6072
|
|
|
6073
|
+
/**
|
|
6074
|
+
* V3 per-leg request (used in the `legs` array for route reconstruction).
|
|
6075
|
+
* @ignore
|
|
6076
|
+
*/
|
|
6077
|
+
declare type LegRequestAPI = {
|
|
6078
|
+
path?: LineString;
|
|
6079
|
+
};
|
|
6080
|
+
|
|
5905
6081
|
/**
|
|
5906
6082
|
* Basic low/normal/high intensity level option.
|
|
5907
6083
|
*
|
|
@@ -6194,6 +6370,15 @@ declare const parseTrafficAreaAnalyticsResponse: (apiResponse: AreaAnalyticsResp
|
|
|
6194
6370
|
*/
|
|
6195
6371
|
declare const parseTrafficIncidentDetailsResponse: (apiResponse: IncidentDetailsResponseAPI) => TrafficIncidentDetails;
|
|
6196
6372
|
|
|
6373
|
+
/**
|
|
6374
|
+
* V3 phonetic transcription — an object keyed by phonetic alphabet, not a flat string as in V2.
|
|
6375
|
+
* @ignore
|
|
6376
|
+
*/
|
|
6377
|
+
declare type PhoneticAPI = {
|
|
6378
|
+
lhp?: string;
|
|
6379
|
+
ipa?: string;
|
|
6380
|
+
};
|
|
6381
|
+
|
|
6197
6382
|
/**
|
|
6198
6383
|
* Retrieve detailed information about a place using its unique identifier.
|
|
6199
6384
|
*
|
|
@@ -6569,14 +6754,6 @@ export declare type POICategoryResult = {
|
|
|
6569
6754
|
synonyms: string[];
|
|
6570
6755
|
};
|
|
6571
6756
|
|
|
6572
|
-
/**
|
|
6573
|
-
* @ignore
|
|
6574
|
-
*/
|
|
6575
|
-
declare type PointWaypointAPI = {
|
|
6576
|
-
waypointSourceType: 'USER_DEFINED' | 'AUTO_GENERATED';
|
|
6577
|
-
supportingPointIndex: number;
|
|
6578
|
-
};
|
|
6579
|
-
|
|
6580
6757
|
/**
|
|
6581
6758
|
* @ignore
|
|
6582
6759
|
*/
|
|
@@ -6622,12 +6799,13 @@ export declare const POPULATED_AREA_TAGS: readonly ["village", "small_town", "mi
|
|
|
6622
6799
|
export declare type PopulatedAreaTag = (typeof POPULATED_AREA_TAGS)[number];
|
|
6623
6800
|
|
|
6624
6801
|
/**
|
|
6625
|
-
* POST object with URL and optional
|
|
6802
|
+
* POST object with URL, optional payload, and optional service-specific API headers.
|
|
6626
6803
|
* @ignore
|
|
6627
6804
|
*/
|
|
6628
6805
|
export declare type PostObject<D> = {
|
|
6629
6806
|
url: URL;
|
|
6630
6807
|
data?: D;
|
|
6808
|
+
headers?: TomTomAPIHeaders;
|
|
6631
6809
|
};
|
|
6632
6810
|
|
|
6633
6811
|
/**
|
|
@@ -6682,6 +6860,16 @@ declare type PredefinedVehicleModel = {
|
|
|
6682
6860
|
variantId: string;
|
|
6683
6861
|
};
|
|
6684
6862
|
|
|
6863
|
+
/**
|
|
6864
|
+
* V3 progress point — field names differ from the SDK's RouteProgressPoint.
|
|
6865
|
+
* @ignore
|
|
6866
|
+
*/
|
|
6867
|
+
declare type ProgressPointAPI = {
|
|
6868
|
+
pathIndex: number;
|
|
6869
|
+
distanceInMeters?: number;
|
|
6870
|
+
travelDurationInSeconds?: number;
|
|
6871
|
+
};
|
|
6872
|
+
|
|
6685
6873
|
/**
|
|
6686
6874
|
* Union type for all possible query intents.
|
|
6687
6875
|
*
|
|
@@ -6992,16 +7180,6 @@ declare type ReachableRangeTemplate = ServiceTemplate<ReachableRangeParams, Reac
|
|
|
6992
7180
|
*/
|
|
6993
7181
|
export declare type RelatedPoisRequest = 'child' | 'parent' | 'all' | 'off';
|
|
6994
7182
|
|
|
6995
|
-
/**
|
|
6996
|
-
* @ignore
|
|
6997
|
-
*/
|
|
6998
|
-
declare type ReportAPI = {
|
|
6999
|
-
effectiveSettings: {
|
|
7000
|
-
key: string;
|
|
7001
|
-
value: string;
|
|
7002
|
-
}[];
|
|
7003
|
-
};
|
|
7004
|
-
|
|
7005
7183
|
/**
|
|
7006
7184
|
* Configuration for services request validation.
|
|
7007
7185
|
* @ignore
|
|
@@ -7350,17 +7528,29 @@ export declare type RoadUse = 'LimitedAccess' | 'Arterial' | 'Terminal' | 'Ramp'
|
|
|
7350
7528
|
*/
|
|
7351
7529
|
declare type RouteAPI = {
|
|
7352
7530
|
legs: LegAPI[];
|
|
7353
|
-
sections
|
|
7531
|
+
sections?: SectionsAPI;
|
|
7354
7532
|
summary: SummaryAPI_2;
|
|
7355
|
-
|
|
7356
|
-
|
|
7533
|
+
instructions?: InstructionAPI[];
|
|
7534
|
+
progressPoints?: ProgressPointAPI[];
|
|
7357
7535
|
};
|
|
7358
7536
|
|
|
7359
7537
|
/**
|
|
7538
|
+
* V3 routePath point — field names changed from V2.
|
|
7360
7539
|
* @ignore
|
|
7361
7540
|
*/
|
|
7362
|
-
declare type RoutePathPointAPI =
|
|
7363
|
-
point:
|
|
7541
|
+
declare type RoutePathPointAPI = {
|
|
7542
|
+
point: LatLonPointAPI;
|
|
7543
|
+
distanceFromRouteStartInMeters: number;
|
|
7544
|
+
travelTimeFromRouteStartInSeconds: number;
|
|
7545
|
+
};
|
|
7546
|
+
|
|
7547
|
+
/**
|
|
7548
|
+
* @ignore
|
|
7549
|
+
*/
|
|
7550
|
+
declare type RoutePlanningLocationsAPI = {
|
|
7551
|
+
origin: Point;
|
|
7552
|
+
destination: Point;
|
|
7553
|
+
waypoints?: MultiPoint;
|
|
7364
7554
|
};
|
|
7365
7555
|
|
|
7366
7556
|
/**
|
|
@@ -7847,38 +8037,32 @@ export declare type SearchSummary = {
|
|
|
7847
8037
|
};
|
|
7848
8038
|
|
|
7849
8039
|
/**
|
|
8040
|
+
* V3 sections object — already grouped by type (no flat array + discriminator).
|
|
7850
8041
|
* @ignore
|
|
7851
8042
|
*/
|
|
7852
|
-
declare type
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
text: string;
|
|
7874
|
-
}[];
|
|
8043
|
+
declare type SectionsAPI = {
|
|
8044
|
+
carTrain?: BasicSectionAPI[];
|
|
8045
|
+
ferry?: BasicSectionAPI[];
|
|
8046
|
+
tunnel?: BasicSectionAPI[];
|
|
8047
|
+
motorway?: BasicSectionAPI[];
|
|
8048
|
+
pedestrian?: BasicSectionAPI[];
|
|
8049
|
+
toll?: BasicSectionAPI[];
|
|
8050
|
+
country?: CountrySectionAPI[];
|
|
8051
|
+
travelMode?: TravelModeSectionAPI[];
|
|
8052
|
+
traffic?: TrafficSectionAPI[];
|
|
8053
|
+
carpool?: BasicSectionAPI[];
|
|
8054
|
+
urban?: BasicSectionAPI[];
|
|
8055
|
+
unpaved?: BasicSectionAPI[];
|
|
8056
|
+
lowEmissionZone?: BasicSectionAPI[];
|
|
8057
|
+
speedLimit?: SpeedLimitSectionAPI[];
|
|
8058
|
+
lanes?: LanesSectionAPI[];
|
|
8059
|
+
roadShields?: (BasicSectionAPI & {
|
|
8060
|
+
roadShieldReferences?: RoadShieldReference[];
|
|
8061
|
+
})[];
|
|
8062
|
+
tollVignette?: CountrySectionAPI[];
|
|
8063
|
+
importantRoadStretch?: ImportantRoadStretchSectionAPI[];
|
|
7875
8064
|
};
|
|
7876
8065
|
|
|
7877
|
-
/**
|
|
7878
|
-
* @ignore
|
|
7879
|
-
*/
|
|
7880
|
-
declare type SectionTypeAPI = 'CAR_TRAIN' | 'COUNTRY' | 'FERRY' | 'MOTORWAY' | 'PEDESTRIAN' | 'TOLL' | 'TOLL_VIGNETTE' | 'TRAFFIC' | 'TRAVEL_MODE' | 'TUNNEL' | 'UNPAVED' | 'URBAN' | 'CARPOOL' | 'LOW_EMISSION_ZONE' | 'LANES' | 'SPEED_LIMIT' | 'ROAD_SHIELDS' | 'IMPORTANT_ROAD_STRETCH';
|
|
7881
|
-
|
|
7882
8066
|
/**
|
|
7883
8067
|
* Name of a service managed by the SDK.
|
|
7884
8068
|
*/
|
|
@@ -7956,6 +8140,29 @@ export declare type ServiceTemplate<Params extends CommonServiceParams<ApiReques
|
|
|
7956
8140
|
parseResponseError?: ParseResponseError<any>;
|
|
7957
8141
|
};
|
|
7958
8142
|
|
|
8143
|
+
/**
|
|
8144
|
+
* V3 signpost — adds an EXPLICIT `exitIconReference` (mapped to signpostRoadShieldReferences).
|
|
8145
|
+
* @ignore
|
|
8146
|
+
*/
|
|
8147
|
+
declare type SignpostAPI = {
|
|
8148
|
+
exitName?: TextWithPhoneticsAPI;
|
|
8149
|
+
exitNumber?: TextWithPhoneticsAPI;
|
|
8150
|
+
towardName?: TextWithPhoneticsAPI;
|
|
8151
|
+
exitIconReference?: IconReferenceAPI;
|
|
8152
|
+
};
|
|
8153
|
+
|
|
8154
|
+
/**
|
|
8155
|
+
* V3 speed limit section — speed values live under `speedRestrictions` (typed maximum/minimum)
|
|
8156
|
+
* instead of the V2 flat `maxSpeedLimitInKmh`.
|
|
8157
|
+
* @ignore
|
|
8158
|
+
*/
|
|
8159
|
+
declare type SpeedLimitSectionAPI = BasicSectionAPI & {
|
|
8160
|
+
speedRestrictions?: {
|
|
8161
|
+
type: 'maximum' | 'minimum';
|
|
8162
|
+
inKilometersPerHour: number;
|
|
8163
|
+
}[];
|
|
8164
|
+
};
|
|
8165
|
+
|
|
7959
8166
|
/**
|
|
7960
8167
|
* Specifies the speed-dependent component of consumption.
|
|
7961
8168
|
* Provided as an unordered list of speed/consumption-rate pairs.
|
|
@@ -7986,15 +8193,28 @@ declare type SummaryAPI = Omit<SearchSummary, 'geoBias'> & {
|
|
|
7986
8193
|
};
|
|
7987
8194
|
|
|
7988
8195
|
/**
|
|
7989
|
-
*
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
8196
|
+
* V3 summary — field names changed from V2.
|
|
8197
|
+
* @ignore
|
|
8198
|
+
*/
|
|
8199
|
+
declare type SummaryAPI_2 = {
|
|
8200
|
+
lengthInMeters: number;
|
|
8201
|
+
travelDurationInSeconds: number;
|
|
8202
|
+
trafficDelayDurationInSeconds?: number;
|
|
8203
|
+
trafficLengthInMeters?: number;
|
|
8204
|
+
departureDateTime: string;
|
|
8205
|
+
arrivalDateTime: string;
|
|
8206
|
+
deviationDistanceInMeters?: number;
|
|
8207
|
+
deviationDurationInSeconds?: number;
|
|
8208
|
+
deviationPoint?: Point;
|
|
8209
|
+
historicTrafficTravelTimeInSeconds?: number;
|
|
8210
|
+
liveTrafficIncidentsTravelTimeInSeconds?: number;
|
|
8211
|
+
noTrafficTravelTimeInSeconds?: number;
|
|
8212
|
+
totalChargingTimeInSeconds?: number;
|
|
8213
|
+
batteryConsumptionInkWh?: number;
|
|
8214
|
+
batteryConsumptionInKilowattHours?: number;
|
|
8215
|
+
remainingChargeAtArrivalInkWh?: number;
|
|
8216
|
+
fuelConsumptionInLiters?: number;
|
|
7994
8217
|
chargingInformationAtEndOfLeg?: ChargingStopAPI;
|
|
7995
|
-
deviationDistance?: number;
|
|
7996
|
-
deviationTime?: number;
|
|
7997
|
-
deviationPoint?: LatitudeLongitudePointAPI;
|
|
7998
8218
|
};
|
|
7999
8219
|
|
|
8000
8220
|
/**
|
|
@@ -8010,6 +8230,16 @@ declare type SummaryAPI_2 = Omit<RouteSummary & LegSummary, 'arrivalTime' | 'dep
|
|
|
8010
8230
|
*/
|
|
8011
8231
|
declare type SummaryQueryType = 'NEARBY' | 'NON_NEAR';
|
|
8012
8232
|
|
|
8233
|
+
/**
|
|
8234
|
+
* V3 text-with-phonetics — `phonetic` is now an object (mapped to a flat string during parsing).
|
|
8235
|
+
* @ignore
|
|
8236
|
+
*/
|
|
8237
|
+
declare type TextWithPhoneticsAPI = {
|
|
8238
|
+
text: string;
|
|
8239
|
+
phonetic?: PhoneticAPI;
|
|
8240
|
+
phoneticLanguageCode?: string;
|
|
8241
|
+
};
|
|
8242
|
+
|
|
8013
8243
|
/**
|
|
8014
8244
|
* @ignore
|
|
8015
8245
|
*/
|
|
@@ -8291,11 +8521,6 @@ export declare type TrafficAreaAnalyticsParams = CommonServiceParams & TrafficAr
|
|
|
8291
8521
|
*/
|
|
8292
8522
|
declare type TrafficAreaAnalyticsTemplate = ServiceTemplate<TrafficAreaAnalyticsParams, FetchInput<AreaAnalyticsRequestBody>, AreaAnalyticsResponseAPI, TrafficAreaAnalytics>;
|
|
8293
8523
|
|
|
8294
|
-
/**
|
|
8295
|
-
* @ignore
|
|
8296
|
-
*/
|
|
8297
|
-
declare type TrafficCategoryAPI = 'JAM' | 'ROAD_WORK' | 'ROAD_CLOSURE' | 'OTHER';
|
|
8298
|
-
|
|
8299
8524
|
/**
|
|
8300
8525
|
* Fetch detailed information about traffic incidents.
|
|
8301
8526
|
*
|
|
@@ -8557,6 +8782,25 @@ declare type TrafficIncidentDetailsTemplate = ServiceTemplate<TrafficIncidentDet
|
|
|
8557
8782
|
*/
|
|
8558
8783
|
export declare type TrafficInput = 'live' | 'historical';
|
|
8559
8784
|
|
|
8785
|
+
/**
|
|
8786
|
+
* @ignore
|
|
8787
|
+
*/
|
|
8788
|
+
declare type TrafficSectionAPI = BasicSectionAPI & {
|
|
8789
|
+
effectiveSpeedInKilometersPerHour?: number;
|
|
8790
|
+
delayDurationInSeconds?: number;
|
|
8791
|
+
delayMagnitude?: DelayMagnitudeAPI;
|
|
8792
|
+
tec?: TrafficIncidentTEC;
|
|
8793
|
+
iconCategory?: IconCategoryAPI;
|
|
8794
|
+
eventId?: string;
|
|
8795
|
+
};
|
|
8796
|
+
|
|
8797
|
+
/**
|
|
8798
|
+
* @ignore
|
|
8799
|
+
*/
|
|
8800
|
+
declare type TravelModeSectionAPI = BasicSectionAPI & {
|
|
8801
|
+
travelMode?: TravelMode | 'other';
|
|
8802
|
+
};
|
|
8803
|
+
|
|
8560
8804
|
/**
|
|
8561
8805
|
* Validate Error Class for validating params input, this will be used by SDKError class.
|
|
8562
8806
|
* @ignore
|