google-maps-fetch 0.0.0-stage → 0.1.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.
@@ -0,0 +1,786 @@
1
+ import { F as FetchLike, G as GeocodeResult, E as ElevationResult, T as TimeZone, a as GeolocateResponse$1, S as SnappedPoint } from './types-FNou8i90.cjs';
2
+ export { M as MapsError } from './types-FNou8i90.cjs';
3
+
4
+ interface LatLngLiteral {
5
+ lat: number;
6
+ lng: number;
7
+ }
8
+ /** [lat, lng], "lat,lng", { lat, lng } or { latitude, longitude } */
9
+ type LegacyLatLng = [number, number] | string | LatLngLiteral | {
10
+ latitude: number;
11
+ longitude: number;
12
+ };
13
+ interface LatLngBounds {
14
+ northeast: LatLngLiteral;
15
+ southwest: LatLngLiteral;
16
+ }
17
+
18
+ interface PlaceAutocompleteParams {
19
+ input: string;
20
+ sessiontoken?: string;
21
+ offset?: number;
22
+ origin?: LegacyLatLng;
23
+ location?: LegacyLatLng;
24
+ radius?: number;
25
+ language?: string;
26
+ region?: string;
27
+ /** e.g. "(cities)", "address", "establishment", or several separated by "|" */
28
+ types?: string;
29
+ /** e.g. ["country:in", "country:np"] */
30
+ components?: string[] | string;
31
+ strictbounds?: boolean;
32
+ }
33
+ interface PredictionSubstring {
34
+ offset: number;
35
+ length: number;
36
+ }
37
+ interface PlaceAutocompleteResult {
38
+ description: string;
39
+ place_id: string;
40
+ reference: string;
41
+ types: string[];
42
+ matched_substrings: PredictionSubstring[];
43
+ structured_formatting: {
44
+ main_text: string;
45
+ main_text_matched_substrings: PredictionSubstring[];
46
+ secondary_text: string;
47
+ secondary_text_matched_substrings: PredictionSubstring[];
48
+ };
49
+ terms: {
50
+ offset: number;
51
+ value: string;
52
+ }[];
53
+ distance_meters?: number;
54
+ }
55
+ interface LegacyPlace {
56
+ place_id?: string;
57
+ name?: string;
58
+ formatted_address?: string;
59
+ geometry?: {
60
+ location: LatLngLiteral;
61
+ viewport?: LatLngBounds;
62
+ };
63
+ address_components?: {
64
+ long_name: string;
65
+ short_name: string;
66
+ types: string[];
67
+ }[];
68
+ adr_address?: string;
69
+ business_status?: string;
70
+ permanently_closed?: boolean;
71
+ icon?: string;
72
+ icon_mask_base_uri?: string;
73
+ icon_background_color?: string;
74
+ plus_code?: {
75
+ global_code?: string;
76
+ compound_code?: string;
77
+ };
78
+ types?: string[];
79
+ url?: string;
80
+ utc_offset?: number;
81
+ vicinity?: string;
82
+ formatted_phone_number?: string;
83
+ international_phone_number?: string;
84
+ opening_hours?: LegacyOpeningHours;
85
+ current_opening_hours?: LegacyOpeningHours;
86
+ website?: string;
87
+ price_level?: number;
88
+ rating?: number;
89
+ user_ratings_total?: number;
90
+ photos?: {
91
+ photo_reference: string;
92
+ width: number;
93
+ height: number;
94
+ html_attributions: string[];
95
+ }[];
96
+ reviews?: {
97
+ author_name: string;
98
+ author_url?: string;
99
+ profile_photo_url?: string;
100
+ rating?: number;
101
+ text: string;
102
+ language?: string;
103
+ relative_time_description?: string;
104
+ time?: number;
105
+ }[];
106
+ editorial_summary?: {
107
+ overview: string;
108
+ language?: string;
109
+ };
110
+ secondary_opening_hours?: (LegacyOpeningHours & {
111
+ type?: string;
112
+ })[];
113
+ wheelchair_accessible_entrance?: boolean;
114
+ [field: string]: unknown;
115
+ }
116
+ interface LegacyOpeningHours {
117
+ open_now?: boolean;
118
+ periods: {
119
+ open: {
120
+ day: number;
121
+ time: string;
122
+ };
123
+ close?: {
124
+ day: number;
125
+ time: string;
126
+ };
127
+ }[];
128
+ weekday_text: string[];
129
+ }
130
+ interface TextSearchParams {
131
+ /** Required, except when pagetoken continues a search this client made */
132
+ query?: string;
133
+ region?: string;
134
+ location?: LegacyLatLng;
135
+ radius?: number;
136
+ language?: string;
137
+ minprice?: number;
138
+ maxprice?: number;
139
+ opennow?: boolean;
140
+ pagetoken?: string;
141
+ type?: string;
142
+ /** Not in the legacy API: legacy field names (or new ones) to fetch instead of the defaults */
143
+ fields?: string[];
144
+ }
145
+ interface PlacesNearbyParams {
146
+ location: LegacyLatLng;
147
+ radius?: number;
148
+ keyword?: string;
149
+ name?: string;
150
+ language?: string;
151
+ minprice?: number;
152
+ maxprice?: number;
153
+ opennow?: boolean;
154
+ /** "prominence" or "distance" */
155
+ rankby?: string;
156
+ type?: string;
157
+ pagetoken?: string;
158
+ fields?: string[];
159
+ }
160
+
161
+ interface CommonParams {
162
+ /** driving (default), walking, bicycling or transit */
163
+ mode?: string;
164
+ avoid?: string[];
165
+ language?: string;
166
+ region?: string;
167
+ /** metric or imperial */
168
+ units?: string;
169
+ arrival_time?: Date | number;
170
+ departure_time?: Date | number | 'now';
171
+ /** best_guess, pessimistic or optimistic */
172
+ traffic_model?: string;
173
+ /** bus, subway, train, tram, rail */
174
+ transit_mode?: string[];
175
+ /** less_walking or fewer_transfers */
176
+ transit_routing_preference?: string;
177
+ }
178
+ interface DirectionsParams extends CommonParams {
179
+ origin: LegacyLatLng;
180
+ destination: LegacyLatLng;
181
+ waypoints?: LegacyLatLng[];
182
+ alternatives?: boolean;
183
+ optimize?: boolean;
184
+ }
185
+ interface DistanceMatrixParams extends CommonParams {
186
+ origins: LegacyLatLng[];
187
+ destinations: LegacyLatLng[];
188
+ }
189
+ interface Distance {
190
+ value: number;
191
+ text: string;
192
+ }
193
+ type Duration = Distance;
194
+ interface DirectionsStep {
195
+ html_instructions: string;
196
+ distance: Distance;
197
+ duration: Duration;
198
+ start_location: LatLngLiteral;
199
+ end_location: LatLngLiteral;
200
+ polyline: {
201
+ points: string;
202
+ };
203
+ travel_mode: string;
204
+ maneuver?: string;
205
+ }
206
+ interface RouteLeg {
207
+ steps: DirectionsStep[];
208
+ distance: Distance;
209
+ duration: Duration;
210
+ duration_in_traffic?: Duration;
211
+ start_location: LatLngLiteral;
212
+ end_location: LatLngLiteral;
213
+ start_address: string;
214
+ end_address: string;
215
+ }
216
+ interface DirectionsRoute {
217
+ summary: string;
218
+ legs: RouteLeg[];
219
+ waypoint_order: number[];
220
+ overview_polyline: {
221
+ points: string;
222
+ };
223
+ bounds?: LatLngBounds;
224
+ copyrights: string;
225
+ warnings: string[];
226
+ }
227
+ interface DistanceMatrixElement {
228
+ status: string;
229
+ distance?: Distance;
230
+ duration?: Duration;
231
+ duration_in_traffic?: Duration;
232
+ }
233
+
234
+ declare enum PlaceIdScope {
235
+ APP = "APP",
236
+ GOOGLE = "GOOGLE"
237
+ }
238
+ declare enum PlaceType1 {
239
+ accounting = "accounting",
240
+ airport = "airport",
241
+ amusement_park = "amusement_park",
242
+ aquarium = "aquarium",
243
+ art_gallery = "art_gallery",
244
+ atm = "atm",
245
+ bakery = "bakery",
246
+ bank = "bank",
247
+ bar = "bar",
248
+ beauty_salon = "beauty_salon",
249
+ bicycle_store = "bicycle_store",
250
+ book_store = "book_store",
251
+ bowling_alley = "bowling_alley",
252
+ bus_station = "bus_station",
253
+ cafe = "cafe",
254
+ campground = "campground",
255
+ car_dealer = "car_dealer",
256
+ car_rental = "car_rental",
257
+ car_repair = "car_repair",
258
+ car_wash = "car_wash",
259
+ casino = "casino",
260
+ cemetery = "cemetery",
261
+ church = "church",
262
+ city_hall = "city_hall",
263
+ clothing_store = "clothing_store",
264
+ convenience_store = "convenience_store",
265
+ courthouse = "courthouse",
266
+ dentist = "dentist",
267
+ department_store = "department_store",
268
+ doctor = "doctor",
269
+ drugstore = "drugstore",
270
+ electrician = "electrician",
271
+ electronics_store = "electronics_store",
272
+ embassy = "embassy",
273
+ fire_station = "fire_station",
274
+ florist = "florist",
275
+ funeral_home = "funeral_home",
276
+ furniture_store = "furniture_store",
277
+ gas_station = "gas_station",
278
+ gym = "gym",
279
+ hair_care = "hair_care",
280
+ hardware_store = "hardware_store",
281
+ hindu_temple = "hindu_temple",
282
+ home_goods_store = "home_goods_store",
283
+ hospital = "hospital",
284
+ insurance_agency = "insurance_agency",
285
+ jewelry_store = "jewelry_store",
286
+ laundry = "laundry",
287
+ lawyer = "lawyer",
288
+ library = "library",
289
+ light_rail_station = "light_rail_station",
290
+ liquor_store = "liquor_store",
291
+ local_government_office = "local_government_office",
292
+ locksmith = "locksmith",
293
+ lodging = "lodging",
294
+ meal_delivery = "meal_delivery",
295
+ meal_takeaway = "meal_takeaway",
296
+ mosque = "mosque",
297
+ movie_rental = "movie_rental",
298
+ movie_theater = "movie_theater",
299
+ moving_company = "moving_company",
300
+ museum = "museum",
301
+ night_club = "night_club",
302
+ painter = "painter",
303
+ park = "park",
304
+ parking = "parking",
305
+ pet_store = "pet_store",
306
+ pharmacy = "pharmacy",
307
+ physiotherapist = "physiotherapist",
308
+ plumber = "plumber",
309
+ police = "police",
310
+ post_office = "post_office",
311
+ real_estate_agency = "real_estate_agency",
312
+ restaurant = "restaurant",
313
+ roofing_contractor = "roofing_contractor",
314
+ rv_park = "rv_park",
315
+ school = "school",
316
+ secondary_school = "secondary_school",
317
+ shoe_store = "shoe_store",
318
+ shopping_mall = "shopping_mall",
319
+ spa = "spa",
320
+ stadium = "stadium",
321
+ storage = "storage",
322
+ store = "store",
323
+ subway_station = "subway_station",
324
+ supermarket = "supermarket",
325
+ synagogue = "synagogue",
326
+ taxi_stand = "taxi_stand",
327
+ tourist_attraction = "tourist_attraction",
328
+ train_station = "train_station",
329
+ transit_station = "transit_station",
330
+ travel_agency = "travel_agency",
331
+ university = "university",
332
+ veterinary_care = "veterinary_care",
333
+ zoo = "zoo"
334
+ }
335
+ declare enum PlaceType2 {
336
+ administrative_area_level_1 = "administrative_area_level_1",
337
+ administrative_area_level_2 = "administrative_area_level_2",
338
+ administrative_area_level_3 = "administrative_area_level_3",
339
+ administrative_area_level_4 = "administrative_area_level_4",
340
+ administrative_area_level_5 = "administrative_area_level_5",
341
+ archipelago = "archipelago",
342
+ colloquial_area = "colloquial_area",
343
+ continent = "continent",
344
+ country = "country",
345
+ establishment = "establishment",
346
+ finance = "finance",
347
+ floor = "floor",
348
+ food = "food",
349
+ general_contractor = "general_contractor",
350
+ geocode = "geocode",
351
+ health = "health",
352
+ intersection = "intersection",
353
+ landmark = "landmark",
354
+ locality = "locality",
355
+ natural_feature = "natural_feature",
356
+ neighborhood = "neighborhood",
357
+ place_of_worship = "place_of_worship",
358
+ plus_code = "plus_code",
359
+ point_of_interest = "point_of_interest",
360
+ political = "political",
361
+ post_box = "post_box",
362
+ postal_code = "postal_code",
363
+ postal_code_prefix = "postal_code_prefix",
364
+ postal_code_suffix = "postal_code_suffix",
365
+ postal_town = "postal_town",
366
+ premise = "premise",
367
+ room = "room",
368
+ route = "route",
369
+ street_address = "street_address",
370
+ street_number = "street_number",
371
+ sublocality = "sublocality",
372
+ sublocality_level_1 = "sublocality_level_1",
373
+ sublocality_level_2 = "sublocality_level_2",
374
+ sublocality_level_3 = "sublocality_level_3",
375
+ sublocality_level_4 = "sublocality_level_4",
376
+ sublocality_level_5 = "sublocality_level_5",
377
+ subpremise = "subpremise",
378
+ town_square = "town_square"
379
+ }
380
+ declare enum AspectRatingType {
381
+ appeal = "appeal",
382
+ atmosphere = "atmosphere",
383
+ decor = "decor",
384
+ facilities = "facilities",
385
+ food = "food",
386
+ overall = "overall",
387
+ quality = "quality",
388
+ service = "service"
389
+ }
390
+ declare enum Language {
391
+ ar = "ar",
392
+ be = "be",
393
+ bg = "bg",
394
+ bn = "bn",
395
+ ca = "ca",
396
+ cs = "cs",
397
+ da = "da",
398
+ de = "de",
399
+ el = "el",
400
+ en = "en",
401
+ en_Au = "en-Au",
402
+ en_GB = "en-GB",
403
+ es = "es",
404
+ eu = "eu",
405
+ fa = "fa",
406
+ fi = "fi",
407
+ fil = "fil",
408
+ fr = "fr",
409
+ gl = "gl",
410
+ gu = "gu",
411
+ hi = "hi",
412
+ hr = "hr",
413
+ hu = "hu",
414
+ id = "id",
415
+ it = "it",
416
+ iw = "iw",
417
+ ja = "ja",
418
+ kk = "kk",
419
+ kn = "kn",
420
+ ko = "ko",
421
+ ky = "ky",
422
+ lt = "lt",
423
+ lv = "lv",
424
+ mk = "mk",
425
+ ml = "ml",
426
+ mr = "mr",
427
+ my = "my",
428
+ nl = "nl",
429
+ no = "no",
430
+ pa = "pa",
431
+ pl = "pl",
432
+ pt = "pt",
433
+ pt_BR = "pt-BR",
434
+ pt_PT = "pt-PT",
435
+ ro = "ro",
436
+ ru = "ru",
437
+ sk = "sk",
438
+ sl = "sl",
439
+ sq = "sq",
440
+ sr = "sr",
441
+ sv = "sv",
442
+ ta = "ta",
443
+ te = "te",
444
+ th = "th",
445
+ tl = "tl",
446
+ tr = "tr",
447
+ uk = "uk",
448
+ uz = "uz",
449
+ vi = "vi",
450
+ zh_CN = "zh-CN",
451
+ zh_TW = "zh-TW"
452
+ }
453
+ declare enum TransitRoutingPreference {
454
+ less_walking = "less_walking",
455
+ fewer_transfers = "fewer_transfers"
456
+ }
457
+ declare enum DirectionsResponseStatus {
458
+ OK = "OK",
459
+ NOT_FOUND = "NOT_FOUND",
460
+ ZERO_RESULTS = "ZERO_RESULTS",
461
+ MAX_WAYPOINTS_EXCEEDED = "MAX_WAYPOINTS_EXCEEDED",
462
+ MAX_ROUTE_LENGTH_EXCEEDED = "MAX_ROUTE_LENGTH_EXCEEDED",
463
+ INVALID_REQUEST = "INVALID_REQUEST",
464
+ OVER_DAILY_LIMIT = "OVER_DAILY_LIMIT",
465
+ OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT",
466
+ REQUEST_DENIED = "REQUEST_DENIED",
467
+ UNKNOWN_ERROR = "UNKNOWN_ERROR"
468
+ }
469
+ declare enum GeocodedWaypointStatus {
470
+ OK = "OK",
471
+ ZERO_RESULTS = "ZERO_RESULTS"
472
+ }
473
+ declare enum Maneuver {
474
+ turn_slight_left = "turn-slight-left",
475
+ turn_sharp_left = "turn-sharp-left",
476
+ uturn_left = "uturn-left",
477
+ turn_left = "turn-left",
478
+ turn_slight_right = "turn-slight-right",
479
+ turn_sharp_right = "turn-sharp-right",
480
+ uturn_right = "uturn-right",
481
+ turn_right = "turn-right",
482
+ straight = "straight",
483
+ ramp_left = "ramp-left",
484
+ ramp_right = "ramp-right",
485
+ merge = "merge",
486
+ fork_left = "fork-left",
487
+ fork_right = "fork-right",
488
+ ferry = "ferry",
489
+ ferry_train = "ferry-train",
490
+ roundabout_left = "roundabout-left",
491
+ roundabout_right = "roundabout-right"
492
+ }
493
+ declare enum VehicleType {
494
+ RAIL = "RAIL",
495
+ METRO_RAIL = "METRO_RAIL",
496
+ SUBWAY = "SUBWAY",
497
+ TRAM = "TRAM",
498
+ MONORAIL = "MONORAIL",
499
+ HEAVY_RAIL = "HEAVY_RAIL",
500
+ COMMUTER_TRAIN = "COMMUTER_TRAIN",
501
+ HIGH_SPEED_TRAIN = "HIGH_SPEED_TRAIN",
502
+ BUS = "BUS",
503
+ INTERCITY_BUS = "INTERCITY_BUS",
504
+ TROLLEYBUS = "TROLLEYBUS",
505
+ SHARE_TAXI = "SHARE_TAXI",
506
+ FERRY = "FERRY",
507
+ CABLE_CAR = "CABLE_CAR",
508
+ GONDOLA_LIFT = "GONDOLA_LIFT",
509
+ FUNICULAR = "FUNICULAR",
510
+ OTHER = "OTHER"
511
+ }
512
+ declare enum GeocodingAddressComponentType {
513
+ floor = "floor",
514
+ establishment = "establishment",
515
+ point_of_interest = "point_of_interest",
516
+ parking = "parking",
517
+ post_box = "post_box",
518
+ postal_town = "postal_town",
519
+ room = "room",
520
+ street_number = "street_number",
521
+ bus_station = "bus_station",
522
+ train_station = "train_station",
523
+ transit_station = "transit_station"
524
+ }
525
+ declare enum LocationType {
526
+ ROOFTOP = "ROOFTOP",
527
+ RANGE_INTERPOLATED = "RANGE_INTERPOLATED",
528
+ GEOMETRIC_CENTER = "GEOMETRIC_CENTER",
529
+ APPROXIMATE = "APPROXIMATE"
530
+ }
531
+ declare enum RadioType {
532
+ lte = "lte",
533
+ gsm = "gsm",
534
+ cdma = "cdma",
535
+ wcdma = "wcdma"
536
+ }
537
+ declare enum ReverseGeocodingLocationType {
538
+ ROOFTOP = "ROOFTOP",
539
+ RANGE_INTERPOLATED = "RANGE_INTERPOLATED",
540
+ GEOMETRIC_CENTER = "GEOMETRIC_CENTER",
541
+ APPROXIMATE = "APPROXIMATE"
542
+ }
543
+ declare enum GeolocateErrorReason {
544
+ dailyLimitExceeded = "dailyLimitExceeded",
545
+ keyInvalid = "keyInvalid",
546
+ userRateLimitExceeded = "userRateLimitExceeded",
547
+ notFound = "notFound",
548
+ parseError = "parseError"
549
+ }
550
+
551
+ /** Every place and address type together, as the legacy client's AddressType */
552
+ declare const AddressType: typeof PlaceType1 & typeof PlaceType2;
553
+ type AddressType = PlaceType1 | PlaceType2;
554
+
555
+ declare enum Status {
556
+ OK = "OK",
557
+ INVALID_REQUEST = "INVALID_REQUEST",
558
+ MAX_WAYPOINTS_EXCEEDED = "MAX_WAYPOINTS_EXCEEDED",
559
+ MAX_ROUTE_LENGTH_EXCEEDED = "MAX_ROUTE_LENGTH_EXCEEDED",
560
+ OVER_DAILY_LIMIT = "OVER_DAILY_LIMIT",
561
+ OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT",
562
+ REQUEST_DENIED = "REQUEST_DENIED",
563
+ UNKNOWN_ERROR = "UNKNOWN_ERROR",
564
+ ZERO_RESULTS = "ZERO_RESULTS",
565
+ NOT_FOUND = "NOT_FOUND"
566
+ }
567
+ declare enum TravelMode {
568
+ driving = "driving",
569
+ walking = "walking",
570
+ bicycling = "bicycling",
571
+ transit = "transit"
572
+ }
573
+ declare enum TravelRestriction {
574
+ tolls = "tolls",
575
+ highways = "highways",
576
+ ferries = "ferries",
577
+ indoor = "indoor"
578
+ }
579
+ declare enum UnitSystem {
580
+ metric = "metric",
581
+ imperial = "imperial"
582
+ }
583
+ declare enum TrafficModel {
584
+ best_guess = "best_guess",
585
+ optimistic = "optimistic",
586
+ pessimistic = "pessimistic"
587
+ }
588
+ declare enum TransitMode {
589
+ bus = "bus",
590
+ subway = "subway",
591
+ train = "train",
592
+ tram = "tram",
593
+ rail = "rail"
594
+ }
595
+ declare enum PlaceAutocompleteType {
596
+ geocode = "geocode",
597
+ address = "address",
598
+ establishment = "establishment",
599
+ regions = "(regions)",
600
+ cities = "(cities)"
601
+ }
602
+ declare enum PlaceInputType {
603
+ textQuery = "textquery",
604
+ phoneNumber = "phonenumber"
605
+ }
606
+ declare enum PlacesNearbyRanking {
607
+ prominence = "prominence",
608
+ distance = "distance"
609
+ }
610
+ interface ClientOptions {
611
+ /** Defaults to the global fetch */
612
+ fetch?: FetchLike;
613
+ /** timeout (ms), retries and extra headers. Other axios options are ignored. */
614
+ config?: {
615
+ timeout?: number;
616
+ retries?: number;
617
+ headers?: Record<string, string>;
618
+ };
619
+ /** Ignored: there is no axios */
620
+ axiosInstance?: unknown;
621
+ experienceId?: string[];
622
+ }
623
+ interface ResponseData {
624
+ status: Status | string;
625
+ error_message?: string;
626
+ html_attributions?: string[];
627
+ next_page_token?: string;
628
+ }
629
+ /** The fields of an axios response that callers read */
630
+ interface Response<T> {
631
+ data: T;
632
+ status: number;
633
+ statusText: string;
634
+ headers: Record<string, string>;
635
+ config: Record<string, unknown>;
636
+ }
637
+ interface Request<P> {
638
+ params: P & {
639
+ key: string;
640
+ };
641
+ /** Milliseconds */
642
+ timeout?: number;
643
+ signal?: AbortSignal;
644
+ }
645
+ /** Requests whose response body comes from Google unchanged */
646
+ type PassthroughRequest = Request<Record<string, unknown>>;
647
+ declare class Client {
648
+ private readonly options;
649
+ private experienceId;
650
+ private readonly transports;
651
+ private readonly pages;
652
+ constructor(options?: ClientOptions);
653
+ setExperienceId(...ids: string[]): void;
654
+ clearExperienceId(): void;
655
+ getExperienceId(): string[];
656
+ private transport;
657
+ /** The request to send for a page: the one that issued the token, when only the token was given */
658
+ private paged;
659
+ private remember;
660
+ private call;
661
+ private passthrough;
662
+ placeAutocomplete(request: Request<PlaceAutocompleteParams>): Promise<Response<ResponseData & {
663
+ predictions: PlaceAutocompleteResult[];
664
+ }>>;
665
+ placeQueryAutocomplete(request: Request<Omit<PlaceAutocompleteParams, 'types' | 'components' | 'strictbounds' | 'origin'>>): Promise<Response<ResponseData & {
666
+ predictions: PlaceAutocompleteResult[];
667
+ }>>;
668
+ placeDetails(request: Request<{
669
+ place_id: string;
670
+ fields?: string[];
671
+ language?: string;
672
+ region?: string;
673
+ sessiontoken?: string;
674
+ }>): Promise<Response<ResponseData & {
675
+ result: LegacyPlace;
676
+ html_attributions: string[];
677
+ }>>;
678
+ findPlaceFromText(request: Request<{
679
+ input: string;
680
+ inputtype: PlaceInputType | string;
681
+ fields?: string[];
682
+ locationbias?: string;
683
+ language?: string;
684
+ }>): Promise<Response<ResponseData & {
685
+ candidates: LegacyPlace[];
686
+ }>>;
687
+ textSearch(request: Request<TextSearchParams>): Promise<Response<ResponseData & {
688
+ results: LegacyPlace[];
689
+ }>>;
690
+ placesNearby(request: Request<PlacesNearbyParams>): Promise<Response<ResponseData & {
691
+ results: LegacyPlace[];
692
+ }>>;
693
+ /**
694
+ * Image bytes for a photo. photoreference is a photo name from a result's photos (places/.../photos/...).
695
+ * Returns an ArrayBuffer, as the legacy client did by default.
696
+ */
697
+ placePhoto(request: Request<{
698
+ photoreference: string;
699
+ maxwidth?: number;
700
+ maxheight?: number;
701
+ }>): Promise<Response<ArrayBuffer>>;
702
+ directions(request: Request<DirectionsParams>): Promise<Response<ResponseData & {
703
+ routes: DirectionsRoute[];
704
+ geocoded_waypoints: unknown[];
705
+ available_travel_modes: string[];
706
+ }>>;
707
+ distancematrix(request: Request<DistanceMatrixParams>): Promise<Response<ResponseData & {
708
+ origin_addresses: string[];
709
+ destination_addresses: string[];
710
+ rows: {
711
+ elements: DistanceMatrixElement[];
712
+ }[];
713
+ }>>;
714
+ geocode(request: PassthroughRequest): Promise<Response<ResponseData & {
715
+ results: GeocodeResult[];
716
+ }>>;
717
+ reverseGeocode(request: PassthroughRequest): Promise<Response<ResponseData & {
718
+ results: GeocodeResult[];
719
+ }>>;
720
+ elevation(request: PassthroughRequest): Promise<Response<ResponseData & {
721
+ results: ElevationResult[];
722
+ }>>;
723
+ timezone(request: PassthroughRequest): Promise<Response<ResponseData & Partial<TimeZone>>>;
724
+ geolocate(request: PassthroughRequest & {
725
+ data?: unknown;
726
+ }): Promise<Response<ResponseData & Partial<GeolocateResponse$1>>>;
727
+ nearestRoads(request: PassthroughRequest): Promise<Response<ResponseData & {
728
+ snappedPoints: SnappedPoint[];
729
+ }>>;
730
+ snapToRoads(request: PassthroughRequest): Promise<Response<ResponseData & {
731
+ snappedPoints: SnappedPoint[];
732
+ warningMessage?: string;
733
+ }>>;
734
+ }
735
+ type PlaceAutocompleteRequest = Parameters<Client['placeAutocomplete']>[0];
736
+ type PlaceAutocompleteResponse = Awaited<ReturnType<Client['placeAutocomplete']>>;
737
+ type PlaceAutocompleteResponseData = PlaceAutocompleteResponse['data'];
738
+ type PlaceQueryAutocompleteRequest = Parameters<Client['placeQueryAutocomplete']>[0];
739
+ type PlaceQueryAutocompleteResponse = Awaited<ReturnType<Client['placeQueryAutocomplete']>>;
740
+ type PlaceQueryAutocompleteResponseData = PlaceQueryAutocompleteResponse['data'];
741
+ type PlaceQueryAutocompletePrediction = PlaceAutocompleteResult;
742
+ type PlaceDetailsRequest = Parameters<Client['placeDetails']>[0];
743
+ type PlaceDetailsResponse = Awaited<ReturnType<Client['placeDetails']>>;
744
+ type PlaceDetailsResponseData = PlaceDetailsResponse['data'];
745
+ type FindPlaceFromTextRequest = Parameters<Client['findPlaceFromText']>[0];
746
+ type FindPlaceFromTextResponse = Awaited<ReturnType<Client['findPlaceFromText']>>;
747
+ type FindPlaceFromTextResponseData = FindPlaceFromTextResponse['data'];
748
+ type TextSearchRequest = Parameters<Client['textSearch']>[0];
749
+ type TextSearchResponse = Awaited<ReturnType<Client['textSearch']>>;
750
+ type TextSearchResponseData = TextSearchResponse['data'];
751
+ type PlacesNearbyRequest = Parameters<Client['placesNearby']>[0];
752
+ type PlacesNearbyResponse = Awaited<ReturnType<Client['placesNearby']>>;
753
+ type PlacesNearbyResponseData = PlacesNearbyResponse['data'];
754
+ type PlacePhotoRequest = Parameters<Client['placePhoto']>[0];
755
+ type PlacePhotoResponse = Awaited<ReturnType<Client['placePhoto']>>;
756
+ type DirectionsRequest = Parameters<Client['directions']>[0];
757
+ type DirectionsResponse = Awaited<ReturnType<Client['directions']>>;
758
+ type DirectionsResponseData = DirectionsResponse['data'];
759
+ type DistanceMatrixRequest = Parameters<Client['distancematrix']>[0];
760
+ type DistanceMatrixResponse = Awaited<ReturnType<Client['distancematrix']>>;
761
+ type DistanceMatrixResponseData = DistanceMatrixResponse['data'];
762
+ type DistanceMatrixRow = DistanceMatrixResponseData['rows'][number];
763
+ type DistanceMatrixRowElement = DistanceMatrixElement;
764
+ type GeocodeRequest = Parameters<Client['geocode']>[0];
765
+ type GeocodeResponse = Awaited<ReturnType<Client['geocode']>>;
766
+ type GeocodeResponseData = GeocodeResponse['data'];
767
+ type ReverseGeocodeRequest = Parameters<Client['reverseGeocode']>[0];
768
+ type ReverseGeocodeResponse = Awaited<ReturnType<Client['reverseGeocode']>>;
769
+ type ReverseGeocodeResponseData = ReverseGeocodeResponse['data'];
770
+ type ElevationRequest = Parameters<Client['elevation']>[0];
771
+ type ElevationResponse = Awaited<ReturnType<Client['elevation']>>;
772
+ type ElevationResponseData = ElevationResponse['data'];
773
+ type TimeZoneRequest = Parameters<Client['timezone']>[0];
774
+ type TimeZoneResponse = Awaited<ReturnType<Client['timezone']>>;
775
+ type TimeZoneResponseData = TimeZoneResponse['data'];
776
+ type GeolocateRequest = Parameters<Client['geolocate']>[0];
777
+ type GeolocateResponse = Awaited<ReturnType<Client['geolocate']>>;
778
+ type GeolocateResponseData = GeolocateResponse['data'];
779
+ type NearestRoadsRequest = Parameters<Client['nearestRoads']>[0];
780
+ type NearestRoadsResponse = Awaited<ReturnType<Client['nearestRoads']>>;
781
+ type SnapToRoadsRequest = Parameters<Client['snapToRoads']>[0];
782
+ type SnapToRoadsResponse = Awaited<ReturnType<Client['snapToRoads']>>;
783
+ /** e.g. { country: 'IN', postal_code: '411001' } */
784
+ type GeocodeComponents = Record<string, string>;
785
+
786
+ export { AddressType, AspectRatingType, Client, type ClientOptions, type DirectionsParams, DirectionsResponseStatus as DirectionsReponseStatus, type DirectionsRequest, type DirectionsResponse, type DirectionsResponseData, DirectionsResponseStatus, type DirectionsRoute, type DirectionsStep, type Distance, type DistanceMatrixElement, type DistanceMatrixParams, type DistanceMatrixRequest, type DistanceMatrixResponse, type DistanceMatrixResponseData, type DistanceMatrixRow, type DistanceMatrixRowElement, type Duration, type ElevationRequest, type ElevationResponse, type ElevationResponseData, ElevationResult, type FindPlaceFromTextRequest, type FindPlaceFromTextResponse, type FindPlaceFromTextResponseData, type GeocodeComponents, type GeocodeRequest, type GeocodeResponse, type GeocodeResponseData, GeocodeResult, GeocodedWaypointStatus, GeocodingAddressComponentType, GeolocateErrorReason, type GeolocateRequest, type GeolocateResponse, type GeolocateResponseData, GeolocateResponse$1 as GeolocateResponseSuccess, Language, type LegacyLatLng as LatLng, type LatLngBounds, type LatLngLiteral, LocationType, Maneuver, type NearestRoadsRequest, type NearestRoadsResponse, type LegacyOpeningHours as OpeningHours, type LegacyPlace as Place, type PlaceAutocompleteParams, type PlaceAutocompleteRequest, type PlaceAutocompleteResponse, type PlaceAutocompleteResponseData, type PlaceAutocompleteResult, PlaceAutocompleteType, type PlaceDetailsRequest, type PlaceDetailsResponse, type PlaceDetailsResponseData, PlaceIdScope, PlaceInputType, type PlacePhotoRequest, type PlacePhotoResponse, type PlaceQueryAutocompletePrediction, type PlaceQueryAutocompleteRequest, type PlaceQueryAutocompleteResponse, type PlaceQueryAutocompleteResponseData, PlaceType1, PlaceType2, type PlacesNearbyParams, PlacesNearbyRanking, type PlacesNearbyRequest, type PlacesNearbyResponse, type PlacesNearbyResponseData, type PredictionSubstring, RadioType, type Request, type Response, type ResponseData, type ReverseGeocodeRequest, type ReverseGeocodeResponse, type ReverseGeocodeResponseData, ReverseGeocodingLocationType, type RouteLeg, type SnapToRoadsRequest, type SnapToRoadsResponse, SnappedPoint, Status, type TextSearchParams, type TextSearchRequest, type TextSearchResponse, type TextSearchResponseData, TimeZone, type TimeZoneRequest, type TimeZoneResponse, type TimeZoneResponseData, TrafficModel, TransitMode, TransitRoutingPreference, TravelMode, TravelRestriction, UnitSystem, VehicleType };