@google-analytics/data 4.5.0 → 4.7.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 +4 -0
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +351 -1
- package/build/protos/google/analytics/data/v1alpha/data.proto +324 -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 +3195 -692
- package/build/protos/protos.js +8162 -1768
- package/build/protos/protos.json +709 -0
- package/build/src/v1alpha/alpha_analytics_data_client.d.ts +230 -0
- package/build/src/v1alpha/alpha_analytics_data_client.js +224 -0
- package/build/src/v1alpha/alpha_analytics_data_client_config.json +20 -0
- package/package.json +1 -1
|
@@ -451,6 +451,86 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
451
451
|
]>;
|
|
452
452
|
getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
|
|
453
453
|
getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
|
|
454
|
+
/**
|
|
455
|
+
* Retrieves a report task's content. After requesting the `CreateReportTask`,
|
|
456
|
+
* you are able to retrieve the report content once the report is
|
|
457
|
+
* ACTIVE. This method will return an error if the report task's state is not
|
|
458
|
+
* `ACTIVE`. A query response will return the tabular row & column values of
|
|
459
|
+
* the report.
|
|
460
|
+
*
|
|
461
|
+
* @param {Object} request
|
|
462
|
+
* The request object that will be sent.
|
|
463
|
+
* @param {string} request.name
|
|
464
|
+
* Required. The report source name.
|
|
465
|
+
* Format: `properties/{property}/reportTasks/{report}`
|
|
466
|
+
* @param {number} [request.offset]
|
|
467
|
+
* Optional. The row count of the start row in the report. The first row is
|
|
468
|
+
* counted as row 0.
|
|
469
|
+
*
|
|
470
|
+
* When paging, the first request does not specify offset; or equivalently,
|
|
471
|
+
* sets offset to 0; the first request returns the first `limit` of rows. The
|
|
472
|
+
* second request sets offset to the `limit` of the first request; the second
|
|
473
|
+
* request returns the second `limit` of rows.
|
|
474
|
+
*
|
|
475
|
+
* To learn more about this pagination parameter, see
|
|
476
|
+
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
|
477
|
+
* @param {number} [request.limit]
|
|
478
|
+
* Optional. The number of rows to return from the report. If unspecified,
|
|
479
|
+
* 10,000 rows are returned. The API returns a maximum of 250,000 rows per
|
|
480
|
+
* request, no matter how many you ask for. `limit` must be positive.
|
|
481
|
+
*
|
|
482
|
+
* The API can also return fewer rows than the requested `limit`, if there
|
|
483
|
+
* aren't as many dimension values as the `limit`. The number of rows
|
|
484
|
+
* available to a QueryReportTaskRequest is further limited by the limit of
|
|
485
|
+
* the associated ReportTask. A query can retrieve at most ReportTask.limit
|
|
486
|
+
* rows. For example, if the ReportTask has a limit of 1,000, then a
|
|
487
|
+
* QueryReportTask request with offset=900 and limit=500 will return at most
|
|
488
|
+
* 100 rows.
|
|
489
|
+
*
|
|
490
|
+
* To learn more about this pagination parameter, see
|
|
491
|
+
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
|
|
492
|
+
* @param {object} [options]
|
|
493
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
494
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
495
|
+
* The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.QueryReportTaskResponse|QueryReportTaskResponse}.
|
|
496
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
497
|
+
* for more details and examples.
|
|
498
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.query_report_task.js</caption>
|
|
499
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_QueryReportTask_async
|
|
500
|
+
*/
|
|
501
|
+
queryReportTask(request?: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, options?: CallOptions): Promise<[
|
|
502
|
+
protos.google.analytics.data.v1alpha.IQueryReportTaskResponse,
|
|
503
|
+
protos.google.analytics.data.v1alpha.IQueryReportTaskRequest | undefined,
|
|
504
|
+
{} | undefined
|
|
505
|
+
]>;
|
|
506
|
+
queryReportTask(request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, protos.google.analytics.data.v1alpha.IQueryReportTaskRequest | null | undefined, {} | null | undefined>): void;
|
|
507
|
+
queryReportTask(request: protos.google.analytics.data.v1alpha.IQueryReportTaskRequest, callback: Callback<protos.google.analytics.data.v1alpha.IQueryReportTaskResponse, protos.google.analytics.data.v1alpha.IQueryReportTaskRequest | null | undefined, {} | null | undefined>): void;
|
|
508
|
+
/**
|
|
509
|
+
* Gets report metadata about a specific report task. After creating a report
|
|
510
|
+
* task, use this method to check its processing state or inspect its
|
|
511
|
+
* report definition.
|
|
512
|
+
*
|
|
513
|
+
* @param {Object} request
|
|
514
|
+
* The request object that will be sent.
|
|
515
|
+
* @param {string} request.name
|
|
516
|
+
* Required. The report task resource name.
|
|
517
|
+
* Format: `properties/{property}/reportTasks/{report_task}`
|
|
518
|
+
* @param {object} [options]
|
|
519
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
520
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
521
|
+
* The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}.
|
|
522
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
523
|
+
* for more details and examples.
|
|
524
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.get_report_task.js</caption>
|
|
525
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetReportTask_async
|
|
526
|
+
*/
|
|
527
|
+
getReportTask(request?: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, options?: CallOptions): Promise<[
|
|
528
|
+
protos.google.analytics.data.v1alpha.IReportTask,
|
|
529
|
+
protos.google.analytics.data.v1alpha.IGetReportTaskRequest | undefined,
|
|
530
|
+
{} | undefined
|
|
531
|
+
]>;
|
|
532
|
+
getReportTask(request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IGetReportTaskRequest | null | undefined, {} | null | undefined>): void;
|
|
533
|
+
getReportTask(request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, callback: Callback<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IGetReportTaskRequest | null | undefined, {} | null | undefined>): void;
|
|
454
534
|
/**
|
|
455
535
|
* Creates an audience list for later retrieval. This method quickly returns
|
|
456
536
|
* the audience list's resource name and initiates a long running asynchronous
|
|
@@ -514,6 +594,49 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
514
594
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async
|
|
515
595
|
*/
|
|
516
596
|
checkCreateAudienceListProgress(name: string): Promise<LROperation<protos.google.analytics.data.v1alpha.AudienceList, protos.google.analytics.data.v1alpha.AudienceListMetadata>>;
|
|
597
|
+
/**
|
|
598
|
+
* Initiates the creation of a report task. This method quickly
|
|
599
|
+
* returns a report task and initiates a long running
|
|
600
|
+
* asynchronous request to form a customized report of your Google Analytics
|
|
601
|
+
* event data.
|
|
602
|
+
*
|
|
603
|
+
* @param {Object} request
|
|
604
|
+
* The request object that will be sent.
|
|
605
|
+
* @param {string} request.parent
|
|
606
|
+
* Required. The parent resource where this report task will be created.
|
|
607
|
+
* Format: `properties/{propertyId}`
|
|
608
|
+
* @param {google.analytics.data.v1alpha.ReportTask} request.reportTask
|
|
609
|
+
* Required. The report task configuration to create.
|
|
610
|
+
* @param {object} [options]
|
|
611
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
612
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
613
|
+
* The first element of the array is an object representing
|
|
614
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
615
|
+
* you can `await` for.
|
|
616
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
617
|
+
* for more details and examples.
|
|
618
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js</caption>
|
|
619
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async
|
|
620
|
+
*/
|
|
621
|
+
createReportTask(request?: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, options?: CallOptions): Promise<[
|
|
622
|
+
LROperation<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IReportTaskMetadata>,
|
|
623
|
+
protos.google.longrunning.IOperation | undefined,
|
|
624
|
+
{} | undefined
|
|
625
|
+
]>;
|
|
626
|
+
createReportTask(request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, options: CallOptions, callback: Callback<LROperation<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IReportTaskMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
627
|
+
createReportTask(request: protos.google.analytics.data.v1alpha.ICreateReportTaskRequest, callback: Callback<LROperation<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IReportTaskMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
628
|
+
/**
|
|
629
|
+
* Check the status of the long running operation returned by `createReportTask()`.
|
|
630
|
+
* @param {String} name
|
|
631
|
+
* The operation name that will be passed.
|
|
632
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
633
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
634
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
635
|
+
* for more details and examples.
|
|
636
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js</caption>
|
|
637
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async
|
|
638
|
+
*/
|
|
639
|
+
checkCreateReportTaskProgress(name: string): Promise<LROperation<protos.google.analytics.data.v1alpha.ReportTask, protos.google.analytics.data.v1alpha.ReportTaskMetadata>>;
|
|
517
640
|
/**
|
|
518
641
|
* Lists all audience lists for a property. This method can be used for you to
|
|
519
642
|
* find and reuse existing audience lists rather than creating unnecessary new
|
|
@@ -746,6 +869,89 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
746
869
|
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListRecurringAudienceLists_async
|
|
747
870
|
*/
|
|
748
871
|
listRecurringAudienceListsAsync(request?: protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, options?: CallOptions): AsyncIterable<protos.google.analytics.data.v1alpha.IRecurringAudienceList>;
|
|
872
|
+
/**
|
|
873
|
+
* Lists all report tasks for a property.
|
|
874
|
+
*
|
|
875
|
+
* @param {Object} request
|
|
876
|
+
* The request object that will be sent.
|
|
877
|
+
* @param {string} request.parent
|
|
878
|
+
* Required. All report tasks for this property will be listed in the
|
|
879
|
+
* response. Format: `properties/{property}`
|
|
880
|
+
* @param {number} [request.pageSize]
|
|
881
|
+
* Optional. The maximum number of report tasks to return.
|
|
882
|
+
* @param {string} [request.pageToken]
|
|
883
|
+
* Optional. A page token, received from a previous `ListReportTasks` call.
|
|
884
|
+
* Provide this to retrieve the subsequent page.
|
|
885
|
+
* @param {object} [options]
|
|
886
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
887
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
888
|
+
* The first element of the array is Array of {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}.
|
|
889
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
890
|
+
* times as needed and will merge results from all the pages into this array.
|
|
891
|
+
* Note that it can affect your quota.
|
|
892
|
+
* We recommend using `listReportTasksAsync()`
|
|
893
|
+
* method described below for async iteration which you can stop as needed.
|
|
894
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
895
|
+
* for more details and examples.
|
|
896
|
+
*/
|
|
897
|
+
listReportTasks(request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, options?: CallOptions): Promise<[
|
|
898
|
+
protos.google.analytics.data.v1alpha.IReportTask[],
|
|
899
|
+
protos.google.analytics.data.v1alpha.IListReportTasksRequest | null,
|
|
900
|
+
protos.google.analytics.data.v1alpha.IListReportTasksResponse
|
|
901
|
+
]>;
|
|
902
|
+
listReportTasks(request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, options: CallOptions, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListReportTasksRequest, protos.google.analytics.data.v1alpha.IListReportTasksResponse | null | undefined, protos.google.analytics.data.v1alpha.IReportTask>): void;
|
|
903
|
+
listReportTasks(request: protos.google.analytics.data.v1alpha.IListReportTasksRequest, callback: PaginationCallback<protos.google.analytics.data.v1alpha.IListReportTasksRequest, protos.google.analytics.data.v1alpha.IListReportTasksResponse | null | undefined, protos.google.analytics.data.v1alpha.IReportTask>): void;
|
|
904
|
+
/**
|
|
905
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
906
|
+
* @param {Object} request
|
|
907
|
+
* The request object that will be sent.
|
|
908
|
+
* @param {string} request.parent
|
|
909
|
+
* Required. All report tasks for this property will be listed in the
|
|
910
|
+
* response. Format: `properties/{property}`
|
|
911
|
+
* @param {number} [request.pageSize]
|
|
912
|
+
* Optional. The maximum number of report tasks to return.
|
|
913
|
+
* @param {string} [request.pageToken]
|
|
914
|
+
* Optional. A page token, received from a previous `ListReportTasks` call.
|
|
915
|
+
* Provide this to retrieve the subsequent page.
|
|
916
|
+
* @param {object} [options]
|
|
917
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
918
|
+
* @returns {Stream}
|
|
919
|
+
* An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask} on 'data' event.
|
|
920
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
921
|
+
* times as needed. Note that it can affect your quota.
|
|
922
|
+
* We recommend using `listReportTasksAsync()`
|
|
923
|
+
* method described below for async iteration which you can stop as needed.
|
|
924
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
925
|
+
* for more details and examples.
|
|
926
|
+
*/
|
|
927
|
+
listReportTasksStream(request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, options?: CallOptions): Transform;
|
|
928
|
+
/**
|
|
929
|
+
* Equivalent to `listReportTasks`, but returns an iterable object.
|
|
930
|
+
*
|
|
931
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
932
|
+
* @param {Object} request
|
|
933
|
+
* The request object that will be sent.
|
|
934
|
+
* @param {string} request.parent
|
|
935
|
+
* Required. All report tasks for this property will be listed in the
|
|
936
|
+
* response. Format: `properties/{property}`
|
|
937
|
+
* @param {number} [request.pageSize]
|
|
938
|
+
* Optional. The maximum number of report tasks to return.
|
|
939
|
+
* @param {string} [request.pageToken]
|
|
940
|
+
* Optional. A page token, received from a previous `ListReportTasks` call.
|
|
941
|
+
* Provide this to retrieve the subsequent page.
|
|
942
|
+
* @param {object} [options]
|
|
943
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
944
|
+
* @returns {Object}
|
|
945
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
946
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
947
|
+
* {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. The API will be called under the hood as needed, once per the page,
|
|
948
|
+
* so you can stop the iteration when you don't need more results.
|
|
949
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
950
|
+
* for more details and examples.
|
|
951
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js</caption>
|
|
952
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async
|
|
953
|
+
*/
|
|
954
|
+
listReportTasksAsync(request?: protos.google.analytics.data.v1alpha.IListReportTasksRequest, options?: CallOptions): AsyncIterable<protos.google.analytics.data.v1alpha.IReportTask>;
|
|
749
955
|
/**
|
|
750
956
|
* Gets the latest state of a long-running operation. Clients can use this
|
|
751
957
|
* method to poll the operation result at intervals as recommended by the API
|
|
@@ -929,6 +1135,30 @@ export declare class AlphaAnalyticsDataClient {
|
|
|
929
1135
|
* @returns {string} A string representing the recurring_audience_list.
|
|
930
1136
|
*/
|
|
931
1137
|
matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName: string): string | number;
|
|
1138
|
+
/**
|
|
1139
|
+
* Return a fully-qualified reportTask resource name string.
|
|
1140
|
+
*
|
|
1141
|
+
* @param {string} property
|
|
1142
|
+
* @param {string} report_task
|
|
1143
|
+
* @returns {string} Resource name string.
|
|
1144
|
+
*/
|
|
1145
|
+
reportTaskPath(property: string, reportTask: string): string;
|
|
1146
|
+
/**
|
|
1147
|
+
* Parse the property from ReportTask resource.
|
|
1148
|
+
*
|
|
1149
|
+
* @param {string} reportTaskName
|
|
1150
|
+
* A fully-qualified path representing ReportTask resource.
|
|
1151
|
+
* @returns {string} A string representing the property.
|
|
1152
|
+
*/
|
|
1153
|
+
matchPropertyFromReportTaskName(reportTaskName: string): string | number;
|
|
1154
|
+
/**
|
|
1155
|
+
* Parse the report_task from ReportTask resource.
|
|
1156
|
+
*
|
|
1157
|
+
* @param {string} reportTaskName
|
|
1158
|
+
* A fully-qualified path representing ReportTask resource.
|
|
1159
|
+
* @returns {string} A string representing the report_task.
|
|
1160
|
+
*/
|
|
1161
|
+
matchReportTaskFromReportTaskName(reportTaskName: string): string | number;
|
|
932
1162
|
/**
|
|
933
1163
|
* Terminate the gRPC channel and close the client.
|
|
934
1164
|
*
|
|
@@ -151,6 +151,7 @@ class AlphaAnalyticsDataClient {
|
|
|
151
151
|
audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceLists/{audience_list}'),
|
|
152
152
|
propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
|
|
153
153
|
recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/recurringAudienceLists/{recurring_audience_list}'),
|
|
154
|
+
reportTaskPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/reportTasks/{report_task}'),
|
|
154
155
|
};
|
|
155
156
|
// Some of the methods on this service return "paged" results,
|
|
156
157
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
|
@@ -158,6 +159,7 @@ class AlphaAnalyticsDataClient {
|
|
|
158
159
|
this.descriptors.page = {
|
|
159
160
|
listAudienceLists: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'),
|
|
160
161
|
listRecurringAudienceLists: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'),
|
|
162
|
+
listReportTasks: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks'),
|
|
161
163
|
};
|
|
162
164
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
163
165
|
// This API contains "long-running operations", which return a
|
|
@@ -176,8 +178,11 @@ class AlphaAnalyticsDataClient {
|
|
|
176
178
|
.operationsClient(opts);
|
|
177
179
|
const createAudienceListResponse = protoFilesRoot.lookup('.google.analytics.data.v1alpha.AudienceList');
|
|
178
180
|
const createAudienceListMetadata = protoFilesRoot.lookup('.google.analytics.data.v1alpha.AudienceListMetadata');
|
|
181
|
+
const createReportTaskResponse = protoFilesRoot.lookup('.google.analytics.data.v1alpha.ReportTask');
|
|
182
|
+
const createReportTaskMetadata = protoFilesRoot.lookup('.google.analytics.data.v1alpha.ReportTaskMetadata');
|
|
179
183
|
this.descriptors.longrunning = {
|
|
180
184
|
createAudienceList: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAudienceListResponse.decode.bind(createAudienceListResponse), createAudienceListMetadata.decode.bind(createAudienceListMetadata)),
|
|
185
|
+
createReportTask: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createReportTaskResponse.decode.bind(createReportTaskResponse), createReportTaskMetadata.decode.bind(createReportTaskMetadata)),
|
|
181
186
|
};
|
|
182
187
|
// Put together the default options sent with requests.
|
|
183
188
|
this._defaults = this._gaxGrpc.constructSettings('google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -223,6 +228,10 @@ class AlphaAnalyticsDataClient {
|
|
|
223
228
|
'createRecurringAudienceList',
|
|
224
229
|
'getRecurringAudienceList',
|
|
225
230
|
'listRecurringAudienceLists',
|
|
231
|
+
'createReportTask',
|
|
232
|
+
'queryReportTask',
|
|
233
|
+
'getReportTask',
|
|
234
|
+
'listReportTasks',
|
|
226
235
|
];
|
|
227
236
|
for (const methodName of alphaAnalyticsDataStubMethods) {
|
|
228
237
|
const callPromise = this.alphaAnalyticsDataStub.then(stub => (...args) => {
|
|
@@ -434,6 +443,48 @@ class AlphaAnalyticsDataClient {
|
|
|
434
443
|
this.initialize();
|
|
435
444
|
return this.innerApiCalls.getRecurringAudienceList(request, options, callback);
|
|
436
445
|
}
|
|
446
|
+
queryReportTask(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.queryReportTask(request, options, callback);
|
|
466
|
+
}
|
|
467
|
+
getReportTask(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
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
484
|
+
});
|
|
485
|
+
this.initialize();
|
|
486
|
+
return this.innerApiCalls.getReportTask(request, options, callback);
|
|
487
|
+
}
|
|
437
488
|
createAudienceList(request, optionsOrCallback, callback) {
|
|
438
489
|
var _a;
|
|
439
490
|
request = request || {};
|
|
@@ -472,6 +523,44 @@ class AlphaAnalyticsDataClient {
|
|
|
472
523
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceList, this._gaxModule.createDefaultBackoffSettings());
|
|
473
524
|
return decodeOperation;
|
|
474
525
|
}
|
|
526
|
+
createReportTask(request, optionsOrCallback, callback) {
|
|
527
|
+
var _a;
|
|
528
|
+
request = request || {};
|
|
529
|
+
let options;
|
|
530
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
531
|
+
callback = optionsOrCallback;
|
|
532
|
+
options = {};
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
options = optionsOrCallback;
|
|
536
|
+
}
|
|
537
|
+
options = options || {};
|
|
538
|
+
options.otherArgs = options.otherArgs || {};
|
|
539
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
540
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
541
|
+
this._gaxModule.routingHeader.fromParams({
|
|
542
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
543
|
+
});
|
|
544
|
+
this.initialize();
|
|
545
|
+
return this.innerApiCalls.createReportTask(request, options, callback);
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Check the status of the long running operation returned by `createReportTask()`.
|
|
549
|
+
* @param {String} name
|
|
550
|
+
* The operation name that will be passed.
|
|
551
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
552
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
553
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
554
|
+
* for more details and examples.
|
|
555
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js</caption>
|
|
556
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async
|
|
557
|
+
*/
|
|
558
|
+
async checkCreateReportTaskProgress(name) {
|
|
559
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
560
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
561
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createReportTask, this._gaxModule.createDefaultBackoffSettings());
|
|
562
|
+
return decodeOperation;
|
|
563
|
+
}
|
|
475
564
|
listAudienceLists(request, optionsOrCallback, callback) {
|
|
476
565
|
var _a;
|
|
477
566
|
request = request || {};
|
|
@@ -700,6 +789,106 @@ class AlphaAnalyticsDataClient {
|
|
|
700
789
|
this.initialize();
|
|
701
790
|
return this.descriptors.page.listRecurringAudienceLists.asyncIterate(this.innerApiCalls['listRecurringAudienceLists'], request, callSettings);
|
|
702
791
|
}
|
|
792
|
+
listReportTasks(request, optionsOrCallback, callback) {
|
|
793
|
+
var _a;
|
|
794
|
+
request = request || {};
|
|
795
|
+
let options;
|
|
796
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
797
|
+
callback = optionsOrCallback;
|
|
798
|
+
options = {};
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
options = optionsOrCallback;
|
|
802
|
+
}
|
|
803
|
+
options = options || {};
|
|
804
|
+
options.otherArgs = options.otherArgs || {};
|
|
805
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
806
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
807
|
+
this._gaxModule.routingHeader.fromParams({
|
|
808
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
809
|
+
});
|
|
810
|
+
this.initialize();
|
|
811
|
+
return this.innerApiCalls.listReportTasks(request, options, callback);
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
815
|
+
* @param {Object} request
|
|
816
|
+
* The request object that will be sent.
|
|
817
|
+
* @param {string} request.parent
|
|
818
|
+
* Required. All report tasks for this property will be listed in the
|
|
819
|
+
* response. Format: `properties/{property}`
|
|
820
|
+
* @param {number} [request.pageSize]
|
|
821
|
+
* Optional. The maximum number of report tasks to return.
|
|
822
|
+
* @param {string} [request.pageToken]
|
|
823
|
+
* Optional. A page token, received from a previous `ListReportTasks` call.
|
|
824
|
+
* Provide this to retrieve the subsequent page.
|
|
825
|
+
* @param {object} [options]
|
|
826
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
827
|
+
* @returns {Stream}
|
|
828
|
+
* An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask} on 'data' event.
|
|
829
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
830
|
+
* times as needed. Note that it can affect your quota.
|
|
831
|
+
* We recommend using `listReportTasksAsync()`
|
|
832
|
+
* method described below for async iteration which you can stop as needed.
|
|
833
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
834
|
+
* for more details and examples.
|
|
835
|
+
*/
|
|
836
|
+
listReportTasksStream(request, options) {
|
|
837
|
+
var _a;
|
|
838
|
+
request = request || {};
|
|
839
|
+
options = options || {};
|
|
840
|
+
options.otherArgs = options.otherArgs || {};
|
|
841
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
842
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
843
|
+
this._gaxModule.routingHeader.fromParams({
|
|
844
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
845
|
+
});
|
|
846
|
+
const defaultCallSettings = this._defaults['listReportTasks'];
|
|
847
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
848
|
+
this.initialize();
|
|
849
|
+
return this.descriptors.page.listReportTasks.createStream(this.innerApiCalls.listReportTasks, request, callSettings);
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Equivalent to `listReportTasks`, but returns an iterable object.
|
|
853
|
+
*
|
|
854
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
855
|
+
* @param {Object} request
|
|
856
|
+
* The request object that will be sent.
|
|
857
|
+
* @param {string} request.parent
|
|
858
|
+
* Required. All report tasks for this property will be listed in the
|
|
859
|
+
* response. Format: `properties/{property}`
|
|
860
|
+
* @param {number} [request.pageSize]
|
|
861
|
+
* Optional. The maximum number of report tasks to return.
|
|
862
|
+
* @param {string} [request.pageToken]
|
|
863
|
+
* Optional. A page token, received from a previous `ListReportTasks` call.
|
|
864
|
+
* Provide this to retrieve the subsequent page.
|
|
865
|
+
* @param {object} [options]
|
|
866
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
867
|
+
* @returns {Object}
|
|
868
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
869
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
870
|
+
* {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. The API will be called under the hood as needed, once per the page,
|
|
871
|
+
* so you can stop the iteration when you don't need more results.
|
|
872
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
873
|
+
* for more details and examples.
|
|
874
|
+
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js</caption>
|
|
875
|
+
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async
|
|
876
|
+
*/
|
|
877
|
+
listReportTasksAsync(request, options) {
|
|
878
|
+
var _a;
|
|
879
|
+
request = request || {};
|
|
880
|
+
options = options || {};
|
|
881
|
+
options.otherArgs = options.otherArgs || {};
|
|
882
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
883
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
884
|
+
this._gaxModule.routingHeader.fromParams({
|
|
885
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
886
|
+
});
|
|
887
|
+
const defaultCallSettings = this._defaults['listReportTasks'];
|
|
888
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
889
|
+
this.initialize();
|
|
890
|
+
return this.descriptors.page.listReportTasks.asyncIterate(this.innerApiCalls['listReportTasks'], request, callSettings);
|
|
891
|
+
}
|
|
703
892
|
/**
|
|
704
893
|
* Gets the latest state of a long-running operation. Clients can use this
|
|
705
894
|
* method to poll the operation result at intervals as recommended by the API
|
|
@@ -920,6 +1109,41 @@ class AlphaAnalyticsDataClient {
|
|
|
920
1109
|
matchRecurringAudienceListFromRecurringAudienceListName(recurringAudienceListName) {
|
|
921
1110
|
return this.pathTemplates.recurringAudienceListPathTemplate.match(recurringAudienceListName).recurring_audience_list;
|
|
922
1111
|
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Return a fully-qualified reportTask resource name string.
|
|
1114
|
+
*
|
|
1115
|
+
* @param {string} property
|
|
1116
|
+
* @param {string} report_task
|
|
1117
|
+
* @returns {string} Resource name string.
|
|
1118
|
+
*/
|
|
1119
|
+
reportTaskPath(property, reportTask) {
|
|
1120
|
+
return this.pathTemplates.reportTaskPathTemplate.render({
|
|
1121
|
+
property: property,
|
|
1122
|
+
report_task: reportTask,
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Parse the property from ReportTask resource.
|
|
1127
|
+
*
|
|
1128
|
+
* @param {string} reportTaskName
|
|
1129
|
+
* A fully-qualified path representing ReportTask resource.
|
|
1130
|
+
* @returns {string} A string representing the property.
|
|
1131
|
+
*/
|
|
1132
|
+
matchPropertyFromReportTaskName(reportTaskName) {
|
|
1133
|
+
return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName)
|
|
1134
|
+
.property;
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Parse the report_task from ReportTask resource.
|
|
1138
|
+
*
|
|
1139
|
+
* @param {string} reportTaskName
|
|
1140
|
+
* A fully-qualified path representing ReportTask resource.
|
|
1141
|
+
* @returns {string} A string representing the report_task.
|
|
1142
|
+
*/
|
|
1143
|
+
matchReportTaskFromReportTaskName(reportTaskName) {
|
|
1144
|
+
return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName)
|
|
1145
|
+
.report_task;
|
|
1146
|
+
}
|
|
923
1147
|
/**
|
|
924
1148
|
* Terminate the gRPC channel and close the client.
|
|
925
1149
|
*
|
|
@@ -76,6 +76,26 @@
|
|
|
76
76
|
"timeout_millis": 60000,
|
|
77
77
|
"retry_codes_name": "unknown",
|
|
78
78
|
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
79
|
+
},
|
|
80
|
+
"CreateReportTask": {
|
|
81
|
+
"timeout_millis": 60000,
|
|
82
|
+
"retry_codes_name": "unknown",
|
|
83
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
84
|
+
},
|
|
85
|
+
"QueryReportTask": {
|
|
86
|
+
"timeout_millis": 60000,
|
|
87
|
+
"retry_codes_name": "unknown",
|
|
88
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
89
|
+
},
|
|
90
|
+
"GetReportTask": {
|
|
91
|
+
"timeout_millis": 60000,
|
|
92
|
+
"retry_codes_name": "unknown",
|
|
93
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
94
|
+
},
|
|
95
|
+
"ListReportTasks": {
|
|
96
|
+
"timeout_millis": 60000,
|
|
97
|
+
"retry_codes_name": "unknown",
|
|
98
|
+
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
|
|
79
99
|
}
|
|
80
100
|
}
|
|
81
101
|
}
|