@google-analytics/data 4.1.0 → 4.3.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 +14 -0
- package/README.md +7 -0
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +208 -1
- package/build/protos/google/analytics/data/v1beta/analytics_data_api.proto +341 -1
- package/build/protos/google/analytics/data/v1beta/data.proto +54 -7
- package/build/protos/protos.d.ts +6381 -4885
- package/build/protos/protos.js +18026 -14981
- package/build/protos/protos.json +892 -530
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +220 -0
- package/build/src/v1alpha/alpha_analytics_data_client.js +196 -0
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +15 -0
- package/build/src/v1beta/beta_analytics_data_client.d.ts +440 -1
- package/build/src/v1beta/beta_analytics_data_client.js +410 -1
- package/build/src/v1beta/beta_analytics_data_client_config.json +32 -0
- package/package.json +2 -2
|
@@ -137,7 +137,35 @@ class BetaAnalyticsDataClient {
|
|
|
137
137
|
// identifiers to uniquely identify resources within the API.
|
|
138
138
|
// Create useful helper objects for these.
|
|
139
139
|
this.pathTemplates = {
|
|
140
|
+
audienceExportPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceExports/{audience_export}'),
|
|
140
141
|
metadataPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/metadata'),
|
|
142
|
+
propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
|
|
143
|
+
};
|
|
144
|
+
// Some of the methods on this service return "paged" results,
|
|
145
|
+
// (e.g. 50 results at a time, with tokens to get subsequent
|
|
146
|
+
// pages). Denote the keys used for pagination and results.
|
|
147
|
+
this.descriptors.page = {
|
|
148
|
+
listAudienceExports: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports'),
|
|
149
|
+
};
|
|
150
|
+
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
151
|
+
// This API contains "long-running operations", which return a
|
|
152
|
+
// an Operation object that allows for tracking of the operation,
|
|
153
|
+
// rather than holding a request open.
|
|
154
|
+
const lroOptions = {
|
|
155
|
+
auth: this.auth,
|
|
156
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
157
|
+
};
|
|
158
|
+
if (opts.fallback) {
|
|
159
|
+
lroOptions.protoJson = protoFilesRoot;
|
|
160
|
+
lroOptions.httpRules = [];
|
|
161
|
+
}
|
|
162
|
+
this.operationsClient = this._gaxModule
|
|
163
|
+
.lro(lroOptions)
|
|
164
|
+
.operationsClient(opts);
|
|
165
|
+
const createAudienceExportResponse = protoFilesRoot.lookup('.google.analytics.data.v1beta.AudienceExport');
|
|
166
|
+
const createAudienceExportMetadata = protoFilesRoot.lookup('.google.analytics.data.v1beta.AudienceExportMetadata');
|
|
167
|
+
this.descriptors.longrunning = {
|
|
168
|
+
createAudienceExport: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAudienceExportResponse.decode.bind(createAudienceExportResponse), createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)),
|
|
141
169
|
};
|
|
142
170
|
// Put together the default options sent with requests.
|
|
143
171
|
this._defaults = this._gaxGrpc.constructSettings('google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -180,6 +208,10 @@ class BetaAnalyticsDataClient {
|
|
|
180
208
|
'getMetadata',
|
|
181
209
|
'runRealtimeReport',
|
|
182
210
|
'checkCompatibility',
|
|
211
|
+
'createAudienceExport',
|
|
212
|
+
'queryAudienceExport',
|
|
213
|
+
'getAudienceExport',
|
|
214
|
+
'listAudienceExports',
|
|
183
215
|
];
|
|
184
216
|
for (const methodName of betaAnalyticsDataStubMethods) {
|
|
185
217
|
const callPromise = this.betaAnalyticsDataStub.then(stub => (...args) => {
|
|
@@ -191,7 +223,9 @@ class BetaAnalyticsDataClient {
|
|
|
191
223
|
}, (err) => () => {
|
|
192
224
|
throw err;
|
|
193
225
|
});
|
|
194
|
-
const descriptor =
|
|
226
|
+
const descriptor = this.descriptors.page[methodName] ||
|
|
227
|
+
this.descriptors.longrunning[methodName] ||
|
|
228
|
+
undefined;
|
|
195
229
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
|
196
230
|
this.innerApiCalls[methodName] = apiCall;
|
|
197
231
|
}
|
|
@@ -388,9 +422,362 @@ class BetaAnalyticsDataClient {
|
|
|
388
422
|
this.initialize();
|
|
389
423
|
return this.innerApiCalls.checkCompatibility(request, options, callback);
|
|
390
424
|
}
|
|
425
|
+
queryAudienceExport(request, optionsOrCallback, callback) {
|
|
426
|
+
var _a;
|
|
427
|
+
request = request || {};
|
|
428
|
+
let options;
|
|
429
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
430
|
+
callback = optionsOrCallback;
|
|
431
|
+
options = {};
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
options = optionsOrCallback;
|
|
435
|
+
}
|
|
436
|
+
options = options || {};
|
|
437
|
+
options.otherArgs = options.otherArgs || {};
|
|
438
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
439
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
440
|
+
this._gaxModule.routingHeader.fromParams({
|
|
441
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
442
|
+
});
|
|
443
|
+
this.initialize();
|
|
444
|
+
return this.innerApiCalls.queryAudienceExport(request, options, callback);
|
|
445
|
+
}
|
|
446
|
+
getAudienceExport(request, optionsOrCallback, callback) {
|
|
447
|
+
var _a;
|
|
448
|
+
request = request || {};
|
|
449
|
+
let options;
|
|
450
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
451
|
+
callback = optionsOrCallback;
|
|
452
|
+
options = {};
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
options = optionsOrCallback;
|
|
456
|
+
}
|
|
457
|
+
options = options || {};
|
|
458
|
+
options.otherArgs = options.otherArgs || {};
|
|
459
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
460
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
461
|
+
this._gaxModule.routingHeader.fromParams({
|
|
462
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
463
|
+
});
|
|
464
|
+
this.initialize();
|
|
465
|
+
return this.innerApiCalls.getAudienceExport(request, options, callback);
|
|
466
|
+
}
|
|
467
|
+
createAudienceExport(request, optionsOrCallback, callback) {
|
|
468
|
+
var _a;
|
|
469
|
+
request = request || {};
|
|
470
|
+
let options;
|
|
471
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
472
|
+
callback = optionsOrCallback;
|
|
473
|
+
options = {};
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
options = optionsOrCallback;
|
|
477
|
+
}
|
|
478
|
+
options = options || {};
|
|
479
|
+
options.otherArgs = options.otherArgs || {};
|
|
480
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
481
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
482
|
+
this._gaxModule.routingHeader.fromParams({
|
|
483
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
484
|
+
});
|
|
485
|
+
this.initialize();
|
|
486
|
+
return this.innerApiCalls.createAudienceExport(request, options, callback);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Check the status of the long running operation returned by `createAudienceExport()`.
|
|
490
|
+
* @param {String} name
|
|
491
|
+
* The operation name that will be passed.
|
|
492
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
493
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
494
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
495
|
+
* for more details and examples.
|
|
496
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js</caption>
|
|
497
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async
|
|
498
|
+
*/
|
|
499
|
+
async checkCreateAudienceExportProgress(name) {
|
|
500
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
501
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
502
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceExport, this._gaxModule.createDefaultBackoffSettings());
|
|
503
|
+
return decodeOperation;
|
|
504
|
+
}
|
|
505
|
+
listAudienceExports(request, optionsOrCallback, callback) {
|
|
506
|
+
var _a;
|
|
507
|
+
request = request || {};
|
|
508
|
+
let options;
|
|
509
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
510
|
+
callback = optionsOrCallback;
|
|
511
|
+
options = {};
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
options = optionsOrCallback;
|
|
515
|
+
}
|
|
516
|
+
options = options || {};
|
|
517
|
+
options.otherArgs = options.otherArgs || {};
|
|
518
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
519
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
520
|
+
this._gaxModule.routingHeader.fromParams({
|
|
521
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
522
|
+
});
|
|
523
|
+
this.initialize();
|
|
524
|
+
return this.innerApiCalls.listAudienceExports(request, options, callback);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
528
|
+
* @param {Object} request
|
|
529
|
+
* The request object that will be sent.
|
|
530
|
+
* @param {string} request.parent
|
|
531
|
+
* Required. All audience exports for this property will be listed in the
|
|
532
|
+
* response. Format: `properties/{property}`
|
|
533
|
+
* @param {number} [request.pageSize]
|
|
534
|
+
* Optional. The maximum number of audience exports to return. The service may
|
|
535
|
+
* return fewer than this value. If unspecified, at most 200 audience exports
|
|
536
|
+
* will be returned. The maximum value is 1000 (higher values will be coerced
|
|
537
|
+
* to the maximum).
|
|
538
|
+
* @param {string} [request.pageToken]
|
|
539
|
+
* Optional. A page token, received from a previous `ListAudienceExports`
|
|
540
|
+
* call. Provide this to retrieve the subsequent page.
|
|
541
|
+
*
|
|
542
|
+
* When paginating, all other parameters provided to `ListAudienceExports`
|
|
543
|
+
* must match the call that provided the page token.
|
|
544
|
+
* @param {object} [options]
|
|
545
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
546
|
+
* @returns {Stream}
|
|
547
|
+
* An object stream which emits an object representing {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport} on 'data' event.
|
|
548
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
549
|
+
* times as needed. Note that it can affect your quota.
|
|
550
|
+
* We recommend using `listAudienceExportsAsync()`
|
|
551
|
+
* method described below for async iteration which you can stop as needed.
|
|
552
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
553
|
+
* for more details and examples.
|
|
554
|
+
*/
|
|
555
|
+
listAudienceExportsStream(request, options) {
|
|
556
|
+
var _a;
|
|
557
|
+
request = request || {};
|
|
558
|
+
options = options || {};
|
|
559
|
+
options.otherArgs = options.otherArgs || {};
|
|
560
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
561
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
562
|
+
this._gaxModule.routingHeader.fromParams({
|
|
563
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
564
|
+
});
|
|
565
|
+
const defaultCallSettings = this._defaults['listAudienceExports'];
|
|
566
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
567
|
+
this.initialize();
|
|
568
|
+
return this.descriptors.page.listAudienceExports.createStream(this.innerApiCalls.listAudienceExports, request, callSettings);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Equivalent to `listAudienceExports`, but returns an iterable object.
|
|
572
|
+
*
|
|
573
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
574
|
+
* @param {Object} request
|
|
575
|
+
* The request object that will be sent.
|
|
576
|
+
* @param {string} request.parent
|
|
577
|
+
* Required. All audience exports for this property will be listed in the
|
|
578
|
+
* response. Format: `properties/{property}`
|
|
579
|
+
* @param {number} [request.pageSize]
|
|
580
|
+
* Optional. The maximum number of audience exports to return. The service may
|
|
581
|
+
* return fewer than this value. If unspecified, at most 200 audience exports
|
|
582
|
+
* will be returned. The maximum value is 1000 (higher values will be coerced
|
|
583
|
+
* to the maximum).
|
|
584
|
+
* @param {string} [request.pageToken]
|
|
585
|
+
* Optional. A page token, received from a previous `ListAudienceExports`
|
|
586
|
+
* call. Provide this to retrieve the subsequent page.
|
|
587
|
+
*
|
|
588
|
+
* When paginating, all other parameters provided to `ListAudienceExports`
|
|
589
|
+
* must match the call that provided the page token.
|
|
590
|
+
* @param {object} [options]
|
|
591
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
592
|
+
* @returns {Object}
|
|
593
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
594
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
595
|
+
* {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}. The API will be called under the hood as needed, once per the page,
|
|
596
|
+
* so you can stop the iteration when you don't need more results.
|
|
597
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
598
|
+
* for more details and examples.
|
|
599
|
+
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js</caption>
|
|
600
|
+
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async
|
|
601
|
+
*/
|
|
602
|
+
listAudienceExportsAsync(request, options) {
|
|
603
|
+
var _a;
|
|
604
|
+
request = request || {};
|
|
605
|
+
options = options || {};
|
|
606
|
+
options.otherArgs = options.otherArgs || {};
|
|
607
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
608
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
609
|
+
this._gaxModule.routingHeader.fromParams({
|
|
610
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
611
|
+
});
|
|
612
|
+
const defaultCallSettings = this._defaults['listAudienceExports'];
|
|
613
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
614
|
+
this.initialize();
|
|
615
|
+
return this.descriptors.page.listAudienceExports.asyncIterate(this.innerApiCalls['listAudienceExports'], request, callSettings);
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
619
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
620
|
+
* service.
|
|
621
|
+
*
|
|
622
|
+
* @param {Object} request - The request object that will be sent.
|
|
623
|
+
* @param {string} request.name - The name of the operation resource.
|
|
624
|
+
* @param {Object=} options
|
|
625
|
+
* Optional parameters. You can override the default settings for this call,
|
|
626
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
627
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
628
|
+
* for the details.
|
|
629
|
+
* @param {function(?Error, ?Object)=} callback
|
|
630
|
+
* The function which will be called with the result of the API call.
|
|
631
|
+
*
|
|
632
|
+
* The second parameter to the callback is an object representing
|
|
633
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
634
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
635
|
+
* The first element of the array is an object representing
|
|
636
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
637
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
638
|
+
*
|
|
639
|
+
* @example
|
|
640
|
+
* ```
|
|
641
|
+
* const client = longrunning.operationsClient();
|
|
642
|
+
* const name = '';
|
|
643
|
+
* const [response] = await client.getOperation({name});
|
|
644
|
+
* // doThingsWith(response)
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
getOperation(request, options, callback) {
|
|
648
|
+
return this.operationsClient.getOperation(request, options, callback);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Lists operations that match the specified filter in the request. If the
|
|
652
|
+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
|
|
653
|
+
*
|
|
654
|
+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
|
|
655
|
+
*
|
|
656
|
+
* @param {Object} request - The request object that will be sent.
|
|
657
|
+
* @param {string} request.name - The name of the operation collection.
|
|
658
|
+
* @param {string} request.filter - The standard list filter.
|
|
659
|
+
* @param {number=} request.pageSize -
|
|
660
|
+
* The maximum number of resources contained in the underlying API
|
|
661
|
+
* response. If page streaming is performed per-resource, this
|
|
662
|
+
* parameter does not affect the return value. If page streaming is
|
|
663
|
+
* performed per-page, this determines the maximum number of
|
|
664
|
+
* resources in a page.
|
|
665
|
+
* @param {Object=} options
|
|
666
|
+
* Optional parameters. You can override the default settings for this call,
|
|
667
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
668
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
669
|
+
* details.
|
|
670
|
+
* @returns {Object}
|
|
671
|
+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
|
|
672
|
+
*
|
|
673
|
+
* @example
|
|
674
|
+
* ```
|
|
675
|
+
* const client = longrunning.operationsClient();
|
|
676
|
+
* for await (const response of client.listOperationsAsync(request));
|
|
677
|
+
* // doThingsWith(response)
|
|
678
|
+
* ```
|
|
679
|
+
*/
|
|
680
|
+
listOperationsAsync(request, options) {
|
|
681
|
+
return this.operationsClient.listOperationsAsync(request, options);
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Starts asynchronous cancellation on a long-running operation. The server
|
|
685
|
+
* makes a best effort to cancel the operation, but success is not
|
|
686
|
+
* guaranteed. If the server doesn't support this method, it returns
|
|
687
|
+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
|
688
|
+
* {@link Operations.GetOperation} or
|
|
689
|
+
* other methods to check whether the cancellation succeeded or whether the
|
|
690
|
+
* operation completed despite cancellation. On successful cancellation,
|
|
691
|
+
* the operation is not deleted; instead, it becomes an operation with
|
|
692
|
+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
|
|
693
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
694
|
+
*
|
|
695
|
+
* @param {Object} request - The request object that will be sent.
|
|
696
|
+
* @param {string} request.name - The name of the operation resource to be cancelled.
|
|
697
|
+
* @param {Object=} options
|
|
698
|
+
* Optional parameters. You can override the default settings for this call,
|
|
699
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
700
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
701
|
+
* details.
|
|
702
|
+
* @param {function(?Error)=} callback
|
|
703
|
+
* The function which will be called with the result of the API call.
|
|
704
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
705
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
706
|
+
* call.
|
|
707
|
+
*
|
|
708
|
+
* @example
|
|
709
|
+
* ```
|
|
710
|
+
* const client = longrunning.operationsClient();
|
|
711
|
+
* await client.cancelOperation({name: ''});
|
|
712
|
+
* ```
|
|
713
|
+
*/
|
|
714
|
+
cancelOperation(request, options, callback) {
|
|
715
|
+
return this.operationsClient.cancelOperation(request, options, callback);
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Deletes a long-running operation. This method indicates that the client is
|
|
719
|
+
* no longer interested in the operation result. It does not cancel the
|
|
720
|
+
* operation. If the server doesn't support this method, it returns
|
|
721
|
+
* `google.rpc.Code.UNIMPLEMENTED`.
|
|
722
|
+
*
|
|
723
|
+
* @param {Object} request - The request object that will be sent.
|
|
724
|
+
* @param {string} request.name - The name of the operation resource to be deleted.
|
|
725
|
+
* @param {Object=} options
|
|
726
|
+
* Optional parameters. You can override the default settings for this call,
|
|
727
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
728
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
729
|
+
* for the details.
|
|
730
|
+
* @param {function(?Error)=} callback
|
|
731
|
+
* The function which will be called with the result of the API call.
|
|
732
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
733
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
734
|
+
* call.
|
|
735
|
+
*
|
|
736
|
+
* @example
|
|
737
|
+
* ```
|
|
738
|
+
* const client = longrunning.operationsClient();
|
|
739
|
+
* await client.deleteOperation({name: ''});
|
|
740
|
+
* ```
|
|
741
|
+
*/
|
|
742
|
+
deleteOperation(request, options, callback) {
|
|
743
|
+
return this.operationsClient.deleteOperation(request, options, callback);
|
|
744
|
+
}
|
|
391
745
|
// --------------------
|
|
392
746
|
// -- Path templates --
|
|
393
747
|
// --------------------
|
|
748
|
+
/**
|
|
749
|
+
* Return a fully-qualified audienceExport resource name string.
|
|
750
|
+
*
|
|
751
|
+
* @param {string} property
|
|
752
|
+
* @param {string} audience_export
|
|
753
|
+
* @returns {string} Resource name string.
|
|
754
|
+
*/
|
|
755
|
+
audienceExportPath(property, audienceExport) {
|
|
756
|
+
return this.pathTemplates.audienceExportPathTemplate.render({
|
|
757
|
+
property: property,
|
|
758
|
+
audience_export: audienceExport,
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Parse the property from AudienceExport resource.
|
|
763
|
+
*
|
|
764
|
+
* @param {string} audienceExportName
|
|
765
|
+
* A fully-qualified path representing AudienceExport resource.
|
|
766
|
+
* @returns {string} A string representing the property.
|
|
767
|
+
*/
|
|
768
|
+
matchPropertyFromAudienceExportName(audienceExportName) {
|
|
769
|
+
return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Parse the audience_export from AudienceExport resource.
|
|
773
|
+
*
|
|
774
|
+
* @param {string} audienceExportName
|
|
775
|
+
* A fully-qualified path representing AudienceExport resource.
|
|
776
|
+
* @returns {string} A string representing the audience_export.
|
|
777
|
+
*/
|
|
778
|
+
matchAudienceExportFromAudienceExportName(audienceExportName) {
|
|
779
|
+
return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export;
|
|
780
|
+
}
|
|
394
781
|
/**
|
|
395
782
|
* Return a fully-qualified metadata resource name string.
|
|
396
783
|
*
|
|
@@ -412,6 +799,27 @@ class BetaAnalyticsDataClient {
|
|
|
412
799
|
matchPropertyFromMetadataName(metadataName) {
|
|
413
800
|
return this.pathTemplates.metadataPathTemplate.match(metadataName).property;
|
|
414
801
|
}
|
|
802
|
+
/**
|
|
803
|
+
* Return a fully-qualified property resource name string.
|
|
804
|
+
*
|
|
805
|
+
* @param {string} property
|
|
806
|
+
* @returns {string} Resource name string.
|
|
807
|
+
*/
|
|
808
|
+
propertyPath(property) {
|
|
809
|
+
return this.pathTemplates.propertyPathTemplate.render({
|
|
810
|
+
property: property,
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Parse the property from Property resource.
|
|
815
|
+
*
|
|
816
|
+
* @param {string} propertyName
|
|
817
|
+
* A fully-qualified path representing Property resource.
|
|
818
|
+
* @returns {string} A string representing the property.
|
|
819
|
+
*/
|
|
820
|
+
matchPropertyFromPropertyName(propertyName) {
|
|
821
|
+
return this.pathTemplates.propertyPathTemplate.match(propertyName).property;
|
|
822
|
+
}
|
|
415
823
|
/**
|
|
416
824
|
* Terminate the gRPC channel and close the client.
|
|
417
825
|
*
|
|
@@ -423,6 +831,7 @@ class BetaAnalyticsDataClient {
|
|
|
423
831
|
return this.betaAnalyticsDataStub.then(stub => {
|
|
424
832
|
this._terminated = true;
|
|
425
833
|
stub.close();
|
|
834
|
+
this.operationsClient.close();
|
|
426
835
|
});
|
|
427
836
|
}
|
|
428
837
|
return Promise.resolve();
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
"idempotent": [
|
|
7
7
|
"DEADLINE_EXCEEDED",
|
|
8
8
|
"UNAVAILABLE"
|
|
9
|
+
],
|
|
10
|
+
"unknown": [
|
|
11
|
+
"UNKNOWN"
|
|
9
12
|
]
|
|
10
13
|
},
|
|
11
14
|
"retry_params": {
|
|
@@ -17,6 +20,15 @@
|
|
|
17
20
|
"rpc_timeout_multiplier": 1,
|
|
18
21
|
"max_rpc_timeout_millis": 60000,
|
|
19
22
|
"total_timeout_millis": 600000
|
|
23
|
+
},
|
|
24
|
+
"01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": {
|
|
25
|
+
"initial_retry_delay_millis": 1000,
|
|
26
|
+
"retry_delay_multiplier": 1.3,
|
|
27
|
+
"max_retry_delay_millis": 60000,
|
|
28
|
+
"initial_rpc_timeout_millis": 60000,
|
|
29
|
+
"rpc_timeout_multiplier": 1,
|
|
30
|
+
"max_rpc_timeout_millis": 60000,
|
|
31
|
+
"total_timeout_millis": 600000
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
"methods": {
|
|
@@ -54,6 +66,26 @@
|
|
|
54
66
|
"timeout_millis": 60000,
|
|
55
67
|
"retry_codes_name": "non_idempotent",
|
|
56
68
|
"retry_params_name": "default"
|
|
69
|
+
},
|
|
70
|
+
"CreateAudienceExport": {
|
|
71
|
+
"timeout_millis": 60000,
|
|
72
|
+
"retry_codes_name": "unknown",
|
|
73
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
74
|
+
},
|
|
75
|
+
"QueryAudienceExport": {
|
|
76
|
+
"timeout_millis": 60000,
|
|
77
|
+
"retry_codes_name": "unknown",
|
|
78
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
79
|
+
},
|
|
80
|
+
"GetAudienceExport": {
|
|
81
|
+
"timeout_millis": 60000,
|
|
82
|
+
"retry_codes_name": "unknown",
|
|
83
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
84
|
+
},
|
|
85
|
+
"ListAudienceExports": {
|
|
86
|
+
"timeout_millis": 60000,
|
|
87
|
+
"retry_codes_name": "unknown",
|
|
88
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
57
89
|
}
|
|
58
90
|
}
|
|
59
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-analytics/data",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Data client for Node.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"docs-test": "linkinator docs",
|
|
38
38
|
"fix": "gts fix",
|
|
39
39
|
"lint": "gts check",
|
|
40
|
-
"prepare": "npm run compile
|
|
40
|
+
"prepare": "npm run compile",
|
|
41
41
|
"prelint": "cd samples; npm link ../; npm i",
|
|
42
42
|
"postpack": "minifyProtoJson",
|
|
43
43
|
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|