@google-analytics/data 4.12.0 → 5.0.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.
- package/CHANGELOG.md +23 -0
- package/README.md +2 -2
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +1 -1
- package/build/protos/google/analytics/data/v1alpha/data.proto +1 -1
- package/build/protos/google/analytics/data/v1beta/analytics_data_api.proto +1 -1
- package/build/protos/google/analytics/data/v1beta/data.proto +1 -1
- package/build/protos/protos.d.ts +1 -1
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +0 -3
- package/build/src/index.js +1 -1
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +8 -7
- package/build/src/v1alpha/alpha_analytics_data_client.js +307 -79
- package/build/src/v1alpha/alpha_analytics_data_proto_list.json +4 -0
- package/build/src/v1alpha/gapic_metadata.json +175 -0
- package/build/src/v1alpha/index.js +1 -1
- package/build/src/v1beta/beta_analytics_data_client.d.ts +6 -5
- package/build/src/v1beta/beta_analytics_data_client.js +254 -60
- package/build/src/v1beta/beta_analytics_data_proto_list.json +4 -0
- package/build/src/v1beta/gapic_metadata.json +137 -0
- package/build/src/v1beta/index.js +1 -1
- package/package.json +16 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2025 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.BetaAnalyticsDataClient = void 0;
|
|
21
21
|
const jsonProtos = require("../../protos/protos.json");
|
|
22
|
+
const google_gax_1 = require("google-gax");
|
|
22
23
|
/**
|
|
23
24
|
* Client JSON configuration object, loaded from
|
|
24
25
|
* `src/v1beta/beta_analytics_data_client_config.json`.
|
|
@@ -32,6 +33,28 @@ const version = require('../../../package.json').version;
|
|
|
32
33
|
* @memberof v1beta
|
|
33
34
|
*/
|
|
34
35
|
class BetaAnalyticsDataClient {
|
|
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('data');
|
|
46
|
+
auth;
|
|
47
|
+
descriptors = {
|
|
48
|
+
page: {},
|
|
49
|
+
stream: {},
|
|
50
|
+
longrunning: {},
|
|
51
|
+
batching: {},
|
|
52
|
+
};
|
|
53
|
+
warn;
|
|
54
|
+
innerApiCalls;
|
|
55
|
+
pathTemplates;
|
|
56
|
+
operationsClient;
|
|
57
|
+
betaAnalyticsDataStub;
|
|
35
58
|
/**
|
|
36
59
|
* Construct an instance of BetaAnalyticsDataClient.
|
|
37
60
|
*
|
|
@@ -54,7 +77,7 @@ class BetaAnalyticsDataClient {
|
|
|
54
77
|
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
55
78
|
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
56
79
|
* app is running in an environment which supports
|
|
57
|
-
* {@link https://
|
|
80
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
58
81
|
* your project ID will be detected automatically.
|
|
59
82
|
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
60
83
|
* API remote host.
|
|
@@ -72,32 +95,28 @@ class BetaAnalyticsDataClient {
|
|
|
72
95
|
* ```
|
|
73
96
|
*/
|
|
74
97
|
constructor(opts, gaxInstance) {
|
|
75
|
-
var _a, _b, _c, _d, _e;
|
|
76
|
-
this._terminated = false;
|
|
77
|
-
this.descriptors = {
|
|
78
|
-
page: {},
|
|
79
|
-
stream: {},
|
|
80
|
-
longrunning: {},
|
|
81
|
-
batching: {},
|
|
82
|
-
};
|
|
83
98
|
// Ensure that options include all the required fields.
|
|
84
99
|
const staticMembers = this.constructor;
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
100
|
+
if (opts?.universe_domain &&
|
|
101
|
+
opts?.universeDomain &&
|
|
102
|
+
opts?.universe_domain !== opts?.universeDomain) {
|
|
88
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
89
104
|
}
|
|
90
105
|
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
91
106
|
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
92
107
|
: undefined;
|
|
93
108
|
this._universeDomain =
|
|
94
|
-
|
|
109
|
+
opts?.universeDomain ??
|
|
110
|
+
opts?.universe_domain ??
|
|
111
|
+
universeDomainEnvVar ??
|
|
112
|
+
'googleapis.com';
|
|
95
113
|
this._servicePath = 'analyticsdata.' + this._universeDomain;
|
|
96
|
-
const servicePath =
|
|
97
|
-
this._providedCustomServicePath = !!(
|
|
98
|
-
const port =
|
|
99
|
-
const clientConfig =
|
|
100
|
-
const fallback =
|
|
114
|
+
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
115
|
+
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
116
|
+
const port = opts?.port || staticMembers.port;
|
|
117
|
+
const clientConfig = opts?.clientConfig ?? {};
|
|
118
|
+
const fallback = opts?.fallback ??
|
|
119
|
+
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
101
120
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
102
121
|
// Request numeric enum values if REST transport is used.
|
|
103
122
|
opts.numericEnums = true;
|
|
@@ -306,7 +325,6 @@ class BetaAnalyticsDataClient {
|
|
|
306
325
|
return this.auth.getProjectId();
|
|
307
326
|
}
|
|
308
327
|
runReport(request, optionsOrCallback, callback) {
|
|
309
|
-
var _a;
|
|
310
328
|
request = request || {};
|
|
311
329
|
let options;
|
|
312
330
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -321,13 +339,24 @@ class BetaAnalyticsDataClient {
|
|
|
321
339
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
322
340
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
323
341
|
this._gaxModule.routingHeader.fromParams({
|
|
324
|
-
property:
|
|
342
|
+
property: request.property ?? '',
|
|
325
343
|
});
|
|
326
344
|
this.initialize();
|
|
327
|
-
|
|
345
|
+
this._log.info('runReport request %j', request);
|
|
346
|
+
const wrappedCallback = callback
|
|
347
|
+
? (error, response, options, rawResponse) => {
|
|
348
|
+
this._log.info('runReport response %j', response);
|
|
349
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
350
|
+
}
|
|
351
|
+
: undefined;
|
|
352
|
+
return this.innerApiCalls
|
|
353
|
+
.runReport(request, options, wrappedCallback)
|
|
354
|
+
?.then(([response, options, rawResponse]) => {
|
|
355
|
+
this._log.info('runReport response %j', response);
|
|
356
|
+
return [response, options, rawResponse];
|
|
357
|
+
});
|
|
328
358
|
}
|
|
329
359
|
runPivotReport(request, optionsOrCallback, callback) {
|
|
330
|
-
var _a;
|
|
331
360
|
request = request || {};
|
|
332
361
|
let options;
|
|
333
362
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -342,13 +371,24 @@ class BetaAnalyticsDataClient {
|
|
|
342
371
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
343
372
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
344
373
|
this._gaxModule.routingHeader.fromParams({
|
|
345
|
-
property:
|
|
374
|
+
property: request.property ?? '',
|
|
346
375
|
});
|
|
347
376
|
this.initialize();
|
|
348
|
-
|
|
377
|
+
this._log.info('runPivotReport request %j', request);
|
|
378
|
+
const wrappedCallback = callback
|
|
379
|
+
? (error, response, options, rawResponse) => {
|
|
380
|
+
this._log.info('runPivotReport response %j', response);
|
|
381
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
382
|
+
}
|
|
383
|
+
: undefined;
|
|
384
|
+
return this.innerApiCalls
|
|
385
|
+
.runPivotReport(request, options, wrappedCallback)
|
|
386
|
+
?.then(([response, options, rawResponse]) => {
|
|
387
|
+
this._log.info('runPivotReport response %j', response);
|
|
388
|
+
return [response, options, rawResponse];
|
|
389
|
+
});
|
|
349
390
|
}
|
|
350
391
|
batchRunReports(request, optionsOrCallback, callback) {
|
|
351
|
-
var _a;
|
|
352
392
|
request = request || {};
|
|
353
393
|
let options;
|
|
354
394
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -363,13 +403,24 @@ class BetaAnalyticsDataClient {
|
|
|
363
403
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
364
404
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
365
405
|
this._gaxModule.routingHeader.fromParams({
|
|
366
|
-
property:
|
|
406
|
+
property: request.property ?? '',
|
|
367
407
|
});
|
|
368
408
|
this.initialize();
|
|
369
|
-
|
|
409
|
+
this._log.info('batchRunReports request %j', request);
|
|
410
|
+
const wrappedCallback = callback
|
|
411
|
+
? (error, response, options, rawResponse) => {
|
|
412
|
+
this._log.info('batchRunReports response %j', response);
|
|
413
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
414
|
+
}
|
|
415
|
+
: undefined;
|
|
416
|
+
return this.innerApiCalls
|
|
417
|
+
.batchRunReports(request, options, wrappedCallback)
|
|
418
|
+
?.then(([response, options, rawResponse]) => {
|
|
419
|
+
this._log.info('batchRunReports response %j', response);
|
|
420
|
+
return [response, options, rawResponse];
|
|
421
|
+
});
|
|
370
422
|
}
|
|
371
423
|
batchRunPivotReports(request, optionsOrCallback, callback) {
|
|
372
|
-
var _a;
|
|
373
424
|
request = request || {};
|
|
374
425
|
let options;
|
|
375
426
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -384,13 +435,24 @@ class BetaAnalyticsDataClient {
|
|
|
384
435
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
385
436
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
386
437
|
this._gaxModule.routingHeader.fromParams({
|
|
387
|
-
property:
|
|
438
|
+
property: request.property ?? '',
|
|
388
439
|
});
|
|
389
440
|
this.initialize();
|
|
390
|
-
|
|
441
|
+
this._log.info('batchRunPivotReports request %j', request);
|
|
442
|
+
const wrappedCallback = callback
|
|
443
|
+
? (error, response, options, rawResponse) => {
|
|
444
|
+
this._log.info('batchRunPivotReports response %j', response);
|
|
445
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
446
|
+
}
|
|
447
|
+
: undefined;
|
|
448
|
+
return this.innerApiCalls
|
|
449
|
+
.batchRunPivotReports(request, options, wrappedCallback)
|
|
450
|
+
?.then(([response, options, rawResponse]) => {
|
|
451
|
+
this._log.info('batchRunPivotReports response %j', response);
|
|
452
|
+
return [response, options, rawResponse];
|
|
453
|
+
});
|
|
391
454
|
}
|
|
392
455
|
getMetadata(request, optionsOrCallback, callback) {
|
|
393
|
-
var _a;
|
|
394
456
|
request = request || {};
|
|
395
457
|
let options;
|
|
396
458
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -405,13 +467,24 @@ class BetaAnalyticsDataClient {
|
|
|
405
467
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
406
468
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
407
469
|
this._gaxModule.routingHeader.fromParams({
|
|
408
|
-
name:
|
|
470
|
+
name: request.name ?? '',
|
|
409
471
|
});
|
|
410
472
|
this.initialize();
|
|
411
|
-
|
|
473
|
+
this._log.info('getMetadata request %j', request);
|
|
474
|
+
const wrappedCallback = callback
|
|
475
|
+
? (error, response, options, rawResponse) => {
|
|
476
|
+
this._log.info('getMetadata response %j', response);
|
|
477
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
478
|
+
}
|
|
479
|
+
: undefined;
|
|
480
|
+
return this.innerApiCalls
|
|
481
|
+
.getMetadata(request, options, wrappedCallback)
|
|
482
|
+
?.then(([response, options, rawResponse]) => {
|
|
483
|
+
this._log.info('getMetadata response %j', response);
|
|
484
|
+
return [response, options, rawResponse];
|
|
485
|
+
});
|
|
412
486
|
}
|
|
413
487
|
runRealtimeReport(request, optionsOrCallback, callback) {
|
|
414
|
-
var _a;
|
|
415
488
|
request = request || {};
|
|
416
489
|
let options;
|
|
417
490
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -426,13 +499,24 @@ class BetaAnalyticsDataClient {
|
|
|
426
499
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
427
500
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
428
501
|
this._gaxModule.routingHeader.fromParams({
|
|
429
|
-
property:
|
|
502
|
+
property: request.property ?? '',
|
|
430
503
|
});
|
|
431
504
|
this.initialize();
|
|
432
|
-
|
|
505
|
+
this._log.info('runRealtimeReport request %j', request);
|
|
506
|
+
const wrappedCallback = callback
|
|
507
|
+
? (error, response, options, rawResponse) => {
|
|
508
|
+
this._log.info('runRealtimeReport response %j', response);
|
|
509
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
510
|
+
}
|
|
511
|
+
: undefined;
|
|
512
|
+
return this.innerApiCalls
|
|
513
|
+
.runRealtimeReport(request, options, wrappedCallback)
|
|
514
|
+
?.then(([response, options, rawResponse]) => {
|
|
515
|
+
this._log.info('runRealtimeReport response %j', response);
|
|
516
|
+
return [response, options, rawResponse];
|
|
517
|
+
});
|
|
433
518
|
}
|
|
434
519
|
checkCompatibility(request, optionsOrCallback, callback) {
|
|
435
|
-
var _a;
|
|
436
520
|
request = request || {};
|
|
437
521
|
let options;
|
|
438
522
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -447,13 +531,24 @@ class BetaAnalyticsDataClient {
|
|
|
447
531
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
448
532
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
449
533
|
this._gaxModule.routingHeader.fromParams({
|
|
450
|
-
property:
|
|
534
|
+
property: request.property ?? '',
|
|
451
535
|
});
|
|
452
536
|
this.initialize();
|
|
453
|
-
|
|
537
|
+
this._log.info('checkCompatibility request %j', request);
|
|
538
|
+
const wrappedCallback = callback
|
|
539
|
+
? (error, response, options, rawResponse) => {
|
|
540
|
+
this._log.info('checkCompatibility response %j', response);
|
|
541
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
542
|
+
}
|
|
543
|
+
: undefined;
|
|
544
|
+
return this.innerApiCalls
|
|
545
|
+
.checkCompatibility(request, options, wrappedCallback)
|
|
546
|
+
?.then(([response, options, rawResponse]) => {
|
|
547
|
+
this._log.info('checkCompatibility response %j', response);
|
|
548
|
+
return [response, options, rawResponse];
|
|
549
|
+
});
|
|
454
550
|
}
|
|
455
551
|
queryAudienceExport(request, optionsOrCallback, callback) {
|
|
456
|
-
var _a;
|
|
457
552
|
request = request || {};
|
|
458
553
|
let options;
|
|
459
554
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -468,13 +563,24 @@ class BetaAnalyticsDataClient {
|
|
|
468
563
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
469
564
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
470
565
|
this._gaxModule.routingHeader.fromParams({
|
|
471
|
-
name:
|
|
566
|
+
name: request.name ?? '',
|
|
472
567
|
});
|
|
473
568
|
this.initialize();
|
|
474
|
-
|
|
569
|
+
this._log.info('queryAudienceExport request %j', request);
|
|
570
|
+
const wrappedCallback = callback
|
|
571
|
+
? (error, response, options, rawResponse) => {
|
|
572
|
+
this._log.info('queryAudienceExport response %j', response);
|
|
573
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
574
|
+
}
|
|
575
|
+
: undefined;
|
|
576
|
+
return this.innerApiCalls
|
|
577
|
+
.queryAudienceExport(request, options, wrappedCallback)
|
|
578
|
+
?.then(([response, options, rawResponse]) => {
|
|
579
|
+
this._log.info('queryAudienceExport response %j', response);
|
|
580
|
+
return [response, options, rawResponse];
|
|
581
|
+
});
|
|
475
582
|
}
|
|
476
583
|
getAudienceExport(request, optionsOrCallback, callback) {
|
|
477
|
-
var _a;
|
|
478
584
|
request = request || {};
|
|
479
585
|
let options;
|
|
480
586
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -489,13 +595,24 @@ class BetaAnalyticsDataClient {
|
|
|
489
595
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
490
596
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
491
597
|
this._gaxModule.routingHeader.fromParams({
|
|
492
|
-
name:
|
|
598
|
+
name: request.name ?? '',
|
|
493
599
|
});
|
|
494
600
|
this.initialize();
|
|
495
|
-
|
|
601
|
+
this._log.info('getAudienceExport request %j', request);
|
|
602
|
+
const wrappedCallback = callback
|
|
603
|
+
? (error, response, options, rawResponse) => {
|
|
604
|
+
this._log.info('getAudienceExport response %j', response);
|
|
605
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
606
|
+
}
|
|
607
|
+
: undefined;
|
|
608
|
+
return this.innerApiCalls
|
|
609
|
+
.getAudienceExport(request, options, wrappedCallback)
|
|
610
|
+
?.then(([response, options, rawResponse]) => {
|
|
611
|
+
this._log.info('getAudienceExport response %j', response);
|
|
612
|
+
return [response, options, rawResponse];
|
|
613
|
+
});
|
|
496
614
|
}
|
|
497
615
|
createAudienceExport(request, optionsOrCallback, callback) {
|
|
498
|
-
var _a;
|
|
499
616
|
request = request || {};
|
|
500
617
|
let options;
|
|
501
618
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -510,10 +627,22 @@ class BetaAnalyticsDataClient {
|
|
|
510
627
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
511
628
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
512
629
|
this._gaxModule.routingHeader.fromParams({
|
|
513
|
-
parent:
|
|
630
|
+
parent: request.parent ?? '',
|
|
514
631
|
});
|
|
515
632
|
this.initialize();
|
|
516
|
-
|
|
633
|
+
const wrappedCallback = callback
|
|
634
|
+
? (error, response, rawResponse, _) => {
|
|
635
|
+
this._log.info('createAudienceExport response %j', rawResponse);
|
|
636
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
637
|
+
}
|
|
638
|
+
: undefined;
|
|
639
|
+
this._log.info('createAudienceExport request %j', request);
|
|
640
|
+
return this.innerApiCalls
|
|
641
|
+
.createAudienceExport(request, options, wrappedCallback)
|
|
642
|
+
?.then(([response, rawResponse, _]) => {
|
|
643
|
+
this._log.info('createAudienceExport response %j', rawResponse);
|
|
644
|
+
return [response, rawResponse, _];
|
|
645
|
+
});
|
|
517
646
|
}
|
|
518
647
|
/**
|
|
519
648
|
* Check the status of the long running operation returned by `createAudienceExport()`.
|
|
@@ -527,13 +656,13 @@ class BetaAnalyticsDataClient {
|
|
|
527
656
|
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async
|
|
528
657
|
*/
|
|
529
658
|
async checkCreateAudienceExportProgress(name) {
|
|
659
|
+
this._log.info('createAudienceExport long-running');
|
|
530
660
|
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
531
661
|
const [operation] = await this.operationsClient.getOperation(request);
|
|
532
662
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceExport, this._gaxModule.createDefaultBackoffSettings());
|
|
533
663
|
return decodeOperation;
|
|
534
664
|
}
|
|
535
665
|
listAudienceExports(request, optionsOrCallback, callback) {
|
|
536
|
-
var _a;
|
|
537
666
|
request = request || {};
|
|
538
667
|
let options;
|
|
539
668
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -548,13 +677,25 @@ class BetaAnalyticsDataClient {
|
|
|
548
677
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
549
678
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
550
679
|
this._gaxModule.routingHeader.fromParams({
|
|
551
|
-
parent:
|
|
680
|
+
parent: request.parent ?? '',
|
|
552
681
|
});
|
|
553
682
|
this.initialize();
|
|
554
|
-
|
|
683
|
+
const wrappedCallback = callback
|
|
684
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
685
|
+
this._log.info('listAudienceExports values %j', values);
|
|
686
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
687
|
+
}
|
|
688
|
+
: undefined;
|
|
689
|
+
this._log.info('listAudienceExports request %j', request);
|
|
690
|
+
return this.innerApiCalls
|
|
691
|
+
.listAudienceExports(request, options, wrappedCallback)
|
|
692
|
+
?.then(([response, input, output]) => {
|
|
693
|
+
this._log.info('listAudienceExports values %j', response);
|
|
694
|
+
return [response, input, output];
|
|
695
|
+
});
|
|
555
696
|
}
|
|
556
697
|
/**
|
|
557
|
-
* Equivalent to `
|
|
698
|
+
* Equivalent to `listAudienceExports`, but returns a NodeJS Stream object.
|
|
558
699
|
* @param {Object} request
|
|
559
700
|
* The request object that will be sent.
|
|
560
701
|
* @param {string} request.parent
|
|
@@ -583,18 +724,18 @@ class BetaAnalyticsDataClient {
|
|
|
583
724
|
* for more details and examples.
|
|
584
725
|
*/
|
|
585
726
|
listAudienceExportsStream(request, options) {
|
|
586
|
-
var _a;
|
|
587
727
|
request = request || {};
|
|
588
728
|
options = options || {};
|
|
589
729
|
options.otherArgs = options.otherArgs || {};
|
|
590
730
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
591
731
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
592
732
|
this._gaxModule.routingHeader.fromParams({
|
|
593
|
-
parent:
|
|
733
|
+
parent: request.parent ?? '',
|
|
594
734
|
});
|
|
595
735
|
const defaultCallSettings = this._defaults['listAudienceExports'];
|
|
596
736
|
const callSettings = defaultCallSettings.merge(options);
|
|
597
737
|
this.initialize();
|
|
738
|
+
this._log.info('listAudienceExports stream %j', request);
|
|
598
739
|
return this.descriptors.page.listAudienceExports.createStream(this.innerApiCalls.listAudienceExports, request, callSettings);
|
|
599
740
|
}
|
|
600
741
|
/**
|
|
@@ -630,18 +771,18 @@ class BetaAnalyticsDataClient {
|
|
|
630
771
|
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async
|
|
631
772
|
*/
|
|
632
773
|
listAudienceExportsAsync(request, options) {
|
|
633
|
-
var _a;
|
|
634
774
|
request = request || {};
|
|
635
775
|
options = options || {};
|
|
636
776
|
options.otherArgs = options.otherArgs || {};
|
|
637
777
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
638
778
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
639
779
|
this._gaxModule.routingHeader.fromParams({
|
|
640
|
-
parent:
|
|
780
|
+
parent: request.parent ?? '',
|
|
641
781
|
});
|
|
642
782
|
const defaultCallSettings = this._defaults['listAudienceExports'];
|
|
643
783
|
const callSettings = defaultCallSettings.merge(options);
|
|
644
784
|
this.initialize();
|
|
785
|
+
this._log.info('listAudienceExports iterate %j', request);
|
|
645
786
|
return this.descriptors.page.listAudienceExports.asyncIterate(this.innerApiCalls['listAudienceExports'], request, callSettings);
|
|
646
787
|
}
|
|
647
788
|
/**
|
|
@@ -674,7 +815,22 @@ class BetaAnalyticsDataClient {
|
|
|
674
815
|
* // doThingsWith(response)
|
|
675
816
|
* ```
|
|
676
817
|
*/
|
|
677
|
-
getOperation(request,
|
|
818
|
+
getOperation(request, optionsOrCallback, callback) {
|
|
819
|
+
let options;
|
|
820
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
821
|
+
callback = optionsOrCallback;
|
|
822
|
+
options = {};
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
options = optionsOrCallback;
|
|
826
|
+
}
|
|
827
|
+
options = options || {};
|
|
828
|
+
options.otherArgs = options.otherArgs || {};
|
|
829
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
830
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
831
|
+
this._gaxModule.routingHeader.fromParams({
|
|
832
|
+
name: request.name ?? '',
|
|
833
|
+
});
|
|
678
834
|
return this.operationsClient.getOperation(request, options, callback);
|
|
679
835
|
}
|
|
680
836
|
/**
|
|
@@ -708,6 +864,13 @@ class BetaAnalyticsDataClient {
|
|
|
708
864
|
* ```
|
|
709
865
|
*/
|
|
710
866
|
listOperationsAsync(request, options) {
|
|
867
|
+
options = options || {};
|
|
868
|
+
options.otherArgs = options.otherArgs || {};
|
|
869
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
870
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
871
|
+
this._gaxModule.routingHeader.fromParams({
|
|
872
|
+
name: request.name ?? '',
|
|
873
|
+
});
|
|
711
874
|
return this.operationsClient.listOperationsAsync(request, options);
|
|
712
875
|
}
|
|
713
876
|
/**
|
|
@@ -741,7 +904,22 @@ class BetaAnalyticsDataClient {
|
|
|
741
904
|
* await client.cancelOperation({name: ''});
|
|
742
905
|
* ```
|
|
743
906
|
*/
|
|
744
|
-
cancelOperation(request,
|
|
907
|
+
cancelOperation(request, optionsOrCallback, callback) {
|
|
908
|
+
let options;
|
|
909
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
910
|
+
callback = optionsOrCallback;
|
|
911
|
+
options = {};
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
options = optionsOrCallback;
|
|
915
|
+
}
|
|
916
|
+
options = options || {};
|
|
917
|
+
options.otherArgs = options.otherArgs || {};
|
|
918
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
919
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
920
|
+
this._gaxModule.routingHeader.fromParams({
|
|
921
|
+
name: request.name ?? '',
|
|
922
|
+
});
|
|
745
923
|
return this.operationsClient.cancelOperation(request, options, callback);
|
|
746
924
|
}
|
|
747
925
|
/**
|
|
@@ -769,7 +947,22 @@ class BetaAnalyticsDataClient {
|
|
|
769
947
|
* await client.deleteOperation({name: ''});
|
|
770
948
|
* ```
|
|
771
949
|
*/
|
|
772
|
-
deleteOperation(request,
|
|
950
|
+
deleteOperation(request, optionsOrCallback, callback) {
|
|
951
|
+
let options;
|
|
952
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
953
|
+
callback = optionsOrCallback;
|
|
954
|
+
options = {};
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
options = optionsOrCallback;
|
|
958
|
+
}
|
|
959
|
+
options = options || {};
|
|
960
|
+
options.otherArgs = options.otherArgs || {};
|
|
961
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
962
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
963
|
+
this._gaxModule.routingHeader.fromParams({
|
|
964
|
+
name: request.name ?? '',
|
|
965
|
+
});
|
|
773
966
|
return this.operationsClient.deleteOperation(request, options, callback);
|
|
774
967
|
}
|
|
775
968
|
// --------------------
|
|
@@ -859,6 +1052,7 @@ class BetaAnalyticsDataClient {
|
|
|
859
1052
|
close() {
|
|
860
1053
|
if (this.betaAnalyticsDataStub && !this._terminated) {
|
|
861
1054
|
return this.betaAnalyticsDataStub.then(stub => {
|
|
1055
|
+
this._log.info('ending gRPC channel');
|
|
862
1056
|
this._terminated = true;
|
|
863
1057
|
stub.close();
|
|
864
1058
|
this.operationsClient.close();
|