@tomtom-org/maps-sdk 0.36.4 → 0.36.9
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 +35 -0
- package/README.md +2 -1
- package/core/dist/core.es.js +1 -1
- package/core/package.json +4 -1
- package/map/dist/THIRD_PARTY.txt +0 -173
- package/map/dist/index.d.ts +89 -89
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +3 -1
- package/package.json +1 -1
- package/services/dist/index.d.ts +316 -104
- package/services/dist/services.es.js.map +1 -1
- package/services/package.json +2 -1
package/map/package.json
CHANGED
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"test": "vitest run",
|
|
14
14
|
"test:coverage": "vitest run --coverage",
|
|
15
|
-
"
|
|
15
|
+
"test:dist": "vitest run dist-validation.test.ts",
|
|
16
|
+
"build": "vite build && pnpm test:dist",
|
|
16
17
|
"build:watch": "pnpm build --watch",
|
|
17
18
|
"build:full": "pnpm type-check && pnpm build",
|
|
19
|
+
"build:validate": "pnpm build && pnpm test:dist",
|
|
18
20
|
"type-check": "tsc --noEmit",
|
|
19
21
|
"clean:dist": "rimraf ./dist"
|
|
20
22
|
},
|
package/package.json
CHANGED
package/services/dist/index.d.ts
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
import { $ZodError } from 'zod/v4/core';
|
|
2
2
|
import { $ZodIssue } from 'zod/v4/core';
|
|
3
|
-
import { AddressProperties } from '
|
|
4
|
-
import { Avoidable } from '
|
|
5
|
-
import { ChargingStation } from '
|
|
6
|
-
import { ChargingStationsAccessType } from '
|
|
7
|
-
import { ChargingStationsAvailability } from '
|
|
8
|
-
import { ChargingStopProps } from '
|
|
9
|
-
import { Classification } from '
|
|
10
|
-
import { CommonPlaceProps } from '
|
|
11
|
-
import { Connector } from '
|
|
12
|
-
import { ConnectorType } from '
|
|
13
|
-
import { CurrentType } from '
|
|
14
|
-
import { EntryPoint } from '
|
|
15
|
-
import { EVChargingStationPlaceProps } from '
|
|
16
|
-
import { Fuel } from '
|
|
17
|
-
import { GeographyType } from '
|
|
3
|
+
import { AddressProperties } from '@tomtom-org/maps-sdk/core';
|
|
4
|
+
import { Avoidable } from '@tomtom-org/maps-sdk/core';
|
|
5
|
+
import { ChargingStation } from '@tomtom-org/maps-sdk/core';
|
|
6
|
+
import { ChargingStationsAccessType } from '@tomtom-org/maps-sdk/core';
|
|
7
|
+
import { ChargingStationsAvailability } from '@tomtom-org/maps-sdk/core';
|
|
8
|
+
import { ChargingStopProps } from '@tomtom-org/maps-sdk/core';
|
|
9
|
+
import { Classification } from '@tomtom-org/maps-sdk/core';
|
|
10
|
+
import { CommonPlaceProps } from '@tomtom-org/maps-sdk/core';
|
|
11
|
+
import { Connector } from '@tomtom-org/maps-sdk/core';
|
|
12
|
+
import { ConnectorType } from '@tomtom-org/maps-sdk/core';
|
|
13
|
+
import { CurrentType } from '@tomtom-org/maps-sdk/core';
|
|
14
|
+
import { EntryPoint } from '@tomtom-org/maps-sdk/core';
|
|
15
|
+
import { EVChargingStationPlaceProps } from '@tomtom-org/maps-sdk/core';
|
|
16
|
+
import { Fuel } from '@tomtom-org/maps-sdk/core';
|
|
17
|
+
import { GeographyType } from '@tomtom-org/maps-sdk/core';
|
|
18
18
|
import { GeoJsonObject } from 'geojson';
|
|
19
|
-
import { GetPositionEntryPointOption } from '
|
|
20
|
-
import { GlobalConfig } from '
|
|
21
|
-
import { Guidance } from '
|
|
22
|
-
import { HasBBox } from '
|
|
23
|
-
import { HasLngLat } from '
|
|
24
|
-
import { inputSectionTypes } from '
|
|
25
|
-
import { Instruction } from '
|
|
26
|
-
import { LaneDirection } from '
|
|
27
|
-
import { LegSummary } from '
|
|
28
|
-
import { Mapcode } from '
|
|
29
|
-
import { MapcodeType } from '
|
|
19
|
+
import { GetPositionEntryPointOption } from '@tomtom-org/maps-sdk/core';
|
|
20
|
+
import { GlobalConfig } from '@tomtom-org/maps-sdk/core';
|
|
21
|
+
import { Guidance } from '@tomtom-org/maps-sdk/core';
|
|
22
|
+
import { HasBBox } from '@tomtom-org/maps-sdk/core';
|
|
23
|
+
import { HasLngLat } from '@tomtom-org/maps-sdk/core';
|
|
24
|
+
import { inputSectionTypes } from '@tomtom-org/maps-sdk/core';
|
|
25
|
+
import { Instruction } from '@tomtom-org/maps-sdk/core';
|
|
26
|
+
import { LaneDirection } from '@tomtom-org/maps-sdk/core';
|
|
27
|
+
import { LegSummary } from '@tomtom-org/maps-sdk/core';
|
|
28
|
+
import { Mapcode } from '@tomtom-org/maps-sdk/core';
|
|
29
|
+
import { MapcodeType } from '@tomtom-org/maps-sdk/core';
|
|
30
30
|
import { MultiPolygon } from 'geojson';
|
|
31
|
-
import { OpeningHours } from '
|
|
32
|
-
import { OpeningHoursMode } from '
|
|
33
|
-
import { Place } from '
|
|
34
|
-
import { Place as Place_2 } from '
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import { Places } from '
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { POICategory } from '../../../../core';
|
|
31
|
+
import { OpeningHours } from '@tomtom-org/maps-sdk/core';
|
|
32
|
+
import { OpeningHoursMode } from '@tomtom-org/maps-sdk/core';
|
|
33
|
+
import { Place } from '@tomtom-org/maps-sdk/core';
|
|
34
|
+
import { Place as Place_2 } from '@tomtom-org/maps-sdk/core';
|
|
35
|
+
import { PlaceDataSources } from '@tomtom-org/maps-sdk/core';
|
|
36
|
+
import { Places } from '@tomtom-org/maps-sdk/core';
|
|
37
|
+
import { Places as Places_2 } from '@tomtom-org/maps-sdk/core';
|
|
38
|
+
import { PlaceType } from '@tomtom-org/maps-sdk/core';
|
|
39
|
+
import { PlugType } from '@tomtom-org/maps-sdk/core';
|
|
40
|
+
import { POICategory } from '@tomtom-org/maps-sdk/core';
|
|
42
41
|
import { Polygon } from 'geojson';
|
|
43
|
-
import { PolygonFeature } from '
|
|
44
|
-
import { PolygonFeatures } from '
|
|
45
|
-
import { PolygonFeatures as PolygonFeatures_2 } from '
|
|
42
|
+
import { PolygonFeature } from '@tomtom-org/maps-sdk/core';
|
|
43
|
+
import { PolygonFeatures } from '@tomtom-org/maps-sdk/core';
|
|
44
|
+
import { PolygonFeatures as PolygonFeatures_2 } from '@tomtom-org/maps-sdk/core';
|
|
46
45
|
import { Position } from 'geojson';
|
|
47
|
-
import { PossibleLaneSeparator } from '
|
|
48
|
-
import { RevGeoAddressProps } from '
|
|
49
|
-
import { RoadShieldReference } from '
|
|
50
|
-
import { RoutePathPoint } from '
|
|
51
|
-
import { RoutePlanningLocation } from '
|
|
52
|
-
import { RouteProgress } from '
|
|
53
|
-
import { Routes } from '
|
|
54
|
-
import { RouteSummary } from '
|
|
55
|
-
import { SearchPlaceProps } from '
|
|
56
|
-
import { SearchPlaceProps as SearchPlaceProps_2 } from '
|
|
57
|
-
import { SideOfStreet } from '
|
|
58
|
-
import { TimeZone } from '
|
|
59
|
-
import { TomTomHeaders } from '
|
|
60
|
-
import { TrafficIncidentTEC } from '
|
|
61
|
-
import { TravelMode } from '
|
|
62
|
-
import { View } from '
|
|
46
|
+
import { PossibleLaneSeparator } from '@tomtom-org/maps-sdk/core';
|
|
47
|
+
import { RevGeoAddressProps } from '@tomtom-org/maps-sdk/core';
|
|
48
|
+
import { RoadShieldReference } from '@tomtom-org/maps-sdk/core';
|
|
49
|
+
import { RoutePathPoint } from '@tomtom-org/maps-sdk/core';
|
|
50
|
+
import { RoutePlanningLocation } from '@tomtom-org/maps-sdk/core';
|
|
51
|
+
import { RouteProgress } from '@tomtom-org/maps-sdk/core';
|
|
52
|
+
import { Routes } from '@tomtom-org/maps-sdk/core';
|
|
53
|
+
import { RouteSummary } from '@tomtom-org/maps-sdk/core';
|
|
54
|
+
import { SearchPlaceProps } from '@tomtom-org/maps-sdk/core';
|
|
55
|
+
import { SearchPlaceProps as SearchPlaceProps_2 } from '@tomtom-org/maps-sdk/core';
|
|
56
|
+
import { SideOfStreet } from '@tomtom-org/maps-sdk/core';
|
|
57
|
+
import { TimeZone } from '@tomtom-org/maps-sdk/core';
|
|
58
|
+
import { TomTomHeaders } from '@tomtom-org/maps-sdk/core';
|
|
59
|
+
import { TrafficIncidentTEC } from '@tomtom-org/maps-sdk/core';
|
|
60
|
+
import { TravelMode } from '@tomtom-org/maps-sdk/core';
|
|
61
|
+
import { View } from '@tomtom-org/maps-sdk/core';
|
|
63
62
|
import { ZodMiniObject } from 'zod/v4-mini';
|
|
64
63
|
|
|
65
64
|
/**
|
|
@@ -750,6 +749,48 @@ declare type BudgetType = (typeof budgetTypes)[number];
|
|
|
750
749
|
|
|
751
750
|
declare const budgetTypes: readonly ["timeMinutes", "remainingChargeCPT", "spentChargePCT", "spentFuelLiters", "distanceKM"];
|
|
752
751
|
|
|
752
|
+
/**
|
|
753
|
+
* Default function for building autocomplete request from {@link AutocompleteSearchParams}
|
|
754
|
+
* @param params The autocomplete parameters, with global configuration already merged into them.
|
|
755
|
+
*/
|
|
756
|
+
declare const buildAutocompleteSearchRequest: (params: AutocompleteSearchParams) => URL;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Default function for building calculate route request from {@link CalculateRouteParams}
|
|
760
|
+
* @param params The calculate route parameters, with global configuration already merged into them.
|
|
761
|
+
*/
|
|
762
|
+
declare const buildCalculateRouteRequest: (params: CalculateRouteParams) => FetchInput<CalculateRoutePOSTDataAPI>;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Default method for building ev charging stations availability request from {@link ChargingStationsAvailabilityParams}
|
|
766
|
+
* @param params The charging availability parameters, with global configuration already merged into them.
|
|
767
|
+
*/
|
|
768
|
+
declare const buildEVChargingStationsAvailabilityRequest: (params: ChargingStationsAvailabilityParams) => URL;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Default method for building geocoding request from {@link GeocodingParams}
|
|
772
|
+
* @param params The geocoding parameters, with global configuration already merged into them.
|
|
773
|
+
*/
|
|
774
|
+
declare const buildGeocodingRequest: (params: GeocodingParams) => URL;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Default function for building a geometry data request from {@link GeometryDataParams}
|
|
778
|
+
* @param params The geometry data parameters, with global configuration already merged into them.
|
|
779
|
+
*/
|
|
780
|
+
declare const buildGeometryDataRequest: (params: GeometryParams) => URL;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Default function for building a geometry search request from {@link GeometrySearchParams}
|
|
784
|
+
* @param params The geometry search parameters, with global configuration already merged into them.
|
|
785
|
+
*/
|
|
786
|
+
declare const buildGeometrySearchRequest: (params: GeometrySearchParams) => PostObject<GeometrySearchPayloadAPI>;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Default method for building place by id request from {@link PlaceByIdParams}
|
|
790
|
+
* @param params The place by id parameters, with global configuration already merged into them.
|
|
791
|
+
*/
|
|
792
|
+
declare const buildPlaceByIdRequest: (params: PlaceByIdParams) => URL;
|
|
793
|
+
|
|
753
794
|
/**
|
|
754
795
|
* Enhance multiple places with real-time EV charging availability data.
|
|
755
796
|
*
|
|
@@ -824,6 +865,13 @@ export declare const buildPlacesWithEVAvailability: (places: Places_2, options?:
|
|
|
824
865
|
*/
|
|
825
866
|
export declare const buildPlaceWithEVAvailability: (place: Place) => Promise<Place<EVChargingStationPlaceProps>>;
|
|
826
867
|
|
|
868
|
+
/**
|
|
869
|
+
*
|
|
870
|
+
* @param params
|
|
871
|
+
* @returns
|
|
872
|
+
*/
|
|
873
|
+
declare const buildReachableRangeRequest: (params: ReachableRangeParams) => URL;
|
|
874
|
+
|
|
827
875
|
/**
|
|
828
876
|
* @ignore
|
|
829
877
|
* Generate error for APIResponse, any other error type will be returned as it is.
|
|
@@ -833,6 +881,12 @@ export declare const buildPlaceWithEVAvailability: (place: Place) => Promise<Pla
|
|
|
833
881
|
*/
|
|
834
882
|
export declare const buildResponseError: (error: unknown, serviceName: ServiceName, parseResponseError?: ParseResponseError<unknown>) => SDKError;
|
|
835
883
|
|
|
884
|
+
/**
|
|
885
|
+
* Default function for building a reverse geocoding request from {@link ReverseGeocodingParams}
|
|
886
|
+
* @param params The reverse geocoding parameters, with global configuration already merged into them.
|
|
887
|
+
*/
|
|
888
|
+
declare const buildRevGeoRequest: (params: ReverseGeocodingParams) => URL;
|
|
889
|
+
|
|
836
890
|
/**
|
|
837
891
|
* @ignore
|
|
838
892
|
* @param error
|
|
@@ -2964,6 +3018,62 @@ export declare type CostModel = {
|
|
|
2964
3018
|
*/
|
|
2965
3019
|
declare type CurrentTypeAPI = 'Direct_Current' | 'Alternating_Current_1_Phase' | 'Alternating_Current_3_Phase';
|
|
2966
3020
|
|
|
3021
|
+
declare const customize: {
|
|
3022
|
+
buildRevGeoRequest: typeof buildRevGeoRequest;
|
|
3023
|
+
parseRevGeoResponse: typeof parseRevGeoResponse;
|
|
3024
|
+
reverseGeocodingTemplate: ReverseGeocodingTemplate;
|
|
3025
|
+
};
|
|
3026
|
+
|
|
3027
|
+
declare const customize_2: {
|
|
3028
|
+
buildGeocodingRequest: typeof buildGeocodingRequest;
|
|
3029
|
+
parseGeocodingResponse: typeof parseGeocodingResponse;
|
|
3030
|
+
geocodingTemplate: GeocodingTemplate;
|
|
3031
|
+
};
|
|
3032
|
+
|
|
3033
|
+
declare const customize_3: {
|
|
3034
|
+
buildGeometryDataRequest: typeof buildGeometryDataRequest;
|
|
3035
|
+
parseGeometryDataResponse: typeof parseGeometryDataResponse;
|
|
3036
|
+
geometryDataTemplate: GeometryDataTemplate;
|
|
3037
|
+
};
|
|
3038
|
+
|
|
3039
|
+
declare const customize_4: {
|
|
3040
|
+
geometrySearch: typeof geometrySearch;
|
|
3041
|
+
buildGeometrySearchRequest: typeof buildGeometrySearchRequest;
|
|
3042
|
+
parseGeometrySearchResponse: typeof parseGeometrySearchResponse;
|
|
3043
|
+
geometrySearchTemplate: GeometrySearchTemplate;
|
|
3044
|
+
};
|
|
3045
|
+
|
|
3046
|
+
declare const customize_5: {
|
|
3047
|
+
buildCalculateRouteRequest: typeof buildCalculateRouteRequest;
|
|
3048
|
+
parseCalculateRouteResponse: typeof parseCalculateRouteResponse;
|
|
3049
|
+
calculateRouteTemplate: CalculateRouteTemplate;
|
|
3050
|
+
};
|
|
3051
|
+
|
|
3052
|
+
declare const customize_6: {
|
|
3053
|
+
buildReachableRangeRequest: typeof buildReachableRangeRequest;
|
|
3054
|
+
parseReachableRangeResponse: typeof parseReachableRangeResponse;
|
|
3055
|
+
reachableRangeTemplate: ReachableRangeTemplate;
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
declare const customize_7: {
|
|
3059
|
+
buildEVChargingStationsAvailabilityRequest: typeof buildEVChargingStationsAvailabilityRequest;
|
|
3060
|
+
parseEVChargingStationsAvailabilityResponse: typeof parseEVChargingStationsAvailabilityResponse;
|
|
3061
|
+
evChargingStationsAvailabilityTemplate: EVChargingStationsAvailabilityTemplate;
|
|
3062
|
+
};
|
|
3063
|
+
|
|
3064
|
+
declare const customize_8: {
|
|
3065
|
+
buildPlaceByIdRequest: typeof buildPlaceByIdRequest;
|
|
3066
|
+
parsePlaceByIdResponse: typeof parsePlaceByIdResponse;
|
|
3067
|
+
placeByIdTemplate: PlaceByIdTemplate;
|
|
3068
|
+
};
|
|
3069
|
+
|
|
3070
|
+
declare const customize_9: {
|
|
3071
|
+
autocompleteSearch: typeof autocompleteSearch;
|
|
3072
|
+
buildAutocompleteSearchRequest: typeof buildAutocompleteSearchRequest;
|
|
3073
|
+
parseAutocompleteSearchResponse: typeof parseAutocompleteSearchResponse;
|
|
3074
|
+
autocompleteSearchTemplate: AutocompleteSearchTemplate;
|
|
3075
|
+
};
|
|
3076
|
+
|
|
2967
3077
|
/**
|
|
2968
3078
|
* Access to service implementation components for advanced customization.
|
|
2969
3079
|
*
|
|
@@ -3007,53 +3117,15 @@ declare type CurrentTypeAPI = 'Direct_Current' | 'Alternating_Current_1_Phase' |
|
|
|
3007
3117
|
* @group Advanced
|
|
3008
3118
|
*/
|
|
3009
3119
|
export declare const customizeService: {
|
|
3010
|
-
reverseGeocode:
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
};
|
|
3020
|
-
geometryData: {
|
|
3021
|
-
buildGeometryDataRequest: (params: GeometryParams) => URL;
|
|
3022
|
-
parseGeometryDataResponse: (apiResponse: GeometryDataResponseAPI) => PolygonFeatures;
|
|
3023
|
-
geometryDataTemplate: GeometryDataTemplate;
|
|
3024
|
-
};
|
|
3025
|
-
geometrySearch: {
|
|
3026
|
-
geometrySearch: (params: GeometrySearchParams, customTemplate?: Partial<GeometrySearchTemplate>) => Promise<GeometrySearchResponse>;
|
|
3027
|
-
buildGeometrySearchRequest: (params: GeometrySearchParams) => PostObject<GeometrySearchPayloadAPI>;
|
|
3028
|
-
parseGeometrySearchResponse: (apiResponse: GeometrySearchResponseAPI) => GeometrySearchResponse;
|
|
3029
|
-
geometrySearchTemplate: GeometrySearchTemplate;
|
|
3030
|
-
};
|
|
3031
|
-
calculateRoute: {
|
|
3032
|
-
buildCalculateRouteRequest: (params: CalculateRouteParams) => FetchInput<CalculateRoutePOSTDataAPI>;
|
|
3033
|
-
parseCalculateRouteResponse: (apiResponse: CalculateRouteResponseAPI, params: CalculateRouteParams) => Routes;
|
|
3034
|
-
calculateRouteTemplate: CalculateRouteTemplate;
|
|
3035
|
-
};
|
|
3036
|
-
reachableRange: {
|
|
3037
|
-
buildReachableRangeRequest: (params: ReachableRangeParams) => URL;
|
|
3038
|
-
parseReachableRangeResponse: (apiResponse: ReachableRangeResponseAPI, params: ReachableRangeParams) => PolygonFeature<ReachableRangeParams>;
|
|
3039
|
-
reachableRangeTemplate: ReachableRangeTemplate;
|
|
3040
|
-
};
|
|
3041
|
-
evChargingStationsAvailability: {
|
|
3042
|
-
buildEVChargingStationsAvailabilityRequest: (params: ChargingStationsAvailabilityParams) => URL;
|
|
3043
|
-
parseEVChargingStationsAvailabilityResponse: (apiResponse: ChargingStationsAvailabilityResponseAPI) => ChargingStationsAvailability | undefined;
|
|
3044
|
-
evChargingStationsAvailabilityTemplate: EVChargingStationsAvailabilityTemplate;
|
|
3045
|
-
};
|
|
3046
|
-
placeByID: {
|
|
3047
|
-
buildPlaceByIdRequest: (params: PlaceByIdParams) => URL;
|
|
3048
|
-
parsePlaceByIdResponse: (apiResponse: PlaceByIdResponseAPI) => PlaceByIdResponse;
|
|
3049
|
-
placeByIdTemplate: PlaceByIdTemplate;
|
|
3050
|
-
};
|
|
3051
|
-
autocompleteSearch: {
|
|
3052
|
-
autocompleteSearch: (params: AutocompleteSearchParams, customTemplate?: Partial<AutocompleteSearchTemplate>) => Promise<AutocompleteSearchResponse>;
|
|
3053
|
-
buildAutocompleteSearchRequest: (params: AutocompleteSearchParams) => URL;
|
|
3054
|
-
parseAutocompleteSearchResponse: (apiResponse: AutocompleteSearchResponseAPI) => AutocompleteSearchResponse;
|
|
3055
|
-
autocompleteSearchTemplate: AutocompleteSearchTemplate;
|
|
3056
|
-
};
|
|
3120
|
+
reverseGeocode: typeof customize;
|
|
3121
|
+
geocode: typeof customize_2;
|
|
3122
|
+
geometryData: typeof customize_3;
|
|
3123
|
+
geometrySearch: typeof customize_4;
|
|
3124
|
+
calculateRoute: typeof customize_5;
|
|
3125
|
+
reachableRange: typeof customize_6;
|
|
3126
|
+
evChargingStationsAvailability: typeof customize_7;
|
|
3127
|
+
placeByID: typeof customize_8;
|
|
3128
|
+
autocompleteSearch: typeof customize_9;
|
|
3057
3129
|
};
|
|
3058
3130
|
|
|
3059
3131
|
/**
|
|
@@ -3915,7 +3987,7 @@ export declare const geocode: (params: GeocodingParams, customTemplate?: Partial
|
|
|
3915
3987
|
* @param query
|
|
3916
3988
|
* @group Geocoding
|
|
3917
3989
|
*/
|
|
3918
|
-
export declare const geocodeOne: (query: string) => Promise<
|
|
3990
|
+
export declare const geocodeOne: (query: string) => Promise<Place<GeocodingProps>>;
|
|
3919
3991
|
|
|
3920
3992
|
declare type GeocodingIndexTypesAbbreviation = Exclude<SearchIndexType, 'POI'>;
|
|
3921
3993
|
|
|
@@ -4286,6 +4358,86 @@ export declare type GeometryPlaceParams = CommonServiceParamsWithZoom & {
|
|
|
4286
4358
|
geometries: Place_2[] | Places;
|
|
4287
4359
|
};
|
|
4288
4360
|
|
|
4361
|
+
/**
|
|
4362
|
+
* Search for places within specific geographic boundaries.
|
|
4363
|
+
*
|
|
4364
|
+
* The Geometry Search service finds places that fall within one or more defined areas,
|
|
4365
|
+
* such as polygons, circles, or corridors. This is essential for location-based filtering
|
|
4366
|
+
* and spatial queries where you need results constrained to specific regions.
|
|
4367
|
+
*
|
|
4368
|
+
* @remarks
|
|
4369
|
+
* Key features:
|
|
4370
|
+
* - **Area-based search**: Find places within polygons, circles, or along routes
|
|
4371
|
+
* - **Multiple geometries**: Search across several areas simultaneously
|
|
4372
|
+
* - **Precise boundaries**: Only returns results within the specified areas
|
|
4373
|
+
* - **Combined with text**: Filter by query text within the geometric boundaries
|
|
4374
|
+
* - **Category filtering**: Narrow results by POI categories
|
|
4375
|
+
*
|
|
4376
|
+
* Common use cases:
|
|
4377
|
+
* - **Route-based search**: "Find gas stations along my route"
|
|
4378
|
+
* - **Area filtering**: "Restaurants within this neighborhood polygon"
|
|
4379
|
+
* - **Corridor search**: "Hotels within 5km of the highway"
|
|
4380
|
+
* - **Service areas**: "Stores within our delivery zone"
|
|
4381
|
+
* - **Geofencing**: Places within administrative or custom boundaries
|
|
4382
|
+
*
|
|
4383
|
+
* @param params Geometry search parameters including geometries and optional query
|
|
4384
|
+
* @param customTemplate Advanced customization for request/response handling
|
|
4385
|
+
*
|
|
4386
|
+
* @returns Promise resolving to places within the specified geometries
|
|
4387
|
+
*
|
|
4388
|
+
* @example
|
|
4389
|
+
* ```typescript
|
|
4390
|
+
* // Search within a polygon (neighborhood boundaries)
|
|
4391
|
+
* const inArea = await geometrySearch({
|
|
4392
|
+
* key: 'your-api-key',
|
|
4393
|
+
* query: 'coffee shop',
|
|
4394
|
+
* geometries: [{
|
|
4395
|
+
* type: 'Polygon',
|
|
4396
|
+
* coordinates: [[
|
|
4397
|
+
* [4.88, 52.36],
|
|
4398
|
+
* [4.90, 52.36],
|
|
4399
|
+
* [4.90, 52.38],
|
|
4400
|
+
* [4.88, 52.38],
|
|
4401
|
+
* [4.88, 52.36]
|
|
4402
|
+
* ]]
|
|
4403
|
+
* }]
|
|
4404
|
+
* });
|
|
4405
|
+
*
|
|
4406
|
+
* // Find POIs along a route corridor
|
|
4407
|
+
* const alongRoute = await geometrySearch({
|
|
4408
|
+
* key: 'your-api-key',
|
|
4409
|
+
* query: 'gas station',
|
|
4410
|
+
* geometries: [routeLineString], // From calculateRoute result
|
|
4411
|
+
* geometryList: [{
|
|
4412
|
+
* position: 0,
|
|
4413
|
+
* radius: 5000 // 5km corridor along route
|
|
4414
|
+
* }]
|
|
4415
|
+
* });
|
|
4416
|
+
*
|
|
4417
|
+
* // Search multiple areas at once
|
|
4418
|
+
* const multiArea = await geometrySearch({
|
|
4419
|
+
* key: 'your-api-key',
|
|
4420
|
+
* query: 'pharmacy',
|
|
4421
|
+
* geometries: [polygonA, polygonB, polygonC],
|
|
4422
|
+
* limit: 20
|
|
4423
|
+
* });
|
|
4424
|
+
*
|
|
4425
|
+
* // Category search within geometry
|
|
4426
|
+
* const restaurants = await geometrySearch({
|
|
4427
|
+
* key: 'your-api-key',
|
|
4428
|
+
* categorySet: [7315], // Restaurant category
|
|
4429
|
+
* geometries: [cityBoundary]
|
|
4430
|
+
* });
|
|
4431
|
+
* ```
|
|
4432
|
+
*
|
|
4433
|
+
* @see [Geometry Search API Documentation](https://docs.tomtom.com/search-api/documentation/search-service/geometry-search)
|
|
4434
|
+
* @see [Places Quickstart Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/quickstart)
|
|
4435
|
+
* @see [Search Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/search)
|
|
4436
|
+
*
|
|
4437
|
+
* @ignore (exposed via 'search')
|
|
4438
|
+
*/
|
|
4439
|
+
declare const geometrySearch: (params: GeometrySearchParams, customTemplate?: Partial<GeometrySearchTemplate>) => Promise<GeometrySearchResponse>;
|
|
4440
|
+
|
|
4289
4441
|
/**
|
|
4290
4442
|
* Properties attached to the geometry search feature collection.
|
|
4291
4443
|
*
|
|
@@ -4789,6 +4941,19 @@ declare type OpeningHoursAPI = Omit<OpeningHours, 'alwaysOpenThisPeriod' | 'time
|
|
|
4789
4941
|
timeRanges: TimeRangeAPI[];
|
|
4790
4942
|
};
|
|
4791
4943
|
|
|
4944
|
+
/**
|
|
4945
|
+
* Default function to parse autocomplete response.
|
|
4946
|
+
* @param apiResponse The API response.
|
|
4947
|
+
*/
|
|
4948
|
+
declare const parseAutocompleteSearchResponse: (apiResponse: AutocompleteSearchResponseAPI) => AutocompleteSearchResponse;
|
|
4949
|
+
|
|
4950
|
+
/**
|
|
4951
|
+
* Default method for parsing calculate route response from {@link CalculateRouteResponseAPI}
|
|
4952
|
+
* @param apiResponse The Routing API response.
|
|
4953
|
+
* @param params The params used to calculate this route.
|
|
4954
|
+
*/
|
|
4955
|
+
declare const parseCalculateRouteResponse: (apiResponse: CalculateRouteResponseAPI, params: CalculateRouteParams) => Routes;
|
|
4956
|
+
|
|
4792
4957
|
/**
|
|
4793
4958
|
* @ignore
|
|
4794
4959
|
* @param error
|
|
@@ -4801,6 +4966,46 @@ export declare type ParsedFetchResponse<T> = Promise<{
|
|
|
4801
4966
|
status: number;
|
|
4802
4967
|
}>;
|
|
4803
4968
|
|
|
4969
|
+
/**
|
|
4970
|
+
* Default method for parsing ev charging stations availability from {@link ChargingStationsAvailability}
|
|
4971
|
+
* @param apiResponse
|
|
4972
|
+
*/
|
|
4973
|
+
declare const parseEVChargingStationsAvailabilityResponse: (apiResponse: ChargingStationsAvailabilityResponseAPI) => ChargingStationsAvailability | undefined;
|
|
4974
|
+
|
|
4975
|
+
/**
|
|
4976
|
+
* Default method for parsing geocoding request from {@link GeocodingResponse}
|
|
4977
|
+
* @param apiResponse
|
|
4978
|
+
*/
|
|
4979
|
+
declare const parseGeocodingResponse: (apiResponse: GeocodingResponseAPI) => GeocodingResponse;
|
|
4980
|
+
|
|
4981
|
+
/**
|
|
4982
|
+
* Default geometry data API response parsing.
|
|
4983
|
+
* * The API response consists of an array, with a FeatureCollection (with only one feature) for each geometry.
|
|
4984
|
+
* * The parsed response consists of a fully-GeoJSON-compatible FeatureCollection with a Feature for each geometry.
|
|
4985
|
+
* * Each geometry ID is included in each GeoJSON feature "id" field.
|
|
4986
|
+
* @param apiResponse
|
|
4987
|
+
*/
|
|
4988
|
+
declare const parseGeometryDataResponse: (apiResponse: GeometryDataResponseAPI) => PolygonFeatures;
|
|
4989
|
+
|
|
4990
|
+
/**
|
|
4991
|
+
* Default function to parse a geometry search response.
|
|
4992
|
+
* @param apiResponse The API response.
|
|
4993
|
+
*/
|
|
4994
|
+
declare const parseGeometrySearchResponse: (apiResponse: GeometrySearchResponseAPI) => GeometrySearchResponse;
|
|
4995
|
+
|
|
4996
|
+
/**
|
|
4997
|
+
* Default method for parsing place by id response.
|
|
4998
|
+
* @param apiResponse The place by id response.
|
|
4999
|
+
*/
|
|
5000
|
+
declare const parsePlaceByIdResponse: (apiResponse: PlaceByIdResponseAPI) => PlaceByIdResponse;
|
|
5001
|
+
|
|
5002
|
+
/**
|
|
5003
|
+
*
|
|
5004
|
+
* @param apiResponse
|
|
5005
|
+
* @param params
|
|
5006
|
+
*/
|
|
5007
|
+
declare const parseReachableRangeResponse: (apiResponse: ReachableRangeResponseAPI, params: ReachableRangeParams) => PolygonFeature<ReachableRangeParams>;
|
|
5008
|
+
|
|
4804
5009
|
/**
|
|
4805
5010
|
* Function type for parsing API error responses into SDK service errors.
|
|
4806
5011
|
*
|
|
@@ -4814,6 +5019,13 @@ export declare type ParsedFetchResponse<T> = Promise<{
|
|
|
4814
5019
|
*/
|
|
4815
5020
|
export declare type ParseResponseError<T = DefaultAPIResponseErrorBody> = (apiError: APIErrorResponse<T>, serviceName: string) => SDKServiceError;
|
|
4816
5021
|
|
|
5022
|
+
/**
|
|
5023
|
+
* Default method for parsing reverse geocoding request from {@link ReverseGeocodingResponse}
|
|
5024
|
+
* @param params
|
|
5025
|
+
* @param apiResponse
|
|
5026
|
+
*/
|
|
5027
|
+
declare const parseRevGeoResponse: (apiResponse: ReverseGeocodingResponseAPI, params: ReverseGeocodingParams) => ReverseGeocodingResponse;
|
|
5028
|
+
|
|
4817
5029
|
/**
|
|
4818
5030
|
* Retrieve detailed information about a place using its unique identifier.
|
|
4819
5031
|
*
|