@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
@@ -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": {
@@ -2607,7 +2698,8 @@
2607
2698
  "ReferenceRoute": {
2608
2699
  "values": {
2609
2700
  "REFERENCE_ROUTE_UNSPECIFIED": 0,
2610
- "FUEL_EFFICIENT": 1
2701
+ "FUEL_EFFICIENT": 1,
2702
+ "SHORTER_DISTANCE": 2
2611
2703
  }
2612
2704
  },
2613
2705
  "ExtraComputation": {
@@ -2616,7 +2708,9 @@
2616
2708
  "TOLLS": 1,
2617
2709
  "FUEL_CONSUMPTION": 2,
2618
2710
  "TRAFFIC_ON_POLYLINE": 3,
2619
- "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4
2711
+ "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4,
2712
+ "FLYOVER_INFO_ON_POLYLINE": 7,
2713
+ "NARROW_ROAD_INFO_ON_POLYLINE": 8
2620
2714
  }
2621
2715
  }
2622
2716
  }
@@ -2986,14 +3080,33 @@
2986
3080
  },
2987
3081
  "api": {
2988
3082
  "options": {
2989
- "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations",
3083
+ "go_package": "google.golang.org/genproto/googleapis/api;api",
2990
3084
  "java_multiple_files": true,
2991
- "java_outer_classname": "FieldBehaviorProto",
3085
+ "java_outer_classname": "LaunchStageProto",
2992
3086
  "java_package": "com.google.api",
2993
3087
  "objc_class_prefix": "GAPI",
2994
3088
  "cc_enable_arenas": true
2995
3089
  },
2996
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
+ },
2997
3110
  "http": {
2998
3111
  "type": "HttpRule",
2999
3112
  "id": 72295728,
@@ -3375,25 +3488,6 @@
3375
3488
  "GA": 4,
3376
3489
  "DEPRECATED": 5
3377
3490
  }
3378
- },
3379
- "fieldBehavior": {
3380
- "rule": "repeated",
3381
- "type": "google.api.FieldBehavior",
3382
- "id": 1052,
3383
- "extend": "google.protobuf.FieldOptions"
3384
- },
3385
- "FieldBehavior": {
3386
- "values": {
3387
- "FIELD_BEHAVIOR_UNSPECIFIED": 0,
3388
- "OPTIONAL": 1,
3389
- "REQUIRED": 2,
3390
- "OUTPUT_ONLY": 3,
3391
- "INPUT_ONLY": 4,
3392
- "IMMUTABLE": 5,
3393
- "UNORDERED_LIST": 6,
3394
- "NON_EMPTY_DEFAULT": 7,
3395
- "IDENTIFIER": 8
3396
- }
3397
3491
  }
3398
3492
  }
3399
3493
  }
@@ -225,7 +225,10 @@ export declare class RoutesClient {
225
225
  * request in addition to the default route. A reference route is a route with
226
226
  * a different route calculation objective than the default route. For example
227
227
  * a `FUEL_EFFICIENT` reference route calculation takes into account various
228
- * 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.
229
232
  * @param {number[]} [request.extraComputations]
230
233
  * Optional. A list of extra computations which may be used to complete the
231
234
  * 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.3.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": {