import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * Google Analytics reporting data service. * @class * @memberof v1beta */ export declare class BetaAnalyticsDataClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; pathTemplates: { [name: string]: gax.PathTemplate; }; operationsClient: gax.OperationsClient; betaAnalyticsDataStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of BetaAnalyticsDataClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new BetaAnalyticsDataClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise; getProjectId(callback: Callback): void; /** * Returns a customized report of your Google Analytics event data. Reports * contain statistics derived from data collected by the Google Analytics * tracking code. The data returned from the API is as a table with columns * for the requested dimensions and metrics. Metrics are individual * measurements of user activity on your property, such as active users or * event count. Dimensions break down metrics across some common criteria, * such as country or event name. * * For a guide to constructing requests & understanding responses, see * [Creating a * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics). * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. * Specified in the URL path and not the body. To learn more, see [where to * find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Within a batch request, this property should either be unspecified or * consistent with the batch-level property. * * Example: properties/1234 * @param {number[]} request.dimensions * The dimensions requested and displayed. * @param {number[]} request.metrics * The metrics requested and displayed. * @param {number[]} request.dateRanges * Date ranges of data to read. If multiple date ranges are requested, each * response row will contain a zero based date range index. If two date * ranges overlap, the event data for the overlapping days is included in the * response rows for both date ranges. In a cohort request, this `dateRanges` * must be unspecified. * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter * Dimension filters let you ask for only specific dimension values in * the report. To learn more, see [Fundamentals of Dimension * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) * for examples. Metrics cannot be used in this filter. * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter * The filter clause of metrics. Applied after aggregating the report's rows, * similar to SQL having-clause. Dimensions cannot be used in this filter. * @param {number} request.offset * 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 * 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`. For instance, there are * fewer than 300 possible values for the dimension `country`, so when * reporting on only `country`, you can't get more than 300 rows, even if you * set `limit` to a higher value. * * To learn more about this pagination parameter, see * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). * @param {number[]} request.metricAggregations * Aggregation of metrics. Aggregated metric values will be shown in rows * where the dimension_values are set to "RESERVED_(MetricAggregation)". * Aggregates including both comparisons and multiple date ranges will * be aggregated based on the date ranges. * @param {number[]} request.orderBys * Specifies how rows are ordered in the response. * Requests including both comparisons and multiple date ranges will * have order bys applied on the comparisons. * @param {string} request.currencyCode * A currency code in ISO4217 format, such as "AED", "USD", "JPY". * If the field is empty, the report uses the property's default currency. * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec * Cohort group associated with this request. If there is a cohort group * in the request the 'cohort' dimension must be present. * @param {boolean} request.keepEmptyRows * If false or unspecified, each row with all metrics equal to 0 will not be * returned. If true, these rows will be returned if they are not separately * removed by a filter. * * Regardless of this `keep_empty_rows` setting, only data recorded by the * Google Analytics property can be displayed in a report. * * For example if a property never logs a `purchase` event, then a query for * the `eventName` dimension and `eventCount` metric will not have a row * eventName: "purchase" and eventCount: 0. * @param {boolean} request.returnPropertyQuota * Toggles whether to return the current state of this Google Analytics * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). * @param {number[]} [request.comparisons] * Optional. The configuration of comparisons requested and displayed. The * request only requires a comparisons field in order to receive a comparison * column in the response. * @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.RunReportResponse|RunReportResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.run_report.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async */ runReport(request?: protos.google.analytics.data.v1beta.IRunReportRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IRunReportResponse, protos.google.analytics.data.v1beta.IRunReportRequest | undefined, {} | undefined ]>; runReport(request: protos.google.analytics.data.v1beta.IRunReportRequest, options: CallOptions, callback: Callback): void; runReport(request: protos.google.analytics.data.v1beta.IRunReportRequest, callback: Callback): void; /** * Returns a customized pivot report of your Google Analytics event data. * Pivot reports are more advanced and expressive formats than regular * reports. In a pivot report, dimensions are only visible if they are * included in a pivot. Multiple pivots can be specified to further dissect * your data. * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. * Specified in the URL path and not the body. To learn more, see [where to * find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Within a batch request, this property should either be unspecified or * consistent with the batch-level property. * * Example: properties/1234 * @param {number[]} request.dimensions * The dimensions requested. All defined dimensions must be used by one of the * following: dimension_expression, dimension_filter, pivots, order_bys. * @param {number[]} request.metrics * The metrics requested, at least one metric needs to be specified. All * defined metrics must be used by one of the following: metric_expression, * metric_filter, order_bys. * @param {number[]} request.dateRanges * The date range to retrieve event data for the report. If multiple date * ranges are specified, event data from each date range is used in the * report. A special dimension with field name "dateRange" can be included in * a Pivot's field names; if included, the report compares between date * ranges. In a cohort request, this `dateRanges` must be unspecified. * @param {number[]} request.pivots * Describes the visual format of the report's dimensions in columns or rows. * The union of the fieldNames (dimension names) in all pivots must be a * subset of dimension names defined in Dimensions. No two pivots can share a * dimension. A dimension is only visible if it appears in a pivot. * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter * The filter clause of dimensions. Dimensions must be requested to be used in * this filter. Metrics cannot be used in this filter. * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter * The filter clause of metrics. Applied at post aggregation phase, similar to * SQL having-clause. Metrics must be requested to be used in this filter. * Dimensions cannot be used in this filter. * @param {string} request.currencyCode * A currency code in ISO4217 format, such as "AED", "USD", "JPY". * If the field is empty, the report uses the property's default currency. * @param {google.analytics.data.v1beta.CohortSpec} request.cohortSpec * Cohort group associated with this request. If there is a cohort group * in the request the 'cohort' dimension must be present. * @param {boolean} request.keepEmptyRows * If false or unspecified, each row with all metrics equal to 0 will not be * returned. If true, these rows will be returned if they are not separately * removed by a filter. * * Regardless of this `keep_empty_rows` setting, only data recorded by the * Google Analytics property can be displayed in a report. * * For example if a property never logs a `purchase` event, then a query for * the `eventName` dimension and `eventCount` metric will not have a row * eventName: "purchase" and eventCount: 0. * @param {boolean} request.returnPropertyQuota * Toggles whether to return the current state of this Google Analytics * property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). * @param {number[]} [request.comparisons] * Optional. The configuration of comparisons requested and displayed. The * request requires both a comparisons field and a comparisons dimension to * receive a comparison column in the response. * @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.RunPivotReportResponse|RunPivotReportResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async */ runPivotReport(request?: protos.google.analytics.data.v1beta.IRunPivotReportRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IRunPivotReportResponse, protos.google.analytics.data.v1beta.IRunPivotReportRequest | undefined, {} | undefined ]>; runPivotReport(request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, options: CallOptions, callback: Callback): void; runPivotReport(request: protos.google.analytics.data.v1beta.IRunPivotReportRequest, callback: Callback): void; /** * Returns multiple reports in a batch. All reports must be for the same * Google Analytics property. * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. * Specified in the URL path and not the body. To learn more, see [where to * find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * This property must be specified for the batch. The property within * RunReportRequest may either be unspecified or consistent with this * property. * * Example: properties/1234 * @param {number[]} request.requests * Individual requests. Each request has a separate report response. Each * batch request is allowed up to 5 requests. * @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.BatchRunReportsResponse|BatchRunReportsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async */ batchRunReports(request?: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IBatchRunReportsResponse, protos.google.analytics.data.v1beta.IBatchRunReportsRequest | undefined, {} | undefined ]>; batchRunReports(request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, options: CallOptions, callback: Callback): void; batchRunReports(request: protos.google.analytics.data.v1beta.IBatchRunReportsRequest, callback: Callback): void; /** * Returns multiple pivot reports in a batch. All reports must be for the same * Google Analytics property. * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. * Specified in the URL path and not the body. To learn more, see [where to * find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * This property must be specified for the batch. The property within * RunPivotReportRequest may either be unspecified or consistent with this * property. * * Example: properties/1234 * @param {number[]} request.requests * Individual requests. Each request has a separate pivot report response. * Each batch request is allowed up to 5 requests. * @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.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async */ batchRunPivotReports(request?: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IBatchRunPivotReportsResponse, protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest | undefined, {} | undefined ]>; batchRunPivotReports(request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, options: CallOptions, callback: Callback): void; batchRunPivotReports(request: protos.google.analytics.data.v1beta.IBatchRunPivotReportsRequest, callback: Callback): void; /** * Returns metadata for dimensions and metrics available in reporting methods. * Used to explore the dimensions and metrics. In this method, a Google * Analytics property identifier is specified in the request, and * the metadata response includes Custom dimensions and metrics as well as * Universal metadata. * * For example if a custom metric with parameter name `levels_unlocked` is * registered to a property, the Metadata response will contain * `customEvent:levels_unlocked`. 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 {string} request.name * Required. The resource name of the metadata to retrieve. This name field is * specified in the URL path and not URL parameters. Property is a numeric * Google Analytics 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] * 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.Metadata|Metadata}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.get_metadata.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async */ getMetadata(request?: protos.google.analytics.data.v1beta.IGetMetadataRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IMetadata, protos.google.analytics.data.v1beta.IGetMetadataRequest | undefined, {} | undefined ]>; getMetadata(request: protos.google.analytics.data.v1beta.IGetMetadataRequest, options: CallOptions, callback: Callback): void; getMetadata(request: protos.google.analytics.data.v1beta.IGetMetadataRequest, callback: Callback): void; /** * Returns a customized report of realtime event data for your property. * Events appear in realtime reports seconds after they have been sent to * the Google Analytics. Realtime reports show events and usage data for the * periods of time ranging from the present moment to 30 minutes ago (up to * 60 minutes for Google Analytics 360 properties). * * For a guide to constructing realtime requests & understanding responses, * see [Creating a Realtime * Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. * Specified in the URL path and not the body. To learn more, see [where to * find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * * Example: properties/1234 * @param {number[]} request.dimensions * The dimensions requested and displayed. * @param {number[]} request.metrics * The metrics requested and displayed. * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter * The filter clause of dimensions. Metrics cannot be used in this filter. * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter * The filter clause of metrics. Applied at post aggregation phase, similar to * SQL having-clause. Dimensions cannot be used in this filter. * @param {number} request.limit * 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`. For instance, there are * fewer than 300 possible values for the dimension `country`, so when * reporting on only `country`, you can't get more than 300 rows, even if you * set `limit` to a higher value. * @param {number[]} request.metricAggregations * Aggregation of metrics. Aggregated metric values will be shown in rows * where the dimension_values are set to "RESERVED_(MetricAggregation)". * @param {number[]} request.orderBys * Specifies how rows are ordered in the response. * @param {boolean} request.returnPropertyQuota * Toggles whether to return the current state of this Google Analytics * property's Realtime quota. Quota is returned in * [PropertyQuota](#PropertyQuota). * @param {number[]} request.minuteRanges * The minute ranges of event data to read. If unspecified, one minute range * for the last 30 minutes will be used. If multiple minute ranges are * requested, each response row will contain a zero based minute range index. * If two minute ranges overlap, the event data for the overlapping minutes is * included in the response rows for both minute ranges. * @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.RunRealtimeReportResponse|RunRealtimeReportResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async */ runRealtimeReport(request?: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.IRunRealtimeReportResponse, protos.google.analytics.data.v1beta.IRunRealtimeReportRequest | undefined, {} | undefined ]>; runRealtimeReport(request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, options: CallOptions, callback: Callback): void; runRealtimeReport(request: protos.google.analytics.data.v1beta.IRunRealtimeReportRequest, callback: Callback): void; /** * This compatibility method lists dimensions and metrics that can be added to * a report request and maintain compatibility. This method fails if the * request's dimensions and metrics are incompatible. * * In Google Analytics, reports fail if they request incompatible dimensions * and/or metrics; in that case, you will need to remove dimensions and/or * metrics from the incompatible report until the report is compatible. * * The Realtime and Core reports have different compatibility rules. This * method checks compatibility for Core reports. * * @param {Object} request * The request object that will be sent. * @param {string} request.property * A Google Analytics property identifier whose events are tracked. To * learn more, see [where to find your Property * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * `property` should be the same value as in your `runReport` request. * * Example: properties/1234 * @param {number[]} request.dimensions * The dimensions in this report. `dimensions` should be the same value as in * your `runReport` request. * @param {number[]} request.metrics * The metrics in this report. `metrics` should be the same value as in your * `runReport` request. * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter * The filter clause of dimensions. `dimensionFilter` should be the same value * as in your `runReport` request. * @param {google.analytics.data.v1beta.FilterExpression} request.metricFilter * The filter clause of metrics. `metricFilter` should be the same value as in * your `runReport` request * @param {google.analytics.data.v1beta.Compatibility} request.compatibilityFilter * Filters the dimensions and metrics in the response to just this * compatibility. Commonly used as `”compatibilityFilter”: “COMPATIBLE”` * to only return compatible dimensions & metrics. * @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.CheckCompatibilityResponse|CheckCompatibilityResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async */ checkCompatibility(request?: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options?: CallOptions): Promise<[ protos.google.analytics.data.v1beta.ICheckCompatibilityResponse, protos.google.analytics.data.v1beta.ICheckCompatibilityRequest | undefined, {} | undefined ]>; checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, options: CallOptions, callback: Callback): void; checkCompatibility(request: protos.google.analytics.data.v1beta.ICheckCompatibilityRequest, callback: Callback): void; /** * 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 include:samples/generated/v1beta/beta_analytics_data.query_audience_export.js * 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): void; queryAudienceExport(request: protos.google.analytics.data.v1beta.IQueryAudienceExportRequest, callback: Callback): 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 include:samples/generated/v1beta/beta_analytics_data.get_audience_export.js * 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): void; getAudienceExport(request: protos.google.analytics.data.v1beta.IGetAudienceExportRequest, callback: Callback): 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 include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async */ createAudienceExport(request?: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, options?: CallOptions): Promise<[ LROperation, protos.google.longrunning.IOperation | undefined, {} | undefined ]>; createAudienceExport(request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, options: CallOptions, callback: Callback, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; createAudienceExport(request: protos.google.analytics.data.v1beta.ICreateAudienceExportRequest, callback: Callback, 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 include:samples/generated/v1beta/beta_analytics_data.create_audience_export.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CreateAudienceExport_async */ checkCreateAudienceExportProgress(name: string): Promise>; /** * 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): void; listAudienceExports(request: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, callback: PaginationCallback): void; /** * Equivalent to `listAudienceExports`, 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 include:samples/generated/v1beta/beta_analytics_data.list_audience_exports.js * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_ListAudienceExports_async */ listAudienceExportsAsync(request?: protos.google.analytics.data.v1beta.IListAudienceExportsRequest, options?: CallOptions): AsyncIterable; /** * 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, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): 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; /** * 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, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): Promise; /** * 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, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): Promise; /** * 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. * * @param {string} property * @returns {string} Resource name string. */ metadataPath(property: string): string; /** * Parse the property from Metadata resource. * * @param {string} metadataName * A fully-qualified path representing Metadata resource. * @returns {string} A string representing the property. */ matchPropertyFromMetadataName(metadataName: string): string | number; /** * 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. * * The client will no longer be usable and all future behavior is undefined. * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise; }