@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.AlphaAnalyticsDataClient = 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/v1alpha/alpha_analytics_data_client_config.json`.
|
|
@@ -32,6 +33,28 @@ const version = require('../../../package.json').version;
|
|
|
32
33
|
* @memberof v1alpha
|
|
33
34
|
*/
|
|
34
35
|
class AlphaAnalyticsDataClient {
|
|
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
|
+
alphaAnalyticsDataStub;
|
|
35
58
|
/**
|
|
36
59
|
* Construct an instance of AlphaAnalyticsDataClient.
|
|
37
60
|
*
|
|
@@ -54,7 +77,7 @@ class AlphaAnalyticsDataClient {
|
|
|
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 AlphaAnalyticsDataClient {
|
|
|
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;
|
|
@@ -320,7 +339,6 @@ class AlphaAnalyticsDataClient {
|
|
|
320
339
|
return this.auth.getProjectId();
|
|
321
340
|
}
|
|
322
341
|
runFunnelReport(request, optionsOrCallback, callback) {
|
|
323
|
-
var _a;
|
|
324
342
|
request = request || {};
|
|
325
343
|
let options;
|
|
326
344
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -335,13 +353,24 @@ class AlphaAnalyticsDataClient {
|
|
|
335
353
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
336
354
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
337
355
|
this._gaxModule.routingHeader.fromParams({
|
|
338
|
-
property:
|
|
356
|
+
property: request.property ?? '',
|
|
339
357
|
});
|
|
340
358
|
this.initialize();
|
|
341
|
-
|
|
359
|
+
this._log.info('runFunnelReport request %j', request);
|
|
360
|
+
const wrappedCallback = callback
|
|
361
|
+
? (error, response, options, rawResponse) => {
|
|
362
|
+
this._log.info('runFunnelReport response %j', response);
|
|
363
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
364
|
+
}
|
|
365
|
+
: undefined;
|
|
366
|
+
return this.innerApiCalls
|
|
367
|
+
.runFunnelReport(request, options, wrappedCallback)
|
|
368
|
+
?.then(([response, options, rawResponse]) => {
|
|
369
|
+
this._log.info('runFunnelReport response %j', response);
|
|
370
|
+
return [response, options, rawResponse];
|
|
371
|
+
});
|
|
342
372
|
}
|
|
343
373
|
queryAudienceList(request, optionsOrCallback, callback) {
|
|
344
|
-
var _a;
|
|
345
374
|
request = request || {};
|
|
346
375
|
let options;
|
|
347
376
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -356,13 +385,24 @@ class AlphaAnalyticsDataClient {
|
|
|
356
385
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
357
386
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
358
387
|
this._gaxModule.routingHeader.fromParams({
|
|
359
|
-
name:
|
|
388
|
+
name: request.name ?? '',
|
|
360
389
|
});
|
|
361
390
|
this.initialize();
|
|
362
|
-
|
|
391
|
+
this._log.info('queryAudienceList request %j', request);
|
|
392
|
+
const wrappedCallback = callback
|
|
393
|
+
? (error, response, options, rawResponse) => {
|
|
394
|
+
this._log.info('queryAudienceList response %j', response);
|
|
395
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
396
|
+
}
|
|
397
|
+
: undefined;
|
|
398
|
+
return this.innerApiCalls
|
|
399
|
+
.queryAudienceList(request, options, wrappedCallback)
|
|
400
|
+
?.then(([response, options, rawResponse]) => {
|
|
401
|
+
this._log.info('queryAudienceList response %j', response);
|
|
402
|
+
return [response, options, rawResponse];
|
|
403
|
+
});
|
|
363
404
|
}
|
|
364
405
|
sheetExportAudienceList(request, optionsOrCallback, callback) {
|
|
365
|
-
var _a;
|
|
366
406
|
request = request || {};
|
|
367
407
|
let options;
|
|
368
408
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -377,13 +417,24 @@ class AlphaAnalyticsDataClient {
|
|
|
377
417
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
378
418
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
379
419
|
this._gaxModule.routingHeader.fromParams({
|
|
380
|
-
name:
|
|
420
|
+
name: request.name ?? '',
|
|
381
421
|
});
|
|
382
422
|
this.initialize();
|
|
383
|
-
|
|
423
|
+
this._log.info('sheetExportAudienceList request %j', request);
|
|
424
|
+
const wrappedCallback = callback
|
|
425
|
+
? (error, response, options, rawResponse) => {
|
|
426
|
+
this._log.info('sheetExportAudienceList response %j', response);
|
|
427
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
428
|
+
}
|
|
429
|
+
: undefined;
|
|
430
|
+
return this.innerApiCalls
|
|
431
|
+
.sheetExportAudienceList(request, options, wrappedCallback)
|
|
432
|
+
?.then(([response, options, rawResponse]) => {
|
|
433
|
+
this._log.info('sheetExportAudienceList response %j', response);
|
|
434
|
+
return [response, options, rawResponse];
|
|
435
|
+
});
|
|
384
436
|
}
|
|
385
437
|
getAudienceList(request, optionsOrCallback, callback) {
|
|
386
|
-
var _a;
|
|
387
438
|
request = request || {};
|
|
388
439
|
let options;
|
|
389
440
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -398,13 +449,24 @@ class AlphaAnalyticsDataClient {
|
|
|
398
449
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
399
450
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
400
451
|
this._gaxModule.routingHeader.fromParams({
|
|
401
|
-
name:
|
|
452
|
+
name: request.name ?? '',
|
|
402
453
|
});
|
|
403
454
|
this.initialize();
|
|
404
|
-
|
|
455
|
+
this._log.info('getAudienceList request %j', request);
|
|
456
|
+
const wrappedCallback = callback
|
|
457
|
+
? (error, response, options, rawResponse) => {
|
|
458
|
+
this._log.info('getAudienceList response %j', response);
|
|
459
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
460
|
+
}
|
|
461
|
+
: undefined;
|
|
462
|
+
return this.innerApiCalls
|
|
463
|
+
.getAudienceList(request, options, wrappedCallback)
|
|
464
|
+
?.then(([response, options, rawResponse]) => {
|
|
465
|
+
this._log.info('getAudienceList response %j', response);
|
|
466
|
+
return [response, options, rawResponse];
|
|
467
|
+
});
|
|
405
468
|
}
|
|
406
469
|
createRecurringAudienceList(request, optionsOrCallback, callback) {
|
|
407
|
-
var _a;
|
|
408
470
|
request = request || {};
|
|
409
471
|
let options;
|
|
410
472
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -419,13 +481,24 @@ class AlphaAnalyticsDataClient {
|
|
|
419
481
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
420
482
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
421
483
|
this._gaxModule.routingHeader.fromParams({
|
|
422
|
-
parent:
|
|
484
|
+
parent: request.parent ?? '',
|
|
423
485
|
});
|
|
424
486
|
this.initialize();
|
|
425
|
-
|
|
487
|
+
this._log.info('createRecurringAudienceList request %j', request);
|
|
488
|
+
const wrappedCallback = callback
|
|
489
|
+
? (error, response, options, rawResponse) => {
|
|
490
|
+
this._log.info('createRecurringAudienceList response %j', response);
|
|
491
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
492
|
+
}
|
|
493
|
+
: undefined;
|
|
494
|
+
return this.innerApiCalls
|
|
495
|
+
.createRecurringAudienceList(request, options, wrappedCallback)
|
|
496
|
+
?.then(([response, options, rawResponse]) => {
|
|
497
|
+
this._log.info('createRecurringAudienceList response %j', response);
|
|
498
|
+
return [response, options, rawResponse];
|
|
499
|
+
});
|
|
426
500
|
}
|
|
427
501
|
getRecurringAudienceList(request, optionsOrCallback, callback) {
|
|
428
|
-
var _a;
|
|
429
502
|
request = request || {};
|
|
430
503
|
let options;
|
|
431
504
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -440,13 +513,24 @@ class AlphaAnalyticsDataClient {
|
|
|
440
513
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
441
514
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
442
515
|
this._gaxModule.routingHeader.fromParams({
|
|
443
|
-
name:
|
|
516
|
+
name: request.name ?? '',
|
|
444
517
|
});
|
|
445
518
|
this.initialize();
|
|
446
|
-
|
|
519
|
+
this._log.info('getRecurringAudienceList request %j', request);
|
|
520
|
+
const wrappedCallback = callback
|
|
521
|
+
? (error, response, options, rawResponse) => {
|
|
522
|
+
this._log.info('getRecurringAudienceList response %j', response);
|
|
523
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
524
|
+
}
|
|
525
|
+
: undefined;
|
|
526
|
+
return this.innerApiCalls
|
|
527
|
+
.getRecurringAudienceList(request, options, wrappedCallback)
|
|
528
|
+
?.then(([response, options, rawResponse]) => {
|
|
529
|
+
this._log.info('getRecurringAudienceList response %j', response);
|
|
530
|
+
return [response, options, rawResponse];
|
|
531
|
+
});
|
|
447
532
|
}
|
|
448
533
|
getPropertyQuotasSnapshot(request, optionsOrCallback, callback) {
|
|
449
|
-
var _a;
|
|
450
534
|
request = request || {};
|
|
451
535
|
let options;
|
|
452
536
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -461,13 +545,24 @@ class AlphaAnalyticsDataClient {
|
|
|
461
545
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
462
546
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
463
547
|
this._gaxModule.routingHeader.fromParams({
|
|
464
|
-
name:
|
|
548
|
+
name: request.name ?? '',
|
|
465
549
|
});
|
|
466
550
|
this.initialize();
|
|
467
|
-
|
|
551
|
+
this._log.info('getPropertyQuotasSnapshot request %j', request);
|
|
552
|
+
const wrappedCallback = callback
|
|
553
|
+
? (error, response, options, rawResponse) => {
|
|
554
|
+
this._log.info('getPropertyQuotasSnapshot response %j', response);
|
|
555
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
556
|
+
}
|
|
557
|
+
: undefined;
|
|
558
|
+
return this.innerApiCalls
|
|
559
|
+
.getPropertyQuotasSnapshot(request, options, wrappedCallback)
|
|
560
|
+
?.then(([response, options, rawResponse]) => {
|
|
561
|
+
this._log.info('getPropertyQuotasSnapshot response %j', response);
|
|
562
|
+
return [response, options, rawResponse];
|
|
563
|
+
});
|
|
468
564
|
}
|
|
469
565
|
queryReportTask(request, optionsOrCallback, callback) {
|
|
470
|
-
var _a;
|
|
471
566
|
request = request || {};
|
|
472
567
|
let options;
|
|
473
568
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -482,13 +577,24 @@ class AlphaAnalyticsDataClient {
|
|
|
482
577
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
483
578
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
484
579
|
this._gaxModule.routingHeader.fromParams({
|
|
485
|
-
name:
|
|
580
|
+
name: request.name ?? '',
|
|
486
581
|
});
|
|
487
582
|
this.initialize();
|
|
488
|
-
|
|
583
|
+
this._log.info('queryReportTask request %j', request);
|
|
584
|
+
const wrappedCallback = callback
|
|
585
|
+
? (error, response, options, rawResponse) => {
|
|
586
|
+
this._log.info('queryReportTask response %j', response);
|
|
587
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
588
|
+
}
|
|
589
|
+
: undefined;
|
|
590
|
+
return this.innerApiCalls
|
|
591
|
+
.queryReportTask(request, options, wrappedCallback)
|
|
592
|
+
?.then(([response, options, rawResponse]) => {
|
|
593
|
+
this._log.info('queryReportTask response %j', response);
|
|
594
|
+
return [response, options, rawResponse];
|
|
595
|
+
});
|
|
489
596
|
}
|
|
490
597
|
getReportTask(request, optionsOrCallback, callback) {
|
|
491
|
-
var _a;
|
|
492
598
|
request = request || {};
|
|
493
599
|
let options;
|
|
494
600
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -503,13 +609,24 @@ class AlphaAnalyticsDataClient {
|
|
|
503
609
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
504
610
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
505
611
|
this._gaxModule.routingHeader.fromParams({
|
|
506
|
-
name:
|
|
612
|
+
name: request.name ?? '',
|
|
507
613
|
});
|
|
508
614
|
this.initialize();
|
|
509
|
-
|
|
615
|
+
this._log.info('getReportTask request %j', request);
|
|
616
|
+
const wrappedCallback = callback
|
|
617
|
+
? (error, response, options, rawResponse) => {
|
|
618
|
+
this._log.info('getReportTask response %j', response);
|
|
619
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
620
|
+
}
|
|
621
|
+
: undefined;
|
|
622
|
+
return this.innerApiCalls
|
|
623
|
+
.getReportTask(request, options, wrappedCallback)
|
|
624
|
+
?.then(([response, options, rawResponse]) => {
|
|
625
|
+
this._log.info('getReportTask response %j', response);
|
|
626
|
+
return [response, options, rawResponse];
|
|
627
|
+
});
|
|
510
628
|
}
|
|
511
629
|
createAudienceList(request, optionsOrCallback, callback) {
|
|
512
|
-
var _a;
|
|
513
630
|
request = request || {};
|
|
514
631
|
let options;
|
|
515
632
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -524,10 +641,22 @@ class AlphaAnalyticsDataClient {
|
|
|
524
641
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
525
642
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
526
643
|
this._gaxModule.routingHeader.fromParams({
|
|
527
|
-
parent:
|
|
644
|
+
parent: request.parent ?? '',
|
|
528
645
|
});
|
|
529
646
|
this.initialize();
|
|
530
|
-
|
|
647
|
+
const wrappedCallback = callback
|
|
648
|
+
? (error, response, rawResponse, _) => {
|
|
649
|
+
this._log.info('createAudienceList response %j', rawResponse);
|
|
650
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
651
|
+
}
|
|
652
|
+
: undefined;
|
|
653
|
+
this._log.info('createAudienceList request %j', request);
|
|
654
|
+
return this.innerApiCalls
|
|
655
|
+
.createAudienceList(request, options, wrappedCallback)
|
|
656
|
+
?.then(([response, rawResponse, _]) => {
|
|
657
|
+
this._log.info('createAudienceList response %j', rawResponse);
|
|
658
|
+
return [response, rawResponse, _];
|
|
659
|
+
});
|
|
531
660
|
}
|
|
532
661
|
/**
|
|
533
662
|
* Check the status of the long running operation returned by `createAudienceList()`.
|
|
@@ -541,13 +670,13 @@ class AlphaAnalyticsDataClient {
|
|
|
541
670
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async
|
|
542
671
|
*/
|
|
543
672
|
async checkCreateAudienceListProgress(name) {
|
|
673
|
+
this._log.info('createAudienceList long-running');
|
|
544
674
|
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
545
675
|
const [operation] = await this.operationsClient.getOperation(request);
|
|
546
676
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceList, this._gaxModule.createDefaultBackoffSettings());
|
|
547
677
|
return decodeOperation;
|
|
548
678
|
}
|
|
549
679
|
createReportTask(request, optionsOrCallback, callback) {
|
|
550
|
-
var _a;
|
|
551
680
|
request = request || {};
|
|
552
681
|
let options;
|
|
553
682
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -562,10 +691,22 @@ class AlphaAnalyticsDataClient {
|
|
|
562
691
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
563
692
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
564
693
|
this._gaxModule.routingHeader.fromParams({
|
|
565
|
-
parent:
|
|
694
|
+
parent: request.parent ?? '',
|
|
566
695
|
});
|
|
567
696
|
this.initialize();
|
|
568
|
-
|
|
697
|
+
const wrappedCallback = callback
|
|
698
|
+
? (error, response, rawResponse, _) => {
|
|
699
|
+
this._log.info('createReportTask response %j', rawResponse);
|
|
700
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
701
|
+
}
|
|
702
|
+
: undefined;
|
|
703
|
+
this._log.info('createReportTask request %j', request);
|
|
704
|
+
return this.innerApiCalls
|
|
705
|
+
.createReportTask(request, options, wrappedCallback)
|
|
706
|
+
?.then(([response, rawResponse, _]) => {
|
|
707
|
+
this._log.info('createReportTask response %j', rawResponse);
|
|
708
|
+
return [response, rawResponse, _];
|
|
709
|
+
});
|
|
569
710
|
}
|
|
570
711
|
/**
|
|
571
712
|
* Check the status of the long running operation returned by `createReportTask()`.
|
|
@@ -579,13 +720,13 @@ class AlphaAnalyticsDataClient {
|
|
|
579
720
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async
|
|
580
721
|
*/
|
|
581
722
|
async checkCreateReportTaskProgress(name) {
|
|
723
|
+
this._log.info('createReportTask long-running');
|
|
582
724
|
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
583
725
|
const [operation] = await this.operationsClient.getOperation(request);
|
|
584
726
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createReportTask, this._gaxModule.createDefaultBackoffSettings());
|
|
585
727
|
return decodeOperation;
|
|
586
728
|
}
|
|
587
729
|
listAudienceLists(request, optionsOrCallback, callback) {
|
|
588
|
-
var _a;
|
|
589
730
|
request = request || {};
|
|
590
731
|
let options;
|
|
591
732
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -600,13 +741,25 @@ class AlphaAnalyticsDataClient {
|
|
|
600
741
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
601
742
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
602
743
|
this._gaxModule.routingHeader.fromParams({
|
|
603
|
-
parent:
|
|
744
|
+
parent: request.parent ?? '',
|
|
604
745
|
});
|
|
605
746
|
this.initialize();
|
|
606
|
-
|
|
747
|
+
const wrappedCallback = callback
|
|
748
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
749
|
+
this._log.info('listAudienceLists values %j', values);
|
|
750
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
751
|
+
}
|
|
752
|
+
: undefined;
|
|
753
|
+
this._log.info('listAudienceLists request %j', request);
|
|
754
|
+
return this.innerApiCalls
|
|
755
|
+
.listAudienceLists(request, options, wrappedCallback)
|
|
756
|
+
?.then(([response, input, output]) => {
|
|
757
|
+
this._log.info('listAudienceLists values %j', response);
|
|
758
|
+
return [response, input, output];
|
|
759
|
+
});
|
|
607
760
|
}
|
|
608
761
|
/**
|
|
609
|
-
* Equivalent to `
|
|
762
|
+
* Equivalent to `listAudienceLists`, but returns a NodeJS Stream object.
|
|
610
763
|
* @param {Object} request
|
|
611
764
|
* The request object that will be sent.
|
|
612
765
|
* @param {string} request.parent
|
|
@@ -635,18 +788,18 @@ class AlphaAnalyticsDataClient {
|
|
|
635
788
|
* for more details and examples.
|
|
636
789
|
*/
|
|
637
790
|
listAudienceListsStream(request, options) {
|
|
638
|
-
var _a;
|
|
639
791
|
request = request || {};
|
|
640
792
|
options = options || {};
|
|
641
793
|
options.otherArgs = options.otherArgs || {};
|
|
642
794
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
643
795
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
644
796
|
this._gaxModule.routingHeader.fromParams({
|
|
645
|
-
parent:
|
|
797
|
+
parent: request.parent ?? '',
|
|
646
798
|
});
|
|
647
799
|
const defaultCallSettings = this._defaults['listAudienceLists'];
|
|
648
800
|
const callSettings = defaultCallSettings.merge(options);
|
|
649
801
|
this.initialize();
|
|
802
|
+
this._log.info('listAudienceLists stream %j', request);
|
|
650
803
|
return this.descriptors.page.listAudienceLists.createStream(this.innerApiCalls.listAudienceLists, request, callSettings);
|
|
651
804
|
}
|
|
652
805
|
/**
|
|
@@ -682,22 +835,21 @@ class AlphaAnalyticsDataClient {
|
|
|
682
835
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async
|
|
683
836
|
*/
|
|
684
837
|
listAudienceListsAsync(request, options) {
|
|
685
|
-
var _a;
|
|
686
838
|
request = request || {};
|
|
687
839
|
options = options || {};
|
|
688
840
|
options.otherArgs = options.otherArgs || {};
|
|
689
841
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
690
842
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
691
843
|
this._gaxModule.routingHeader.fromParams({
|
|
692
|
-
parent:
|
|
844
|
+
parent: request.parent ?? '',
|
|
693
845
|
});
|
|
694
846
|
const defaultCallSettings = this._defaults['listAudienceLists'];
|
|
695
847
|
const callSettings = defaultCallSettings.merge(options);
|
|
696
848
|
this.initialize();
|
|
849
|
+
this._log.info('listAudienceLists iterate %j', request);
|
|
697
850
|
return this.descriptors.page.listAudienceLists.asyncIterate(this.innerApiCalls['listAudienceLists'], request, callSettings);
|
|
698
851
|
}
|
|
699
852
|
listRecurringAudienceLists(request, optionsOrCallback, callback) {
|
|
700
|
-
var _a;
|
|
701
853
|
request = request || {};
|
|
702
854
|
let options;
|
|
703
855
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -712,13 +864,25 @@ class AlphaAnalyticsDataClient {
|
|
|
712
864
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
713
865
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
714
866
|
this._gaxModule.routingHeader.fromParams({
|
|
715
|
-
parent:
|
|
867
|
+
parent: request.parent ?? '',
|
|
716
868
|
});
|
|
717
869
|
this.initialize();
|
|
718
|
-
|
|
870
|
+
const wrappedCallback = callback
|
|
871
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
872
|
+
this._log.info('listRecurringAudienceLists values %j', values);
|
|
873
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
874
|
+
}
|
|
875
|
+
: undefined;
|
|
876
|
+
this._log.info('listRecurringAudienceLists request %j', request);
|
|
877
|
+
return this.innerApiCalls
|
|
878
|
+
.listRecurringAudienceLists(request, options, wrappedCallback)
|
|
879
|
+
?.then(([response, input, output]) => {
|
|
880
|
+
this._log.info('listRecurringAudienceLists values %j', response);
|
|
881
|
+
return [response, input, output];
|
|
882
|
+
});
|
|
719
883
|
}
|
|
720
884
|
/**
|
|
721
|
-
* Equivalent to `
|
|
885
|
+
* Equivalent to `listRecurringAudienceLists`, but returns a NodeJS Stream object.
|
|
722
886
|
* @param {Object} request
|
|
723
887
|
* The request object that will be sent.
|
|
724
888
|
* @param {string} request.parent
|
|
@@ -749,18 +913,18 @@ class AlphaAnalyticsDataClient {
|
|
|
749
913
|
* for more details and examples.
|
|
750
914
|
*/
|
|
751
915
|
listRecurringAudienceListsStream(request, options) {
|
|
752
|
-
var _a;
|
|
753
916
|
request = request || {};
|
|
754
917
|
options = options || {};
|
|
755
918
|
options.otherArgs = options.otherArgs || {};
|
|
756
919
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
757
920
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
758
921
|
this._gaxModule.routingHeader.fromParams({
|
|
759
|
-
parent:
|
|
922
|
+
parent: request.parent ?? '',
|
|
760
923
|
});
|
|
761
924
|
const defaultCallSettings = this._defaults['listRecurringAudienceLists'];
|
|
762
925
|
const callSettings = defaultCallSettings.merge(options);
|
|
763
926
|
this.initialize();
|
|
927
|
+
this._log.info('listRecurringAudienceLists stream %j', request);
|
|
764
928
|
return this.descriptors.page.listRecurringAudienceLists.createStream(this.innerApiCalls.listRecurringAudienceLists, request, callSettings);
|
|
765
929
|
}
|
|
766
930
|
/**
|
|
@@ -798,22 +962,21 @@ class AlphaAnalyticsDataClient {
|
|
|
798
962
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async
|
|
799
963
|
*/
|
|
800
964
|
listRecurringAudienceListsAsync(request, options) {
|
|
801
|
-
var _a;
|
|
802
965
|
request = request || {};
|
|
803
966
|
options = options || {};
|
|
804
967
|
options.otherArgs = options.otherArgs || {};
|
|
805
968
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
806
969
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
807
970
|
this._gaxModule.routingHeader.fromParams({
|
|
808
|
-
parent:
|
|
971
|
+
parent: request.parent ?? '',
|
|
809
972
|
});
|
|
810
973
|
const defaultCallSettings = this._defaults['listRecurringAudienceLists'];
|
|
811
974
|
const callSettings = defaultCallSettings.merge(options);
|
|
812
975
|
this.initialize();
|
|
976
|
+
this._log.info('listRecurringAudienceLists iterate %j', request);
|
|
813
977
|
return this.descriptors.page.listRecurringAudienceLists.asyncIterate(this.innerApiCalls['listRecurringAudienceLists'], request, callSettings);
|
|
814
978
|
}
|
|
815
979
|
listReportTasks(request, optionsOrCallback, callback) {
|
|
816
|
-
var _a;
|
|
817
980
|
request = request || {};
|
|
818
981
|
let options;
|
|
819
982
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -828,13 +991,25 @@ class AlphaAnalyticsDataClient {
|
|
|
828
991
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
829
992
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
830
993
|
this._gaxModule.routingHeader.fromParams({
|
|
831
|
-
parent:
|
|
994
|
+
parent: request.parent ?? '',
|
|
832
995
|
});
|
|
833
996
|
this.initialize();
|
|
834
|
-
|
|
997
|
+
const wrappedCallback = callback
|
|
998
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
999
|
+
this._log.info('listReportTasks values %j', values);
|
|
1000
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1001
|
+
}
|
|
1002
|
+
: undefined;
|
|
1003
|
+
this._log.info('listReportTasks request %j', request);
|
|
1004
|
+
return this.innerApiCalls
|
|
1005
|
+
.listReportTasks(request, options, wrappedCallback)
|
|
1006
|
+
?.then(([response, input, output]) => {
|
|
1007
|
+
this._log.info('listReportTasks values %j', response);
|
|
1008
|
+
return [response, input, output];
|
|
1009
|
+
});
|
|
835
1010
|
}
|
|
836
1011
|
/**
|
|
837
|
-
* Equivalent to `
|
|
1012
|
+
* Equivalent to `listReportTasks`, but returns a NodeJS Stream object.
|
|
838
1013
|
* @param {Object} request
|
|
839
1014
|
* The request object that will be sent.
|
|
840
1015
|
* @param {string} request.parent
|
|
@@ -857,18 +1032,18 @@ class AlphaAnalyticsDataClient {
|
|
|
857
1032
|
* for more details and examples.
|
|
858
1033
|
*/
|
|
859
1034
|
listReportTasksStream(request, options) {
|
|
860
|
-
var _a;
|
|
861
1035
|
request = request || {};
|
|
862
1036
|
options = options || {};
|
|
863
1037
|
options.otherArgs = options.otherArgs || {};
|
|
864
1038
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
865
1039
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
866
1040
|
this._gaxModule.routingHeader.fromParams({
|
|
867
|
-
parent:
|
|
1041
|
+
parent: request.parent ?? '',
|
|
868
1042
|
});
|
|
869
1043
|
const defaultCallSettings = this._defaults['listReportTasks'];
|
|
870
1044
|
const callSettings = defaultCallSettings.merge(options);
|
|
871
1045
|
this.initialize();
|
|
1046
|
+
this._log.info('listReportTasks stream %j', request);
|
|
872
1047
|
return this.descriptors.page.listReportTasks.createStream(this.innerApiCalls.listReportTasks, request, callSettings);
|
|
873
1048
|
}
|
|
874
1049
|
/**
|
|
@@ -898,18 +1073,18 @@ class AlphaAnalyticsDataClient {
|
|
|
898
1073
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async
|
|
899
1074
|
*/
|
|
900
1075
|
listReportTasksAsync(request, options) {
|
|
901
|
-
var _a;
|
|
902
1076
|
request = request || {};
|
|
903
1077
|
options = options || {};
|
|
904
1078
|
options.otherArgs = options.otherArgs || {};
|
|
905
1079
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
906
1080
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
907
1081
|
this._gaxModule.routingHeader.fromParams({
|
|
908
|
-
parent:
|
|
1082
|
+
parent: request.parent ?? '',
|
|
909
1083
|
});
|
|
910
1084
|
const defaultCallSettings = this._defaults['listReportTasks'];
|
|
911
1085
|
const callSettings = defaultCallSettings.merge(options);
|
|
912
1086
|
this.initialize();
|
|
1087
|
+
this._log.info('listReportTasks iterate %j', request);
|
|
913
1088
|
return this.descriptors.page.listReportTasks.asyncIterate(this.innerApiCalls['listReportTasks'], request, callSettings);
|
|
914
1089
|
}
|
|
915
1090
|
/**
|
|
@@ -942,7 +1117,22 @@ class AlphaAnalyticsDataClient {
|
|
|
942
1117
|
* // doThingsWith(response)
|
|
943
1118
|
* ```
|
|
944
1119
|
*/
|
|
945
|
-
getOperation(request,
|
|
1120
|
+
getOperation(request, optionsOrCallback, callback) {
|
|
1121
|
+
let options;
|
|
1122
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1123
|
+
callback = optionsOrCallback;
|
|
1124
|
+
options = {};
|
|
1125
|
+
}
|
|
1126
|
+
else {
|
|
1127
|
+
options = optionsOrCallback;
|
|
1128
|
+
}
|
|
1129
|
+
options = options || {};
|
|
1130
|
+
options.otherArgs = options.otherArgs || {};
|
|
1131
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1132
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1133
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1134
|
+
name: request.name ?? '',
|
|
1135
|
+
});
|
|
946
1136
|
return this.operationsClient.getOperation(request, options, callback);
|
|
947
1137
|
}
|
|
948
1138
|
/**
|
|
@@ -976,6 +1166,13 @@ class AlphaAnalyticsDataClient {
|
|
|
976
1166
|
* ```
|
|
977
1167
|
*/
|
|
978
1168
|
listOperationsAsync(request, options) {
|
|
1169
|
+
options = options || {};
|
|
1170
|
+
options.otherArgs = options.otherArgs || {};
|
|
1171
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1172
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1173
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1174
|
+
name: request.name ?? '',
|
|
1175
|
+
});
|
|
979
1176
|
return this.operationsClient.listOperationsAsync(request, options);
|
|
980
1177
|
}
|
|
981
1178
|
/**
|
|
@@ -1009,7 +1206,22 @@ class AlphaAnalyticsDataClient {
|
|
|
1009
1206
|
* await client.cancelOperation({name: ''});
|
|
1010
1207
|
* ```
|
|
1011
1208
|
*/
|
|
1012
|
-
cancelOperation(request,
|
|
1209
|
+
cancelOperation(request, optionsOrCallback, callback) {
|
|
1210
|
+
let options;
|
|
1211
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1212
|
+
callback = optionsOrCallback;
|
|
1213
|
+
options = {};
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
options = optionsOrCallback;
|
|
1217
|
+
}
|
|
1218
|
+
options = options || {};
|
|
1219
|
+
options.otherArgs = options.otherArgs || {};
|
|
1220
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1221
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1222
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1223
|
+
name: request.name ?? '',
|
|
1224
|
+
});
|
|
1013
1225
|
return this.operationsClient.cancelOperation(request, options, callback);
|
|
1014
1226
|
}
|
|
1015
1227
|
/**
|
|
@@ -1037,7 +1249,22 @@ class AlphaAnalyticsDataClient {
|
|
|
1037
1249
|
* await client.deleteOperation({name: ''});
|
|
1038
1250
|
* ```
|
|
1039
1251
|
*/
|
|
1040
|
-
deleteOperation(request,
|
|
1252
|
+
deleteOperation(request, optionsOrCallback, callback) {
|
|
1253
|
+
let options;
|
|
1254
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1255
|
+
callback = optionsOrCallback;
|
|
1256
|
+
options = {};
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
options = optionsOrCallback;
|
|
1260
|
+
}
|
|
1261
|
+
options = options || {};
|
|
1262
|
+
options.otherArgs = options.otherArgs || {};
|
|
1263
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1264
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1265
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1266
|
+
name: request.name ?? '',
|
|
1267
|
+
});
|
|
1041
1268
|
return this.operationsClient.deleteOperation(request, options, callback);
|
|
1042
1269
|
}
|
|
1043
1270
|
// --------------------
|
|
@@ -1197,6 +1424,7 @@ class AlphaAnalyticsDataClient {
|
|
|
1197
1424
|
close() {
|
|
1198
1425
|
if (this.alphaAnalyticsDataStub && !this._terminated) {
|
|
1199
1426
|
return this.alphaAnalyticsDataStub.then(stub => {
|
|
1427
|
+
this._log.info('ending gRPC channel');
|
|
1200
1428
|
this._terminated = true;
|
|
1201
1429
|
stub.close();
|
|
1202
1430
|
this.operationsClient.close();
|