Socket
Socket
Sign inDemoInstall

@google-analytics/data

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-analytics/data - npm Package Compare versions

Comparing version 4.5.0 to 4.6.0

20

build/src/v1alpha/alpha_analytics_data_client_config.json

@@ -79,2 +79,22 @@ {

"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"CreateReportTask": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"QueryReportTask": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"GetReportTask": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"ListReportTasks": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
}

@@ -81,0 +101,0 @@ }

@@ -154,2 +154,3 @@ "use strict";

recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/recurringAudienceLists/{recurring_audience_list}'),
reportTaskPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/reportTasks/{report_task}'),
};

@@ -162,2 +163,3 @@ // Some of the methods on this service return "paged" results,

listRecurringAudienceLists: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'recurringAudienceLists'),
listReportTasks: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reportTasks'),
};

@@ -181,4 +183,7 @@ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);

const createAudienceListMetadata = protoFilesRoot.lookup('.google.analytics.data.v1alpha.AudienceListMetadata');
const createReportTaskResponse = protoFilesRoot.lookup('.google.analytics.data.v1alpha.ReportTask');
const createReportTaskMetadata = protoFilesRoot.lookup('.google.analytics.data.v1alpha.ReportTaskMetadata');
this.descriptors.longrunning = {
createAudienceList: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAudienceListResponse.decode.bind(createAudienceListResponse), createAudienceListMetadata.decode.bind(createAudienceListMetadata)),
createReportTask: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createReportTaskResponse.decode.bind(createReportTaskResponse), createReportTaskMetadata.decode.bind(createReportTaskMetadata)),
};

@@ -229,2 +234,6 @@ // Put together the default options sent with requests.

'listRecurringAudienceLists',
'createReportTask',
'queryReportTask',
'getReportTask',
'listReportTasks',
];

@@ -441,2 +450,44 @@ for (const methodName of alphaAnalyticsDataStubMethods) {

}
queryReportTask(request, optionsOrCallback, callback) {
var _a;
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
});
this.initialize();
return this.innerApiCalls.queryReportTask(request, options, callback);
}
getReportTask(request, optionsOrCallback, callback) {
var _a;
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
});
this.initialize();
return this.innerApiCalls.getReportTask(request, options, callback);
}
createAudienceList(request, optionsOrCallback, callback) {

@@ -480,2 +531,40 @@ var _a;

}
createReportTask(request, optionsOrCallback, callback) {
var _a;
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});
this.initialize();
return this.innerApiCalls.createReportTask(request, options, callback);
}
/**
* Check the status of the long running operation returned by `createReportTask()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.create_report_task.js</caption>
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateReportTask_async
*/
async checkCreateReportTaskProgress(name) {
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createReportTask, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;
}
listAudienceLists(request, optionsOrCallback, callback) {

@@ -709,3 +798,103 @@ var _a;

}
listReportTasks(request, optionsOrCallback, callback) {
var _a;
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});
this.initialize();
return this.innerApiCalls.listReportTasks(request, options, callback);
}
/**
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. All report tasks for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of report tasks to return.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListReportTasks` call.
* Provide this to retrieve the subsequent page.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listReportTasksAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listReportTasksStream(request, options) {
var _a;
request = request || {};
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});
const defaultCallSettings = this._defaults['listReportTasks'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listReportTasks.createStream(this.innerApiCalls.listReportTasks, request, callSettings);
}
/**
* Equivalent to `listReportTasks`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. All report tasks for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of report tasks to return.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListReportTasks` call.
* Provide this to retrieve the subsequent page.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.analytics.data.v1alpha.ReportTask|ReportTask}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js</caption>
* region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListReportTasks_async
*/
listReportTasksAsync(request, options) {
var _a;
request = request || {};
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});
const defaultCallSettings = this._defaults['listReportTasks'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listReportTasks.asyncIterate(this.innerApiCalls['listReportTasks'], request, callSettings);
}
/**
* Gets the latest state of a long-running operation. Clients can use this

@@ -931,2 +1120,37 @@ * method to poll the operation result at intervals as recommended by the API

/**
* Return a fully-qualified reportTask resource name string.
*
* @param {string} property
* @param {string} report_task
* @returns {string} Resource name string.
*/
reportTaskPath(property, reportTask) {
return this.pathTemplates.reportTaskPathTemplate.render({
property: property,
report_task: reportTask,
});
}
/**
* Parse the property from ReportTask resource.
*
* @param {string} reportTaskName
* A fully-qualified path representing ReportTask resource.
* @returns {string} A string representing the property.
*/
matchPropertyFromReportTaskName(reportTaskName) {
return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName)
.property;
}
/**
* Parse the report_task from ReportTask resource.
*
* @param {string} reportTaskName
* A fully-qualified path representing ReportTask resource.
* @returns {string} A string representing the report_task.
*/
matchReportTaskFromReportTaskName(reportTaskName) {
return this.pathTemplates.reportTaskPathTemplate.match(reportTaskName)
.report_task;
}
/**
* Terminate the gRPC channel and close the client.

@@ -933,0 +1157,0 @@ *

# Changelog
## [4.6.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.5.0...data-v4.6.0) (2024-05-08)
### Features
* Add `ReportTask`, `Metric`, `OrderBy`, `Cohort`, `CohortsRange`, `CohortReportSettings`, `ResponseMetaData`, `MetricAggregation`, `RestrictedMetricType` types to the Data API v1alpha ([#5318](https://github.com/googleapis/google-cloud-node/issues/5318)) ([76ae561](https://github.com/googleapis/google-cloud-node/commit/76ae561ee40d66cbba815cd7c9c964a6b92cc00c))
## [4.5.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.4.0...data-v4.5.0) (2024-04-16)

@@ -4,0 +11,0 @@

2

package.json
{
"name": "@google-analytics/data",
"version": "4.5.0",
"version": "4.6.0",
"description": "Data client for Node.js",

@@ -5,0 +5,0 @@ "repository": {

@@ -114,7 +114,11 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

| Alpha_analytics_data.create_recurring_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_recurring_audience_list.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.create_report_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.create_report_task.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.get_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_audience_list.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.get_recurring_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_recurring_audience_list.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.get_report_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.get_report_task.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.list_audience_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.list_recurring_audience_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_recurring_audience_lists.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.list_report_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.list_report_tasks.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.query_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_audience_list.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.query_report_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.query_report_task.js,packages/google-analytics-data/samples/README.md) |
| Alpha_analytics_data.run_funnel_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.run_funnel_report.js,packages/google-analytics-data/samples/README.md) |

@@ -121,0 +125,0 @@ | Alpha_analytics_data.sheet_export_audience_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js,packages/google-analytics-data/samples/README.md) |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc