@googlemaps/routing 2.1.1 → 2.2.1

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/build/protos/google/maps/routing/v2/fallback_info.proto +1 -1
  2. package/build/protos/google/maps/routing/v2/geocoding_results.proto +1 -1
  3. package/build/protos/google/maps/routing/v2/localized_time.proto +1 -1
  4. package/build/protos/google/maps/routing/v2/location.proto +1 -1
  5. package/build/protos/google/maps/routing/v2/maneuver.proto +1 -1
  6. package/build/protos/google/maps/routing/v2/navigation_instruction.proto +1 -1
  7. package/build/protos/google/maps/routing/v2/polyline.proto +1 -1
  8. package/build/protos/google/maps/routing/v2/polyline_details.proto +1 -1
  9. package/build/protos/google/maps/routing/v2/route.proto +30 -16
  10. package/build/protos/google/maps/routing/v2/route_label.proto +1 -1
  11. package/build/protos/google/maps/routing/v2/route_modifiers.proto +1 -1
  12. package/build/protos/google/maps/routing/v2/route_travel_mode.proto +1 -1
  13. package/build/protos/google/maps/routing/v2/routes_service.proto +4 -3
  14. package/build/protos/google/maps/routing/v2/routing_preference.proto +1 -1
  15. package/build/protos/google/maps/routing/v2/speed_reading_interval.proto +5 -4
  16. package/build/protos/google/maps/routing/v2/toll_info.proto +1 -2
  17. package/build/protos/google/maps/routing/v2/toll_passes.proto +1 -1
  18. package/build/protos/google/maps/routing/v2/traffic_model.proto +9 -5
  19. package/build/protos/google/maps/routing/v2/transit.proto +1 -1
  20. package/build/protos/google/maps/routing/v2/transit_preferences.proto +1 -1
  21. package/build/protos/google/maps/routing/v2/units.proto +1 -1
  22. package/build/protos/google/maps/routing/v2/vehicle_emission_type.proto +1 -1
  23. package/build/protos/google/maps/routing/v2/vehicle_info.proto +1 -2
  24. package/build/protos/google/maps/routing/v2/waypoint.proto +6 -1
  25. package/build/protos/protos.d.ts +8 -2
  26. package/build/protos/protos.js +32 -3
  27. package/build/protos/protos.json +7 -3
  28. package/build/src/index.js +1 -1
  29. package/build/src/v2/index.js +1 -1
  30. package/build/src/v2/routes_client.d.ts +3 -2
  31. package/build/src/v2/routes_client.js +2 -1
  32. package/package.json +10 -2
  33. package/LICENSE +0 -202
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -121,8 +121,8 @@ message Route {
121
121
  RouteLocalizedValues localized_values = 11;
122
122
 
123
123
  // An opaque token that can be passed to [Navigation
124
- // SDK](https://developers.google.com/maps/documentation/navigation) to
125
- // reconstruct the route during navigation, and, in the event of rerouting,
124
+ // SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
125
+ // to reconstruct the route during navigation, and, in the event of rerouting,
126
126
  // honor the original intention when the route was created. Treat this token
127
127
  // as an opaque blob. Don't compare its value across requests as its value
128
128
  // may change even if the service returns the exact same route.
@@ -141,16 +141,21 @@ message Route {
141
141
  // about, such as possible traffic zone restrictions.
142
142
  message RouteTravelAdvisory {
143
143
  // Contains information about tolls on the route. This field is only populated
144
- // if tolls are expected on the route. If this field is set, but the
145
- // `estimatedPrice` subfield is not populated, then the route contains tolls,
146
- // but the estimated price is unknown. If this field is not set, then there
147
- // are no tolls expected on the route.
144
+ // if tolls are expected on the route and `TOLLS` is included in the request's
145
+ // [ComputeRoutesRequest.extra_computations][google.maps.routing.v2.ComputeRoutesRequest.extra_computations].
146
+ // If this field is set, but the `estimatedPrice` subfield is not populated,
147
+ // then the route contains tolls, but the estimated price is unknown. If
148
+ // `toll_info` is not set, then there are no tolls expected on the route.
148
149
  TollInfo toll_info = 2;
149
150
 
150
- // Speed reading intervals detailing traffic density. Applicable in case of
151
- // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
152
- // The intervals cover the entire polyline of the route without overlap.
153
- // The start point of a specified interval is the same as the end point of the
151
+ // Speed reading intervals indicating traffic density. This field is only
152
+ // populated for requests when the request has a `TRAFFIC_AWARE` or
153
+ // `TRAFFIC_AWARE_OPTIMAL`
154
+ // [ComputeRoutesRequest.routing_preference][google.maps.routing.v2.ComputeRoutesRequest.routing_preference]
155
+ // value, and `TRAFFIC_ON_POLYLINE` is included in the
156
+ // [ComputeRoutesRequest.extra_computations][google.maps.routing.v2.ComputeRoutesRequest.extra_computations].
157
+ // The intervals cover the entire polyline of the route without overlap. The
158
+ // start point of a specified interval is the same as the end point of the
154
159
  // preceding interval.
155
160
  //
156
161
  // Example:
@@ -160,6 +165,9 @@ message RouteTravelAdvisory {
160
165
  repeated SpeedReadingInterval speed_reading_intervals = 3;
161
166
 
162
167
  // The predicted fuel consumption in microliters.
168
+ // This field is only populated when `FUEL_CONSUMPTION` is included in the
169
+ // request's
170
+ // [ComputeRoutesRequest.extra_computations][google.maps.routing.v2.ComputeRoutesRequest.extra_computations].
163
171
  int64 fuel_consumption_microliters = 5;
164
172
 
165
173
  // Returned route may have restrictions that are not suitable for requested
@@ -177,14 +185,20 @@ message RouteTravelAdvisory {
177
185
  message RouteLegTravelAdvisory {
178
186
  // Contains information about tolls on the specific `RouteLeg`.
179
187
  // This field is only populated if we expect there are tolls on the
180
- // `RouteLeg`. If this field is set but the estimated_price subfield is not
188
+ // `RouteLeg` and `TOLLS` is included in the request's
189
+ // [ComputeRoutesRequest.extra_computations][google.maps.routing.v2.ComputeRoutesRequest.extra_computations].
190
+ // If this field is set but the estimated_price subfield is not
181
191
  // populated, we expect that road contains tolls but we do not know an
182
- // estimated price. If this field does not exist, then there is no toll on the
183
- // `RouteLeg`.
192
+ // estimated price. If `toll_info` does not exist, then there is no toll on
193
+ // the `RouteLeg`.
184
194
  TollInfo toll_info = 1;
185
195
 
186
- // Speed reading intervals detailing traffic density. Applicable in case of
187
- // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
196
+ // Speed reading intervals indicating traffic density. This field is only
197
+ // populated for requests when the request has a `TRAFFIC_AWARE` or
198
+ // `TRAFFIC_AWARE_OPTIMAL`
199
+ // [ComputeRoutesRequest.routing_preference][google.maps.routing.v2.ComputeRoutesRequest.routing_preference]
200
+ // value, and `TRAFFIC_ON_POLYLINE` is included in the
201
+ // [ComputeRoutesRequest.extra_computations][google.maps.routing.v2.ComputeRoutesRequest.extra_computations].
188
202
  // The intervals cover the entire polyline of the `RouteLeg` without overlap.
189
203
  // The start point of a specified interval is the same as the end point of the
190
204
  // preceding interval.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -235,8 +235,8 @@ message ComputeRoutesRequest {
235
235
  [(google.api.field_behavior) = OPTIONAL];
236
236
 
237
237
  // Optional. The arrival time.
238
- // NOTE: Can only be set when
239
- // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to
238
+ // NOTE: This field is ignored when requests specify a
239
+ // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] other than
240
240
  // `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
241
241
  // not both. Transit trips are available for up to 7 days in the past or 100
242
242
  // days in the future.
@@ -431,6 +431,7 @@ message ComputeRouteMatrixRequest {
431
431
  // traffic. This setting affects the value returned in the duration field in
432
432
  // the [RouteMatrixElement][google.maps.routing.v2.RouteMatrixElement] which
433
433
  // contains the predicted time in traffic based on historical averages.
434
+ // `TrafficModel` is only available for requests that have set
434
435
  // [RoutingPreference][google.maps.routing.v2.RoutingPreference] to
435
436
  // `TRAFFIC_AWARE_OPTIMAL` and
436
437
  // [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] to `DRIVE`.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -35,13 +35,13 @@ message SpeedReadingInterval {
35
35
  // Default value. This value is unused.
36
36
  SPEED_UNSPECIFIED = 0;
37
37
 
38
- // Normal speed, no slowdown is detected.
38
+ // Normal speed, no traffic delays.
39
39
  NORMAL = 1;
40
40
 
41
- // Slowdown detected, but no traffic jam formed.
41
+ // Slowdown detected, medium amount of traffic.
42
42
  SLOW = 2;
43
43
 
44
- // Traffic jam detected.
44
+ // Traffic delays.
45
45
  TRAFFIC_JAM = 3;
46
46
  }
47
47
 
@@ -51,6 +51,7 @@ message SpeedReadingInterval {
51
51
  // The ending index of this interval in the polyline.
52
52
  optional int32 end_polyline_point_index = 2;
53
53
 
54
+ // The type of speed in this interval.
54
55
  oneof speed_type {
55
56
  // Traffic speed in this interval.
56
57
  Speed speed = 3;
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/type/money.proto";
20
20
 
21
- option cc_enable_arenas = true;
22
21
  option csharp_namespace = "Google.Maps.Routing.V2";
23
22
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
24
23
  option java_multiple_files = true;
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -25,10 +25,14 @@ option objc_class_prefix = "GMRV2";
25
25
  option php_namespace = "Google\\Maps\\Routing\\V2";
26
26
  option ruby_package = "Google::Maps::Routing::V2";
27
27
 
28
- // Specifies the assumptions to use when calculating time in traffic. This
29
- // setting affects the value returned in the `duration` field in the
30
- // response, which contains the predicted time in traffic based on historical
31
- // averages.
28
+ // This field specifies one of the following assumptions to use when calculating
29
+ // travel time in traffic conditions, shown in the enums below. Depending on the
30
+ // enum chosen, the `duration` field of the TrafficModel response will vary. The
31
+ // value contains the predicted time to destination in traffic, based on
32
+ // historical averages. `TrafficModel` is only available for requests that have
33
+ // set [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] to
34
+ // `TRAFFIC_AWARE_OPTIMAL` and
35
+ // [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode] to `DRIVE`.
32
36
  enum TrafficModel {
33
37
  // Unused. If specified, will default to `BEST_GUESS`.
34
38
  TRAFFIC_MODEL_UNSPECIFIED = 0;
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/maps/routing/v2/vehicle_emission_type.proto";
20
20
 
21
- option cc_enable_arenas = true;
22
21
  option csharp_namespace = "Google.Maps.Routing.V2";
23
22
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
24
23
  option java_multiple_files = true;
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -42,6 +42,11 @@ message Waypoint {
42
42
  // Human readable address or a plus code.
43
43
  // See https://plus.codes for details.
44
44
  string address = 7;
45
+
46
+ // A token that identifies a
47
+ // [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint),
48
+ // obtained from the `SearchDestinations` method of the Geocoding API.
49
+ string navigation_point_token = 8;
45
50
  }
46
51
 
47
52
  // Marks this waypoint as a milestone rather a stopping point. For
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -11267,6 +11267,9 @@ export namespace google {
11267
11267
  /** Waypoint address */
11268
11268
  address?: (string|null);
11269
11269
 
11270
+ /** Waypoint navigationPointToken */
11271
+ navigationPointToken?: (string|null);
11272
+
11270
11273
  /** Waypoint via */
11271
11274
  via?: (boolean|null);
11272
11275
 
@@ -11295,6 +11298,9 @@ export namespace google {
11295
11298
  /** Waypoint address. */
11296
11299
  public address?: (string|null);
11297
11300
 
11301
+ /** Waypoint navigationPointToken. */
11302
+ public navigationPointToken?: (string|null);
11303
+
11298
11304
  /** Waypoint via. */
11299
11305
  public via: boolean;
11300
11306
 
@@ -11305,7 +11311,7 @@ export namespace google {
11305
11311
  public sideOfRoad: boolean;
11306
11312
 
11307
11313
  /** Waypoint locationType. */
11308
- public locationType?: ("location"|"placeId"|"address");
11314
+ public locationType?: ("location"|"placeId"|"address"|"navigationPointToken");
11309
11315
 
11310
11316
  /**
11311
11317
  * Creates a new Waypoint instance using the specified properties.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -31376,6 +31376,7 @@
31376
31376
  * @property {google.maps.routing.v2.ILocation|null} [location] Waypoint location
31377
31377
  * @property {string|null} [placeId] Waypoint placeId
31378
31378
  * @property {string|null} [address] Waypoint address
31379
+ * @property {string|null} [navigationPointToken] Waypoint navigationPointToken
31379
31380
  * @property {boolean|null} [via] Waypoint via
31380
31381
  * @property {boolean|null} [vehicleStopover] Waypoint vehicleStopover
31381
31382
  * @property {boolean|null} [sideOfRoad] Waypoint sideOfRoad
@@ -31420,6 +31421,14 @@
31420
31421
  */
31421
31422
  Waypoint.prototype.address = null;
31422
31423
 
31424
+ /**
31425
+ * Waypoint navigationPointToken.
31426
+ * @member {string|null|undefined} navigationPointToken
31427
+ * @memberof google.maps.routing.v2.Waypoint
31428
+ * @instance
31429
+ */
31430
+ Waypoint.prototype.navigationPointToken = null;
31431
+
31423
31432
  /**
31424
31433
  * Waypoint via.
31425
31434
  * @member {boolean} via
@@ -31449,12 +31458,12 @@
31449
31458
 
31450
31459
  /**
31451
31460
  * Waypoint locationType.
31452
- * @member {"location"|"placeId"|"address"|undefined} locationType
31461
+ * @member {"location"|"placeId"|"address"|"navigationPointToken"|undefined} locationType
31453
31462
  * @memberof google.maps.routing.v2.Waypoint
31454
31463
  * @instance
31455
31464
  */
31456
31465
  Object.defineProperty(Waypoint.prototype, "locationType", {
31457
- get: $util.oneOfGetter($oneOfFields = ["location", "placeId", "address"]),
31466
+ get: $util.oneOfGetter($oneOfFields = ["location", "placeId", "address", "navigationPointToken"]),
31458
31467
  set: $util.oneOfSetter($oneOfFields)
31459
31468
  });
31460
31469
 
@@ -31494,6 +31503,8 @@
31494
31503
  writer.uint32(/* id 5, wireType 0 =*/40).bool(message.sideOfRoad);
31495
31504
  if (message.address != null && Object.hasOwnProperty.call(message, "address"))
31496
31505
  writer.uint32(/* id 7, wireType 2 =*/58).string(message.address);
31506
+ if (message.navigationPointToken != null && Object.hasOwnProperty.call(message, "navigationPointToken"))
31507
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.navigationPointToken);
31497
31508
  return writer;
31498
31509
  };
31499
31510
 
@@ -31542,6 +31553,10 @@
31542
31553
  message.address = reader.string();
31543
31554
  break;
31544
31555
  }
31556
+ case 8: {
31557
+ message.navigationPointToken = reader.string();
31558
+ break;
31559
+ }
31545
31560
  case 3: {
31546
31561
  message.via = reader.bool();
31547
31562
  break;
@@ -31612,6 +31627,13 @@
31612
31627
  if (!$util.isString(message.address))
31613
31628
  return "address: string expected";
31614
31629
  }
31630
+ if (message.navigationPointToken != null && message.hasOwnProperty("navigationPointToken")) {
31631
+ if (properties.locationType === 1)
31632
+ return "locationType: multiple values";
31633
+ properties.locationType = 1;
31634
+ if (!$util.isString(message.navigationPointToken))
31635
+ return "navigationPointToken: string expected";
31636
+ }
31615
31637
  if (message.via != null && message.hasOwnProperty("via"))
31616
31638
  if (typeof message.via !== "boolean")
31617
31639
  return "via: boolean expected";
@@ -31645,6 +31667,8 @@
31645
31667
  message.placeId = String(object.placeId);
31646
31668
  if (object.address != null)
31647
31669
  message.address = String(object.address);
31670
+ if (object.navigationPointToken != null)
31671
+ message.navigationPointToken = String(object.navigationPointToken);
31648
31672
  if (object.via != null)
31649
31673
  message.via = Boolean(object.via);
31650
31674
  if (object.vehicleStopover != null)
@@ -31693,6 +31717,11 @@
31693
31717
  if (options.oneofs)
31694
31718
  object.locationType = "address";
31695
31719
  }
31720
+ if (message.navigationPointToken != null && message.hasOwnProperty("navigationPointToken")) {
31721
+ object.navigationPointToken = message.navigationPointToken;
31722
+ if (options.oneofs)
31723
+ object.locationType = "navigationPointToken";
31724
+ }
31696
31725
  return object;
31697
31726
  };
31698
31727
 
@@ -1578,8 +1578,7 @@
1578
1578
  "java_package": "com.google.maps.routing.v2",
1579
1579
  "objc_class_prefix": "GMRV2",
1580
1580
  "php_namespace": "Google\\Maps\\Routing\\V2",
1581
- "ruby_package": "Google::Maps::Routing::V2",
1582
- "cc_enable_arenas": true
1581
+ "ruby_package": "Google::Maps::Routing::V2"
1583
1582
  },
1584
1583
  "nested": {
1585
1584
  "FallbackInfo": {
@@ -3045,7 +3044,8 @@
3045
3044
  "oneof": [
3046
3045
  "location",
3047
3046
  "placeId",
3048
- "address"
3047
+ "address",
3048
+ "navigationPointToken"
3049
3049
  ]
3050
3050
  }
3051
3051
  },
@@ -3062,6 +3062,10 @@
3062
3062
  "type": "string",
3063
3063
  "id": 7
3064
3064
  },
3065
+ "navigationPointToken": {
3066
+ "type": "string",
3067
+ "id": 8
3068
+ },
3065
3069
  "via": {
3066
3070
  "type": "bool",
3067
3071
  "id": 3
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2025 Google LLC
2
+ // Copyright 2026 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2025 Google LLC
2
+ // Copyright 2026 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -179,8 +179,8 @@ export declare class RoutesClient {
179
179
  * days in the future.
180
180
  * @param {google.protobuf.Timestamp} [request.arrivalTime]
181
181
  * Optional. The arrival time.
182
- * NOTE: Can only be set when
183
- * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} is set to
182
+ * NOTE: This field is ignored when requests specify a
183
+ * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} other than
184
184
  * `TRANSIT`. You can specify either `departure_time` or `arrival_time`, but
185
185
  * not both. Transit trips are available for up to 7 days in the past or 100
186
186
  * days in the future.
@@ -368,6 +368,7 @@ export declare class RoutesClient {
368
368
  * traffic. This setting affects the value returned in the duration field in
369
369
  * the {@link protos.google.maps.routing.v2.RouteMatrixElement|RouteMatrixElement} which
370
370
  * contains the predicted time in traffic based on historical averages.
371
+ * `TrafficModel` is only available for requests that have set
371
372
  * {@link protos.google.maps.routing.v2.RoutingPreference|RoutingPreference} to
372
373
  * `TRAFFIC_AWARE_OPTIMAL` and
373
374
  * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} to `DRIVE`.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2025 Google LLC
2
+ // Copyright 2026 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -409,6 +409,7 @@ class RoutesClient {
409
409
  * traffic. This setting affects the value returned in the duration field in
410
410
  * the {@link protos.google.maps.routing.v2.RouteMatrixElement|RouteMatrixElement} which
411
411
  * contains the predicted time in traffic based on historical averages.
412
+ * `TrafficModel` is only available for requests that have set
412
413
  * {@link protos.google.maps.routing.v2.RoutingPreference|RoutingPreference} to
413
414
  * `TRAFFIC_AWARE_OPTIMAL` and
414
415
  * {@link protos.google.maps.routing.v2.RouteTravelMode|RouteTravelMode} to `DRIVE`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googlemaps/routing",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": " client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,10 +62,18 @@
62
62
  "long": "^5.3.1",
63
63
  "mocha": "^11.1.0",
64
64
  "pack-n-play": "^3.0.0",
65
- "sinon": "^21.0.0",
65
+ "sinon": "21.0.3",
66
66
  "typescript": "^5.8.2"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=18"
70
+ },
71
+ "overrides": {
72
+ "@sinonjs/fake-timers": "15.2.1"
73
+ },
74
+ "pnpm": {
75
+ "overrides": {
76
+ "@sinonjs/fake-timers": "15.2.1"
77
+ }
70
78
  }
71
79
  }
package/LICENSE DELETED
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.