@google-analytics/data 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -0
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +239 -80
- package/build/protos/google/analytics/data/v1alpha/data.proto +14 -5
- package/build/protos/protos.d.ts +816 -5
- package/build/protos/protos.js +2803 -203
- package/build/protos/protos.json +491 -24
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +200 -95
- package/build/src/v1alpha/alpha_analytics_data_client.js +69 -46
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +5 -0
- package/build/src/v1beta/beta_analytics_data_client.d.ts +2 -3
- package/build/src/v1beta/beta_analytics_data_client.js +3 -4
- package/package.json +7 -7
|
@@ -60,8 +60,7 @@ class AlphaAnalyticsDataClient {
|
|
|
60
60
|
* API remote host.
|
|
61
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
62
62
|
* Follows the structure of {@link gapicConfig}.
|
|
63
|
-
* @param {boolean
|
|
64
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
65
64
|
* For more information, please check the
|
|
66
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
67
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -69,7 +68,7 @@ class AlphaAnalyticsDataClient {
|
|
|
69
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
70
69
|
* ```
|
|
71
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
72
|
-
* const client = new AlphaAnalyticsDataClient({fallback:
|
|
71
|
+
* const client = new AlphaAnalyticsDataClient({fallback: true}, gax);
|
|
73
72
|
* ```
|
|
74
73
|
*/
|
|
75
74
|
constructor(opts, gaxInstance) {
|
|
@@ -126,7 +125,7 @@ class AlphaAnalyticsDataClient {
|
|
|
126
125
|
if (!opts.fallback) {
|
|
127
126
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
|
128
127
|
}
|
|
129
|
-
else
|
|
128
|
+
else {
|
|
130
129
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
|
131
130
|
}
|
|
132
131
|
if (opts.libName && opts.libVersion) {
|
|
@@ -138,8 +137,8 @@ class AlphaAnalyticsDataClient {
|
|
|
138
137
|
// identifiers to uniquely identify resources within the API.
|
|
139
138
|
// Create useful helper objects for these.
|
|
140
139
|
this.pathTemplates = {
|
|
141
|
-
audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{
|
|
142
|
-
propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{
|
|
140
|
+
audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceLists/{audience_list}'),
|
|
141
|
+
propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
|
|
143
142
|
};
|
|
144
143
|
// Some of the methods on this service return "paged" results,
|
|
145
144
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
|
@@ -155,7 +154,7 @@ class AlphaAnalyticsDataClient {
|
|
|
155
154
|
auth: this.auth,
|
|
156
155
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
157
156
|
};
|
|
158
|
-
if (opts.fallback
|
|
157
|
+
if (opts.fallback) {
|
|
159
158
|
lroOptions.protoJson = protoFilesRoot;
|
|
160
159
|
lroOptions.httpRules = [];
|
|
161
160
|
}
|
|
@@ -205,6 +204,7 @@ class AlphaAnalyticsDataClient {
|
|
|
205
204
|
'runFunnelReport',
|
|
206
205
|
'createAudienceList',
|
|
207
206
|
'queryAudienceList',
|
|
207
|
+
'sheetExportAudienceList',
|
|
208
208
|
'getAudienceList',
|
|
209
209
|
'listAudienceLists',
|
|
210
210
|
];
|
|
@@ -257,6 +257,9 @@ class AlphaAnalyticsDataClient {
|
|
|
257
257
|
return [
|
|
258
258
|
'https://www.googleapis.com/auth/analytics',
|
|
259
259
|
'https://www.googleapis.com/auth/analytics.readonly',
|
|
260
|
+
'https://www.googleapis.com/auth/drive',
|
|
261
|
+
'https://www.googleapis.com/auth/drive.file',
|
|
262
|
+
'https://www.googleapis.com/auth/spreadsheets',
|
|
260
263
|
];
|
|
261
264
|
}
|
|
262
265
|
/**
|
|
@@ -312,6 +315,27 @@ class AlphaAnalyticsDataClient {
|
|
|
312
315
|
this.initialize();
|
|
313
316
|
return this.innerApiCalls.queryAudienceList(request, options, callback);
|
|
314
317
|
}
|
|
318
|
+
sheetExportAudienceList(request, optionsOrCallback, callback) {
|
|
319
|
+
var _a;
|
|
320
|
+
request = request || {};
|
|
321
|
+
let options;
|
|
322
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
323
|
+
callback = optionsOrCallback;
|
|
324
|
+
options = {};
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
options = optionsOrCallback;
|
|
328
|
+
}
|
|
329
|
+
options = options || {};
|
|
330
|
+
options.otherArgs = options.otherArgs || {};
|
|
331
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
332
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
333
|
+
this._gaxModule.routingHeader.fromParams({
|
|
334
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
335
|
+
});
|
|
336
|
+
this.initialize();
|
|
337
|
+
return this.innerApiCalls.sheetExportAudienceList(request, options, callback);
|
|
338
|
+
}
|
|
315
339
|
getAudienceList(request, optionsOrCallback, callback) {
|
|
316
340
|
var _a;
|
|
317
341
|
request = request || {};
|
|
@@ -398,15 +422,15 @@ class AlphaAnalyticsDataClient {
|
|
|
398
422
|
* The request object that will be sent.
|
|
399
423
|
* @param {string} request.parent
|
|
400
424
|
* Required. All audience lists for this property will be listed in the
|
|
401
|
-
* response. Format: `properties/{
|
|
402
|
-
* @param {number} request.pageSize
|
|
403
|
-
* The maximum number of audience lists to return. The service may
|
|
404
|
-
* fewer than this value. If unspecified, at most 200 audience lists
|
|
405
|
-
* returned. The maximum value is 1000 (higher values will be coerced
|
|
406
|
-
* maximum).
|
|
407
|
-
* @param {string} request.pageToken
|
|
408
|
-
* A page token, received from a previous `ListAudienceLists` call.
|
|
409
|
-
* this to retrieve the subsequent page.
|
|
425
|
+
* response. Format: `properties/{property}`
|
|
426
|
+
* @param {number} [request.pageSize]
|
|
427
|
+
* Optional. The maximum number of audience lists to return. The service may
|
|
428
|
+
* return fewer than this value. If unspecified, at most 200 audience lists
|
|
429
|
+
* will be returned. The maximum value is 1000 (higher values will be coerced
|
|
430
|
+
* to the maximum).
|
|
431
|
+
* @param {string} [request.pageToken]
|
|
432
|
+
* Optional. A page token, received from a previous `ListAudienceLists` call.
|
|
433
|
+
* Provide this to retrieve the subsequent page.
|
|
410
434
|
*
|
|
411
435
|
* When paginating, all other parameters provided to `ListAudienceLists` must
|
|
412
436
|
* match the call that provided the page token.
|
|
@@ -444,15 +468,15 @@ class AlphaAnalyticsDataClient {
|
|
|
444
468
|
* The request object that will be sent.
|
|
445
469
|
* @param {string} request.parent
|
|
446
470
|
* Required. All audience lists for this property will be listed in the
|
|
447
|
-
* response. Format: `properties/{
|
|
448
|
-
* @param {number} request.pageSize
|
|
449
|
-
* The maximum number of audience lists to return. The service may
|
|
450
|
-
* fewer than this value. If unspecified, at most 200 audience lists
|
|
451
|
-
* returned. The maximum value is 1000 (higher values will be coerced
|
|
452
|
-
* maximum).
|
|
453
|
-
* @param {string} request.pageToken
|
|
454
|
-
* A page token, received from a previous `ListAudienceLists` call.
|
|
455
|
-
* this to retrieve the subsequent page.
|
|
471
|
+
* response. Format: `properties/{property}`
|
|
472
|
+
* @param {number} [request.pageSize]
|
|
473
|
+
* Optional. The maximum number of audience lists to return. The service may
|
|
474
|
+
* return fewer than this value. If unspecified, at most 200 audience lists
|
|
475
|
+
* will be returned. The maximum value is 1000 (higher values will be coerced
|
|
476
|
+
* to the maximum).
|
|
477
|
+
* @param {string} [request.pageToken]
|
|
478
|
+
* Optional. A page token, received from a previous `ListAudienceLists` call.
|
|
479
|
+
* Provide this to retrieve the subsequent page.
|
|
456
480
|
*
|
|
457
481
|
* When paginating, all other parameters provided to `ListAudienceLists` must
|
|
458
482
|
* match the call that provided the page token.
|
|
@@ -489,59 +513,58 @@ class AlphaAnalyticsDataClient {
|
|
|
489
513
|
/**
|
|
490
514
|
* Return a fully-qualified audienceList resource name string.
|
|
491
515
|
*
|
|
492
|
-
* @param {string}
|
|
493
|
-
* @param {string}
|
|
516
|
+
* @param {string} property
|
|
517
|
+
* @param {string} audience_list
|
|
494
518
|
* @returns {string} Resource name string.
|
|
495
519
|
*/
|
|
496
|
-
audienceListPath(
|
|
520
|
+
audienceListPath(property, audienceList) {
|
|
497
521
|
return this.pathTemplates.audienceListPathTemplate.render({
|
|
498
|
-
|
|
499
|
-
|
|
522
|
+
property: property,
|
|
523
|
+
audience_list: audienceList,
|
|
500
524
|
});
|
|
501
525
|
}
|
|
502
526
|
/**
|
|
503
|
-
* Parse the
|
|
527
|
+
* Parse the property from AudienceList resource.
|
|
504
528
|
*
|
|
505
529
|
* @param {string} audienceListName
|
|
506
530
|
* A fully-qualified path representing AudienceList resource.
|
|
507
|
-
* @returns {string} A string representing the
|
|
531
|
+
* @returns {string} A string representing the property.
|
|
508
532
|
*/
|
|
509
|
-
|
|
533
|
+
matchPropertyFromAudienceListName(audienceListName) {
|
|
510
534
|
return this.pathTemplates.audienceListPathTemplate.match(audienceListName)
|
|
511
|
-
.
|
|
535
|
+
.property;
|
|
512
536
|
}
|
|
513
537
|
/**
|
|
514
|
-
* Parse the
|
|
538
|
+
* Parse the audience_list from AudienceList resource.
|
|
515
539
|
*
|
|
516
540
|
* @param {string} audienceListName
|
|
517
541
|
* A fully-qualified path representing AudienceList resource.
|
|
518
|
-
* @returns {string} A string representing the
|
|
542
|
+
* @returns {string} A string representing the audience_list.
|
|
519
543
|
*/
|
|
520
|
-
|
|
544
|
+
matchAudienceListFromAudienceListName(audienceListName) {
|
|
521
545
|
return this.pathTemplates.audienceListPathTemplate.match(audienceListName)
|
|
522
|
-
.
|
|
546
|
+
.audience_list;
|
|
523
547
|
}
|
|
524
548
|
/**
|
|
525
549
|
* Return a fully-qualified property resource name string.
|
|
526
550
|
*
|
|
527
|
-
* @param {string}
|
|
551
|
+
* @param {string} property
|
|
528
552
|
* @returns {string} Resource name string.
|
|
529
553
|
*/
|
|
530
|
-
propertyPath(
|
|
554
|
+
propertyPath(property) {
|
|
531
555
|
return this.pathTemplates.propertyPathTemplate.render({
|
|
532
|
-
|
|
556
|
+
property: property,
|
|
533
557
|
});
|
|
534
558
|
}
|
|
535
559
|
/**
|
|
536
|
-
* Parse the
|
|
560
|
+
* Parse the property from Property resource.
|
|
537
561
|
*
|
|
538
562
|
* @param {string} propertyName
|
|
539
563
|
* A fully-qualified path representing Property resource.
|
|
540
|
-
* @returns {string} A string representing the
|
|
564
|
+
* @returns {string} A string representing the property.
|
|
541
565
|
*/
|
|
542
|
-
|
|
543
|
-
return this.pathTemplates.propertyPathTemplate.match(propertyName)
|
|
544
|
-
.propertyId;
|
|
566
|
+
matchPropertyFromPropertyName(propertyName) {
|
|
567
|
+
return this.pathTemplates.propertyPathTemplate.match(propertyName).property;
|
|
545
568
|
}
|
|
546
569
|
/**
|
|
547
570
|
* Terminate the gRPC channel and close the client.
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"retry_codes_name": "unknown",
|
|
48
48
|
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
49
49
|
},
|
|
50
|
+
"SheetExportAudienceList": {
|
|
51
|
+
"timeout_millis": 60000,
|
|
52
|
+
"retry_codes_name": "unknown",
|
|
53
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
54
|
+
},
|
|
50
55
|
"GetAudienceList": {
|
|
51
56
|
"timeout_millis": 60000,
|
|
52
57
|
"retry_codes_name": "unknown",
|
|
@@ -54,8 +54,7 @@ export declare class BetaAnalyticsDataClient {
|
|
|
54
54
|
* API remote host.
|
|
55
55
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
56
56
|
* Follows the structure of {@link gapicConfig}.
|
|
57
|
-
* @param {boolean
|
|
58
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
57
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
59
58
|
* For more information, please check the
|
|
60
59
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
61
60
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -63,7 +62,7 @@ export declare class BetaAnalyticsDataClient {
|
|
|
63
62
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
64
63
|
* ```
|
|
65
64
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
66
|
-
* const client = new BetaAnalyticsDataClient({fallback:
|
|
65
|
+
* const client = new BetaAnalyticsDataClient({fallback: true}, gax);
|
|
67
66
|
* ```
|
|
68
67
|
*/
|
|
69
68
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
@@ -60,8 +60,7 @@ class BetaAnalyticsDataClient {
|
|
|
60
60
|
* API remote host.
|
|
61
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
62
62
|
* Follows the structure of {@link gapicConfig}.
|
|
63
|
-
* @param {boolean
|
|
64
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
65
64
|
* For more information, please check the
|
|
66
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
67
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -69,7 +68,7 @@ class BetaAnalyticsDataClient {
|
|
|
69
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
70
69
|
* ```
|
|
71
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
72
|
-
* const client = new BetaAnalyticsDataClient({fallback:
|
|
71
|
+
* const client = new BetaAnalyticsDataClient({fallback: true}, gax);
|
|
73
72
|
* ```
|
|
74
73
|
*/
|
|
75
74
|
constructor(opts, gaxInstance) {
|
|
@@ -126,7 +125,7 @@ class BetaAnalyticsDataClient {
|
|
|
126
125
|
if (!opts.fallback) {
|
|
127
126
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
|
128
127
|
}
|
|
129
|
-
else
|
|
128
|
+
else {
|
|
130
129
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
|
131
130
|
}
|
|
132
131
|
if (opts.libName && opts.libVersion) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-analytics/data",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Data client for Node.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,18 +50,18 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/mocha": "^9.0.0",
|
|
52
52
|
"@types/node": "^20.4.5",
|
|
53
|
-
"@types/sinon": "^
|
|
53
|
+
"@types/sinon": "^17.0.0",
|
|
54
54
|
"c8": "^8.0.1",
|
|
55
|
-
"gapic-tools": "^0.
|
|
55
|
+
"gapic-tools": "^0.2.0",
|
|
56
56
|
"gts": "^5.0.0",
|
|
57
57
|
"jsdoc": "^4.0.0",
|
|
58
|
-
"jsdoc-fresh": "^
|
|
59
|
-
"jsdoc-region-tag": "^
|
|
58
|
+
"jsdoc-fresh": "^3.0.0",
|
|
59
|
+
"jsdoc-region-tag": "^3.0.0",
|
|
60
60
|
"linkinator": "4.1.2",
|
|
61
61
|
"long": "^5.2.3",
|
|
62
62
|
"mocha": "^9.2.2",
|
|
63
|
-
"pack-n-play": "^
|
|
64
|
-
"sinon": "^
|
|
63
|
+
"pack-n-play": "^2.0.0",
|
|
64
|
+
"sinon": "^17.0.0",
|
|
65
65
|
"typescript": "^5.1.6"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|