@googlemaps/routing 1.2.0 → 1.4.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -2
  3. package/build/protos/google/geo/type/viewport.proto +1 -1
  4. package/build/protos/google/maps/routing/v2/fallback_info.proto +5 -5
  5. package/build/protos/google/maps/routing/v2/geocoding_results.proto +4 -5
  6. package/build/protos/google/maps/routing/v2/localized_time.proto +1 -2
  7. package/build/protos/google/maps/routing/v2/location.proto +2 -3
  8. package/build/protos/google/maps/routing/v2/maneuver.proto +2 -3
  9. package/build/protos/google/maps/routing/v2/navigation_instruction.proto +5 -5
  10. package/build/protos/google/maps/routing/v2/polyline.proto +3 -4
  11. package/build/protos/google/maps/routing/v2/polyline_details.proto +84 -0
  12. package/build/protos/google/maps/routing/v2/route.proto +30 -23
  13. package/build/protos/google/maps/routing/v2/route_label.proto +6 -4
  14. package/build/protos/google/maps/routing/v2/route_modifiers.proto +6 -7
  15. package/build/protos/google/maps/routing/v2/route_travel_mode.proto +1 -2
  16. package/build/protos/google/maps/routing/v2/routes_service.proto +84 -44
  17. package/build/protos/google/maps/routing/v2/routing_preference.proto +6 -5
  18. package/build/protos/google/maps/routing/v2/speed_reading_interval.proto +3 -4
  19. package/build/protos/google/maps/routing/v2/toll_info.proto +5 -5
  20. package/build/protos/google/maps/routing/v2/toll_passes.proto +17 -3
  21. package/build/protos/google/maps/routing/v2/traffic_model.proto +1 -2
  22. package/build/protos/google/maps/routing/v2/transit.proto +1 -2
  23. package/build/protos/google/maps/routing/v2/transit_preferences.proto +1 -2
  24. package/build/protos/google/maps/routing/v2/units.proto +1 -2
  25. package/build/protos/google/maps/routing/v2/vehicle_emission_type.proto +2 -3
  26. package/build/protos/google/maps/routing/v2/vehicle_info.proto +2 -2
  27. package/build/protos/google/maps/routing/v2/waypoint.proto +5 -6
  28. package/build/protos/protos.d.ts +695 -248
  29. package/build/protos/protos.js +1690 -510
  30. package/build/protos/protos.json +154 -50
  31. package/build/src/v2/routes_client.d.ts +49 -37
  32. package/build/src/v2/routes_client.js +24 -20
  33. package/package.json +2 -2
@@ -1,4 +1,7 @@
1
1
  {
2
+ "options": {
3
+ "syntax": "proto3"
4
+ },
2
5
  "nested": {
3
6
  "google": {
4
7
  "nested": {
@@ -160,30 +163,6 @@
160
163
  }
161
164
  }
162
165
  },
163
- "Duration": {
164
- "fields": {
165
- "seconds": {
166
- "type": "int64",
167
- "id": 1
168
- },
169
- "nanos": {
170
- "type": "int32",
171
- "id": 2
172
- }
173
- }
174
- },
175
- "Timestamp": {
176
- "fields": {
177
- "seconds": {
178
- "type": "int64",
179
- "id": 1
180
- },
181
- "nanos": {
182
- "type": "int32",
183
- "id": 2
184
- }
185
- }
186
- },
187
166
  "FileDescriptorSet": {
188
167
  "fields": {
189
168
  "file": {
@@ -1447,6 +1426,30 @@
1447
1426
  }
1448
1427
  }
1449
1428
  }
1429
+ },
1430
+ "Duration": {
1431
+ "fields": {
1432
+ "seconds": {
1433
+ "type": "int64",
1434
+ "id": 1
1435
+ },
1436
+ "nanos": {
1437
+ "type": "int32",
1438
+ "id": 2
1439
+ }
1440
+ }
1441
+ },
1442
+ "Timestamp": {
1443
+ "fields": {
1444
+ "seconds": {
1445
+ "type": "int64",
1446
+ "id": 1
1447
+ },
1448
+ "nanos": {
1449
+ "type": "int32",
1450
+ "id": 2
1451
+ }
1452
+ }
1450
1453
  }
1451
1454
  }
1452
1455
  },
@@ -1535,7 +1538,6 @@
1535
1538
  "nested": {
1536
1539
  "v2": {
1537
1540
  "options": {
1538
- "cc_enable_arenas": true,
1539
1541
  "csharp_namespace": "Google.Maps.Routing.V2",
1540
1542
  "go_package": "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb",
1541
1543
  "java_multiple_files": true,
@@ -1543,7 +1545,8 @@
1543
1545
  "java_package": "com.google.maps.routing.v2",
1544
1546
  "objc_class_prefix": "GMRV2",
1545
1547
  "php_namespace": "Google\\Maps\\Routing\\V2",
1546
- "ruby_package": "Google::Maps::Routing::V2"
1548
+ "ruby_package": "Google::Maps::Routing::V2",
1549
+ "cc_enable_arenas": true
1547
1550
  },
1548
1551
  "nested": {
1549
1552
  "FallbackInfo": {
@@ -1719,6 +1722,89 @@
1719
1722
  "GEO_JSON_LINESTRING": 2
1720
1723
  }
1721
1724
  },
1725
+ "PolylineDetails": {
1726
+ "fields": {
1727
+ "flyoverInfo": {
1728
+ "rule": "repeated",
1729
+ "type": "FlyoverInfo",
1730
+ "id": 12
1731
+ },
1732
+ "narrowRoadInfo": {
1733
+ "rule": "repeated",
1734
+ "type": "NarrowRoadInfo",
1735
+ "id": 13
1736
+ }
1737
+ },
1738
+ "nested": {
1739
+ "PolylinePointIndex": {
1740
+ "oneofs": {
1741
+ "_startIndex": {
1742
+ "oneof": [
1743
+ "startIndex"
1744
+ ]
1745
+ },
1746
+ "_endIndex": {
1747
+ "oneof": [
1748
+ "endIndex"
1749
+ ]
1750
+ }
1751
+ },
1752
+ "fields": {
1753
+ "startIndex": {
1754
+ "type": "int32",
1755
+ "id": 1,
1756
+ "options": {
1757
+ "proto3_optional": true
1758
+ }
1759
+ },
1760
+ "endIndex": {
1761
+ "type": "int32",
1762
+ "id": 2,
1763
+ "options": {
1764
+ "proto3_optional": true
1765
+ }
1766
+ }
1767
+ }
1768
+ },
1769
+ "RoadFeatureState": {
1770
+ "values": {
1771
+ "ROAD_FEATURE_STATE_UNSPECIFIED": 0,
1772
+ "EXISTS": 1,
1773
+ "DOES_NOT_EXIST": 2
1774
+ }
1775
+ },
1776
+ "FlyoverInfo": {
1777
+ "fields": {
1778
+ "flyoverPresence": {
1779
+ "type": "RoadFeatureState",
1780
+ "id": 1,
1781
+ "options": {
1782
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
1783
+ }
1784
+ },
1785
+ "polylinePointIndex": {
1786
+ "type": "PolylinePointIndex",
1787
+ "id": 2
1788
+ }
1789
+ }
1790
+ },
1791
+ "NarrowRoadInfo": {
1792
+ "fields": {
1793
+ "narrowRoadPresence": {
1794
+ "type": "RoadFeatureState",
1795
+ "id": 1,
1796
+ "options": {
1797
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
1798
+ }
1799
+ },
1800
+ "polylinePointIndex": {
1801
+ "type": "PolylinePointIndex",
1802
+ "id": 2
1803
+ }
1804
+ }
1805
+ }
1806
+ }
1807
+ },
1722
1808
  "Route": {
1723
1809
  "fields": {
1724
1810
  "routeLabels": {
@@ -1776,6 +1862,10 @@
1776
1862
  "routeToken": {
1777
1863
  "type": "string",
1778
1864
  "id": 12
1865
+ },
1866
+ "polylineDetails": {
1867
+ "type": "PolylineDetails",
1868
+ "id": 14
1779
1869
  }
1780
1870
  },
1781
1871
  "nested": {
@@ -2089,7 +2179,8 @@
2089
2179
  "ROUTE_LABEL_UNSPECIFIED": 0,
2090
2180
  "DEFAULT_ROUTE": 1,
2091
2181
  "DEFAULT_ROUTE_ALTERNATE": 2,
2092
- "FUEL_EFFICIENT": 3
2182
+ "FUEL_EFFICIENT": 3,
2183
+ "SHORTER_DISTANCE": 4
2093
2184
  }
2094
2185
  },
2095
2186
  "RouteTravelMode": {
@@ -2326,6 +2417,8 @@
2326
2417
  "ID_E_TOLL": 16,
2327
2418
  "IN_FASTAG": 78,
2328
2419
  "IN_LOCAL_HP_PLATE_EXEMPT": 79,
2420
+ "JP_ETC": 98,
2421
+ "JP_ETC2": 99,
2329
2422
  "MX_IAVE": 90,
2330
2423
  "MX_PASE": 91,
2331
2424
  "MX_QUICKPASS": 93,
@@ -2401,6 +2494,7 @@
2401
2494
  "US_WA_GOOD_TO_GO": 1,
2402
2495
  "US_WV_EZPASSWV": 62,
2403
2496
  "US_WV_MEMORIAL_BRIDGE_TICKETS": 63,
2497
+ "US_WV_MOV_PASS": 100,
2404
2498
  "US_WV_NEWELL_TOLL_BRIDGE_TICKET": 64
2405
2499
  }
2406
2500
  },
@@ -2604,7 +2698,8 @@
2604
2698
  "ReferenceRoute": {
2605
2699
  "values": {
2606
2700
  "REFERENCE_ROUTE_UNSPECIFIED": 0,
2607
- "FUEL_EFFICIENT": 1
2701
+ "FUEL_EFFICIENT": 1,
2702
+ "SHORTER_DISTANCE": 2
2608
2703
  }
2609
2704
  },
2610
2705
  "ExtraComputation": {
@@ -2613,7 +2708,9 @@
2613
2708
  "TOLLS": 1,
2614
2709
  "FUEL_CONSUMPTION": 2,
2615
2710
  "TRAFFIC_ON_POLYLINE": 3,
2616
- "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4
2711
+ "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4,
2712
+ "FLYOVER_INFO_ON_POLYLINE": 7,
2713
+ "NARROW_ROAD_INFO_ON_POLYLINE": 8
2617
2714
  }
2618
2715
  }
2619
2716
  }
@@ -2695,6 +2792,13 @@
2695
2792
  "(google.api.field_behavior)": "OPTIONAL"
2696
2793
  }
2697
2794
  },
2795
+ "units": {
2796
+ "type": "Units",
2797
+ "id": 7,
2798
+ "options": {
2799
+ "(google.api.field_behavior)": "OPTIONAL"
2800
+ }
2801
+ },
2698
2802
  "extraComputations": {
2699
2803
  "rule": "repeated",
2700
2804
  "type": "ExtraComputation",
@@ -2976,14 +3080,33 @@
2976
3080
  },
2977
3081
  "api": {
2978
3082
  "options": {
2979
- "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations",
3083
+ "go_package": "google.golang.org/genproto/googleapis/api;api",
2980
3084
  "java_multiple_files": true,
2981
- "java_outer_classname": "FieldBehaviorProto",
3085
+ "java_outer_classname": "LaunchStageProto",
2982
3086
  "java_package": "com.google.api",
2983
3087
  "objc_class_prefix": "GAPI",
2984
3088
  "cc_enable_arenas": true
2985
3089
  },
2986
3090
  "nested": {
3091
+ "fieldBehavior": {
3092
+ "rule": "repeated",
3093
+ "type": "google.api.FieldBehavior",
3094
+ "id": 1052,
3095
+ "extend": "google.protobuf.FieldOptions"
3096
+ },
3097
+ "FieldBehavior": {
3098
+ "values": {
3099
+ "FIELD_BEHAVIOR_UNSPECIFIED": 0,
3100
+ "OPTIONAL": 1,
3101
+ "REQUIRED": 2,
3102
+ "OUTPUT_ONLY": 3,
3103
+ "INPUT_ONLY": 4,
3104
+ "IMMUTABLE": 5,
3105
+ "UNORDERED_LIST": 6,
3106
+ "NON_EMPTY_DEFAULT": 7,
3107
+ "IDENTIFIER": 8
3108
+ }
3109
+ },
2987
3110
  "http": {
2988
3111
  "type": "HttpRule",
2989
3112
  "id": 72295728,
@@ -3365,25 +3488,6 @@
3365
3488
  "GA": 4,
3366
3489
  "DEPRECATED": 5
3367
3490
  }
3368
- },
3369
- "fieldBehavior": {
3370
- "rule": "repeated",
3371
- "type": "google.api.FieldBehavior",
3372
- "id": 1052,
3373
- "extend": "google.protobuf.FieldOptions"
3374
- },
3375
- "FieldBehavior": {
3376
- "values": {
3377
- "FIELD_BEHAVIOR_UNSPECIFIED": 0,
3378
- "OPTIONAL": 1,
3379
- "REQUIRED": 2,
3380
- "OUTPUT_ONLY": 3,
3381
- "INPUT_ONLY": 4,
3382
- "IMMUTABLE": 5,
3383
- "UNORDERED_LIST": 6,
3384
- "NON_EMPTY_DEFAULT": 7,
3385
- "IDENTIFIER": 8
3386
- }
3387
3491
  }
3388
3492
  }
3389
3493
  }
@@ -118,7 +118,7 @@ export declare class RoutesClient {
118
118
  * the input. You can provide the response field mask by using URL parameter
119
119
  * `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask`
120
120
  * (see the [available URL parameters and
121
- * headers](https://cloud.google.com/apis/docs/system-parameters). The value
121
+ * headers](https://cloud.google.com/apis/docs/system-parameters)). The value
122
122
  * is a comma separated list of field paths. See detailed documentation about
123
123
  * [how to construct the field
124
124
  * paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
@@ -173,14 +173,16 @@ export declare class RoutesClient {
173
173
  * Optional. The departure time. If you don't set this value, then this value
174
174
  * defaults to the time that you made the request.
175
175
  * NOTE: You can only specify a `departure_time` in the past when
176
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
177
- * `TRANSIT`.
176
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
177
+ * `TRANSIT`. Transit trips are available for up to 7 days in the past or 100
178
+ * days in the future.
178
179
  * @param {google.protobuf.Timestamp} [request.arrivalTime]
179
180
  * Optional. The arrival time.
180
181
  * NOTE: Can only be set when
181
182
  * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
182
- * `TRANSIT`. You can specify either departure_time or arrival_time, but not
183
- * both.
183
+ * `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
184
+ * not both. Transit trips are available for up to 7 days in the past or 100
185
+ * days in the future.
184
186
  * @param {boolean} [request.computeAlternativeRoutes]
185
187
  * Optional. Specifies whether to calculate alternate routes in addition to
186
188
  * the route. No alternative routes are returned for requests that have
@@ -190,21 +192,22 @@ export declare class RoutesClient {
190
192
  * calculated.
191
193
  * @param {string} [request.languageCode]
192
194
  * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
193
- * information, see
194
- * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
195
- * [Language Support](https://developers.google.com/maps/faq#languagesupport)
195
+ * information, see [Unicode Locale
196
+ * Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier).
197
+ * See [Language
198
+ * Support](https://developers.google.com/maps/faq#languagesupport)
196
199
  * for the list of supported languages. When you don't provide this value, the
197
200
  * display language is inferred from the location of the route request.
198
201
  * @param {string} [request.regionCode]
199
202
  * Optional. The region code, specified as a ccTLD ("top-level domain")
200
- * two-character value. For more information see
201
- * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
203
+ * two-character value. For more information see [Country code top-level
204
+ * domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
202
205
  * @param {google.maps.routing.v2.Units} [request.units]
203
206
  * Optional. Specifies the units of measure for the display fields. These
204
207
  * fields include the `instruction` field in
205
- * {@link protos.google.maps.routing.v2.NavigationInstruction|NavigationInstruction}. The
206
- * units of measure used for the route, leg, step distance, and duration are
207
- * not affected by this value. If you don't provide this value, then the
208
+ * {@link protos.google.maps.routing.v2.NavigationInstruction|`NavigationInstruction`}.
209
+ * The units of measure used for the route, leg, step distance, and duration
210
+ * are not affected by this value. If you don't provide this value, then the
208
211
  * display units are inferred from the location of the first origin.
209
212
  * @param {boolean} [request.optimizeWaypointOrder]
210
213
  * Optional. If set to true, the service attempts to minimize the overall cost
@@ -222,7 +225,10 @@ export declare class RoutesClient {
222
225
  * request in addition to the default route. A reference route is a route with
223
226
  * a different route calculation objective than the default route. For example
224
227
  * a `FUEL_EFFICIENT` reference route calculation takes into account various
225
- * parameters that would generate an optimal fuel efficient route.
228
+ * parameters that would generate an optimal fuel efficient route. When using
229
+ * this feature, look for
230
+ * {@link protos.google.maps.routing.v2.Route.route_labels|`route_labels`} on the
231
+ * resulting routes.
226
232
  * @param {number[]} [request.extraComputations]
227
233
  * Optional. A list of extra computations which may be used to complete the
228
234
  * request. Note: These extra computations may return extra fields on the
@@ -231,19 +237,20 @@ export declare class RoutesClient {
231
237
  * @param {google.maps.routing.v2.TrafficModel} [request.trafficModel]
232
238
  * Optional. Specifies the assumptions to use when calculating time in
233
239
  * traffic. This setting affects the value returned in the duration field in
234
- * the {@link protos.google.maps.routing.v2.Route|Route} and
235
- * {@link protos.google.maps.routing.v2.RouteLeg|RouteLeg} which contains the predicted
240
+ * the
241
+ * {@link protos.google.maps.routing.v2.Route|`Route`} and
242
+ * {@link protos.google.maps.routing.v2.RouteLeg|`RouteLeg`} which contains the predicted
236
243
  * time in traffic based on historical averages.
237
244
  * `TrafficModel` is only available for requests that have set
238
- * {@link protos.google.maps.routing.v2.RoutingPreference|RoutingPreference} to
245
+ * {@link protos.google.maps.routing.v2.RoutingPreference|`RoutingPreference`} to
239
246
  * `TRAFFIC_AWARE_OPTIMAL` and
240
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} to `DRIVE`.
247
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} to `DRIVE`.
241
248
  * Defaults to `BEST_GUESS` if traffic is requested and `TrafficModel` is not
242
249
  * specified.
243
250
  * @param {google.maps.routing.v2.TransitPreferences} [request.transitPreferences]
244
251
  * Optional. Specifies preferences that influence the route returned for
245
252
  * `TRANSIT` routes. NOTE: You can only specify a `transit_preferences` when
246
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
253
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
247
254
  * `TRANSIT`.
248
255
  * @param {object} [options]
249
256
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
@@ -269,9 +276,9 @@ export declare class RoutesClient {
269
276
  * the input. You can provide the response field mask by using the URL
270
277
  * parameter `$fields` or `fields`, or by using the HTTP/gRPC header
271
278
  * `X-Goog-FieldMask` (see the [available URL parameters and
272
- * headers](https://cloud.google.com/apis/docs/system-parameters). The value
273
- * is a comma separated list of field paths. See this detailed documentation
274
- * about [how to construct the field
279
+ * headers](https://cloud.google.com/apis/docs/system-parameters)).
280
+ * The value is a comma separated list of field paths. See this detailed
281
+ * documentation about [how to construct the field
275
282
  * paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
276
283
  *
277
284
  * For example, in this method:
@@ -305,12 +312,14 @@ export declare class RoutesClient {
305
312
  * matrix. Several size restrictions apply to the cardinality of origins and
306
313
  * destinations:
307
314
  *
308
- * * The number of elements (origins × destinations) must be no greater than
309
- * 625 in any case.
310
- * * The number of elements (origins × destinations) must be no greater than
311
- * 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
312
- * * The number of waypoints (origins + destinations) specified as `place_id`
313
- * must be no greater than 50.
315
+ * * The sum of the number of origins + the number of destinations specified
316
+ * as either `place_id` or `address` must be no greater than 50.
317
+ * * The product of number of origins × number of destinations must be no
318
+ * greater than 625 in any case.
319
+ * * The product of the number of origins × number of destinations must be no
320
+ * greater than 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
321
+ * * The product of the number of origins × number of destinations must be no
322
+ * greater than 100 if travel_mode is set to `TRANSIT`.
314
323
  * @param {number[]} request.destinations
315
324
  * Required. Array of destinations, which determines the columns of the
316
325
  * response matrix.
@@ -326,25 +335,28 @@ export declare class RoutesClient {
326
335
  * Optional. The departure time. If you don't set this value, then this value
327
336
  * defaults to the time that you made the request.
328
337
  * NOTE: You can only specify a `departure_time` in the past when
329
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
338
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
330
339
  * `TRANSIT`.
331
340
  * @param {google.protobuf.Timestamp} [request.arrivalTime]
332
341
  * Optional. The arrival time.
333
342
  * NOTE: Can only be set when
334
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
335
- * `TRANSIT`. You can specify either departure_time or arrival_time, but not
336
- * both.
343
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
344
+ * `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
345
+ * not both.
337
346
  * @param {string} [request.languageCode]
338
347
  * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
339
- * information, see
340
- * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
341
- * [Language Support](https://developers.google.com/maps/faq#languagesupport)
348
+ * information, see [Unicode Locale
349
+ * Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier).
350
+ * See [Language
351
+ * Support](https://developers.google.com/maps/faq#languagesupport)
342
352
  * for the list of supported languages. When you don't provide this value, the
343
353
  * display language is inferred from the location of the first origin.
344
354
  * @param {string} [request.regionCode]
345
355
  * Optional. The region code, specified as a ccTLD ("top-level domain")
346
- * two-character value. For more information see
347
- * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
356
+ * two-character value. For more information see [Country code top-level
357
+ * domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
358
+ * @param {google.maps.routing.v2.Units} [request.units]
359
+ * Optional. Specifies the units of measure for the display fields.
348
360
  * @param {number[]} [request.extraComputations]
349
361
  * Optional. A list of extra computations which may be used to complete the
350
362
  * request. Note: These extra computations may return extra fields on the
@@ -148,8 +148,7 @@ class RoutesClient {
148
148
  // Some of the methods on this service provide streaming responses.
149
149
  // Provide descriptors for these.
150
150
  this.descriptors.stream = {
151
- computeRouteMatrix: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback,
152
- /* gaxStreamingRetries: */ false),
151
+ computeRouteMatrix: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
153
152
  };
154
153
  // Put together the default options sent with requests.
155
154
  this._defaults = this._gaxGrpc.constructSettings('google.maps.routing.v2.Routes', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -292,9 +291,9 @@ class RoutesClient {
292
291
  * the input. You can provide the response field mask by using the URL
293
292
  * parameter `$fields` or `fields`, or by using the HTTP/gRPC header
294
293
  * `X-Goog-FieldMask` (see the [available URL parameters and
295
- * headers](https://cloud.google.com/apis/docs/system-parameters). The value
296
- * is a comma separated list of field paths. See this detailed documentation
297
- * about [how to construct the field
294
+ * headers](https://cloud.google.com/apis/docs/system-parameters)).
295
+ * The value is a comma separated list of field paths. See this detailed
296
+ * documentation about [how to construct the field
298
297
  * paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
299
298
  *
300
299
  * For example, in this method:
@@ -328,12 +327,14 @@ class RoutesClient {
328
327
  * matrix. Several size restrictions apply to the cardinality of origins and
329
328
  * destinations:
330
329
  *
331
- * * The number of elements (origins × destinations) must be no greater than
332
- * 625 in any case.
333
- * * The number of elements (origins × destinations) must be no greater than
334
- * 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
335
- * * The number of waypoints (origins + destinations) specified as `place_id`
336
- * must be no greater than 50.
330
+ * * The sum of the number of origins + the number of destinations specified
331
+ * as either `place_id` or `address` must be no greater than 50.
332
+ * * The product of number of origins × number of destinations must be no
333
+ * greater than 625 in any case.
334
+ * * The product of the number of origins × number of destinations must be no
335
+ * greater than 100 if routing_preference is set to `TRAFFIC_AWARE_OPTIMAL`.
336
+ * * The product of the number of origins × number of destinations must be no
337
+ * greater than 100 if travel_mode is set to `TRANSIT`.
337
338
  * @param {number[]} request.destinations
338
339
  * Required. Array of destinations, which determines the columns of the
339
340
  * response matrix.
@@ -349,25 +350,28 @@ class RoutesClient {
349
350
  * Optional. The departure time. If you don't set this value, then this value
350
351
  * defaults to the time that you made the request.
351
352
  * NOTE: You can only specify a `departure_time` in the past when
352
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
353
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
353
354
  * `TRANSIT`.
354
355
  * @param {google.protobuf.Timestamp} [request.arrivalTime]
355
356
  * Optional. The arrival time.
356
357
  * NOTE: Can only be set when
357
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
358
- * `TRANSIT`. You can specify either departure_time or arrival_time, but not
359
- * both.
358
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|`RouteTravelMode`} is set to
359
+ * `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
360
+ * not both.
360
361
  * @param {string} [request.languageCode]
361
362
  * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
362
- * information, see
363
- * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
364
- * [Language Support](https://developers.google.com/maps/faq#languagesupport)
363
+ * information, see [Unicode Locale
364
+ * Identifier](http://www.unicode.org/reports/tr35/#Unicode_locale_identifier).
365
+ * See [Language
366
+ * Support](https://developers.google.com/maps/faq#languagesupport)
365
367
  * for the list of supported languages. When you don't provide this value, the
366
368
  * display language is inferred from the location of the first origin.
367
369
  * @param {string} [request.regionCode]
368
370
  * Optional. The region code, specified as a ccTLD ("top-level domain")
369
- * two-character value. For more information see
370
- * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
371
+ * two-character value. For more information see [Country code top-level
372
+ * domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains).
373
+ * @param {google.maps.routing.v2.Units} [request.units]
374
+ * Optional. Specifies the units of measure for the display fields.
371
375
  * @param {number[]} [request.extraComputations]
372
376
  * Optional. A list of extra computations which may be used to complete the
373
377
  * request. Note: These extra computations may return extra fields on the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googlemaps/routing",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": " client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,7 +62,7 @@
62
62
  "long": "^5.2.3",
63
63
  "mocha": "^9.2.2",
64
64
  "pack-n-play": "^2.0.0",
65
- "sinon": "^17.0.0",
65
+ "sinon": "^18.0.0",
66
66
  "typescript": "^5.1.6"
67
67
  },
68
68
  "engines": {