@tomtom-org/maps-sdk 0.46.2 → 0.46.4

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/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.46.2",
5
+ "version": "0.46.4",
6
6
  "description": "TomTom Maps for JavaScript",
7
7
  "keywords": [
8
8
  "tomtom",
@@ -18,7 +18,7 @@
18
18
  "nodejs"
19
19
  ],
20
20
  "devDependencies": {
21
- "@biomejs/biome": "^2.4.6",
21
+ "@biomejs/biome": "^2.4.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",
@@ -28,7 +28,7 @@
28
28
  "peerDependencies": {
29
29
  "@turf/turf": "^7.3.4",
30
30
  "lodash-es": "^4.17.23",
31
- "maplibre-gl": "^5.20.0",
31
+ "maplibre-gl": "^5.20.1",
32
32
  "zod": "^4.3.6"
33
33
  },
34
34
  "size-limit": [
@@ -48,6 +48,7 @@ import { Position } from 'geojson';
48
48
  import { PossibleLaneSeparator } from '@tomtom-org/maps-sdk/core';
49
49
  import { RevGeoAddressProps } from '@tomtom-org/maps-sdk/core';
50
50
  import { RoadShieldReference } from '@tomtom-org/maps-sdk/core';
51
+ import { Route } from '@tomtom-org/maps-sdk/core';
51
52
  import { RoutePathPoint } from '@tomtom-org/maps-sdk/core';
52
53
  import { RoutePlanningLocation } from '@tomtom-org/maps-sdk/core';
53
54
  import { RouteProgressPoint } from '@tomtom-org/maps-sdk/core';
@@ -100,6 +101,200 @@ declare type AddressRangesAPI = {
100
101
  to: LatLonAPI;
101
102
  };
102
103
 
104
+ /**
105
+ * Search for places along a route, ranked by detour cost.
106
+ *
107
+ * Returns POIs reachable within a given detour budget from the provided route geometry.
108
+ * Results are sorted by detour time (or offset along the route) so the most
109
+ * accessible stops appear first.
110
+ *
111
+ * @remarks
112
+ * This service is ideal for trip planning use cases:
113
+ * - Find fuel or EV charging stations along the way
114
+ * - Locate food stops or rest areas near the route
115
+ * - Surface services reachable within a time budget
116
+ *
117
+ * The `route` is typically sourced from a {@link calculateRoute} result.
118
+ *
119
+ * @param params Along-route search parameters including the route geometry and detour budget
120
+ * @param customTemplate Advanced customization for request/response handling
121
+ *
122
+ * @returns Promise resolving to a collection of matching places sorted by detour cost
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * // Find coffee shops within a 5-minute detour
127
+ * const results = await alongRouteSearch({
128
+ * route: routeResult.features[0].geometry,
129
+ * maxDetourTimeSeconds: 300,
130
+ * query: 'coffee',
131
+ * });
132
+ *
133
+ * // EV chargers with a 10-minute budget, sorted by position on route
134
+ * const chargers = await alongRouteSearch({
135
+ * route: routeResult.features[0].geometry,
136
+ * maxDetourTimeSeconds: 600,
137
+ * poiCategories: ['ELECTRIC_VEHICLE_STATION'],
138
+ * sortBy: 'detourOffset',
139
+ * });
140
+ * ```
141
+ *
142
+ * @see [Along Route Search API Documentation](https://docs.tomtom.com/search-api/documentation/tomtom-orbis-maps/search-service/along-route-search)
143
+ *
144
+ * @ignore (exposed via 'search')
145
+ */
146
+ declare const alongRouteSearch: (params: AlongRouteSearchParams, customTemplate?: Partial<AlongRouteSearchTemplate>) => Promise<AlongRouteSearchResponse>;
147
+
148
+ /**
149
+ * Parameters for searching places along a route.
150
+ *
151
+ * Along-route search finds POIs near a provided route geometry and ranks them
152
+ * by the detour cost (time or distance offset) required to visit them.
153
+ *
154
+ * @remarks
155
+ * **Key Features:**
156
+ * - Search for POIs within a detour budget from the route
157
+ * - Sort results by detour time or route offset
158
+ * - Combine with POI category and brand filters
159
+ * - Use directly with a {@link calculateRoute} result
160
+ *
161
+ * **Use Cases:**
162
+ * - Find fuel stations or EV chargers along a trip
163
+ * - Locate rest stops or restaurants near a route
164
+ * - Surface services reachable within a time budget
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * // Find coffee shops within a 5-minute detour from a route
169
+ * const results = await search({
170
+ * route: routeResult.features[0],
171
+ * maxDetourTimeSeconds: 300,
172
+ * query: 'coffee',
173
+ * });
174
+ *
175
+ * // Find EV charging stations using a plain coordinate array
176
+ * const chargers = await search({
177
+ * route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]],
178
+ * maxDetourTimeSeconds: 600,
179
+ * poiCategories: ['ELECTRIC_VEHICLE_STATION'],
180
+ * sortBy: 'detourOffset',
181
+ * });
182
+ * ```
183
+ *
184
+ * @group Along Route Search
185
+ */
186
+ export declare type AlongRouteSearchParams = CommonSearchParams<AlongRouteSearchRequestAPI, AlongRouteSearchResponseAPI> & {
187
+ /**
188
+ * Route geometry to search along.
189
+ *
190
+ * Accepts any of three forms:
191
+ * - **`Route`** feature as returned by {@link calculateRoute} (most common)
192
+ * - **`LineString`** GeoJSON geometry object
193
+ * - **`Position[]`** — a plain array of `[longitude, latitude]` coordinate pairs
194
+ *
195
+ * Coordinates must always be in `[longitude, latitude]` order.
196
+ *
197
+ * @example
198
+ * ```typescript
199
+ * // Route Feature from calculateRoute (most common)
200
+ * route: routeResult.features[0]
201
+ *
202
+ * // GeoJSON LineString geometry
203
+ * route: routeResult.features[0].geometry
204
+ *
205
+ * // Plain coordinate array
206
+ * route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]]
207
+ * ```
208
+ */
209
+ route: LineString | Route | Position[];
210
+ /**
211
+ * Maximum allowed detour time in seconds.
212
+ *
213
+ * Only POIs reachable within this additional travel time from the route
214
+ * will be returned. Controls the width of the search corridor.
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * maxDetourTimeSeconds: 300 // 5-minute detour budget
219
+ * ```
220
+ */
221
+ maxDetourTimeSeconds: number;
222
+ /**
223
+ * Sort order for the results.
224
+ *
225
+ * @default 'detourTime'
226
+ *
227
+ * @example
228
+ * ```typescript
229
+ * sortBy: 'detourOffset' // order by position along the route
230
+ * ```
231
+ */
232
+ sortBy?: AlongRouteSortBy;
233
+ };
234
+
235
+ /**
236
+ * @ignore
237
+ */
238
+ export declare type AlongRouteSearchPayloadAPI = {
239
+ route: {
240
+ points: RoutePointAPI[];
241
+ };
242
+ };
243
+
244
+ /**
245
+ * Along-route search request type.
246
+ * @ignore
247
+ */
248
+ export declare type AlongRouteSearchRequestAPI = PostObject<AlongRouteSearchPayloadAPI>;
249
+
250
+ /**
251
+ * Response from an along-route search query.
252
+ *
253
+ * Contains places found near the route, sorted by detour time or offset,
254
+ * along with summary information about the search results.
255
+ *
256
+ * @group Along Route Search
257
+ */
258
+ export declare type AlongRouteSearchResponse = Places<SearchPlaceProps, SearchSummary>;
259
+
260
+ /**
261
+ * @ignore
262
+ */
263
+ export declare type AlongRouteSearchResponseAPI = {
264
+ /**
265
+ * Summary information about the search that was performed.
266
+ */
267
+ summary: SummaryAPI;
268
+ /**
269
+ * The result list, sorted by detour time or offset.
270
+ */
271
+ results: AlongRouteSearchResultAPI[];
272
+ };
273
+
274
+ /**
275
+ * @ignore
276
+ */
277
+ export declare type AlongRouteSearchResultAPI = CommonSearchPlaceResultAPI;
278
+
279
+ /**
280
+ * Along-route search service template type.
281
+ * @ignore
282
+ */
283
+ declare type AlongRouteSearchTemplate = ServiceTemplate<AlongRouteSearchParams, AlongRouteSearchRequestAPI, AlongRouteSearchResponseAPI, AlongRouteSearchResponse>;
284
+
285
+ /**
286
+ * Result sorting order for along-route search.
287
+ *
288
+ * Controls how the returned POIs are ordered relative to the route.
289
+ *
290
+ * @remarks
291
+ * - `detourTime`: Sort by additional travel time required to visit the POI (default)
292
+ * - `detourOffset`: Sort by how far along the route the detour point falls
293
+ *
294
+ * @group Along Route Search
295
+ */
296
+ export declare type AlongRouteSortBy = 'detourTime' | 'detourOffset';
297
+
103
298
  /**
104
299
  * @ignore
105
300
  */
@@ -883,6 +1078,12 @@ export declare type BudgetType = (typeof budgetTypes)[number];
883
1078
 
884
1079
  export declare const budgetTypes: readonly ["timeMinutes", "remainingChargeCPT", "spentChargePCT", "spentFuelLiters", "distanceKM"];
885
1080
 
1081
+ /**
1082
+ * Default function for building an along-route search request from {@link AlongRouteSearchParams}.
1083
+ * @param params The along-route search parameters, with global configuration already merged into them.
1084
+ */
1085
+ declare const buildAlongRouteSearchRequest: (params: AlongRouteSearchParams) => AlongRouteSearchRequestAPI;
1086
+
886
1087
  /**
887
1088
  * Default function for building autocomplete request from {@link AutocompleteSearchParams}
888
1089
  * @param params The autocomplete parameters, with global configuration already merged into them.
@@ -2143,12 +2344,6 @@ export declare type CommonGeocodeAndFuzzySearchParams = {
2143
2344
  *
2144
2345
  * @example
2145
2346
  * ```typescript
2146
- * // Search with position bias
2147
- * const searchParams: CommonPlacesParams<URL, Response> = {
2148
- * position: [4.9041, 52.3676], // Near Amsterdam
2149
- * limit: 20
2150
- * };
2151
- *
2152
2347
  * // Search with geography type filter
2153
2348
  * const citySearch: CommonPlacesParams<URL, Response> = {
2154
2349
  * geographyTypes: ['Municipality'], // Only cities
@@ -2174,34 +2369,6 @@ export declare type CommonGeocodeAndFuzzySearchParams = {
2174
2369
  * @group Search
2175
2370
  */
2176
2371
  export declare type CommonPlacesParams<ApiRequest, ApiResponse> = CommonServiceParams<ApiRequest, ApiResponse> & {
2177
- /**
2178
- * Geographic position to bias search results.
2179
- *
2180
- * When provided, results closer to this position are ranked higher.
2181
- * Does not filter results, only influences ranking.
2182
- *
2183
- * @remarks
2184
- * **Coordinates:**
2185
- * - Longitude: -180 to +180 (East-West)
2186
- * - Latitude: -90 to +90 (North-South)
2187
- * - Format: [longitude, latitude]
2188
- *
2189
- * **Without Radius:**
2190
- * Supplying position without a radius parameter biases results toward this area
2191
- * but doesn't create a hard boundary.
2192
- *
2193
- * **Use Cases:**
2194
- * - "Find pizza near me" - bias toward user's location
2195
- * - "Main Street" - prioritize Main Streets in the target area
2196
- * - Local search within a city or region
2197
- *
2198
- * @example
2199
- * ```typescript
2200
- * position: [4.9041, 52.3676] // Amsterdam coordinates
2201
- * position: [-74.0060, 40.7128] // New York coordinates
2202
- * ```
2203
- */
2204
- position?: HasLngLat;
2205
2372
  /**
2206
2373
  * Maximum number of results to return.
2207
2374
  *
@@ -3239,18 +3406,25 @@ export declare type CostModel = {
3239
3406
  declare type CurrentTypeAPI = 'Direct_Current' | 'Alternating_Current_1_Phase' | 'Alternating_Current_3_Phase';
3240
3407
 
3241
3408
  declare const customize: {
3242
- buildRevGeoRequest: typeof buildRevGeoRequest;
3243
- parseRevGeoResponse: typeof parseRevGeoResponse;
3244
- reverseGeocodingTemplate: ReverseGeocodingTemplate;
3409
+ alongRouteSearch: typeof alongRouteSearch;
3410
+ buildAlongRouteSearchRequest: typeof buildAlongRouteSearchRequest;
3411
+ parseAlongRouteSearchResponse: typeof parseAlongRouteSearchResponse;
3412
+ alongRouteSearchTemplate: AlongRouteSearchTemplate;
3245
3413
  };
3246
3414
 
3247
3415
  declare const customize_10: {
3416
+ buildTrafficIncidentDetailsRequest: typeof buildTrafficIncidentDetailsRequest;
3417
+ parseTrafficIncidentDetailsResponse: typeof parseTrafficIncidentDetailsResponse;
3418
+ trafficIncidentDetailsTemplate: TrafficIncidentDetailsTemplate;
3419
+ };
3420
+
3421
+ declare const customize_11: {
3248
3422
  buildPlaceByIdRequest: typeof buildPlaceByIdRequest;
3249
3423
  parsePlaceByIdResponse: typeof parsePlaceByIdResponse;
3250
3424
  placeByIdTemplate: PlaceByIdTemplate;
3251
3425
  };
3252
3426
 
3253
- declare const customize_11: {
3427
+ declare const customize_12: {
3254
3428
  autocompleteSearch: typeof autocompleteSearch;
3255
3429
  buildAutocompleteSearchRequest: typeof buildAutocompleteSearchRequest;
3256
3430
  parseAutocompleteSearchResponse: typeof parseAutocompleteSearchResponse;
@@ -3258,54 +3432,54 @@ declare const customize_11: {
3258
3432
  };
3259
3433
 
3260
3434
  declare const customize_2: {
3435
+ buildRevGeoRequest: typeof buildRevGeoRequest;
3436
+ parseRevGeoResponse: typeof parseRevGeoResponse;
3437
+ reverseGeocodingTemplate: ReverseGeocodingTemplate;
3438
+ };
3439
+
3440
+ declare const customize_3: {
3261
3441
  buildGeocodingRequest: typeof buildGeocodingRequest;
3262
3442
  parseGeocodingResponse: typeof parseGeocodingResponse;
3263
3443
  geocodingTemplate: GeocodingTemplate;
3264
3444
  };
3265
3445
 
3266
- declare const customize_3: {
3446
+ declare const customize_4: {
3267
3447
  buildGeometryDataRequest: typeof buildGeometryDataRequest;
3268
3448
  parseGeometryDataResponse: typeof parseGeometryDataResponse;
3269
3449
  geometryDataTemplate: GeometryDataTemplate;
3270
3450
  };
3271
3451
 
3272
- declare const customize_4: {
3452
+ declare const customize_5: {
3273
3453
  geometrySearch: typeof geometrySearch;
3274
3454
  buildGeometrySearchRequest: typeof buildGeometrySearchRequest;
3275
3455
  parseGeometrySearchResponse: typeof parseGeometrySearchResponse;
3276
3456
  geometrySearchTemplate: GeometrySearchTemplate;
3277
3457
  };
3278
3458
 
3279
- declare const customize_5: {
3459
+ declare const customize_6: {
3280
3460
  buildCalculateRouteRequest: typeof buildCalculateRouteRequest;
3281
3461
  parseCalculateRouteResponse: typeof parseCalculateRouteResponse;
3282
3462
  calculateRouteTemplate: CalculateRouteTemplate;
3283
3463
  };
3284
3464
 
3285
- declare const customize_6: {
3465
+ declare const customize_7: {
3286
3466
  buildReachableRangeRequest: typeof buildReachableRangeRequest;
3287
3467
  parseReachableRangeResponse: typeof parseReachableRangeResponse;
3288
3468
  reachableRangeTemplate: ReachableRangeTemplate;
3289
3469
  };
3290
3470
 
3291
- declare const customize_7: {
3471
+ declare const customize_8: {
3292
3472
  buildEVChargingStationsAvailabilityRequest: typeof buildEVChargingStationsAvailabilityRequest;
3293
3473
  parseEVChargingStationsAvailabilityResponse: typeof parseEVChargingStationsAvailabilityResponse;
3294
3474
  evChargingStationsAvailabilityTemplate: EVChargingStationsAvailabilityTemplate;
3295
3475
  };
3296
3476
 
3297
- declare const customize_8: {
3477
+ declare const customize_9: {
3298
3478
  buildTrafficAreaAnalyticsRequest: typeof buildTrafficAreaAnalyticsRequest;
3299
3479
  parseTrafficAreaAnalyticsResponse: typeof parseTrafficAreaAnalyticsResponse;
3300
3480
  trafficAreaAnalyticsTemplate: TrafficAreaAnalyticsTemplate;
3301
3481
  };
3302
3482
 
3303
- declare const customize_9: {
3304
- buildTrafficIncidentDetailsRequest: typeof buildTrafficIncidentDetailsRequest;
3305
- parseTrafficIncidentDetailsResponse: typeof parseTrafficIncidentDetailsResponse;
3306
- trafficIncidentDetailsTemplate: TrafficIncidentDetailsTemplate;
3307
- };
3308
-
3309
3483
  /**
3310
3484
  * Access to service implementation components for advanced customization.
3311
3485
  *
@@ -3349,17 +3523,18 @@ declare const customize_9: {
3349
3523
  * @group Advanced
3350
3524
  */
3351
3525
  export declare const customizeService: {
3352
- reverseGeocode: typeof customize;
3353
- geocode: typeof customize_2;
3354
- geometryData: typeof customize_3;
3355
- geometrySearch: typeof customize_4;
3356
- calculateRoute: typeof customize_5;
3357
- reachableRange: typeof customize_6;
3358
- evChargingStationsAvailability: typeof customize_7;
3359
- trafficAreaAnalytics: typeof customize_8;
3360
- trafficIncidentDetails: typeof customize_9;
3361
- placeByID: typeof customize_10;
3362
- autocompleteSearch: typeof customize_11;
3526
+ alongRouteSearch: typeof customize;
3527
+ reverseGeocode: typeof customize_2;
3528
+ geocode: typeof customize_3;
3529
+ geometryData: typeof customize_4;
3530
+ geometrySearch: typeof customize_5;
3531
+ calculateRoute: typeof customize_6;
3532
+ reachableRange: typeof customize_7;
3533
+ evChargingStationsAvailability: typeof customize_8;
3534
+ trafficAreaAnalytics: typeof customize_9;
3535
+ trafficIncidentDetails: typeof customize_10;
3536
+ placeByID: typeof customize_11;
3537
+ autocompleteSearch: typeof customize_12;
3363
3538
  };
3364
3539
 
3365
3540
  /**
@@ -4059,6 +4234,30 @@ export declare type FuzzySearchParams = CommonSearchParams<URL, FuzzySearchRespo
4059
4234
  * minFuzzyLevel: 2 // Require at least moderate similarity
4060
4235
  * ```
4061
4236
  */
4237
+ /**
4238
+ * Geographic position to bias search results toward.
4239
+ *
4240
+ * When provided, results closer to this position are ranked higher.
4241
+ * Does not filter results, only creates a soft bias.
4242
+ *
4243
+ * Accepts any {@link HasLngLat}-compatible value:
4244
+ * - `[longitude, latitude]` coordinate pair
4245
+ * - GeoJSON `Point` geometry
4246
+ * - GeoJSON `Feature<Point>` — pass a {@link Place} directly
4247
+ *
4248
+ * @example
4249
+ * ```typescript
4250
+ * // Coordinate pair
4251
+ * position: [4.9041, 52.3676]
4252
+ *
4253
+ * // Place result from a previous search
4254
+ * position: searchResults.features[0]
4255
+ *
4256
+ * // GeoJSON Point
4257
+ * position: { type: 'Point', coordinates: [4.9041, 52.3676] }
4258
+ * ```
4259
+ */
4260
+ position?: HasLngLat;
4062
4261
  minFuzzyLevel?: number;
4063
4262
  /**
4064
4263
  * Maximum fuzziness level to be used.
@@ -4355,6 +4554,31 @@ export declare type GeocodingParams = Omit<CommonPlacesParams<URL, GeocodingResp
4355
4554
  * ```
4356
4555
  */
4357
4556
  query: string;
4557
+ /**
4558
+ * Geographic position to bias geocoding results toward.
4559
+ *
4560
+ * When provided, results closer to this position are ranked higher.
4561
+ * Useful for resolving ambiguous queries (e.g. "Main Street") to
4562
+ * the right city or region.
4563
+ *
4564
+ * Accepts any {@link HasLngLat}-compatible value:
4565
+ * - `[longitude, latitude]` coordinate pair
4566
+ * - GeoJSON `Point` geometry
4567
+ * - GeoJSON `Feature<Point>` — pass a {@link Place} directly
4568
+ *
4569
+ * @example
4570
+ * ```typescript
4571
+ * // Coordinate pair
4572
+ * position: [4.9041, 52.3676]
4573
+ *
4574
+ * // Place result from a previous search (e.g. user's selected location)
4575
+ * position: selectedPlace
4576
+ *
4577
+ * // GeoJSON Point
4578
+ * position: { type: 'Point', coordinates: [4.9041, 52.3676] }
4579
+ * ```
4580
+ */
4581
+ position?: HasLngLat;
4358
4582
  /**
4359
4583
  * Indexes for which extended postal codes should be included in the results.
4360
4584
  *
@@ -5471,6 +5695,12 @@ declare type OpeningHoursAPI = Omit<OpeningHours, 'alwaysOpenThisPeriod' | 'time
5471
5695
  timeRanges: TimeRangeAPI[];
5472
5696
  };
5473
5697
 
5698
+ /**
5699
+ * Default function to parse an along-route search response.
5700
+ * @param apiResponse The API response.
5701
+ */
5702
+ declare const parseAlongRouteSearchResponse: (apiResponse: AlongRouteSearchResponseAPI) => AlongRouteSearchResponse;
5703
+
5474
5704
  /**
5475
5705
  * Default function to parse autocomplete response.
5476
5706
  * @param apiResponse The API response.
@@ -6703,6 +6933,14 @@ declare type RoutePathPointAPI = Omit<RoutePathPoint, 'point'> & {
6703
6933
  point: LatitudeLongitudePointAPI;
6704
6934
  };
6705
6935
 
6936
+ /**
6937
+ * @ignore
6938
+ */
6939
+ export declare type RoutePointAPI = {
6940
+ lat: number;
6941
+ lon: number;
6942
+ };
6943
+
6706
6944
  /**
6707
6945
  * Route optimization strategy for route calculation.
6708
6946
  *
@@ -6894,7 +7132,7 @@ export declare class SDKServiceError extends SDKError {
6894
7132
  *
6895
7133
  * @group Search
6896
7134
  */
6897
- export declare const search: (params: GeometrySearchParams | FuzzySearchParams, customTemplate?: Partial<GeometrySearchTemplate | FuzzySearchTemplate>) => Promise<SearchResponse>;
7135
+ export declare const search: (params: GeometrySearchParams | FuzzySearchParams | AlongRouteSearchParams, customTemplate?: Partial<GeometrySearchTemplate | FuzzySearchTemplate | AlongRouteSearchTemplate>) => Promise<SearchResponse>;
6898
7136
 
6899
7137
  declare type SearchFeatureCollectionProps = SearchSummary & {
6900
7138
  queryIntent?: QueryIntent[];
@@ -6971,16 +7209,16 @@ export declare type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' |
6971
7209
  * Search for a single place by text query.
6972
7210
  *
6973
7211
  * Convenience function that calls {@link search} and returns the first result.
7212
+ * Throws an error if no results are found.
6974
7213
  *
6975
7214
  * @param query - Search query string
6976
- * @returns Promise resolving to the first matching place, or undefined if no results
7215
+ * @returns Promise resolving to the first matching place
7216
+ * @throws {Error} If no results are found for the query
6977
7217
  *
6978
7218
  * @example
6979
7219
  * ```typescript
6980
7220
  * const place = await searchOne('Vondelpark Amsterdam');
6981
- * if (place) {
6982
- * console.log(place.properties.name);
6983
- * }
7221
+ * console.log(place.properties.poi?.name);
6984
7222
  * ```
6985
7223
  *
6986
7224
  * @remarks
@@ -6989,7 +7227,7 @@ export declare type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' |
6989
7227
  *
6990
7228
  * @group Search
6991
7229
  */
6992
- export declare const searchOne: (query: string) => Promise<Place<SearchPlaceProps_2> | undefined>;
7230
+ export declare const searchOne: (query: string) => Promise<Place<SearchPlaceProps_2>>;
6993
7231
 
6994
7232
  /**
6995
7233
  * Search service response containing places that match the query.