@googlemaps/routeoptimization 0.1.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.
@@ -0,0 +1,508 @@
1
+ "use strict";
2
+ // Copyright 2024 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.RouteOptimizationClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1/route_optimization_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./route_optimization_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * A service for optimizing vehicle tours.
31
+ *
32
+ * Validity of certain types of fields:
33
+ *
34
+ * * `google.protobuf.Timestamp`
35
+ * * Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00.
36
+ * * seconds must be in [0, 253402300799],
37
+ * i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
38
+ * * nanos must be unset or set to 0.
39
+ * * `google.protobuf.Duration`
40
+ * * seconds must be in [0, 253402300799],
41
+ * i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
42
+ * * nanos must be unset or set to 0.
43
+ * * `google.type.LatLng`
44
+ * * latitude must be in [-90.0, 90.0].
45
+ * * longitude must be in [-180.0, 180.0].
46
+ * * at least one of latitude and longitude must be non-zero.
47
+ *
48
+ * @class
49
+ * @memberof v1
50
+ */
51
+ class RouteOptimizationClient {
52
+ /**
53
+ * Construct an instance of RouteOptimizationClient.
54
+ *
55
+ * @param {object} [options] - The configuration object.
56
+ * The options accepted by the constructor are described in detail
57
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
58
+ * The common options are:
59
+ * @param {object} [options.credentials] - Credentials object.
60
+ * @param {string} [options.credentials.client_email]
61
+ * @param {string} [options.credentials.private_key]
62
+ * @param {string} [options.email] - Account email address. Required when
63
+ * using a .pem or .p12 keyFilename.
64
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
65
+ * .p12 key downloaded from the Google Developers Console. If you provide
66
+ * a path to a JSON file, the projectId option below is not necessary.
67
+ * NOTE: .pem and .p12 require you to specify options.email as well.
68
+ * @param {number} [options.port] - The port on which to connect to
69
+ * the remote host.
70
+ * @param {string} [options.projectId] - The project ID from the Google
71
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
72
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
73
+ * app is running in an environment which supports
74
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
75
+ * your project ID will be detected automatically.
76
+ * @param {string} [options.apiEndpoint] - The domain name of the
77
+ * API remote host.
78
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
79
+ * Follows the structure of {@link gapicConfig}.
80
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
81
+ * For more information, please check the
82
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
83
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
84
+ * need to avoid loading the default gRPC version and want to use the fallback
85
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
86
+ * ```
87
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
88
+ * const client = new RouteOptimizationClient({fallback: true}, gax);
89
+ * ```
90
+ */
91
+ constructor(opts, gaxInstance) {
92
+ var _a, _b, _c, _d, _e;
93
+ this._terminated = false;
94
+ this.descriptors = {
95
+ page: {},
96
+ stream: {},
97
+ longrunning: {},
98
+ batching: {},
99
+ };
100
+ // Ensure that options include all the required fields.
101
+ const staticMembers = this.constructor;
102
+ if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
103
+ (opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
104
+ (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
105
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
+ }
107
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
108
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
109
+ : undefined;
110
+ this._universeDomain =
111
+ (_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';
112
+ this._servicePath = 'routeoptimization.' + this._universeDomain;
113
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
114
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
115
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
116
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
117
+ 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');
118
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
119
+ // Request numeric enum values if REST transport is used.
120
+ opts.numericEnums = true;
121
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
122
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
123
+ opts['scopes'] = staticMembers.scopes;
124
+ }
125
+ // Load google-gax module synchronously if needed
126
+ if (!gaxInstance) {
127
+ gaxInstance = require('google-gax');
128
+ }
129
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
130
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
131
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
132
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
133
+ // Save options to use in initialize() method.
134
+ this._opts = opts;
135
+ // Save the auth object to the client, for use by other methods.
136
+ this.auth = this._gaxGrpc.auth;
137
+ // Set useJWTAccessWithScope on the auth object.
138
+ this.auth.useJWTAccessWithScope = true;
139
+ // Set defaultServicePath on the auth object.
140
+ this.auth.defaultServicePath = this._servicePath;
141
+ // Set the default scopes in auth client if needed.
142
+ if (servicePath === this._servicePath) {
143
+ this.auth.defaultScopes = staticMembers.scopes;
144
+ }
145
+ // Determine the client header string.
146
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
147
+ if (typeof process === 'object' && 'versions' in process) {
148
+ clientHeader.push(`gl-node/${process.versions.node}`);
149
+ }
150
+ else {
151
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
152
+ }
153
+ if (!opts.fallback) {
154
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
155
+ }
156
+ else {
157
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
158
+ }
159
+ if (opts.libName && opts.libVersion) {
160
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
161
+ }
162
+ // Load the applicable protos.
163
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
164
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
165
+ // This API contains "long-running operations", which return a
166
+ // an Operation object that allows for tracking of the operation,
167
+ // rather than holding a request open.
168
+ const lroOptions = {
169
+ auth: this.auth,
170
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
171
+ };
172
+ if (opts.fallback) {
173
+ lroOptions.protoJson = protoFilesRoot;
174
+ lroOptions.httpRules = [
175
+ {
176
+ selector: 'google.longrunning.Operations.GetOperation',
177
+ get: '/v1/{name=projects/*/locations/*/operations/*}',
178
+ },
179
+ ];
180
+ }
181
+ this.operationsClient = this._gaxModule
182
+ .lro(lroOptions)
183
+ .operationsClient(opts);
184
+ const batchOptimizeToursResponse = protoFilesRoot.lookup('.google.maps.routeoptimization.v1.BatchOptimizeToursResponse');
185
+ const batchOptimizeToursMetadata = protoFilesRoot.lookup('.google.maps.routeoptimization.v1.BatchOptimizeToursMetadata');
186
+ this.descriptors.longrunning = {
187
+ batchOptimizeTours: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchOptimizeToursResponse.decode.bind(batchOptimizeToursResponse), batchOptimizeToursMetadata.decode.bind(batchOptimizeToursMetadata)),
188
+ };
189
+ // Put together the default options sent with requests.
190
+ this._defaults = this._gaxGrpc.constructSettings('google.maps.routeoptimization.v1.RouteOptimization', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
191
+ // Set up a dictionary of "inner API calls"; the core implementation
192
+ // of calling the API is handled in `google-gax`, with this code
193
+ // merely providing the destination and request information.
194
+ this.innerApiCalls = {};
195
+ // Add a warn function to the client constructor so it can be easily tested.
196
+ this.warn = this._gaxModule.warn;
197
+ }
198
+ /**
199
+ * Initialize the client.
200
+ * Performs asynchronous operations (such as authentication) and prepares the client.
201
+ * This function will be called automatically when any class method is called for the
202
+ * first time, but if you need to initialize it before calling an actual method,
203
+ * feel free to call initialize() directly.
204
+ *
205
+ * You can await on this method if you want to make sure the client is initialized.
206
+ *
207
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
208
+ */
209
+ initialize() {
210
+ // If the client stub promise is already initialized, return immediately.
211
+ if (this.routeOptimizationStub) {
212
+ return this.routeOptimizationStub;
213
+ }
214
+ // Put together the "service stub" for
215
+ // google.maps.routeoptimization.v1.RouteOptimization.
216
+ this.routeOptimizationStub = this._gaxGrpc.createStub(this._opts.fallback
217
+ ? this._protos.lookupService('google.maps.routeoptimization.v1.RouteOptimization')
218
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
219
+ this._protos.google.maps.routeoptimization.v1
220
+ .RouteOptimization, this._opts, this._providedCustomServicePath);
221
+ // Iterate over each of the methods that the service provides
222
+ // and create an API call method for each.
223
+ const routeOptimizationStubMethods = [
224
+ 'optimizeTours',
225
+ 'batchOptimizeTours',
226
+ ];
227
+ for (const methodName of routeOptimizationStubMethods) {
228
+ const callPromise = this.routeOptimizationStub.then(stub => (...args) => {
229
+ if (this._terminated) {
230
+ return Promise.reject('The client has already been closed.');
231
+ }
232
+ const func = stub[methodName];
233
+ return func.apply(stub, args);
234
+ }, (err) => () => {
235
+ throw err;
236
+ });
237
+ const descriptor = this.descriptors.longrunning[methodName] || undefined;
238
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
239
+ this.innerApiCalls[methodName] = apiCall;
240
+ }
241
+ return this.routeOptimizationStub;
242
+ }
243
+ /**
244
+ * The DNS address for this API service.
245
+ * @deprecated Use the apiEndpoint method of the client instance.
246
+ * @returns {string} The DNS address for this service.
247
+ */
248
+ static get servicePath() {
249
+ if (typeof process === 'object' &&
250
+ typeof process.emitWarning === 'function') {
251
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
252
+ }
253
+ return 'routeoptimization.googleapis.com';
254
+ }
255
+ /**
256
+ * The DNS address for this API service - same as servicePath.
257
+ * @deprecated Use the apiEndpoint method of the client instance.
258
+ * @returns {string} The DNS address for this service.
259
+ */
260
+ static get apiEndpoint() {
261
+ if (typeof process === 'object' &&
262
+ typeof process.emitWarning === 'function') {
263
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
264
+ }
265
+ return 'routeoptimization.googleapis.com';
266
+ }
267
+ /**
268
+ * The DNS address for this API service.
269
+ * @returns {string} The DNS address for this service.
270
+ */
271
+ get apiEndpoint() {
272
+ return this._servicePath;
273
+ }
274
+ get universeDomain() {
275
+ return this._universeDomain;
276
+ }
277
+ /**
278
+ * The port for this API service.
279
+ * @returns {number} The default port for this service.
280
+ */
281
+ static get port() {
282
+ return 443;
283
+ }
284
+ /**
285
+ * The scopes needed to make gRPC calls for every method defined
286
+ * in this service.
287
+ * @returns {string[]} List of default scopes.
288
+ */
289
+ static get scopes() {
290
+ return ['https://www.googleapis.com/auth/cloud-platform'];
291
+ }
292
+ /**
293
+ * Return the project ID used by this class.
294
+ * @returns {Promise} A promise that resolves to string containing the project ID.
295
+ */
296
+ getProjectId(callback) {
297
+ if (callback) {
298
+ this.auth.getProjectId(callback);
299
+ return;
300
+ }
301
+ return this.auth.getProjectId();
302
+ }
303
+ optimizeTours(request, optionsOrCallback, callback) {
304
+ var _a;
305
+ request = request || {};
306
+ let options;
307
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
308
+ callback = optionsOrCallback;
309
+ options = {};
310
+ }
311
+ else {
312
+ options = optionsOrCallback;
313
+ }
314
+ options = options || {};
315
+ options.otherArgs = options.otherArgs || {};
316
+ options.otherArgs.headers = options.otherArgs.headers || {};
317
+ options.otherArgs.headers['x-goog-request-params'] =
318
+ this._gaxModule.routingHeader.fromParams({
319
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
320
+ });
321
+ this.initialize();
322
+ return this.innerApiCalls.optimizeTours(request, options, callback);
323
+ }
324
+ batchOptimizeTours(request, optionsOrCallback, callback) {
325
+ var _a;
326
+ request = request || {};
327
+ let options;
328
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
329
+ callback = optionsOrCallback;
330
+ options = {};
331
+ }
332
+ else {
333
+ options = optionsOrCallback;
334
+ }
335
+ options = options || {};
336
+ options.otherArgs = options.otherArgs || {};
337
+ options.otherArgs.headers = options.otherArgs.headers || {};
338
+ options.otherArgs.headers['x-goog-request-params'] =
339
+ this._gaxModule.routingHeader.fromParams({
340
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
341
+ });
342
+ this.initialize();
343
+ return this.innerApiCalls.batchOptimizeTours(request, options, callback);
344
+ }
345
+ /**
346
+ * Check the status of the long running operation returned by `batchOptimizeTours()`.
347
+ * @param {String} name
348
+ * The operation name that will be passed.
349
+ * @returns {Promise} - The promise which resolves to an object.
350
+ * The decoded operation object has result and metadata field to get information from.
351
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
352
+ * for more details and examples.
353
+ * @example <caption>include:samples/generated/v1/route_optimization.batch_optimize_tours.js</caption>
354
+ * region_tag:routeoptimization_v1_generated_RouteOptimization_BatchOptimizeTours_async
355
+ */
356
+ async checkBatchOptimizeToursProgress(name) {
357
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
358
+ const [operation] = await this.operationsClient.getOperation(request);
359
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.batchOptimizeTours, this._gaxModule.createDefaultBackoffSettings());
360
+ return decodeOperation;
361
+ }
362
+ /**
363
+ * Gets the latest state of a long-running operation. Clients can use this
364
+ * method to poll the operation result at intervals as recommended by the API
365
+ * service.
366
+ *
367
+ * @param {Object} request - The request object that will be sent.
368
+ * @param {string} request.name - The name of the operation resource.
369
+ * @param {Object=} options
370
+ * Optional parameters. You can override the default settings for this call,
371
+ * e.g, timeout, retries, paginations, etc. See {@link
372
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
373
+ * for the details.
374
+ * @param {function(?Error, ?Object)=} callback
375
+ * The function which will be called with the result of the API call.
376
+ *
377
+ * The second parameter to the callback is an object representing
378
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
379
+ * @return {Promise} - The promise which resolves to an array.
380
+ * The first element of the array is an object representing
381
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
382
+ * The promise has a method named "cancel" which cancels the ongoing API call.
383
+ *
384
+ * @example
385
+ * ```
386
+ * const client = longrunning.operationsClient();
387
+ * const name = '';
388
+ * const [response] = await client.getOperation({name});
389
+ * // doThingsWith(response)
390
+ * ```
391
+ */
392
+ getOperation(request, options, callback) {
393
+ return this.operationsClient.getOperation(request, options, callback);
394
+ }
395
+ /**
396
+ * Lists operations that match the specified filter in the request. If the
397
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
398
+ *
399
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
400
+ *
401
+ * @param {Object} request - The request object that will be sent.
402
+ * @param {string} request.name - The name of the operation collection.
403
+ * @param {string} request.filter - The standard list filter.
404
+ * @param {number=} request.pageSize -
405
+ * The maximum number of resources contained in the underlying API
406
+ * response. If page streaming is performed per-resource, this
407
+ * parameter does not affect the return value. If page streaming is
408
+ * performed per-page, this determines the maximum number of
409
+ * resources in a page.
410
+ * @param {Object=} options
411
+ * Optional parameters. You can override the default settings for this call,
412
+ * e.g, timeout, retries, paginations, etc. See {@link
413
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
414
+ * details.
415
+ * @returns {Object}
416
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
417
+ *
418
+ * @example
419
+ * ```
420
+ * const client = longrunning.operationsClient();
421
+ * for await (const response of client.listOperationsAsync(request));
422
+ * // doThingsWith(response)
423
+ * ```
424
+ */
425
+ listOperationsAsync(request, options) {
426
+ return this.operationsClient.listOperationsAsync(request, options);
427
+ }
428
+ /**
429
+ * Starts asynchronous cancellation on a long-running operation. The server
430
+ * makes a best effort to cancel the operation, but success is not
431
+ * guaranteed. If the server doesn't support this method, it returns
432
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
433
+ * {@link Operations.GetOperation} or
434
+ * other methods to check whether the cancellation succeeded or whether the
435
+ * operation completed despite cancellation. On successful cancellation,
436
+ * the operation is not deleted; instead, it becomes an operation with
437
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
438
+ * 1, corresponding to `Code.CANCELLED`.
439
+ *
440
+ * @param {Object} request - The request object that will be sent.
441
+ * @param {string} request.name - The name of the operation resource to be cancelled.
442
+ * @param {Object=} options
443
+ * Optional parameters. You can override the default settings for this call,
444
+ * e.g, timeout, retries, paginations, etc. See {@link
445
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
446
+ * details.
447
+ * @param {function(?Error)=} callback
448
+ * The function which will be called with the result of the API call.
449
+ * @return {Promise} - The promise which resolves when API call finishes.
450
+ * The promise has a method named "cancel" which cancels the ongoing API
451
+ * call.
452
+ *
453
+ * @example
454
+ * ```
455
+ * const client = longrunning.operationsClient();
456
+ * await client.cancelOperation({name: ''});
457
+ * ```
458
+ */
459
+ cancelOperation(request, options, callback) {
460
+ return this.operationsClient.cancelOperation(request, options, callback);
461
+ }
462
+ /**
463
+ * Deletes a long-running operation. This method indicates that the client is
464
+ * no longer interested in the operation result. It does not cancel the
465
+ * operation. If the server doesn't support this method, it returns
466
+ * `google.rpc.Code.UNIMPLEMENTED`.
467
+ *
468
+ * @param {Object} request - The request object that will be sent.
469
+ * @param {string} request.name - The name of the operation resource to be deleted.
470
+ * @param {Object=} options
471
+ * Optional parameters. You can override the default settings for this call,
472
+ * e.g, timeout, retries, paginations, etc. See {@link
473
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
474
+ * for the details.
475
+ * @param {function(?Error)=} callback
476
+ * The function which will be called with the result of the API call.
477
+ * @return {Promise} - The promise which resolves when API call finishes.
478
+ * The promise has a method named "cancel" which cancels the ongoing API
479
+ * call.
480
+ *
481
+ * @example
482
+ * ```
483
+ * const client = longrunning.operationsClient();
484
+ * await client.deleteOperation({name: ''});
485
+ * ```
486
+ */
487
+ deleteOperation(request, options, callback) {
488
+ return this.operationsClient.deleteOperation(request, options, callback);
489
+ }
490
+ /**
491
+ * Terminate the gRPC channel and close the client.
492
+ *
493
+ * The client will no longer be usable and all future behavior is undefined.
494
+ * @returns {Promise} A promise that resolves when the client is closed.
495
+ */
496
+ close() {
497
+ if (this.routeOptimizationStub && !this._terminated) {
498
+ return this.routeOptimizationStub.then(stub => {
499
+ this._terminated = true;
500
+ stub.close();
501
+ this.operationsClient.close();
502
+ });
503
+ }
504
+ return Promise.resolve();
505
+ }
506
+ }
507
+ exports.RouteOptimizationClient = RouteOptimizationClient;
508
+ //# sourceMappingURL=route_optimization_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route_optimization_client.js","sourceRoot":"","sources":["../../../src/v1/route_optimization_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAcrD,uDAAwD;AAExD;;;;GAIG;AACH,uEAAuE;AACvE,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,uBAAuB;IAsBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,YACE,IAAoB,EACpB,WAA8C;;QA9DxC,gBAAW,GAAG,KAAK,CAAC;QAU5B,gBAAW,GAAgB;YACzB,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,QAAQ,EAA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1
+ {
2
+ "interfaces": {
3
+ "google.maps.routeoptimization.v1.RouteOptimization": {
4
+ "retry_codes": {
5
+ "non_idempotent": [],
6
+ "idempotent": [
7
+ "DEADLINE_EXCEEDED",
8
+ "UNAVAILABLE"
9
+ ],
10
+ "unavailable": [
11
+ "UNAVAILABLE"
12
+ ]
13
+ },
14
+ "retry_params": {
15
+ "default": {
16
+ "initial_retry_delay_millis": 100,
17
+ "retry_delay_multiplier": 1.3,
18
+ "max_retry_delay_millis": 60000,
19
+ "initial_rpc_timeout_millis": 60000,
20
+ "rpc_timeout_multiplier": 1,
21
+ "max_rpc_timeout_millis": 60000,
22
+ "total_timeout_millis": 600000
23
+ },
24
+ "ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
25
+ "initial_retry_delay_millis": 1000,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 10000,
28
+ "initial_rpc_timeout_millis": 60000,
29
+ "rpc_timeout_multiplier": 1,
30
+ "max_rpc_timeout_millis": 60000,
31
+ "total_timeout_millis": 600000
32
+ }
33
+ },
34
+ "methods": {
35
+ "OptimizeTours": {
36
+ "timeout_millis": 3600000,
37
+ "retry_codes_name": "unavailable",
38
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
39
+ },
40
+ "BatchOptimizeTours": {
41
+ "retry_codes_name": "non_idempotent",
42
+ "retry_params_name": "default"
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@googlemaps/routeoptimization",
3
+ "version": "0.1.0",
4
+ "description": "Route Optimization API client for Node.js",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/googleapis/google-cloud-node.git",
8
+ "directory": "packages/google-maps-routeoptimization"
9
+ },
10
+ "license": "Apache-2.0",
11
+ "author": "Google LLC",
12
+ "main": "build/src/index.js",
13
+ "files": [
14
+ "build/src",
15
+ "build/protos"
16
+ ],
17
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-routeoptimization",
18
+ "keywords": [
19
+ "google apis client",
20
+ "google api client",
21
+ "google apis",
22
+ "google api",
23
+ "google",
24
+ "google cloud platform",
25
+ "google cloud",
26
+ "cloud",
27
+ "google routeoptimization",
28
+ "routeoptimization",
29
+ "Route Optimization API"
30
+ ],
31
+ "scripts": {
32
+ "clean": "gts clean",
33
+ "compile": "tsc -p . && cp -r protos build/",
34
+ "compile-protos": "compileProtos src",
35
+ "docs": "jsdoc -c .jsdoc.js",
36
+ "predocs-test": "npm run docs",
37
+ "docs-test": "linkinator docs",
38
+ "fix": "gts fix",
39
+ "lint": "gts check",
40
+ "postpack": "minifyProtoJson",
41
+ "prepare": "npm run compile",
42
+ "system-test": "c8 mocha build/system-test",
43
+ "test": "c8 mocha build/test",
44
+ "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
45
+ "prelint": "cd samples; npm link ../; npm i"
46
+ },
47
+ "dependencies": {
48
+ "google-gax": "^4.0.3"
49
+ },
50
+ "devDependencies": {
51
+ "@types/mocha": "^9.0.0",
52
+ "@types/node": "^20.4.5",
53
+ "@types/sinon": "^17.0.0",
54
+ "c8": "^9.0.0",
55
+ "gapic-tools": "^0.4.0",
56
+ "gts": "^5.0.0",
57
+ "jsdoc": "^4.0.0",
58
+ "jsdoc-fresh": "^3.0.0",
59
+ "jsdoc-region-tag": "^3.0.0",
60
+ "linkinator": "4.1.2",
61
+ "long": "^5.2.3",
62
+ "mocha": "^9.2.2",
63
+ "pack-n-play": "^2.0.0",
64
+ "sinon": "^17.0.0",
65
+ "typescript": "^5.1.6"
66
+ },
67
+ "engines": {
68
+ "node": ">=14.0.0"
69
+ }
70
+ }