@googlemaps/routing 1.1.0 → 1.2.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.
@@ -193,6 +193,21 @@
193
193
  }
194
194
  }
195
195
  },
196
+ "Edition": {
197
+ "values": {
198
+ "EDITION_UNKNOWN": 0,
199
+ "EDITION_PROTO2": 998,
200
+ "EDITION_PROTO3": 999,
201
+ "EDITION_2023": 1000,
202
+ "EDITION_2024": 1001,
203
+ "EDITION_1_TEST_ONLY": 1,
204
+ "EDITION_2_TEST_ONLY": 2,
205
+ "EDITION_99997_TEST_ONLY": 99997,
206
+ "EDITION_99998_TEST_ONLY": 99998,
207
+ "EDITION_99999_TEST_ONLY": 99999,
208
+ "EDITION_MAX": 2147483647
209
+ }
210
+ },
196
211
  "FileDescriptorProto": {
197
212
  "fields": {
198
213
  "name": {
@@ -257,8 +272,8 @@
257
272
  "id": 12
258
273
  },
259
274
  "edition": {
260
- "type": "string",
261
- "id": 13
275
+ "type": "Edition",
276
+ "id": 14
262
277
  }
263
278
  }
264
279
  },
@@ -350,6 +365,26 @@
350
365
  "rule": "repeated",
351
366
  "type": "UninterpretedOption",
352
367
  "id": 999
368
+ },
369
+ "declaration": {
370
+ "rule": "repeated",
371
+ "type": "Declaration",
372
+ "id": 2,
373
+ "options": {
374
+ "retention": "RETENTION_SOURCE"
375
+ }
376
+ },
377
+ "features": {
378
+ "type": "FeatureSet",
379
+ "id": 50
380
+ },
381
+ "verification": {
382
+ "type": "VerificationState",
383
+ "id": 3,
384
+ "options": {
385
+ "default": "UNVERIFIED",
386
+ "retention": "RETENTION_SOURCE"
387
+ }
353
388
  }
354
389
  },
355
390
  "extensions": [
@@ -357,7 +392,45 @@
357
392
  1000,
358
393
  536870911
359
394
  ]
360
- ]
395
+ ],
396
+ "nested": {
397
+ "Declaration": {
398
+ "fields": {
399
+ "number": {
400
+ "type": "int32",
401
+ "id": 1
402
+ },
403
+ "fullName": {
404
+ "type": "string",
405
+ "id": 2
406
+ },
407
+ "type": {
408
+ "type": "string",
409
+ "id": 3
410
+ },
411
+ "reserved": {
412
+ "type": "bool",
413
+ "id": 5
414
+ },
415
+ "repeated": {
416
+ "type": "bool",
417
+ "id": 6
418
+ }
419
+ },
420
+ "reserved": [
421
+ [
422
+ 4,
423
+ 4
424
+ ]
425
+ ]
426
+ },
427
+ "VerificationState": {
428
+ "values": {
429
+ "DECLARATION": 0,
430
+ "UNVERIFIED": 1
431
+ }
432
+ }
433
+ }
361
434
  },
362
435
  "FieldDescriptorProto": {
363
436
  "fields": {
@@ -432,8 +505,8 @@
432
505
  "Label": {
433
506
  "values": {
434
507
  "LABEL_OPTIONAL": 1,
435
- "LABEL_REQUIRED": 2,
436
- "LABEL_REPEATED": 3
508
+ "LABEL_REPEATED": 3,
509
+ "LABEL_REQUIRED": 2
437
510
  }
438
511
  }
439
512
  }
@@ -621,13 +694,6 @@
621
694
  "default": false
622
695
  }
623
696
  },
624
- "phpGenericServices": {
625
- "type": "bool",
626
- "id": 42,
627
- "options": {
628
- "default": false
629
- }
630
- },
631
697
  "deprecated": {
632
698
  "type": "bool",
633
699
  "id": 23,
@@ -670,6 +736,10 @@
670
736
  "type": "string",
671
737
  "id": 45
672
738
  },
739
+ "features": {
740
+ "type": "FeatureSet",
741
+ "id": 50
742
+ },
673
743
  "uninterpretedOption": {
674
744
  "rule": "repeated",
675
745
  "type": "UninterpretedOption",
@@ -683,6 +753,10 @@
683
753
  ]
684
754
  ],
685
755
  "reserved": [
756
+ [
757
+ 42,
758
+ 42
759
+ ],
686
760
  [
687
761
  38,
688
762
  38
@@ -732,6 +806,10 @@
732
806
  "deprecated": true
733
807
  }
734
808
  },
809
+ "features": {
810
+ "type": "FeatureSet",
811
+ "id": 12
812
+ },
735
813
  "uninterpretedOption": {
736
814
  "rule": "repeated",
737
815
  "type": "UninterpretedOption",
@@ -826,9 +904,22 @@
826
904
  "type": "OptionRetention",
827
905
  "id": 17
828
906
  },
829
- "target": {
907
+ "targets": {
908
+ "rule": "repeated",
830
909
  "type": "OptionTargetType",
831
- "id": 18
910
+ "id": 19,
911
+ "options": {
912
+ "packed": false
913
+ }
914
+ },
915
+ "editionDefaults": {
916
+ "rule": "repeated",
917
+ "type": "EditionDefault",
918
+ "id": 20
919
+ },
920
+ "features": {
921
+ "type": "FeatureSet",
922
+ "id": 21
832
923
  },
833
924
  "uninterpretedOption": {
834
925
  "rule": "repeated",
@@ -846,6 +937,10 @@
846
937
  [
847
938
  4,
848
939
  4
940
+ ],
941
+ [
942
+ 18,
943
+ 18
849
944
  ]
850
945
  ],
851
946
  "nested": {
@@ -883,11 +978,27 @@
883
978
  "TARGET_TYPE_SERVICE": 8,
884
979
  "TARGET_TYPE_METHOD": 9
885
980
  }
981
+ },
982
+ "EditionDefault": {
983
+ "fields": {
984
+ "edition": {
985
+ "type": "Edition",
986
+ "id": 3
987
+ },
988
+ "value": {
989
+ "type": "string",
990
+ "id": 2
991
+ }
992
+ }
886
993
  }
887
994
  }
888
995
  },
889
996
  "OneofOptions": {
890
997
  "fields": {
998
+ "features": {
999
+ "type": "FeatureSet",
1000
+ "id": 1
1001
+ },
891
1002
  "uninterpretedOption": {
892
1003
  "rule": "repeated",
893
1004
  "type": "UninterpretedOption",
@@ -921,6 +1032,10 @@
921
1032
  "deprecated": true
922
1033
  }
923
1034
  },
1035
+ "features": {
1036
+ "type": "FeatureSet",
1037
+ "id": 7
1038
+ },
924
1039
  "uninterpretedOption": {
925
1040
  "rule": "repeated",
926
1041
  "type": "UninterpretedOption",
@@ -949,6 +1064,17 @@
949
1064
  "default": false
950
1065
  }
951
1066
  },
1067
+ "features": {
1068
+ "type": "FeatureSet",
1069
+ "id": 2
1070
+ },
1071
+ "debugRedact": {
1072
+ "type": "bool",
1073
+ "id": 3,
1074
+ "options": {
1075
+ "default": false
1076
+ }
1077
+ },
952
1078
  "uninterpretedOption": {
953
1079
  "rule": "repeated",
954
1080
  "type": "UninterpretedOption",
@@ -964,6 +1090,10 @@
964
1090
  },
965
1091
  "ServiceOptions": {
966
1092
  "fields": {
1093
+ "features": {
1094
+ "type": "FeatureSet",
1095
+ "id": 34
1096
+ },
967
1097
  "deprecated": {
968
1098
  "type": "bool",
969
1099
  "id": 33,
@@ -1000,6 +1130,10 @@
1000
1130
  "default": "IDEMPOTENCY_UNKNOWN"
1001
1131
  }
1002
1132
  },
1133
+ "features": {
1134
+ "type": "FeatureSet",
1135
+ "id": 35
1136
+ },
1003
1137
  "uninterpretedOption": {
1004
1138
  "rule": "repeated",
1005
1139
  "type": "UninterpretedOption",
@@ -1071,6 +1205,166 @@
1071
1205
  }
1072
1206
  }
1073
1207
  },
1208
+ "FeatureSet": {
1209
+ "fields": {
1210
+ "fieldPresence": {
1211
+ "type": "FieldPresence",
1212
+ "id": 1,
1213
+ "options": {
1214
+ "retention": "RETENTION_RUNTIME",
1215
+ "targets": "TARGET_TYPE_FILE",
1216
+ "edition_defaults.edition": "EDITION_2023",
1217
+ "edition_defaults.value": "EXPLICIT"
1218
+ }
1219
+ },
1220
+ "enumType": {
1221
+ "type": "EnumType",
1222
+ "id": 2,
1223
+ "options": {
1224
+ "retention": "RETENTION_RUNTIME",
1225
+ "targets": "TARGET_TYPE_FILE",
1226
+ "edition_defaults.edition": "EDITION_PROTO3",
1227
+ "edition_defaults.value": "OPEN"
1228
+ }
1229
+ },
1230
+ "repeatedFieldEncoding": {
1231
+ "type": "RepeatedFieldEncoding",
1232
+ "id": 3,
1233
+ "options": {
1234
+ "retention": "RETENTION_RUNTIME",
1235
+ "targets": "TARGET_TYPE_FILE",
1236
+ "edition_defaults.edition": "EDITION_PROTO3",
1237
+ "edition_defaults.value": "PACKED"
1238
+ }
1239
+ },
1240
+ "utf8Validation": {
1241
+ "type": "Utf8Validation",
1242
+ "id": 4,
1243
+ "options": {
1244
+ "retention": "RETENTION_RUNTIME",
1245
+ "targets": "TARGET_TYPE_FILE",
1246
+ "edition_defaults.edition": "EDITION_PROTO3",
1247
+ "edition_defaults.value": "VERIFY"
1248
+ }
1249
+ },
1250
+ "messageEncoding": {
1251
+ "type": "MessageEncoding",
1252
+ "id": 5,
1253
+ "options": {
1254
+ "retention": "RETENTION_RUNTIME",
1255
+ "targets": "TARGET_TYPE_FILE",
1256
+ "edition_defaults.edition": "EDITION_PROTO2",
1257
+ "edition_defaults.value": "LENGTH_PREFIXED"
1258
+ }
1259
+ },
1260
+ "jsonFormat": {
1261
+ "type": "JsonFormat",
1262
+ "id": 6,
1263
+ "options": {
1264
+ "retention": "RETENTION_RUNTIME",
1265
+ "targets": "TARGET_TYPE_FILE",
1266
+ "edition_defaults.edition": "EDITION_PROTO3",
1267
+ "edition_defaults.value": "ALLOW"
1268
+ }
1269
+ }
1270
+ },
1271
+ "extensions": [
1272
+ [
1273
+ 1000,
1274
+ 1000
1275
+ ],
1276
+ [
1277
+ 1001,
1278
+ 1001
1279
+ ],
1280
+ [
1281
+ 9995,
1282
+ 9999
1283
+ ]
1284
+ ],
1285
+ "reserved": [
1286
+ [
1287
+ 999,
1288
+ 999
1289
+ ]
1290
+ ],
1291
+ "nested": {
1292
+ "FieldPresence": {
1293
+ "values": {
1294
+ "FIELD_PRESENCE_UNKNOWN": 0,
1295
+ "EXPLICIT": 1,
1296
+ "IMPLICIT": 2,
1297
+ "LEGACY_REQUIRED": 3
1298
+ }
1299
+ },
1300
+ "EnumType": {
1301
+ "values": {
1302
+ "ENUM_TYPE_UNKNOWN": 0,
1303
+ "OPEN": 1,
1304
+ "CLOSED": 2
1305
+ }
1306
+ },
1307
+ "RepeatedFieldEncoding": {
1308
+ "values": {
1309
+ "REPEATED_FIELD_ENCODING_UNKNOWN": 0,
1310
+ "PACKED": 1,
1311
+ "EXPANDED": 2
1312
+ }
1313
+ },
1314
+ "Utf8Validation": {
1315
+ "values": {
1316
+ "UTF8_VALIDATION_UNKNOWN": 0,
1317
+ "VERIFY": 2,
1318
+ "NONE": 3
1319
+ }
1320
+ },
1321
+ "MessageEncoding": {
1322
+ "values": {
1323
+ "MESSAGE_ENCODING_UNKNOWN": 0,
1324
+ "LENGTH_PREFIXED": 1,
1325
+ "DELIMITED": 2
1326
+ }
1327
+ },
1328
+ "JsonFormat": {
1329
+ "values": {
1330
+ "JSON_FORMAT_UNKNOWN": 0,
1331
+ "ALLOW": 1,
1332
+ "LEGACY_BEST_EFFORT": 2
1333
+ }
1334
+ }
1335
+ }
1336
+ },
1337
+ "FeatureSetDefaults": {
1338
+ "fields": {
1339
+ "defaults": {
1340
+ "rule": "repeated",
1341
+ "type": "FeatureSetEditionDefault",
1342
+ "id": 1
1343
+ },
1344
+ "minimumEdition": {
1345
+ "type": "Edition",
1346
+ "id": 4
1347
+ },
1348
+ "maximumEdition": {
1349
+ "type": "Edition",
1350
+ "id": 5
1351
+ }
1352
+ },
1353
+ "nested": {
1354
+ "FeatureSetEditionDefault": {
1355
+ "fields": {
1356
+ "edition": {
1357
+ "type": "Edition",
1358
+ "id": 3
1359
+ },
1360
+ "features": {
1361
+ "type": "FeatureSet",
1362
+ "id": 2
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ },
1074
1368
  "SourceCodeInfo": {
1075
1369
  "fields": {
1076
1370
  "location": {
@@ -2897,6 +3191,10 @@
2897
3191
  "rule": "repeated",
2898
3192
  "type": "ClientLibrarySettings",
2899
3193
  "id": 109
3194
+ },
3195
+ "protoReferenceDocumentationUri": {
3196
+ "type": "string",
3197
+ "id": 110
2900
3198
  }
2901
3199
  }
2902
3200
  },
@@ -2954,6 +3252,31 @@
2954
3252
  "common": {
2955
3253
  "type": "CommonLanguageSettings",
2956
3254
  "id": 1
3255
+ },
3256
+ "renamedServices": {
3257
+ "keyType": "string",
3258
+ "type": "string",
3259
+ "id": 2
3260
+ },
3261
+ "renamedResources": {
3262
+ "keyType": "string",
3263
+ "type": "string",
3264
+ "id": 3
3265
+ },
3266
+ "ignoredResources": {
3267
+ "rule": "repeated",
3268
+ "type": "string",
3269
+ "id": 4
3270
+ },
3271
+ "forcedNamespaceAliases": {
3272
+ "rule": "repeated",
3273
+ "type": "string",
3274
+ "id": 5
3275
+ },
3276
+ "handwrittenSignatures": {
3277
+ "rule": "repeated",
3278
+ "type": "string",
3279
+ "id": 6
2957
3280
  }
2958
3281
  }
2959
3282
  },
@@ -2982,6 +3305,11 @@
2982
3305
  "longRunning": {
2983
3306
  "type": "LongRunning",
2984
3307
  "id": 2
3308
+ },
3309
+ "autoPopulatedFields": {
3310
+ "rule": "repeated",
3311
+ "type": "string",
3312
+ "id": 3
2985
3313
  }
2986
3314
  },
2987
3315
  "nested": {
@@ -3013,7 +3341,10 @@
3013
3341
  "CLOUD": 1,
3014
3342
  "ADS": 2,
3015
3343
  "PHOTOS": 3,
3016
- "STREET_VIEW": 4
3344
+ "STREET_VIEW": 4,
3345
+ "SHOPPING": 5,
3346
+ "GEO": 6,
3347
+ "GENERATIVE_AI": 7
3017
3348
  }
3018
3349
  },
3019
3350
  "ClientLibraryDestination": {
@@ -3050,7 +3381,8 @@
3050
3381
  "INPUT_ONLY": 4,
3051
3382
  "IMMUTABLE": 5,
3052
3383
  "UNORDERED_LIST": 6,
3053
- "NON_EMPTY_DEFAULT": 7
3384
+ "NON_EMPTY_DEFAULT": 7,
3385
+ "IDENTIFIER": 8
3054
3386
  }
3055
3387
  }
3056
3388
  }
@@ -73,7 +73,7 @@ class RoutesClient {
73
73
  * ```
74
74
  */
75
75
  constructor(opts, gaxInstance) {
76
- var _a, _b, _c, _d;
76
+ var _a, _b, _c, _d, _e;
77
77
  this._terminated = false;
78
78
  this.descriptors = {
79
79
  page: {},
@@ -88,14 +88,17 @@ class RoutesClient {
88
88
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
89
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
90
  }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
91
94
  this._universeDomain =
92
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
93
96
  this._servicePath = 'routes.' + this._universeDomain;
94
97
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
95
98
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
96
99
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
97
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
98
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
102
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
100
103
  // Request numeric enum values if REST transport is used.
101
104
  opts.numericEnums = true;
@@ -125,7 +128,7 @@ class RoutesClient {
125
128
  }
126
129
  // Determine the client header string.
127
130
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
128
- if (typeof process !== 'undefined' && 'versions' in process) {
131
+ if (typeof process === 'object' && 'versions' in process) {
129
132
  clientHeader.push(`gl-node/${process.versions.node}`);
130
133
  }
131
134
  else {
@@ -211,7 +214,7 @@ class RoutesClient {
211
214
  * @returns {string} The DNS address for this service.
212
215
  */
213
216
  static get servicePath() {
214
- if (typeof process !== undefined &&
217
+ if (typeof process === 'object' &&
215
218
  typeof process.emitWarning === 'function') {
216
219
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
217
220
  }
@@ -223,7 +226,7 @@ class RoutesClient {
223
226
  * @returns {string} The DNS address for this service.
224
227
  */
225
228
  static get apiEndpoint() {
226
- if (typeof process !== undefined &&
229
+ if (typeof process === 'object' &&
227
230
  typeof process.emitWarning === 'function') {
228
231
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
229
232
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googlemaps/routing",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": " client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,8 +52,8 @@
52
52
  "@types/mocha": "^9.0.0",
53
53
  "@types/node": "^20.4.5",
54
54
  "@types/sinon": "^17.0.0",
55
- "c8": "^8.0.1",
56
- "gapic-tools": "^0.3.0",
55
+ "c8": "^9.0.0",
56
+ "gapic-tools": "^0.4.0",
57
57
  "gts": "^5.0.0",
58
58
  "jsdoc": "^4.0.0",
59
59
  "jsdoc-fresh": "^3.0.0",