@googlemaps/routing 1.3.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 (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/build/protos/google/maps/routing/v2/fallback_info.proto +0 -1
  4. package/build/protos/google/maps/routing/v2/geocoding_results.proto +0 -1
  5. package/build/protos/google/maps/routing/v2/localized_time.proto +0 -1
  6. package/build/protos/google/maps/routing/v2/location.proto +0 -1
  7. package/build/protos/google/maps/routing/v2/maneuver.proto +0 -1
  8. package/build/protos/google/maps/routing/v2/navigation_instruction.proto +0 -1
  9. package/build/protos/google/maps/routing/v2/polyline.proto +0 -1
  10. package/build/protos/google/maps/routing/v2/polyline_details.proto +84 -0
  11. package/build/protos/google/maps/routing/v2/route.proto +20 -13
  12. package/build/protos/google/maps/routing/v2/route_label.proto +3 -1
  13. package/build/protos/google/maps/routing/v2/route_modifiers.proto +0 -1
  14. package/build/protos/google/maps/routing/v2/route_travel_mode.proto +0 -1
  15. package/build/protos/google/maps/routing/v2/routes_service.proto +35 -4
  16. package/build/protos/google/maps/routing/v2/routing_preference.proto +0 -1
  17. package/build/protos/google/maps/routing/v2/speed_reading_interval.proto +0 -1
  18. package/build/protos/google/maps/routing/v2/toll_passes.proto +0 -1
  19. package/build/protos/google/maps/routing/v2/traffic_model.proto +0 -1
  20. package/build/protos/google/maps/routing/v2/transit.proto +0 -1
  21. package/build/protos/google/maps/routing/v2/transit_preferences.proto +0 -1
  22. package/build/protos/google/maps/routing/v2/units.proto +0 -1
  23. package/build/protos/google/maps/routing/v2/vehicle_emission_type.proto +0 -1
  24. package/build/protos/google/maps/routing/v2/waypoint.proto +0 -1
  25. package/build/protos/protos.d.ts +690 -252
  26. package/build/protos/protos.js +1622 -510
  27. package/build/protos/protos.json +144 -50
  28. package/build/src/v2/routes_client.d.ts +4 -1
  29. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.0](https://github.com/googleapis/google-cloud-node/compare/routing-v1.3.0...routing-v1.4.0) (2024-12-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * [routing] add API for experimental flyover and narrow road polyline details ([#5865](https://github.com/googleapis/google-cloud-node/issues/5865)) ([24d7341](https://github.com/googleapis/google-cloud-node/commit/24d7341b387fc8f6d286ff945bc9aed54ddcc7df))
9
+ * [routing] add API for shorter distance reference routes ([#5842](https://github.com/googleapis/google-cloud-node/issues/5842)) ([99b489f](https://github.com/googleapis/google-cloud-node/commit/99b489f1170ceb45d3ce6cb8d56c8c7aa671ad03))
10
+
3
11
  ## [1.3.0](https://github.com/googleapis/google-cloud-node/compare/routing-v1.2.0...routing-v1.3.0) (2024-05-21)
4
12
 
5
13
 
package/README.md CHANGED
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the Google Maps Routing API][enable_api].
47
- 1. [Set up authentication with a service account][auth] so you can access the
47
+ 1. [Set up authentication][auth] so you can access the
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -233,4 +233,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
233
233
  [projects]: https://console.cloud.google.com/project
234
234
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
235
235
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=routes.googleapis.com
236
- [auth]: https://cloud.google.com/docs/authentication/getting-started
236
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/rpc/status.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;
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/type/localized_text.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;
@@ -19,7 +19,6 @@ package google.maps.routing.v2;
19
19
  import "google/protobuf/wrappers.proto";
20
20
  import "google/type/latlng.proto";
21
21
 
22
- option cc_enable_arenas = true;
23
22
  option csharp_namespace = "Google.Maps.Routing.V2";
24
23
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
25
24
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/maps/routing/v2/maneuver.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;
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/protobuf/struct.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;
@@ -0,0 +1,84 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/api/field_behavior.proto";
20
+
21
+ option csharp_namespace = "Google.Maps.Routing.V2";
22
+ option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
23
+ option java_multiple_files = true;
24
+ option java_outer_classname = "PolylineDetailsProto";
25
+ option java_package = "com.google.maps.routing.v2";
26
+ option objc_class_prefix = "GMRV2";
27
+ option php_namespace = "Google\\Maps\\Routing\\V2";
28
+ option ruby_package = "Google::Maps::Routing::V2";
29
+
30
+ // Details corresponding to a given index or contiguous segment of a polyline.
31
+ // Given a polyline with points P_0, P_1, ... , P_N (zero-based index), the
32
+ // `PolylineDetails` defines an interval and associated metadata.
33
+ message PolylineDetails {
34
+ // Encapsulates the start and end indexes for a polyline detail.
35
+ // For instances where the data corresponds to a single point, `start_index`
36
+ // and `end_index` will be equal.
37
+ message PolylinePointIndex {
38
+ // The start index of this detail in the polyline.
39
+ optional int32 start_index = 1;
40
+
41
+ // The end index of this detail in the polyline.
42
+ optional int32 end_index = 2;
43
+ }
44
+
45
+ // Encapsulates the states of road features along a stretch of polyline.
46
+ enum RoadFeatureState {
47
+ // The road feature's state was not computed (default value).
48
+ ROAD_FEATURE_STATE_UNSPECIFIED = 0;
49
+
50
+ // The road feature exists.
51
+ EXISTS = 1;
52
+
53
+ // The road feature does not exist.
54
+ DOES_NOT_EXIST = 2;
55
+ }
56
+
57
+ // Encapsulates information about flyovers along the polyline.
58
+ message FlyoverInfo {
59
+ // Output only. Denotes whether a flyover exists for a given stretch of the
60
+ // polyline.
61
+ RoadFeatureState flyover_presence = 1
62
+ [(google.api.field_behavior) = OUTPUT_ONLY];
63
+
64
+ // The location of flyover related information along the polyline.
65
+ PolylinePointIndex polyline_point_index = 2;
66
+ }
67
+
68
+ // Encapsulates information about narrow roads along the polyline.
69
+ message NarrowRoadInfo {
70
+ // Output only. Denotes whether a narrow road exists for a given stretch of
71
+ // the polyline.
72
+ RoadFeatureState narrow_road_presence = 1
73
+ [(google.api.field_behavior) = OUTPUT_ONLY];
74
+
75
+ // The location of narrow road related information along the polyline.
76
+ PolylinePointIndex polyline_point_index = 2;
77
+ }
78
+
79
+ // Flyover details along the polyline.
80
+ repeated FlyoverInfo flyover_info = 12;
81
+
82
+ // Narrow road details along the polyline.
83
+ repeated NarrowRoadInfo narrow_road_info = 13;
84
+ }
@@ -21,6 +21,7 @@ import "google/maps/routing/v2/localized_time.proto";
21
21
  import "google/maps/routing/v2/location.proto";
22
22
  import "google/maps/routing/v2/navigation_instruction.proto";
23
23
  import "google/maps/routing/v2/polyline.proto";
24
+ import "google/maps/routing/v2/polyline_details.proto";
24
25
  import "google/maps/routing/v2/route_label.proto";
25
26
  import "google/maps/routing/v2/route_travel_mode.proto";
26
27
  import "google/maps/routing/v2/speed_reading_interval.proto";
@@ -31,7 +32,6 @@ import "google/protobuf/timestamp.proto";
31
32
  import "google/type/localized_text.proto";
32
33
  import "google/type/money.proto";
33
34
 
34
- option cc_enable_arenas = true;
35
35
  option csharp_namespace = "Google.Maps.Routing.V2";
36
36
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
37
37
  option java_multiple_files = true;
@@ -49,9 +49,10 @@ message Route {
49
49
  // Travel distance represented in text form.
50
50
  google.type.LocalizedText distance = 1;
51
51
 
52
- // Duration taking traffic conditions into consideration, represented in
53
- // text form. Note: If you did not request traffic information, this value
54
- // will be the same value as `static_duration`.
52
+ // Duration, represented in text form and localized to the region of the
53
+ // query. Takes traffic conditions into consideration. Note: If you did not
54
+ // request traffic information, this value is the same value as
55
+ // `static_duration`.
55
56
  google.type.LocalizedText duration = 2;
56
57
 
57
58
  // Duration without taking traffic conditions into consideration,
@@ -119,16 +120,21 @@ message Route {
119
120
  // Text representations of properties of the `Route`.
120
121
  RouteLocalizedValues localized_values = 11;
121
122
 
122
- // A web-safe, base64-encoded route token that can be passed to the Navigation
123
- // SDK, that allows the Navigation SDK to reconstruct the route during
124
- // navigation, and, in the event of rerouting, honor the original intention
125
- // when you created the route by calling ComputeRoutes. Customers should treat
126
- // this token as an opaque blob. It is not meant for reading or mutating.
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,
126
+ // honor the original intention when the route was created. Treat this token
127
+ // as an opaque blob. Don't compare its value across requests as its value
128
+ // may change even if the service returns the exact same route.
129
+ //
127
130
  // NOTE: `Route.route_token` is only available for requests that have set
128
131
  // `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or
129
132
  // `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
130
133
  // that have Via waypoints.
131
134
  string route_token = 12;
135
+
136
+ // Contains information about details along the polyline.
137
+ PolylineDetails polyline_details = 14;
132
138
  }
133
139
 
134
140
  // Contains the additional information that the user should be informed
@@ -204,9 +210,10 @@ message RouteLeg {
204
210
  // Travel distance represented in text form.
205
211
  google.type.LocalizedText distance = 1;
206
212
 
207
- // Duration taking traffic conditions into consideration represented in text
208
- // form. Note: If you did not request traffic information, this value will
209
- // be the same value as static_duration.
213
+ // Duration, represented in text form and localized to the region of the
214
+ // query. Takes traffic conditions into consideration. Note: If you did not
215
+ // request traffic information, this value is the same value as
216
+ // static_duration.
210
217
  google.type.LocalizedText duration = 2;
211
218
 
212
219
  // Duration without taking traffic conditions into
@@ -384,7 +391,7 @@ message RouteLegStepTransitDetails {
384
391
  // The number of stops from the departure to the arrival stop. This count
385
392
  // includes the arrival stop, but excludes the departure stop. For example, if
386
393
  // your route leaves from Stop A, passes through stops B and C, and arrives at
387
- // stop D, stop_count will return 3.
394
+ // stop D, <code>stop_count</code> returns 3.
388
395
  int32 stop_count = 6;
389
396
 
390
397
  // The text that appears in schedules and sign boards to identify a transit
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -44,4 +43,7 @@ enum RouteLabel {
44
43
  // Fuel efficient route. Routes labeled with this value are determined to be
45
44
  // optimized for Eco parameters such as fuel consumption.
46
45
  FUEL_EFFICIENT = 3;
46
+
47
+ // Shorter travel distance route. This is an experimental feature.
48
+ SHORTER_DISTANCE = 4;
47
49
  }
@@ -19,7 +19,6 @@ package google.maps.routing.v2;
19
19
  import "google/maps/routing/v2/toll_passes.proto";
20
20
  import "google/maps/routing/v2/vehicle_info.proto";
21
21
 
22
- option cc_enable_arenas = true;
23
22
  option csharp_namespace = "Google.Maps.Routing.V2";
24
23
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
25
24
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -35,7 +35,6 @@ import "google/protobuf/timestamp.proto";
35
35
  import "google/rpc/status.proto";
36
36
  import "google/type/localized_text.proto";
37
37
 
38
- option cc_enable_arenas = true;
39
38
  option csharp_namespace = "Google.Maps.Routing.V2";
40
39
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
41
40
  option java_multiple_files = true;
@@ -142,9 +141,24 @@ message ComputeRoutesRequest {
142
141
  // Not used. Requests containing this value fail.
143
142
  REFERENCE_ROUTE_UNSPECIFIED = 0;
144
143
 
145
- // Fuel efficient route. Routes labeled with this value are determined to be
146
- // optimized for parameters such as fuel consumption.
144
+ // Fuel efficient route.
147
145
  FUEL_EFFICIENT = 1;
146
+
147
+ // Route with shorter travel distance. This is an experimental feature.
148
+ //
149
+ // For `DRIVE` requests, this feature prioritizes shorter distance over
150
+ // driving comfort. For example, it may prefer local roads instead of
151
+ // highways, take dirt roads, cut through parking lots, etc. This feature
152
+ // does not return any maneuvers that Google Maps knows to be illegal.
153
+ //
154
+ // For `BICYCLE` and `TWO_WHEELER` requests, this feature returns routes
155
+ // similar to those returned when you don't specify
156
+ // `requested_reference_routes`.
157
+ //
158
+ // This feature is not compatible with any other travel modes, via
159
+ // intermediate waypoints, or `optimize_waypoint_order`; such requests will
160
+ // fail. However, you can use it with any `routing_preference`.
161
+ SHORTER_DISTANCE = 2;
148
162
  }
149
163
 
150
164
  // Extra computations to perform while completing the request.
@@ -166,6 +180,20 @@ message ComputeRoutesRequest {
166
180
  // is meant to be read as-is. This content is for display only.
167
181
  // Do not programmatically parse it.
168
182
  HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4;
183
+
184
+ // Flyover information for the route(s). The
185
+ // `routes.polyline_details.flyover_info` fieldmask must be specified to
186
+ // return this information. This data will only currently be populated for
187
+ // certain metros in India. This feature is experimental, and the
188
+ // SKU/charge is subject to change.
189
+ FLYOVER_INFO_ON_POLYLINE = 7;
190
+
191
+ // Narrow road information for the route(s). The
192
+ // `routes.polyline_details.narrow_road_info` fieldmask must be specified
193
+ // to return this information. This data will only currently be populated
194
+ // for certain metros in India. This feature is experimental, and the
195
+ // SKU/charge is subject to change.
196
+ NARROW_ROAD_INFO_ON_POLYLINE = 8;
169
197
  }
170
198
 
171
199
  // Required. Origin waypoint.
@@ -262,7 +290,10 @@ message ComputeRoutesRequest {
262
290
  // request in addition to the default route. A reference route is a route with
263
291
  // a different route calculation objective than the default route. For example
264
292
  // a `FUEL_EFFICIENT` reference route calculation takes into account various
265
- // parameters that would generate an optimal fuel efficient route.
293
+ // parameters that would generate an optimal fuel efficient route. When using
294
+ // this feature, look for
295
+ // [`route_labels`][google.maps.routing.v2.Route.route_labels] on the
296
+ // resulting routes.
266
297
  repeated ReferenceRoute requested_reference_routes = 14
267
298
  [(google.api.field_behavior) = OPTIONAL];
268
299
 
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -19,7 +19,6 @@ package google.maps.routing.v2;
19
19
  import "google/maps/routing/v2/location.proto";
20
20
  import "google/type/localized_text.proto";
21
21
 
22
- option cc_enable_arenas = true;
23
22
  option csharp_namespace = "Google.Maps.Routing.V2";
24
23
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
25
24
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
- option cc_enable_arenas = true;
20
19
  option csharp_namespace = "Google.Maps.Routing.V2";
21
20
  option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
22
21
  option java_multiple_files = true;
@@ -18,7 +18,6 @@ package google.maps.routing.v2;
18
18
 
19
19
  import "google/maps/routing/v2/location.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;