@tomtom-org/maps-sdk 0.58.1 → 0.60.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 +147 -0
- package/README.md +2 -1
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +38 -76
- package/map/dist/index.d.ts +9621 -9346
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +1 -1
- package/package.json +2 -2
- package/services/dist/index.d.ts +348 -527
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
- package/services/package.json +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -589,7 +589,7 @@ export declare const currentTypes: readonly ["AC1", "AC3", "DC"];
|
|
|
589
589
|
*/
|
|
590
590
|
export type CurrentType = (typeof currentTypes)[number];
|
|
591
591
|
/**
|
|
592
|
-
*
|
|
592
|
+
* Charging speed class, derived from a rated power.
|
|
593
593
|
*
|
|
594
594
|
* @remarks
|
|
595
595
|
* - `slow`: Typically up to 12 kW (Level 1 AC charging)
|
|
@@ -640,13 +640,7 @@ export type Connector = {
|
|
|
640
640
|
*/
|
|
641
641
|
ratedPowerKW: number;
|
|
642
642
|
/**
|
|
643
|
-
* The
|
|
644
|
-
*
|
|
645
|
-
* @remarks
|
|
646
|
-
* - `slow`: Typically up to 12 kW (Level 1 AC charging)
|
|
647
|
-
* - `regular`: Typically between 12 kW and 50 kW (Level 2 AC charging)
|
|
648
|
-
* - `fast`: Typically between 50 kW and 150 kW (DC fast charging)
|
|
649
|
-
* - `ultra-fast`: Typically above 150 kW (High-power DC fast charging)
|
|
643
|
+
* The {@link ChargingSpeed} class of `ratedPowerKW`.
|
|
650
644
|
*/
|
|
651
645
|
chargingSpeed: ChargingSpeed;
|
|
652
646
|
/**
|
|
@@ -808,9 +802,9 @@ export type ChargingPoint = {
|
|
|
808
802
|
/**
|
|
809
803
|
* Unique identifier for this charging point (EVSE ID).
|
|
810
804
|
*
|
|
811
|
-
* Often follows international standards like ISO 15118.
|
|
805
|
+
* Often follows international standards like ISO 15118. Absent when the operator publishes none.
|
|
812
806
|
*/
|
|
813
|
-
evseId
|
|
807
|
+
evseId?: string;
|
|
814
808
|
/**
|
|
815
809
|
* Capabilities and features of this charging point.
|
|
816
810
|
*
|
|
@@ -836,6 +830,12 @@ export type ChargingPoint = {
|
|
|
836
830
|
*/
|
|
837
831
|
connectors?: Connector[];
|
|
838
832
|
};
|
|
833
|
+
/**
|
|
834
|
+
* A charging point as the search services describe it: everything but its real-time status.
|
|
835
|
+
*
|
|
836
|
+
* @group Place
|
|
837
|
+
*/
|
|
838
|
+
export type StaticChargingPoint = Omit<ChargingPoint, 'status'>;
|
|
839
839
|
/**
|
|
840
840
|
* Electric vehicle charging station.
|
|
841
841
|
*
|
|
@@ -853,9 +853,10 @@ export type ChargingPoint = {
|
|
|
853
853
|
* };
|
|
854
854
|
* ```
|
|
855
855
|
*
|
|
856
|
+
* @typeParam Point - {@link ChargingPoint} with real-time status, {@link StaticChargingPoint} without.
|
|
856
857
|
* @group Place
|
|
857
858
|
*/
|
|
858
|
-
export type ChargingStation = {
|
|
859
|
+
export type ChargingStation<Point = ChargingPoint> = {
|
|
859
860
|
/**
|
|
860
861
|
* Unique identifier for the charging station.
|
|
861
862
|
*/
|
|
@@ -865,7 +866,7 @@ export type ChargingStation = {
|
|
|
865
866
|
*
|
|
866
867
|
* Each charging point can serve one vehicle at a time.
|
|
867
868
|
*/
|
|
868
|
-
chargingPoints:
|
|
869
|
+
chargingPoints: Point[];
|
|
869
870
|
};
|
|
870
871
|
//#endregion
|
|
871
872
|
//#region src/types/place/poi/openingHours.d.ts
|
|
@@ -1756,6 +1757,12 @@ type ChargingPark = {
|
|
|
1756
1757
|
* This field shows total counts regardless of current operational status.
|
|
1757
1758
|
*/
|
|
1758
1759
|
connectors: ConnectorCount[];
|
|
1760
|
+
/**
|
|
1761
|
+
* The charging stations and their charging points (EVSEs), without real-time status.
|
|
1762
|
+
*
|
|
1763
|
+
* Present on places returned by the search services.
|
|
1764
|
+
*/
|
|
1765
|
+
chargingStations?: ChargingStation<StaticChargingPoint>[];
|
|
1759
1766
|
};
|
|
1760
1767
|
/**
|
|
1761
1768
|
* Charging park with optional real-time availability data.
|
|
@@ -1780,17 +1787,12 @@ type ChargingPark = {
|
|
|
1780
1787
|
*/
|
|
1781
1788
|
type ChargingParkWithAvailability = ChargingPark & {
|
|
1782
1789
|
/**
|
|
1783
|
-
* Real-time availability information for this charging park
|
|
1784
|
-
*
|
|
1785
|
-
* Present only if availability data has been fetched from the
|
|
1786
|
-
* EV Charging Station Availability service. Contains current
|
|
1787
|
-
* operational status for all charging points and connectors.
|
|
1790
|
+
* Real-time availability information for this charging park: the status of every charging point,
|
|
1791
|
+
* and counts per connector type and power.
|
|
1788
1792
|
*
|
|
1789
1793
|
* @remarks
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
1792
|
-
* 2. Call the EV Charging Stations Availability service
|
|
1793
|
-
* 3. Merge the result into this property
|
|
1794
|
+
* `getPlaceWithEVAvailability` and `getPlacesWithEVAvailability` from `@tomtom-org/maps-sdk/services`
|
|
1795
|
+
* fetch it with the place's `dataSources.chargingAvailability.id` and merge it in.
|
|
1794
1796
|
*/
|
|
1795
1797
|
availability: ChargingStationsAvailability;
|
|
1796
1798
|
};
|
|
@@ -1854,7 +1856,7 @@ type PlaceDataSources = {
|
|
|
1854
1856
|
/**
|
|
1855
1857
|
* Data source for EV charging station availability.
|
|
1856
1858
|
*
|
|
1857
|
-
* Present only for
|
|
1859
|
+
* Present only for EV charging stations: search results and route charging stops.
|
|
1858
1860
|
* Use the ID to fetch real-time availability from the
|
|
1859
1861
|
* EV Charging Stations Availability service.
|
|
1860
1862
|
*/
|
|
@@ -1862,8 +1864,9 @@ type PlaceDataSources = {
|
|
|
1862
1864
|
/**
|
|
1863
1865
|
* Data source for geometric shape information.
|
|
1864
1866
|
*
|
|
1865
|
-
* Present for places with geometric representations (type === Geography or POI).
|
|
1866
|
-
* Use the ID to fetch boundary polygons from the Geometry Data service.
|
|
1867
|
+
* Present on search results for places with geometric representations (type === Geography or POI).
|
|
1868
|
+
* Use the ID to fetch boundary polygons from the Geometry Data service. A reverse geocoded place
|
|
1869
|
+
* has none; search it by name, with its `geographyType`, to get one.
|
|
1867
1870
|
*
|
|
1868
1871
|
* @remarks
|
|
1869
1872
|
* Useful for:
|
|
@@ -1897,8 +1900,7 @@ type ChargingAvailabilityDataSource = {
|
|
|
1897
1900
|
/**
|
|
1898
1901
|
* Charging availability ID for the EV Charging Stations Availability service.
|
|
1899
1902
|
*
|
|
1900
|
-
* Pass this value as the
|
|
1901
|
-
* real-time status of charging points and connectors.
|
|
1903
|
+
* Pass this value as the `id` parameter to fetch real-time status of charging points and connectors.
|
|
1902
1904
|
*/
|
|
1903
1905
|
id?: string;
|
|
1904
1906
|
};
|
|
@@ -2218,13 +2220,7 @@ export type ChargingConnectionInfo = {
|
|
|
2218
2220
|
*/
|
|
2219
2221
|
chargingPowerInkW?: number;
|
|
2220
2222
|
/**
|
|
2221
|
-
* The
|
|
2222
|
-
*
|
|
2223
|
-
* @remarks
|
|
2224
|
-
* - `slow`: Typically up to 12 kW (Level 1 AC charging)
|
|
2225
|
-
* - `regular`: Typically between 12 kW and 50 kW (Level 2 AC charging)
|
|
2226
|
-
* - `fast`: Typically between 50 kW and 150 kW (DC fast charging)
|
|
2227
|
-
* - `ultra-fast`: Typically above 150 kW (High-power DC fast charging)
|
|
2223
|
+
* The {@link ChargingSpeed} class of `chargingPowerInkW`.
|
|
2228
2224
|
*/
|
|
2229
2225
|
chargingSpeed?: ChargingSpeed;
|
|
2230
2226
|
};
|
|
@@ -2326,23 +2322,9 @@ export type ChargingStopProps = CommonPlaceProps & {
|
|
|
2326
2322
|
/**
|
|
2327
2323
|
* The unique UUID identifier of this charging park.
|
|
2328
2324
|
*
|
|
2329
|
-
* This universally unique identifier can be used to:
|
|
2330
|
-
* - Check real-time availability of charging stations
|
|
2331
|
-
* - Query detailed charging park information
|
|
2332
|
-
* - Track charging park status and updates
|
|
2333
|
-
* - Cross-reference with TomTom EV Charging Stations API
|
|
2334
|
-
*
|
|
2335
2325
|
* @remarks
|
|
2336
|
-
*
|
|
2337
|
-
* real-time
|
|
2338
|
-
*
|
|
2339
|
-
* @example
|
|
2340
|
-
* ```typescript
|
|
2341
|
-
* // Use UUID to check availability
|
|
2342
|
-
* const availability = await evChargingAvailability.get({
|
|
2343
|
-
* chargingAvailability: chargingStop.chargingParkUuid
|
|
2344
|
-
* });
|
|
2345
|
-
* ```
|
|
2326
|
+
* The same ID as `dataSources.chargingAvailability.id`, so `getPlaceWithEVAvailability(chargingStop)`
|
|
2327
|
+
* adds the park's charging stations and their real-time status, as it does for a search result.
|
|
2346
2328
|
*/
|
|
2347
2329
|
chargingParkUuid: string;
|
|
2348
2330
|
/**
|
|
@@ -2408,13 +2390,7 @@ export type ChargingStopProps = CommonPlaceProps & {
|
|
|
2408
2390
|
*/
|
|
2409
2391
|
chargingParkPowerInkW?: number;
|
|
2410
2392
|
/**
|
|
2411
|
-
* The
|
|
2412
|
-
*
|
|
2413
|
-
* @remarks
|
|
2414
|
-
* - `slow`: Typically up to 12 kW (Level 1 AC charging)
|
|
2415
|
-
* - `regular`: Typically between 12 kW and 50 kW (Level 2 AC charging)
|
|
2416
|
-
* - `fast`: Typically between 50 kW and 150 kW (DC fast charging)
|
|
2417
|
-
* - `ultra-fast`: Typically above 150 kW (High-power DC fast charging)
|
|
2393
|
+
* The {@link ChargingSpeed} class of `chargingParkPowerInkW`: the park's fastest connector.
|
|
2418
2394
|
*/
|
|
2419
2395
|
chargingParkSpeed?: ChargingSpeed;
|
|
2420
2396
|
/**
|
|
@@ -4554,9 +4530,10 @@ export type AreaAnalyticsAnomaly = {
|
|
|
4554
4530
|
*/
|
|
4555
4531
|
export type AreaAnalyticsFeatureProperties = {
|
|
4556
4532
|
/**
|
|
4557
|
-
* Name of the analysis region
|
|
4533
|
+
* Name of the analysis region, which the API echoes from a request that names one; the SDK names none, so this is
|
|
4534
|
+
* absent.
|
|
4558
4535
|
*/
|
|
4559
|
-
name
|
|
4536
|
+
name?: string;
|
|
4560
4537
|
/**
|
|
4561
4538
|
* IANA timezone the API echoes from a request that names one; the SDK names none, so this is absent.
|
|
4562
4539
|
*/
|
|
@@ -5729,20 +5706,6 @@ export type GlobalConfig = {
|
|
|
5729
5706
|
*/
|
|
5730
5707
|
retry?: RetryConfig;
|
|
5731
5708
|
};
|
|
5732
|
-
/**
|
|
5733
|
-
* {@link GlobalConfig} plus the options the SDK honours but keeps off the public types.
|
|
5734
|
-
*
|
|
5735
|
-
* `put` and every service call still accept them at runtime; only {@link mergeFromGlobal} types them.
|
|
5736
|
-
* @ignore
|
|
5737
|
-
*/
|
|
5738
|
-
export type InternalGlobalConfig = GlobalConfig & {
|
|
5739
|
-
/**
|
|
5740
|
-
* API version for service endpoints. Services that need another one pin it themselves.
|
|
5741
|
-
*
|
|
5742
|
-
* @default 1
|
|
5743
|
-
*/
|
|
5744
|
-
apiVersion: number;
|
|
5745
|
-
};
|
|
5746
5709
|
/**
|
|
5747
5710
|
* Default base URL for TomTom APIs. A `commonBaseURL` other than this signals a
|
|
5748
5711
|
* proxy or custom backend.
|
|
@@ -5839,7 +5802,7 @@ export declare class TomTomConfig {
|
|
|
5839
5802
|
* Merges the global configuration into the given one, with the latter having priority.
|
|
5840
5803
|
* @ignore
|
|
5841
5804
|
*/
|
|
5842
|
-
export declare const mergeFromGlobal: <T extends Partial<
|
|
5805
|
+
export declare const mergeFromGlobal: <T extends Partial<GlobalConfig>>(givenConfig?: T) => GlobalConfig & T;
|
|
5843
5806
|
/**
|
|
5844
5807
|
* Whether the SDK is configured for a credentials proxy such as the demos proxy
|
|
5845
5808
|
* — no `apiKey` (the
|
|
@@ -5848,11 +5811,10 @@ export declare const mergeFromGlobal: <T extends Partial<InternalGlobalConfig>>(
|
|
|
5848
5811
|
*
|
|
5849
5812
|
* In this mode SDK requests attach `credentials: 'include'` so the proxy's
|
|
5850
5813
|
* session cookie travels with them. In all other cases — direct TomTom usage
|
|
5851
|
-
* and customer-owned `
|
|
5814
|
+
* and a customer-owned proxy that keeps a real `apiKey` — credentials stay at
|
|
5852
5815
|
* the browser default, so we don't break consumers whose backend responds with
|
|
5853
5816
|
* `Access-Control-Allow-Origin: *` (the browser rejects credentialed responses
|
|
5854
|
-
* against a wildcard origin).
|
|
5855
|
-
* real `apiKey`, so this stays false for them.
|
|
5817
|
+
* against a wildcard origin).
|
|
5856
5818
|
*
|
|
5857
5819
|
* The `apiKey` test is a falsy check (not `=== ''`) on purpose: a proxy build
|
|
5858
5820
|
* may overwrite the bootstrap's `apiKey: ''` with `apiKey: undefined` (e.g.
|