Socket
Socket
Sign inDemoInstall

@google-analytics/data

Package Overview
Dependencies
90
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.0 to 4.3.0

32

build/src/v1beta/beta_analytics_data_client_config.json

@@ -9,2 +9,5 @@ {

"UNAVAILABLE"
],
"unknown": [
"UNKNOWN"
]

@@ -21,2 +24,11 @@ },

"total_timeout_millis": 600000
},
"01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
}

@@ -59,2 +71,22 @@ },

"retry_params_name": "default"
},
"CreateAudienceExport": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"QueryAudienceExport": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"GetAudienceExport": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
},
"ListAudienceExports": {
"timeout_millis": 60000,
"retry_codes_name": "unknown",
"retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
}

@@ -61,0 +93,0 @@ }

441

build/src/v1beta/beta_analytics_data_client.d.ts

@@ -0,3 +1,5 @@

/// <reference types="node" />
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';

@@ -26,2 +28,3 @@ /**

};
operationsClient: gax.OperationsClient;
betaAnalyticsDataStub?: Promise<{

@@ -528,2 +531,423 @@ [name: string]: Function;

/**
* Retrieves an audience export of users. After creating an audience, the
* users are not immediately available for exporting. First, a request to
* `CreateAudienceExport` is necessary to create an audience export of users,
* and then second, this method is used to retrieve the users in the audience
* export.
*
* See [Creating an Audience
* Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
* for an introduction to Audience Exports with examples.
*
* Audiences in Google Analytics 4 allow you to segment your users in the ways
* that are important to your business. To learn more, see
* https://support.google.com/analytics/answer/9267572.
*
* Audience Export APIs have some methods at alpha and other methods at beta
* stability. The intention is to advance methods to beta stability after some
* feedback and adoption. To give your feedback on this API, complete the
* [Google Analytics Audience Export API
* Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the audience export to retrieve users from.
* Format: `properties/{property}/audienceExports/{audience_export}`
* @param {number} [request.offset]
* Optional. The row count of the start row. The first row is counted as row
* 0.
*
* When paging, the first request does not specify offset; or equivalently,
* sets offset to 0; the first request returns the first `limit` of rows. The
* second request sets offset to the `limit` of the first request; the second
* request returns the second `limit` of rows.
*
* To learn more about this pagination parameter, see
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
* @param {number} [request.limit]
* Optional. The number of rows to return. If unspecified, 10,000 rows are
* returned. The API returns a maximum of 250,000 rows per request, no matter
* how many you ask for. `limit` must be positive.
*
* The API can also return fewer rows than the requested `limit`, if there
* aren't as many dimension values as the `limit`.
*
* To learn more about this pagination parameter, see
* [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
* @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 {@link protos.google.analytics.data.v1beta.QueryAudienceExportResponse|QueryAudienceExportResponse}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_QueryAudienceExport_async
*/
queryAudienceExport(request?: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, options?: CallOptions): Promise<[
protos.google.analytics.data.v1beta.IQueryAudienceExportResponse,
(protos.google.analytics.data.v1beta.IQueryAudienceExportRequest | undefined),
{} | undefined
]>;
queryAudienceExport(request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, protos.google.analytics.data.v1beta.IQueryAudienceExportRequest | null | undefined, {} | null | undefined>): void;
queryAudienceExport(request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, callback: Callback<protos.google.analytics.data.v1beta.IQueryAudienceExportResponse, protos.google.analytics.data.v1beta.IQueryAudienceExportRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets configuration metadata about a specific audience export. This method
* can be used to understand an audience export after it has been created.
*
* See [Creating an Audience
* Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
* for an introduction to Audience Exports with examples.
*
* Audience Export APIs have some methods at alpha and other methods at beta
* stability. The intention is to advance methods to beta stability after some
* feedback and adoption. To give your feedback on this API, complete the
* [Google Analytics Audience Export API
* Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The audience export resource name.
* Format: `properties/{property}/audienceExports/{audience_export}`
* @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 {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetAudienceExport_async
*/
getAudienceExport(request?: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, options?: CallOptions): Promise<[
protos.google.analytics.data.v1beta.IAudienceExport,
protos.google.analytics.data.v1beta.IGetAudienceExportRequest | undefined,
{} | undefined
]>;
getAudienceExport(request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1beta.IAudienceExport, protos.google.analytics.data.v1beta.IGetAudienceExportRequest | null | undefined, {} | null | undefined>): void;
getAudienceExport(request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, callback: Callback<protos.google.analytics.data.v1beta.IAudienceExport, protos.google.analytics.data.v1beta.IGetAudienceExportRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates an audience export for later retrieval. This method quickly returns
* the audience export's resource name and initiates a long running
* asynchronous request to form an audience export. To export the users in an
* audience export, first create the audience export through this method and
* then send the audience resource name to the `QueryAudienceExport` method.
*
* See [Creating an Audience
* Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
* for an introduction to Audience Exports with examples.
*
* An audience export is a snapshot of the users currently in the audience at
* the time of audience export creation. Creating audience exports for one
* audience on different days will return different results as users enter and
* exit the audience.
*
* Audiences in Google Analytics 4 allow you to segment your users in the ways
* that are important to your business. To learn more, see
* https://support.google.com/analytics/answer/9267572. Audience exports
* contain the users in each audience.
*
* Audience Export APIs have some methods at alpha and other methods at beta
* stability. The intention is to advance methods to beta stability after some
* feedback and adoption. To give your feedback on this API, complete the
* [Google Analytics Audience Export API
* Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource where this audience export will be created.
* Format: `properties/{property}`
* @param {google.analytics.data.v1beta.AudienceExport} request.audienceExport
* Required. The audience export to create.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* 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/v1beta/beta_analytics_data.create_audience_export.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async
*/
createAudienceExport(request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, options?: CallOptions): Promise<[
LROperation<protos.google.analytics.data.v1beta.IAudienceExport, protos.google.analytics.data.v1beta.IAudienceExportMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createAudienceExport(request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.analytics.data.v1beta.IAudienceExport, protos.google.analytics.data.v1beta.IAudienceExportMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createAudienceExport(request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, callback: Callback<LROperation<protos.google.analytics.data.v1beta.IAudienceExport, protos.google.analytics.data.v1beta.IAudienceExportMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createAudienceExport()`.
* @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/v1beta/beta_analytics_data.create_audience_export.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async
*/
checkCreateAudienceExportProgress(name: string): Promise<LROperation<protos.google.analytics.data.v1beta.AudienceExport, protos.google.analytics.data.v1beta.AudienceExportMetadata>>;
/**
* Lists all audience exports for a property. This method can be used for you
* to find and reuse existing audience exports rather than creating
* unnecessary new audience exports. The same audience can have multiple
* audience exports that represent the export of users that were in an
* audience on different days.
*
* See [Creating an Audience
* Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
* for an introduction to Audience Exports with examples.
*
* Audience Export APIs have some methods at alpha and other methods at beta
* stability. The intention is to advance methods to beta stability after some
* feedback and adoption. To give your feedback on this API, complete the
* [Google Analytics Audience Export API
* Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. All audience exports for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
* will be returned. The maximum value is 1000 (higher values will be coerced
* to the maximum).
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAudienceExports`
* must match the call that provided the page token.
* @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 Array of {@link protos.google.analytics.data.v1beta.AudienceExport|AudienceExport}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listAudienceExportsAsync()`
* 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.
*/
listAudienceExports(request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, options?: CallOptions): Promise<[
protos.google.analytics.data.v1beta.IAudienceExport[],
protos.google.analytics.data.v1beta.IListAudienceExportsRequest | null,
protos.google.analytics.data.v1beta.IListAudienceExportsResponse
]>;
listAudienceExports(request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.analytics.data.v1beta.IListAudienceExportsRequest, protos.google.analytics.data.v1beta.IListAudienceExportsResponse | null | undefined, protos.google.analytics.data.v1beta.IAudienceExport>): void;
listAudienceExports(request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, callback: PaginationCallback<protos.google.analytics.data.v1beta.IListAudienceExportsRequest, protos.google.analytics.data.v1beta.IListAudienceExportsResponse | null | undefined, protos.google.analytics.data.v1beta.IAudienceExport>): void;
/**
* 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 audience exports for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
* will be returned. The maximum value is 1000 (higher values will be coerced
* to the maximum).
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAudienceExports`
* must match the call that provided the page token.
* @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.v1beta.AudienceExport|AudienceExport} 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 `listAudienceExportsAsync()`
* 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.
*/
listAudienceExportsStream(request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listAudienceExports`, 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 audience exports for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
* will be returned. The maximum value is 1000 (higher values will be coerced
* to the maximum).
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAudienceExports`
* must match the call that provided the page token.
* @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.v1beta.AudienceExport|AudienceExport}. 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/v1beta/beta_analytics_data.list_audience_exports.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async
*/
listAudienceExportsAsync(request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, options?: CallOptions): AsyncIterable<protos.google.analytics.data.v1beta.IAudienceExport>;
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error, ?Object)=} callback
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* @return {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* const name = '';
* const [response] = await client.getOperation({name});
* // doThingsWith(response)
* ```
*/
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
*
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation collection.
* @param {string} request.filter - The standard list filter.
* @param {number=} request.pageSize -
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @returns {Object}
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
*
* @example
* ```
* const client = longrunning.operationsClient();
* for await (const response of client.listOperationsAsync(request));
* // doThingsWith(response)
* ```
*/
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* {@link Operations.GetOperation} or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
* 1, corresponding to `Code.CANCELLED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be cancelled.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.cancelOperation({name: ''});
* ```
*/
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be deleted.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.deleteOperation({name: ''});
* ```
*/
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
/**
* Return a fully-qualified audienceExport resource name string.
*
* @param {string} property
* @param {string} audience_export
* @returns {string} Resource name string.
*/
audienceExportPath(property: string, audienceExport: string): string;
/**
* Parse the property from AudienceExport resource.
*
* @param {string} audienceExportName
* A fully-qualified path representing AudienceExport resource.
* @returns {string} A string representing the property.
*/
matchPropertyFromAudienceExportName(audienceExportName: string): string | number;
/**
* Parse the audience_export from AudienceExport resource.
*
* @param {string} audienceExportName
* A fully-qualified path representing AudienceExport resource.
* @returns {string} A string representing the audience_export.
*/
matchAudienceExportFromAudienceExportName(audienceExportName: string): string | number;
/**
* Return a fully-qualified metadata resource name string.

@@ -544,2 +968,17 @@ *

/**
* Return a fully-qualified property resource name string.
*
* @param {string} property
* @returns {string} Resource name string.
*/
propertyPath(property: string): string;
/**
* Parse the property from Property resource.
*
* @param {string} propertyName
* A fully-qualified path representing Property resource.
* @returns {string} A string representing the property.
*/
matchPropertyFromPropertyName(propertyName: string): string | number;
/**
* Terminate the gRPC channel and close the client.

@@ -546,0 +985,0 @@ *

@@ -140,4 +140,32 @@ "use strict";

this.pathTemplates = {
audienceExportPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceExports/{audience_export}'),
metadataPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/metadata'),
propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
};
// Some of the methods on this service return "paged" results,
// (e.g. 50 results at a time, with tokens to get subsequent
// pages). Denote the keys used for pagination and results.
this.descriptors.page = {
listAudienceExports: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceExports'),
};
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
// This API contains "long-running operations", which return a
// an Operation object that allows for tracking of the operation,
// rather than holding a request open.
const lroOptions = {
auth: this.auth,
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
};
if (opts.fallback) {
lroOptions.protoJson = protoFilesRoot;
lroOptions.httpRules = [];
}
this.operationsClient = this._gaxModule
.lro(lroOptions)
.operationsClient(opts);
const createAudienceExportResponse = protoFilesRoot.lookup('.google.analytics.data.v1beta.AudienceExport');
const createAudienceExportMetadata = protoFilesRoot.lookup('.google.analytics.data.v1beta.AudienceExportMetadata');
this.descriptors.longrunning = {
createAudienceExport: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAudienceExportResponse.decode.bind(createAudienceExportResponse), createAudienceExportMetadata.decode.bind(createAudienceExportMetadata)),
};
// Put together the default options sent with requests.

@@ -184,2 +212,6 @@ this._defaults = this._gaxGrpc.constructSettings('google.analytics.data.v1beta.BetaAnalyticsData', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });

'checkCompatibility',
'createAudienceExport',
'queryAudienceExport',
'getAudienceExport',
'listAudienceExports',
];

@@ -196,3 +228,5 @@ for (const methodName of betaAnalyticsDataStubMethods) {

});
const descriptor = undefined;
const descriptor = this.descriptors.page[methodName] ||
this.descriptors.longrunning[methodName] ||
undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);

@@ -394,2 +428,322 @@ this.innerApiCalls[methodName] = apiCall;

}
queryAudienceExport(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.queryAudienceExport(request, options, callback);
}
getAudienceExport(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.getAudienceExport(request, options, callback);
}
createAudienceExport(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.createAudienceExport(request, options, callback);
}
/**
* Check the status of the long running operation returned by `createAudienceExport()`.
* @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/v1beta/beta_analytics_data.create_audience_export.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async
*/
async checkCreateAudienceExportProgress(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.createAudienceExport, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;
}
listAudienceExports(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.listAudienceExports(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 audience exports for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
* will be returned. The maximum value is 1000 (higher values will be coerced
* to the maximum).
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAudienceExports`
* must match the call that provided the page token.
* @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.v1beta.AudienceExport|AudienceExport} 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 `listAudienceExportsAsync()`
* 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.
*/
listAudienceExportsStream(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['listAudienceExports'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listAudienceExports.createStream(this.innerApiCalls.listAudienceExports, request, callSettings);
}
/**
* Equivalent to `listAudienceExports`, 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 audience exports for this property will be listed in the
* response. Format: `properties/{property}`
* @param {number} [request.pageSize]
* Optional. The maximum number of audience exports to return. The service may
* return fewer than this value. If unspecified, at most 200 audience exports
* will be returned. The maximum value is 1000 (higher values will be coerced
* to the maximum).
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAudienceExports`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAudienceExports`
* must match the call that provided the page token.
* @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.v1beta.AudienceExport|AudienceExport}. 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/v1beta/beta_analytics_data.list_audience_exports.js</caption>
* region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async
*/
listAudienceExportsAsync(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['listAudienceExports'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listAudienceExports.asyncIterate(this.innerApiCalls['listAudienceExports'], request, callSettings);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error, ?Object)=} callback
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* @return {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* const name = '';
* const [response] = await client.getOperation({name});
* // doThingsWith(response)
* ```
*/
getOperation(request, options, callback) {
return this.operationsClient.getOperation(request, options, callback);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
*
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation collection.
* @param {string} request.filter - The standard list filter.
* @param {number=} request.pageSize -
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @returns {Object}
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
*
* @example
* ```
* const client = longrunning.operationsClient();
* for await (const response of client.listOperationsAsync(request));
* // doThingsWith(response)
* ```
*/
listOperationsAsync(request, options) {
return this.operationsClient.listOperationsAsync(request, options);
}
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* {@link Operations.GetOperation} or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
* 1, corresponding to `Code.CANCELLED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be cancelled.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.cancelOperation({name: ''});
* ```
*/
cancelOperation(request, options, callback) {
return this.operationsClient.cancelOperation(request, options, callback);
}
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be deleted.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.deleteOperation({name: ''});
* ```
*/
deleteOperation(request, options, callback) {
return this.operationsClient.deleteOperation(request, options, callback);
}
// --------------------

@@ -399,2 +753,35 @@ // -- Path templates --

/**
* Return a fully-qualified audienceExport resource name string.
*
* @param {string} property
* @param {string} audience_export
* @returns {string} Resource name string.
*/
audienceExportPath(property, audienceExport) {
return this.pathTemplates.audienceExportPathTemplate.render({
property: property,
audience_export: audienceExport,
});
}
/**
* Parse the property from AudienceExport resource.
*
* @param {string} audienceExportName
* A fully-qualified path representing AudienceExport resource.
* @returns {string} A string representing the property.
*/
matchPropertyFromAudienceExportName(audienceExportName) {
return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).property;
}
/**
* Parse the audience_export from AudienceExport resource.
*
* @param {string} audienceExportName
* A fully-qualified path representing AudienceExport resource.
* @returns {string} A string representing the audience_export.
*/
matchAudienceExportFromAudienceExportName(audienceExportName) {
return this.pathTemplates.audienceExportPathTemplate.match(audienceExportName).audience_export;
}
/**
* Return a fully-qualified metadata resource name string.

@@ -421,2 +808,23 @@ *

/**
* Return a fully-qualified property resource name string.
*
* @param {string} property
* @returns {string} Resource name string.
*/
propertyPath(property) {
return this.pathTemplates.propertyPathTemplate.render({
property: property,
});
}
/**
* Parse the property from Property resource.
*
* @param {string} propertyName
* A fully-qualified path representing Property resource.
* @returns {string} A string representing the property.
*/
matchPropertyFromPropertyName(propertyName) {
return this.pathTemplates.propertyPathTemplate.match(propertyName).property;
}
/**
* Terminate the gRPC channel and close the client.

@@ -432,2 +840,3 @@ *

stub.close();
this.operationsClient.close();
});

@@ -434,0 +843,0 @@ }

# Changelog
## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.2.0...data-v4.3.0) (2023-12-11)
### Features
* [analytics-data] add `CreateAudienceExport`, `QueryAudienceExport`, `GetAudienceExport`, `ListAudienceExports` methods to the Data API v1 beta ([#4878](https://github.com/googleapis/google-cloud-node/issues/4878)) ([1f9dc5a](https://github.com/googleapis/google-cloud-node/commit/1f9dc5ae6faf68324ab358b3f4f40328f62e7b64))
## [4.2.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.1.0...data-v4.2.0) (2023-11-30)

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

2

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

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

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

| Beta_analytics_data.check_compatibility | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.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/v1beta/beta_analytics_data.check_compatibility.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.create_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.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/v1beta/beta_analytics_data.create_audience_export.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.get_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.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/v1beta/beta_analytics_data.get_audience_export.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.get_metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.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/v1beta/beta_analytics_data.get_metadata.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.list_audience_exports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.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/v1beta/beta_analytics_data.list_audience_exports.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.query_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.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/v1beta/beta_analytics_data.query_audience_export.js,packages/google-analytics-data/samples/README.md) |
| Beta_analytics_data.run_pivot_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_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/v1beta/beta_analytics_data.run_pivot_report.js,packages/google-analytics-data/samples/README.md) |

@@ -127,0 +131,0 @@ | Beta_analytics_data.run_realtime_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_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/v1beta/beta_analytics_data.run_realtime_report.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 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc