@google-cloud/navconnect 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,401 @@
1
+ "use strict";
2
+ // Copyright 2026 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.NavConnectServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ const google_gax_1 = require("google-gax");
23
+ /**
24
+ * Client JSON configuration object, loaded from
25
+ * `src/v1/nav_connect_service_client_config.json`.
26
+ * This file defines retry strategy and timeouts for all API methods in this library.
27
+ */
28
+ const gapicConfig = require("./nav_connect_service_client_config.json");
29
+ const version = require('../../../package.json').version;
30
+ /**
31
+ * Service for NavConnect clients to create and get trips.
32
+ * @class
33
+ * @memberof v1
34
+ */
35
+ class NavConnectServiceClient {
36
+ _terminated = false;
37
+ _opts;
38
+ _providedCustomServicePath;
39
+ _gaxModule;
40
+ _gaxGrpc;
41
+ _protos;
42
+ _defaults;
43
+ _universeDomain;
44
+ _servicePath;
45
+ _log = google_gax_1.loggingUtils.log('navconnect');
46
+ auth;
47
+ descriptors = {
48
+ page: {},
49
+ stream: {},
50
+ longrunning: {},
51
+ batching: {},
52
+ };
53
+ warn;
54
+ innerApiCalls;
55
+ pathTemplates;
56
+ navConnectServiceStub;
57
+ /**
58
+ * Construct an instance of NavConnectServiceClient.
59
+ *
60
+ * @param {object} [options] - The configuration object.
61
+ * The options accepted by the constructor are described in detail
62
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
63
+ * The common options are:
64
+ * @param {object} [options.credentials] - Credentials object.
65
+ * @param {string} [options.credentials.client_email]
66
+ * @param {string} [options.credentials.private_key]
67
+ * @param {string} [options.email] - Account email address. Required when
68
+ * using a .pem or .p12 keyFilename.
69
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
70
+ * .p12 key downloaded from the Google Developers Console. If you provide
71
+ * a path to a JSON file, the projectId option below is not necessary.
72
+ * NOTE: .pem and .p12 require you to specify options.email as well.
73
+ * @param {number} [options.port] - The port on which to connect to
74
+ * the remote host.
75
+ * @param {string} [options.projectId] - The project ID from the Google
76
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
77
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
78
+ * app is running in an environment which supports
79
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
80
+ * your project ID will be detected automatically.
81
+ * @param {string} [options.apiEndpoint] - The domain name of the
82
+ * API remote host.
83
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
84
+ * Follows the structure of {@link gapicConfig}.
85
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
86
+ * For more information, please check the
87
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
88
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
89
+ * need to avoid loading the default gRPC version and want to use the fallback
90
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
91
+ * ```
92
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
93
+ * const client = new NavConnectServiceClient({fallback: true}, gax);
94
+ * ```
95
+ */
96
+ constructor(opts, gaxInstance) {
97
+ // Ensure that options include all the required fields.
98
+ const staticMembers = this.constructor;
99
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
100
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
101
+ }
102
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
103
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
104
+ this._servicePath = 'navigationconnect.' + this._universeDomain;
105
+ const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
106
+ this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
107
+ const port = opts?.port || staticMembers.port;
108
+ const clientConfig = opts?.clientConfig ?? {};
109
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
110
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
111
+ // Request numeric enum values if REST transport is used.
112
+ opts.numericEnums = true;
113
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
114
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
115
+ opts['scopes'] = staticMembers.scopes;
116
+ }
117
+ // Load google-gax module synchronously if needed
118
+ if (!gaxInstance) {
119
+ gaxInstance = require('google-gax');
120
+ }
121
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
122
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
123
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
124
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
125
+ // Save options to use in initialize() method.
126
+ this._opts = opts;
127
+ // Save the auth object to the client, for use by other methods.
128
+ this.auth = this._gaxGrpc.auth;
129
+ // Set useJWTAccessWithScope on the auth object.
130
+ this.auth.useJWTAccessWithScope = true;
131
+ // Set defaultServicePath on the auth object.
132
+ this.auth.defaultServicePath = this._servicePath;
133
+ // Set the default scopes in auth client if needed.
134
+ if (servicePath === this._servicePath) {
135
+ this.auth.defaultScopes = staticMembers.scopes;
136
+ }
137
+ // Determine the client header string.
138
+ const clientHeader = [
139
+ `gax/${this._gaxModule.version}`,
140
+ `gapic/${version}`,
141
+ ];
142
+ if (typeof process === 'object' && 'versions' in process) {
143
+ clientHeader.push(`gl-node/${process.versions.node}`);
144
+ }
145
+ else {
146
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
147
+ }
148
+ if (!opts.fallback) {
149
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
150
+ }
151
+ else {
152
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
153
+ }
154
+ if (opts.libName && opts.libVersion) {
155
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
156
+ }
157
+ // Load the applicable protos.
158
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
159
+ // This API contains "path templates"; forward-slash-separated
160
+ // identifiers to uniquely identify resources within the API.
161
+ // Create useful helper objects for these.
162
+ this.pathTemplates = {
163
+ tripPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/trips/{trip}'),
164
+ };
165
+ // Put together the default options sent with requests.
166
+ this._defaults = this._gaxGrpc.constructSettings('google.maps.navconnect.v1.NavConnectService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
167
+ // Set up a dictionary of "inner API calls"; the core implementation
168
+ // of calling the API is handled in `google-gax`, with this code
169
+ // merely providing the destination and request information.
170
+ this.innerApiCalls = {};
171
+ // Add a warn function to the client constructor so it can be easily tested.
172
+ this.warn = this._gaxModule.warn;
173
+ }
174
+ /**
175
+ * Initialize the client.
176
+ * Performs asynchronous operations (such as authentication) and prepares the client.
177
+ * This function will be called automatically when any class method is called for the
178
+ * first time, but if you need to initialize it before calling an actual method,
179
+ * feel free to call initialize() directly.
180
+ *
181
+ * You can await on this method if you want to make sure the client is initialized.
182
+ *
183
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
184
+ */
185
+ initialize() {
186
+ // If the client stub promise is already initialized, return immediately.
187
+ if (this.navConnectServiceStub) {
188
+ return this.navConnectServiceStub;
189
+ }
190
+ // Put together the "service stub" for
191
+ // google.maps.navconnect.v1.NavConnectService.
192
+ this.navConnectServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
193
+ this._protos.lookupService('google.maps.navconnect.v1.NavConnectService') :
194
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
195
+ this._protos.google.maps.navconnect.v1.NavConnectService, this._opts, this._providedCustomServicePath);
196
+ // Iterate over each of the methods that the service provides
197
+ // and create an API call method for each.
198
+ const navConnectServiceStubMethods = ['createTrip', 'getTrip'];
199
+ for (const methodName of navConnectServiceStubMethods) {
200
+ const callPromise = this.navConnectServiceStub.then(stub => (...args) => {
201
+ if (this._terminated) {
202
+ return Promise.reject('The client has already been closed.');
203
+ }
204
+ const func = stub[methodName];
205
+ return func.apply(stub, args);
206
+ }, (err) => () => {
207
+ throw err;
208
+ });
209
+ const descriptor = undefined;
210
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
211
+ this.innerApiCalls[methodName] = apiCall;
212
+ }
213
+ return this.navConnectServiceStub;
214
+ }
215
+ /**
216
+ * The DNS address for this API service.
217
+ * @deprecated Use the apiEndpoint method of the client instance.
218
+ * @returns {string} The DNS address for this service.
219
+ */
220
+ static get servicePath() {
221
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
222
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
223
+ }
224
+ return 'navigationconnect.googleapis.com';
225
+ }
226
+ /**
227
+ * The DNS address for this API service - same as servicePath.
228
+ * @deprecated Use the apiEndpoint method of the client instance.
229
+ * @returns {string} The DNS address for this service.
230
+ */
231
+ static get apiEndpoint() {
232
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
233
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
234
+ }
235
+ return 'navigationconnect.googleapis.com';
236
+ }
237
+ /**
238
+ * The DNS address for this API service.
239
+ * @returns {string} The DNS address for this service.
240
+ */
241
+ get apiEndpoint() {
242
+ return this._servicePath;
243
+ }
244
+ get universeDomain() {
245
+ return this._universeDomain;
246
+ }
247
+ /**
248
+ * The port for this API service.
249
+ * @returns {number} The default port for this service.
250
+ */
251
+ static get port() {
252
+ return 443;
253
+ }
254
+ /**
255
+ * The scopes needed to make gRPC calls for every method defined
256
+ * in this service.
257
+ * @returns {string[]} List of default scopes.
258
+ */
259
+ static get scopes() {
260
+ return [
261
+ 'https://www.googleapis.com/auth/cloud-platform'
262
+ ];
263
+ }
264
+ /**
265
+ * Return the project ID used by this class.
266
+ * @returns {Promise} A promise that resolves to string containing the project ID.
267
+ */
268
+ getProjectId(callback) {
269
+ if (callback) {
270
+ this.auth.getProjectId(callback);
271
+ return;
272
+ }
273
+ return this.auth.getProjectId();
274
+ }
275
+ createTrip(request, optionsOrCallback, callback) {
276
+ request = request || {};
277
+ let options;
278
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
279
+ callback = optionsOrCallback;
280
+ options = {};
281
+ }
282
+ else {
283
+ options = optionsOrCallback;
284
+ }
285
+ options = options || {};
286
+ options.otherArgs = options.otherArgs || {};
287
+ options.otherArgs.headers = options.otherArgs.headers || {};
288
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
289
+ 'parent': request.parent ?? '',
290
+ });
291
+ this.initialize().catch(err => { throw err; });
292
+ this._log.info('createTrip request %j', request);
293
+ const wrappedCallback = callback
294
+ ? (error, response, options, rawResponse) => {
295
+ this._log.info('createTrip response %j', response);
296
+ callback(error, response, options, rawResponse); // We verified callback above.
297
+ }
298
+ : undefined;
299
+ return this.innerApiCalls.createTrip(request, options, wrappedCallback)
300
+ ?.then(([response, options, rawResponse]) => {
301
+ this._log.info('createTrip response %j', response);
302
+ return [response, options, rawResponse];
303
+ }).catch((error) => {
304
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
305
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
306
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
307
+ }
308
+ throw error;
309
+ });
310
+ }
311
+ getTrip(request, optionsOrCallback, callback) {
312
+ request = request || {};
313
+ let options;
314
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
315
+ callback = optionsOrCallback;
316
+ options = {};
317
+ }
318
+ else {
319
+ options = optionsOrCallback;
320
+ }
321
+ options = options || {};
322
+ options.otherArgs = options.otherArgs || {};
323
+ options.otherArgs.headers = options.otherArgs.headers || {};
324
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
325
+ 'name': request.name ?? '',
326
+ });
327
+ this.initialize().catch(err => { throw err; });
328
+ this._log.info('getTrip request %j', request);
329
+ const wrappedCallback = callback
330
+ ? (error, response, options, rawResponse) => {
331
+ this._log.info('getTrip response %j', response);
332
+ callback(error, response, options, rawResponse); // We verified callback above.
333
+ }
334
+ : undefined;
335
+ return this.innerApiCalls.getTrip(request, options, wrappedCallback)
336
+ ?.then(([response, options, rawResponse]) => {
337
+ this._log.info('getTrip response %j', response);
338
+ return [response, options, rawResponse];
339
+ }).catch((error) => {
340
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
341
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
342
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
343
+ }
344
+ throw error;
345
+ });
346
+ }
347
+ // --------------------
348
+ // -- Path templates --
349
+ // --------------------
350
+ /**
351
+ * Return a fully-qualified trip resource name string.
352
+ *
353
+ * @param {string} project
354
+ * @param {string} trip
355
+ * @returns {string} Resource name string.
356
+ */
357
+ tripPath(project, trip) {
358
+ return this.pathTemplates.tripPathTemplate.render({
359
+ project: project,
360
+ trip: trip,
361
+ });
362
+ }
363
+ /**
364
+ * Parse the project from Trip resource.
365
+ *
366
+ * @param {string} tripName
367
+ * A fully-qualified path representing Trip resource.
368
+ * @returns {string} A string representing the project.
369
+ */
370
+ matchProjectFromTripName(tripName) {
371
+ return this.pathTemplates.tripPathTemplate.match(tripName).project;
372
+ }
373
+ /**
374
+ * Parse the trip from Trip resource.
375
+ *
376
+ * @param {string} tripName
377
+ * A fully-qualified path representing Trip resource.
378
+ * @returns {string} A string representing the trip.
379
+ */
380
+ matchTripFromTripName(tripName) {
381
+ return this.pathTemplates.tripPathTemplate.match(tripName).trip;
382
+ }
383
+ /**
384
+ * Terminate the gRPC channel and close the client.
385
+ *
386
+ * The client will no longer be usable and all future behavior is undefined.
387
+ * @returns {Promise} A promise that resolves when the client is closed.
388
+ */
389
+ close() {
390
+ if (this.navConnectServiceStub && !this._terminated) {
391
+ return this.navConnectServiceStub.then(stub => {
392
+ this._log.info('ending gRPC channel');
393
+ this._terminated = true;
394
+ stub.close();
395
+ });
396
+ }
397
+ return Promise.resolve();
398
+ }
399
+ }
400
+ exports.NavConnectServiceClient = NavConnectServiceClient;
401
+ //# sourceMappingURL=nav_connect_service_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav_connect_service_client.js","sourceRoot":"","sources":["../../../src/v1/nav_connect_service_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;;;AAOrD,uDAAwD;AACxD,2CAA2E;AAE3E;;;;GAIG;AACH,wEAAwE;AACxE,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;AAEzD;;;;GAIG;AACH,MAAa,uBAAuB;IAC1B,WAAW,GAAG,KAAK,CAAC;IACpB,KAAK,CAAgB;I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AAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACH,IAAI,IAAI,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;gBACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAjiBD,0DAiiBC"}
@@ -0,0 +1,48 @@
1
+ {
2
+ "interfaces": {
3
+ "google.maps.navconnect.v1.NavConnectService": {
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
+ "CreateTrip": {
36
+ "timeout_millis": 60000,
37
+ "retry_codes_name": "non_idempotent",
38
+ "retry_params_name": "default"
39
+ },
40
+ "GetTrip": {
41
+ "timeout_millis": 60000,
42
+ "retry_codes_name": "unavailable",
43
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,3 @@
1
+ [
2
+ "../../protos/google/maps/navconnect/v1/navconnect_service.proto"
3
+ ]
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@google-cloud/navconnect",
3
+ "version": "0.1.0",
4
+ "description": "Navigation Connect 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-navconnect"
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-navconnect",
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 navigationconnect",
28
+ "navigationconnect",
29
+ "Navigation Connect 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": "^5.0.0"
49
+ },
50
+ "devDependencies": {
51
+ "@types/mocha": "^10.0.10",
52
+ "@types/node": "^22.13.9",
53
+ "@types/sinon": "^17.0.4",
54
+ "c8": "^10.1.3",
55
+ "gapic-tools": "^1.0.0",
56
+ "gts": "^6.0.2",
57
+ "jsdoc": "^4.0.4",
58
+ "jsdoc-fresh": "^4.0.0",
59
+ "jsdoc-region-tag": "^3.0.0",
60
+ "linkinator": "^6.1.2",
61
+ "long": "^5.3.1",
62
+ "mocha": "^11.1.0",
63
+ "pack-n-play": "^3.0.0",
64
+ "sinon": "^21.0.0",
65
+ "typescript": "^5.8.2"
66
+ },
67
+ "engines": {
68
+ "node": ">=18.0.0"
69
+ }
70
+ }