Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-analytics/data

Package Overview
Dependencies
Maintainers
3
Versions
42
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 1.1.0 to 2.0.0

5

build/src/v1alpha/alpha_analytics_data_client_config.json

@@ -55,7 +55,2 @@ {

},
"GetUniversalMetadata": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"GetMetadata": {

@@ -62,0 +57,0 @@ "timeout_millis": 60000,

35

build/src/v1alpha/alpha_analytics_data_client.d.ts
import * as gax from 'google-gax';
import { Callback, Descriptors, ClientOptions } from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
import * as protos from '../../protos/protos';

@@ -53,5 +53,5 @@ /**

* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override.
* TODO(@alexander-fenster): link to gax documentation.
* @param {boolean} fallback - Use HTTP fallback mode.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used

@@ -101,22 +101,19 @@ * instead of gRPC transport. In browser context (if the `window` object is defined)

getProjectId(callback: Callback<string, undefined, undefined>): void;
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | undefined, {} | undefined]>;
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | undefined, {} | undefined]>;
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | undefined, {} | undefined]>;
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | undefined, {} | undefined]>;
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
runPivotReport(request: protos.google.analytics.data.v1alpha.IRunPivotReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunPivotReportResponse, protos.google.analytics.data.v1alpha.IRunPivotReportRequest | null | undefined, {} | null | undefined>): void;
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | undefined, {} | undefined]>;
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | undefined, {} | undefined]>;
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
batchRunReports(request: protos.google.analytics.data.v1alpha.IBatchRunReportsRequest, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunReportsRequest | null | undefined, {} | null | undefined>): void;
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, (protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | undefined), {} | undefined]>;
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, (protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | undefined), {} | undefined]>;
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
batchRunPivotReports(request: protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest, callback: Callback<protos.google.analytics.data.v1alpha.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1alpha.IBatchRunPivotReportsRequest | null | undefined, {} | null | undefined>): void;
getUniversalMetadata(request: protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IUniversalMetadata, (protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest | undefined), {} | undefined]>;
getUniversalMetadata(request: protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IUniversalMetadata, protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest | null | undefined, {} | null | undefined>): void;
getUniversalMetadata(request: protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest, callback: Callback<protos.google.analytics.data.v1alpha.IUniversalMetadata, protos.google.analytics.data.v1alpha.IGetUniversalMetadataRequest | null | undefined, {} | null | undefined>): void;
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | undefined, {} | undefined]>;
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | undefined, {} | undefined]>;
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options?: gax.CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, (protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | undefined), {} | undefined]>;
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options: gax.CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options?: CallOptions): Promise<[protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, (protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | undefined), {} | undefined]>;
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;
runRealtimeReport(request: protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunRealtimeReportResponse, protos.google.analytics.data.v1alpha.IRunRealtimeReportRequest | null | undefined, {} | null | undefined>): void;

@@ -123,0 +120,0 @@ /**

@@ -21,4 +21,10 @@ "use strict";

exports.AlphaAnalyticsDataClient = void 0;
/* global window */
const gax = require("google-gax");
const path = require("path");
/**
* Client JSON configuration object, loaded from
* `src/v1alpha/alpha_analytics_data_client_config.json`.
* This file defines retry strategy and timeouts for all API methods in this library.
*/
const gapicConfig = require("./alpha_analytics_data_client_config.json");

@@ -58,5 +64,5 @@ const version = require('../../../package.json').version;

* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override.
* TODO(@alexander-fenster): link to gax documentation.
* @param {boolean} fallback - Use HTTP fallback mode.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used

@@ -81,3 +87,3 @@ * instead of gRPC transport. In browser context (if the `window` object is defined)

const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : typeof window !== 'undefined';
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);

@@ -165,3 +171,2 @@ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.

'batchRunPivotReports',
'getUniversalMetadata',
'getMetadata',

@@ -256,5 +261,11 @@ 'runRealtimeReport',

* The row count of the start row. The first row is counted as row 0.
*
* To learn more about this pagination parameter, see
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
* @param {number} request.limit
* The number of rows to return. If unspecified, 10 rows are returned. If
* -1, all rows are returned.
*
* To learn more about this pagination parameter, see
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
* @param {number[]} request.metricAggregations

@@ -459,38 +470,4 @@ * Aggregation of metrics. Aggregated metric values will be shown in rows

* Returns metadata for dimensions and metrics available in reporting methods.
* Used to explore the dimensions and metrics. Dimensions and metrics will be
* mostly added over time, but renames and deletions may occur.
*
* This method returns Universal Metadata. Universal Metadata are dimensions
* and metrics applicable to any property such as `country` and `totalUsers`.
*
* @param {Object} request
* The request object that will be sent.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [UniversalMetadata]{@link google.analytics.data.v1alpha.UniversalMetadata}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.getUniversalMetadata(request);
*/
getUniversalMetadata(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
this.initialize();
return this.innerApiCalls.getUniversalMetadata(request, options, callback);
}
/**
* Returns metadata for dimensions and metrics available in reporting methods.
* Used to explore the dimensions and metrics. In this method, a Google
* Analytics 4 (GA4) Property Identifier is specified in the request, and
* Analytics GA4 Property Identifier is specified in the request, and
* the metadata response includes Custom dimensions and metrics as well as

@@ -509,5 +486,11 @@ * Universal metadata.

* specified in the URL path and not URL parameters. Property is a numeric
* Google Analytics 4 (GA4) Property identifier.
* Google Analytics GA4 Property identifier. To learn more, see [where to find
* your Property
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
*
* Example: properties/1234/metadata
*
* Set the Property ID to 0 for dimensions and metrics common to all
* properties. In this special mode, this method will not return custom
* dimensions and metrics.
* @param {object} [options]

@@ -553,3 +536,3 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.

* find your Property
* ID](https://developers.google.com/analytics/trusted-testing/analytics-data/property-id).
* ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
*

@@ -583,3 +566,7 @@ * Example: properties/1234

* The first element of the array is an object representing [RunRealtimeReportResponse]{@link google.analytics.data.v1alpha.RunRealtimeReportResponse}.
* The promise has a method named "cancel" which cancels the ongoing API call.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.runRealtimeReport(request);
*/

@@ -586,0 +573,0 @@ runRealtimeReport(request, optionsOrCallback, callback) {

# Changelog
## [2.0.0](https://www.github.com/googleapis/nodejs-analytics-data/compare/v1.1.0...v2.0.0) (2020-12-28)
### ⚠ BREAKING CHANGES
* GetUniversalMetadata method removed from the API, GetMetadata method should be used instead feat: reporting requests support longer date ranges (#43)
### Bug Fixes
* GetUniversalMetadata method removed from the API, GetMetadata method should be used instead feat: reporting requests support longer date ranges ([#43](https://www.github.com/googleapis/nodejs-analytics-data/issues/43)) ([661ee0e](https://www.github.com/googleapis/nodejs-analytics-data/commit/661ee0e27abea9978d09ee06b2d6c259712b351f))
## [1.1.0](https://www.github.com/googleapis/nodejs-analytics-data/compare/v1.0.2...v1.1.0) (2020-11-11)

@@ -4,0 +15,0 @@

{
"name": "@google-analytics/data",
"version": "1.1.0",
"version": "2.0.0",
"description": "Data client for Node.js",

@@ -5,0 +5,0 @@ "repository": "googleapis/nodejs-analytics-data",

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

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-analytics-data/tree/master/samples) directory. The samples' `README.md`
has instructions for running the samples.
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-analytics-data/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.

@@ -129,3 +128,3 @@ | Sample | Source Code | Try it |

Client libraries targetting some end-of-life versions of Node.js are available, and
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).

@@ -132,0 +131,0 @@ The dist-tags follow the naming convention `legacy-(version)`.

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 not supported yet

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