@tomtom-org/maps-sdk 0.40.1 → 0.41.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/README.md +21 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +10 -22
- package/core/package.json +2 -2
- package/map/dist/THIRD_PARTY.txt +4 -4
- package/map/dist/index.d.ts +86 -56
- 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 +84 -75
- package/services/dist/services.es.js +22 -22
- package/services/dist/services.es.js.map +1 -1
package/map/package.json
CHANGED
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.41.0",
|
|
6
6
|
"description": "TomTom Maps for JavaScript",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"tomtom",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@size-limit/file": "^11.2.0",
|
|
23
23
|
"@size-limit/preset-app": "^11.2.0",
|
|
24
24
|
"size-limit": "^11.2.0",
|
|
25
|
-
"typedoc": "^0.28.
|
|
25
|
+
"typedoc": "^0.28.16",
|
|
26
26
|
"yaml": "^2.8.2"
|
|
27
27
|
},
|
|
28
28
|
"size-limit": [
|
package/services/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { $ZodError } from 'zod/v4/core';
|
|
|
2
2
|
import { $ZodIssue } from 'zod/v4/core';
|
|
3
3
|
import { AddressProperties } from '@tomtom-org/maps-sdk/core';
|
|
4
4
|
import { Avoidable } from '@tomtom-org/maps-sdk/core';
|
|
5
|
+
import { ChargingPark } from '@tomtom-org/maps-sdk/core';
|
|
6
|
+
import { ChargingParkWithAvailability } from '@tomtom-org/maps-sdk/core';
|
|
5
7
|
import { ChargingStation } from '@tomtom-org/maps-sdk/core';
|
|
6
8
|
import { ChargingStationsAccessType } from '@tomtom-org/maps-sdk/core';
|
|
7
9
|
import { ChargingStationsAvailability } from '@tomtom-org/maps-sdk/core';
|
|
@@ -12,7 +14,7 @@ import { Connector } from '@tomtom-org/maps-sdk/core';
|
|
|
12
14
|
import { ConnectorType } from '@tomtom-org/maps-sdk/core';
|
|
13
15
|
import { CurrentType } from '@tomtom-org/maps-sdk/core';
|
|
14
16
|
import { EntryPoint } from '@tomtom-org/maps-sdk/core';
|
|
15
|
-
import {
|
|
17
|
+
import { EVChargingStationWithAvailabilityPlaceProps } from '@tomtom-org/maps-sdk/core';
|
|
16
18
|
import { Fuel } from '@tomtom-org/maps-sdk/core';
|
|
17
19
|
import { GeographyType } from '@tomtom-org/maps-sdk/core';
|
|
18
20
|
import { GeoJsonObject } from 'geojson';
|
|
@@ -791,80 +793,6 @@ declare const buildGeometrySearchRequest: (params: GeometrySearchParams) => Post
|
|
|
791
793
|
*/
|
|
792
794
|
declare const buildPlaceByIdRequest: (params: PlaceByIdParams) => URL;
|
|
793
795
|
|
|
794
|
-
/**
|
|
795
|
-
* Enhance multiple places with real-time EV charging availability data.
|
|
796
|
-
*
|
|
797
|
-
* Fetches availability information for all EV charging stations in a collection
|
|
798
|
-
* and merges it into their properties. Non-EV places are returned unchanged.
|
|
799
|
-
*
|
|
800
|
-
* @remarks
|
|
801
|
-
* **Important**: Availability requests are made sequentially to avoid exceeding
|
|
802
|
-
* API rate limits (QPS - Queries Per Second). For large result sets, this may
|
|
803
|
-
* take some time.
|
|
804
|
-
*
|
|
805
|
-
* @param places - Collection of places to enhance
|
|
806
|
-
* @param options - Configuration options
|
|
807
|
-
*
|
|
808
|
-
* @returns Promise resolving to places collection with merged availability
|
|
809
|
-
*
|
|
810
|
-
* @example
|
|
811
|
-
* ```typescript
|
|
812
|
-
* // Search for charging stations and add availability
|
|
813
|
-
* const results = await search({
|
|
814
|
-
* query: 'EV charging',
|
|
815
|
-
* at: [4.9, 52.3],
|
|
816
|
-
* radius: 5000
|
|
817
|
-
* });
|
|
818
|
-
*
|
|
819
|
-
* const withAvailability = await buildPlacesWithEVAvailability(results, {
|
|
820
|
-
* includeIfAvailabilityUnknown: false // Filter out stations with unknown availability
|
|
821
|
-
* });
|
|
822
|
-
*
|
|
823
|
-
* // Display only stations with known availability
|
|
824
|
-
* withAvailability.features.forEach(place => {
|
|
825
|
-
* const available = place.properties.chargingPark?.availability?.chargingPointAvailability.count;
|
|
826
|
-
* console.log(`${place.properties.poi?.name}: ${available} chargers`);
|
|
827
|
-
* });
|
|
828
|
-
* ```
|
|
829
|
-
*
|
|
830
|
-
* @group EV Charging
|
|
831
|
-
*/
|
|
832
|
-
export declare const buildPlacesWithEVAvailability: (places: Places_2, options?: {
|
|
833
|
-
/**
|
|
834
|
-
* If true, places with unknown availability will be still included. Otherwise, they will be filtered out.
|
|
835
|
-
* @default true
|
|
836
|
-
*/
|
|
837
|
-
includeIfAvailabilityUnknown: boolean;
|
|
838
|
-
}) => Promise<Places_2<EVChargingStationPlaceProps>>;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Enhance a place with real-time EV charging availability data.
|
|
842
|
-
*
|
|
843
|
-
* Fetches availability information for an EV charging station and merges it into
|
|
844
|
-
* the place properties. Non-EV places are returned unchanged.
|
|
845
|
-
*
|
|
846
|
-
* @param place - The place to enhance with availability data
|
|
847
|
-
*
|
|
848
|
-
* @returns Promise resolving to the place with merged availability information
|
|
849
|
-
*
|
|
850
|
-
* @example
|
|
851
|
-
* ```typescript
|
|
852
|
-
* // After search, enhance place with availability
|
|
853
|
-
* const searchResult = await search({ query: 'EV charging', ... });
|
|
854
|
-
* const place = searchResult.features[0];
|
|
855
|
-
*
|
|
856
|
-
* const enhancedPlace = await buildPlaceWithEVAvailability(place);
|
|
857
|
-
* const availability = enhancedPlace.properties.chargingPark?.availability;
|
|
858
|
-
*
|
|
859
|
-
* if (availability) {
|
|
860
|
-
* console.log('Available chargers:', availability.chargingPointAvailability.count);
|
|
861
|
-
* }
|
|
862
|
-
* ```
|
|
863
|
-
*
|
|
864
|
-
* @group EV Charging
|
|
865
|
-
*/
|
|
866
|
-
export declare const buildPlaceWithEVAvailability: (place: Place) => Promise<Place<EVChargingStationPlaceProps>>;
|
|
867
|
-
|
|
868
796
|
/**
|
|
869
797
|
*
|
|
870
798
|
* @param params
|
|
@@ -4631,6 +4559,77 @@ export declare type GeometrySearchResultAPI = CommonSearchPlaceResultAPI;
|
|
|
4631
4559
|
*/
|
|
4632
4560
|
declare type GeometrySearchTemplate = ServiceTemplate<GeometrySearchParams, GeometrySearchRequestAPI, GeometrySearchResponseAPI, GeometrySearchResponse>;
|
|
4633
4561
|
|
|
4562
|
+
/**
|
|
4563
|
+
* Enhance multiple places with real-time EV charging availability data.
|
|
4564
|
+
*
|
|
4565
|
+
* Fetches availability information for all EV charging stations in a collection
|
|
4566
|
+
* and merges it into their properties. Non-EV places and EV stations without availability data are returned unchanged.
|
|
4567
|
+
*
|
|
4568
|
+
* @remarks
|
|
4569
|
+
* **Important**: Availability requests are made sequentially to avoid exceeding
|
|
4570
|
+
* API rate limits (QPS - Queries Per Second). For large result sets, this may
|
|
4571
|
+
* take some time.
|
|
4572
|
+
*
|
|
4573
|
+
* @param places - Collection of places to enhance
|
|
4574
|
+
* @param options - Configuration options
|
|
4575
|
+
*
|
|
4576
|
+
* @returns Promise resolving to places collection with merged availability
|
|
4577
|
+
*
|
|
4578
|
+
* @example
|
|
4579
|
+
* ```typescript
|
|
4580
|
+
* // Search for charging stations and add availability
|
|
4581
|
+
* const results = await search({
|
|
4582
|
+
* query: 'EV charging',
|
|
4583
|
+
* at: [4.9, 52.3],
|
|
4584
|
+
* radius: 5000
|
|
4585
|
+
* });
|
|
4586
|
+
*
|
|
4587
|
+
* const withAvailability = await getPlacesWithEVAvailability(results, {
|
|
4588
|
+
* excludeIfAvailabilityUnknown: true // Filter out stations with unknown availability
|
|
4589
|
+
* });
|
|
4590
|
+
*
|
|
4591
|
+
* // Display only stations with known availability
|
|
4592
|
+
* withAvailability.features.forEach(place => {
|
|
4593
|
+
* const available = place.properties.chargingPark?.availability?.chargingPointAvailability.count;
|
|
4594
|
+
* console.log(`${place.properties.poi?.name}: ${available} chargers`);
|
|
4595
|
+
* });
|
|
4596
|
+
* ```
|
|
4597
|
+
*
|
|
4598
|
+
* @group EV Charging
|
|
4599
|
+
*/
|
|
4600
|
+
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places_2<P>, options?: {
|
|
4601
|
+
excludeIfAvailabilityUnknown: true;
|
|
4602
|
+
}): Promise<Places_2<EVChargingStationWithAvailabilityPlaceProps>>;
|
|
4603
|
+
|
|
4604
|
+
/**
|
|
4605
|
+
* Enhance a place with real-time EV charging availability data.
|
|
4606
|
+
*
|
|
4607
|
+
* Fetches availability information for an EV charging station and merges it into
|
|
4608
|
+
* the place properties.
|
|
4609
|
+
*
|
|
4610
|
+
* @param place - The place to enhance with availability data
|
|
4611
|
+
*
|
|
4612
|
+
* @returns Promise resolving to the place with merged availability information
|
|
4613
|
+
* @returns undefined if no availability data is present for the `place` input parameter.
|
|
4614
|
+
*
|
|
4615
|
+
* @example
|
|
4616
|
+
* ```typescript
|
|
4617
|
+
* // After search, enhance place with availability
|
|
4618
|
+
* const searchResult = await search({ query: 'EV charging', ... });
|
|
4619
|
+
* const place = searchResult.features[0];
|
|
4620
|
+
*
|
|
4621
|
+
* const enhancedPlace = await getPlaceWithEVAvailability(place);
|
|
4622
|
+
* const availability = enhancedPlace.properties.chargingPark?.availability;
|
|
4623
|
+
*
|
|
4624
|
+
* if (availability) {
|
|
4625
|
+
* console.log('Available chargers:', availability.chargingPointAvailability.count);
|
|
4626
|
+
* }
|
|
4627
|
+
* ```
|
|
4628
|
+
*
|
|
4629
|
+
* @group EV Charging
|
|
4630
|
+
*/
|
|
4631
|
+
export declare const getPlaceWithEVAvailability: <P extends CommonPlaceProps = CommonPlaceProps>(place: Place<P>) => Promise<Place<EVChargingStationWithAvailabilityPlaceProps> | undefined>;
|
|
4632
|
+
|
|
4634
4633
|
/**
|
|
4635
4634
|
* @ignore
|
|
4636
4635
|
*/
|
|
@@ -4688,6 +4687,16 @@ export declare type GuidanceParams = {
|
|
|
4688
4687
|
roadShieldReferences?: 'all';
|
|
4689
4688
|
};
|
|
4690
4689
|
|
|
4690
|
+
/**
|
|
4691
|
+
* Type guard to check if a ChargingPark has availability data.
|
|
4692
|
+
*
|
|
4693
|
+
* @param chargingPark - The charging park to check
|
|
4694
|
+
* @returns True if the charging park has availability data
|
|
4695
|
+
*
|
|
4696
|
+
* @group EV Charging
|
|
4697
|
+
*/
|
|
4698
|
+
export declare const hasChargingAvailability: (chargingPark: ChargingPark | ChargingParkWithAvailability | undefined) => chargingPark is ChargingParkWithAvailability;
|
|
4699
|
+
|
|
4691
4700
|
/**
|
|
4692
4701
|
* Route section type that can be requested in routing parameters.
|
|
4693
4702
|
*
|