@google-analytics/data 4.12.1 → 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 +16 -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.json +0 -3
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +2 -1
- package/build/src/v1alpha/alpha_analytics_data_client.js +252 -80
- package/build/src/v1alpha/alpha_analytics_data_proto_list.json +4 -0
- package/build/src/v1alpha/gapic_metadata.json +175 -0
- package/build/src/v1beta/beta_analytics_data_client.d.ts +2 -1
- package/build/src/v1beta/beta_analytics_data_client.js +201 -63
- package/build/src/v1beta/beta_analytics_data_proto_list.json +4 -0
- package/build/src/v1beta/gapic_metadata.json +137 -0
- package/package.json +16 -16
|
@@ -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,10 +677,22 @@ 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
698
|
* Equivalent to `listAudienceExports`, but returns a NodeJS Stream object.
|
|
@@ -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
|
/**
|
|
@@ -675,7 +816,6 @@ class BetaAnalyticsDataClient {
|
|
|
675
816
|
* ```
|
|
676
817
|
*/
|
|
677
818
|
getOperation(request, optionsOrCallback, callback) {
|
|
678
|
-
var _a;
|
|
679
819
|
let options;
|
|
680
820
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
681
821
|
callback = optionsOrCallback;
|
|
@@ -689,7 +829,7 @@ class BetaAnalyticsDataClient {
|
|
|
689
829
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
690
830
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
691
831
|
this._gaxModule.routingHeader.fromParams({
|
|
692
|
-
name:
|
|
832
|
+
name: request.name ?? '',
|
|
693
833
|
});
|
|
694
834
|
return this.operationsClient.getOperation(request, options, callback);
|
|
695
835
|
}
|
|
@@ -724,13 +864,12 @@ class BetaAnalyticsDataClient {
|
|
|
724
864
|
* ```
|
|
725
865
|
*/
|
|
726
866
|
listOperationsAsync(request, options) {
|
|
727
|
-
var _a;
|
|
728
867
|
options = options || {};
|
|
729
868
|
options.otherArgs = options.otherArgs || {};
|
|
730
869
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
731
870
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
732
871
|
this._gaxModule.routingHeader.fromParams({
|
|
733
|
-
name:
|
|
872
|
+
name: request.name ?? '',
|
|
734
873
|
});
|
|
735
874
|
return this.operationsClient.listOperationsAsync(request, options);
|
|
736
875
|
}
|
|
@@ -766,7 +905,6 @@ class BetaAnalyticsDataClient {
|
|
|
766
905
|
* ```
|
|
767
906
|
*/
|
|
768
907
|
cancelOperation(request, optionsOrCallback, callback) {
|
|
769
|
-
var _a;
|
|
770
908
|
let options;
|
|
771
909
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
772
910
|
callback = optionsOrCallback;
|
|
@@ -780,7 +918,7 @@ class BetaAnalyticsDataClient {
|
|
|
780
918
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
781
919
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
782
920
|
this._gaxModule.routingHeader.fromParams({
|
|
783
|
-
name:
|
|
921
|
+
name: request.name ?? '',
|
|
784
922
|
});
|
|
785
923
|
return this.operationsClient.cancelOperation(request, options, callback);
|
|
786
924
|
}
|
|
@@ -810,7 +948,6 @@ class BetaAnalyticsDataClient {
|
|
|
810
948
|
* ```
|
|
811
949
|
*/
|
|
812
950
|
deleteOperation(request, optionsOrCallback, callback) {
|
|
813
|
-
var _a;
|
|
814
951
|
let options;
|
|
815
952
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
816
953
|
callback = optionsOrCallback;
|
|
@@ -824,7 +961,7 @@ class BetaAnalyticsDataClient {
|
|
|
824
961
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
825
962
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
826
963
|
this._gaxModule.routingHeader.fromParams({
|
|
827
|
-
name:
|
|
964
|
+
name: request.name ?? '',
|
|
828
965
|
});
|
|
829
966
|
return this.operationsClient.deleteOperation(request, options, callback);
|
|
830
967
|
}
|
|
@@ -915,6 +1052,7 @@ class BetaAnalyticsDataClient {
|
|
|
915
1052
|
close() {
|
|
916
1053
|
if (this.betaAnalyticsDataStub && !this._terminated) {
|
|
917
1054
|
return this.betaAnalyticsDataStub.then(stub => {
|
|
1055
|
+
this._log.info('ending gRPC channel');
|
|
918
1056
|
this._terminated = true;
|
|
919
1057
|
stub.close();
|
|
920
1058
|
this.operationsClient.close();
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "1.0",
|
|
3
|
+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
|
|
4
|
+
"language": "typescript",
|
|
5
|
+
"protoPackage": "google.analytics.data.v1beta",
|
|
6
|
+
"libraryPackage": "@google-analytics/data",
|
|
7
|
+
"services": {
|
|
8
|
+
"BetaAnalyticsData": {
|
|
9
|
+
"clients": {
|
|
10
|
+
"grpc": {
|
|
11
|
+
"libraryClient": "BetaAnalyticsDataClient",
|
|
12
|
+
"rpcs": {
|
|
13
|
+
"RunReport": {
|
|
14
|
+
"methods": [
|
|
15
|
+
"runReport"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"RunPivotReport": {
|
|
19
|
+
"methods": [
|
|
20
|
+
"runPivotReport"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"BatchRunReports": {
|
|
24
|
+
"methods": [
|
|
25
|
+
"batchRunReports"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"BatchRunPivotReports": {
|
|
29
|
+
"methods": [
|
|
30
|
+
"batchRunPivotReports"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"GetMetadata": {
|
|
34
|
+
"methods": [
|
|
35
|
+
"getMetadata"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"RunRealtimeReport": {
|
|
39
|
+
"methods": [
|
|
40
|
+
"runRealtimeReport"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"CheckCompatibility": {
|
|
44
|
+
"methods": [
|
|
45
|
+
"checkCompatibility"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"QueryAudienceExport": {
|
|
49
|
+
"methods": [
|
|
50
|
+
"queryAudienceExport"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"GetAudienceExport": {
|
|
54
|
+
"methods": [
|
|
55
|
+
"getAudienceExport"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"CreateAudienceExport": {
|
|
59
|
+
"methods": [
|
|
60
|
+
"createAudienceExport"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"ListAudienceExports": {
|
|
64
|
+
"methods": [
|
|
65
|
+
"listAudienceExports",
|
|
66
|
+
"listAudienceExportsStream",
|
|
67
|
+
"listAudienceExportsAsync"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"grpc-fallback": {
|
|
73
|
+
"libraryClient": "BetaAnalyticsDataClient",
|
|
74
|
+
"rpcs": {
|
|
75
|
+
"RunReport": {
|
|
76
|
+
"methods": [
|
|
77
|
+
"runReport"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"RunPivotReport": {
|
|
81
|
+
"methods": [
|
|
82
|
+
"runPivotReport"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"BatchRunReports": {
|
|
86
|
+
"methods": [
|
|
87
|
+
"batchRunReports"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"BatchRunPivotReports": {
|
|
91
|
+
"methods": [
|
|
92
|
+
"batchRunPivotReports"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"GetMetadata": {
|
|
96
|
+
"methods": [
|
|
97
|
+
"getMetadata"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"RunRealtimeReport": {
|
|
101
|
+
"methods": [
|
|
102
|
+
"runRealtimeReport"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"CheckCompatibility": {
|
|
106
|
+
"methods": [
|
|
107
|
+
"checkCompatibility"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"QueryAudienceExport": {
|
|
111
|
+
"methods": [
|
|
112
|
+
"queryAudienceExport"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"GetAudienceExport": {
|
|
116
|
+
"methods": [
|
|
117
|
+
"getAudienceExport"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"CreateAudienceExport": {
|
|
121
|
+
"methods": [
|
|
122
|
+
"createAudienceExport"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"ListAudienceExports": {
|
|
126
|
+
"methods": [
|
|
127
|
+
"listAudienceExports",
|
|
128
|
+
"listAudienceExportsStream",
|
|
129
|
+
"listAudienceExportsAsync"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|