@google-analytics/data 5.2.2 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -275,69 +275,6 @@ export declare class AlphaAnalyticsDataClient {
275
275
  ]>;
276
276
  queryAudienceList(request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>): void;
277
277
  queryAudienceList(request: protos.google.analytics.data.v1alpha.IQueryAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IQueryAudienceListResponse, protos.google.analytics.data.v1alpha.IQueryAudienceListRequest | null | undefined, {} | null | undefined>): void;
278
- /**
279
- * Exports an audience list of users to a Google Sheet. After creating an
280
- * audience, the users are not immediately available for listing. First, a
281
- * request to `CreateAudienceList` is necessary to create an audience list of
282
- * users, and then second, this method is used to export those users in the
283
- * audience list to a Google Sheet.
284
- *
285
- * See [Creating an Audience
286
- * List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
287
- * for an introduction to Audience Lists with examples.
288
- *
289
- * Audiences in Google Analytics 4 allow you to segment your users in the ways
290
- * that are important to your business. To learn more, see
291
- * https://support.google.com/analytics/answer/9267572.
292
- *
293
- * This method is introduced at alpha stability with the intention of
294
- * gathering feedback on syntax and capabilities before entering beta. To give
295
- * your feedback on this API, complete the
296
- * [Google Analytics Audience Export API
297
- * Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
298
- *
299
- * @param {Object} request
300
- * The request object that will be sent.
301
- * @param {string} request.name
302
- * Required. The name of the audience list to retrieve users from.
303
- * Format: `properties/{property}/audienceLists/{audience_list}`
304
- * @param {number} [request.offset]
305
- * Optional. The row count of the start row. The first row is counted as row
306
- * 0.
307
- *
308
- * When paging, the first request does not specify offset; or equivalently,
309
- * sets offset to 0; the first request returns the first `limit` of rows. The
310
- * second request sets offset to the `limit` of the first request; the second
311
- * request returns the second `limit` of rows.
312
- *
313
- * To learn more about this pagination parameter, see
314
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
315
- * @param {number} [request.limit]
316
- * Optional. The number of rows to return. If unspecified, 10,000 rows are
317
- * returned. The API returns a maximum of 250,000 rows per request, no matter
318
- * how many you ask for. `limit` must be positive.
319
- *
320
- * The API can also return fewer rows than the requested `limit`, if there
321
- * aren't as many dimension values as the `limit`.
322
- *
323
- * To learn more about this pagination parameter, see
324
- * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
325
- * @param {object} [options]
326
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
327
- * @returns {Promise} - The promise which resolves to an array.
328
- * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.SheetExportAudienceListResponse|SheetExportAudienceListResponse}.
329
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
330
- * for more details and examples.
331
- * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.sheet_export_audience_list.js</caption>
332
- * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_SheetExportAudienceList_async
333
- */
334
- sheetExportAudienceList(request?: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, options?: CallOptions): Promise<[
335
- protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse,
336
- protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | undefined,
337
- {} | undefined
338
- ]>;
339
- sheetExportAudienceList(request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>): void;
340
- sheetExportAudienceList(request: protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.ISheetExportAudienceListResponse, protos.google.analytics.data.v1alpha.ISheetExportAudienceListRequest | null | undefined, {} | null | undefined>): void;
341
278
  /**
342
279
  * Gets configuration metadata about a specific audience list. This method
343
280
  * can be used to understand an audience list after it has been created.
@@ -556,6 +493,165 @@ export declare class AlphaAnalyticsDataClient {
556
493
  ]>;
557
494
  getReportTask(request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IGetReportTaskRequest | null | undefined, {} | null | undefined>): void;
558
495
  getReportTask(request: protos.google.analytics.data.v1alpha.IGetReportTaskRequest, callback: Callback<protos.google.analytics.data.v1alpha.IReportTask, protos.google.analytics.data.v1alpha.IGetReportTaskRequest | null | undefined, {} | null | undefined>): void;
496
+ /**
497
+ * Returns a customized report of your Google Analytics event data. Reports
498
+ * contain statistics derived from data collected by the Google Analytics
499
+ * tracking code. The data returned from the API is as a table with columns
500
+ * for the requested dimensions and metrics. Metrics are individual
501
+ * measurements of user activity on your property, such as active users or
502
+ * event count. Dimensions break down metrics across some common criteria,
503
+ * such as country or event name.
504
+ *
505
+ * @param {Object} request
506
+ * The request object that will be sent.
507
+ * @param {string} request.property
508
+ * Required. A Google Analytics property identifier whose events are tracked.
509
+ * Specified in the URL path and not the body. To learn more, see [where to
510
+ * find your Property
511
+ * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
512
+ * Within a batch request, this property should either be unspecified or
513
+ * consistent with the batch-level property.
514
+ *
515
+ * Example: properties/1234
516
+ * @param {number[]} [request.dimensions]
517
+ * Optional. The dimensions requested and displayed.
518
+ * @param {number[]} [request.metrics]
519
+ * Optional. The metrics requested and displayed.
520
+ * @param {number[]} [request.dateRanges]
521
+ * Optional. Date ranges of data to read. If multiple date ranges are
522
+ * requested, each response row will contain a zero based date range index. If
523
+ * two date ranges overlap, the event data for the overlapping days is
524
+ * included in the response rows for both date ranges. In a cohort request,
525
+ * this `dateRanges` must be unspecified.
526
+ * @param {google.analytics.data.v1alpha.FilterExpression} [request.dimensionFilter]
527
+ * Optional. Dimension filters let you ask for only specific dimension values
528
+ * in the report. To learn more, see [Fundamentals of Dimension
529
+ * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
530
+ * for examples. Metrics cannot be used in this filter.
531
+ * @param {google.analytics.data.v1alpha.FilterExpression} [request.metricFilter]
532
+ * Optional. The filter clause of metrics. Applied after aggregating the
533
+ * report's rows, similar to SQL having-clause. Dimensions cannot be used in
534
+ * this filter.
535
+ * @param {number} [request.offset]
536
+ * Optional. The row count of the start row. The first row is counted as row
537
+ * 0.
538
+ *
539
+ * When paging, the first request does not specify offset; or equivalently,
540
+ * sets offset to 0; the first request returns the first `limit` of rows. The
541
+ * second request sets offset to the `limit` of the first request; the second
542
+ * request returns the second `limit` of rows.
543
+ *
544
+ * To learn more about this pagination parameter, see
545
+ * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
546
+ * @param {number} [request.limit]
547
+ * Optional. The maximum number of rows to return. If unspecified, 10,000 rows
548
+ * are returned. The API returns a maximum of 250,000 rows per request, no
549
+ * matter how many you ask for. `limit` must be positive.
550
+ *
551
+ * The API can also return fewer rows than the requested `limit`, if there
552
+ * aren't as many dimension values as the `limit`. For instance, there are
553
+ * fewer than 300 possible values for the dimension `country`, so when
554
+ * reporting on only `country`, you can't get more than 300 rows, even if you
555
+ * set `limit` to a higher value.
556
+ *
557
+ * To learn more about this pagination parameter, see
558
+ * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
559
+ * @param {number[]} [request.metricAggregations]
560
+ * Optional. Aggregation of metrics. Aggregated metric values will be shown in
561
+ * rows where the dimension_values are set to "RESERVED_(MetricAggregation)".
562
+ * Aggregates including both comparisons and multiple date ranges will
563
+ * be aggregated based on the date ranges.
564
+ * @param {number[]} [request.orderBys]
565
+ * Optional. Specifies how rows are ordered in the response.
566
+ * Requests including both comparisons and multiple date ranges will
567
+ * have order bys applied on the comparisons.
568
+ * @param {string} [request.currencyCode]
569
+ * Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY".
570
+ * If the field is empty, the report uses the property's default currency.
571
+ * @param {google.analytics.data.v1alpha.CohortSpec} [request.cohortSpec]
572
+ * Optional. Cohort group associated with this request. If there is a cohort
573
+ * group in the request the 'cohort' dimension must be present.
574
+ * @param {boolean} [request.keepEmptyRows]
575
+ * Optional. If false or unspecified, each row with all metrics equal to 0
576
+ * will not be returned. If true, these rows will be returned if they are not
577
+ * separately removed by a filter.
578
+ *
579
+ * Regardless of this `keep_empty_rows` setting, only data recorded by the
580
+ * Google Analytics property can be displayed in a report.
581
+ *
582
+ * For example if a property never logs a `purchase` event, then a query for
583
+ * the `eventName` dimension and `eventCount` metric will not have a row
584
+ * eventName: "purchase" and eventCount: 0.
585
+ * @param {boolean} [request.returnPropertyQuota]
586
+ * Optional. Toggles whether to return the current state of this Google
587
+ * Analytics property's quota. Quota is returned in
588
+ * [PropertyQuota](#PropertyQuota).
589
+ * @param {number[]} [request.comparisons]
590
+ * Optional. The configuration of comparisons requested and displayed. The
591
+ * request only requires a comparisons field in order to receive a comparison
592
+ * column in the response.
593
+ * @param {google.analytics.data.v1alpha.ConversionSpec} [request.conversionSpec]
594
+ * Optional. Controls conversion reporting. This field is optional. If this
595
+ * field is set or any conversion metrics are requested, the report will be a
596
+ * conversion report.
597
+ * @param {object} [options]
598
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
599
+ * @returns {Promise} - The promise which resolves to an array.
600
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.RunReportResponse|RunReportResponse}.
601
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
602
+ * for more details and examples.
603
+ * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.run_report.js</caption>
604
+ * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_async
605
+ */
606
+ runReport(request?: protos.google.analytics.data.v1alpha.IRunReportRequest, options?: CallOptions): Promise<[
607
+ protos.google.analytics.data.v1alpha.IRunReportResponse,
608
+ protos.google.analytics.data.v1alpha.IRunReportRequest | undefined,
609
+ {} | undefined
610
+ ]>;
611
+ runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
612
+ runReport(request: protos.google.analytics.data.v1alpha.IRunReportRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRunReportResponse, protos.google.analytics.data.v1alpha.IRunReportRequest | null | undefined, {} | null | undefined>): void;
613
+ /**
614
+ * Returns metadata for dimensions and metrics available in reporting methods.
615
+ * Used to explore the dimensions and metrics. In this method, a Google
616
+ * Analytics property identifier is specified in the request, and
617
+ * the metadata response includes Custom dimensions and metrics as well as
618
+ * Universal metadata.
619
+ *
620
+ * For example if a custom metric with parameter name `levels_unlocked` is
621
+ * registered to a property, the Metadata response will contain
622
+ * `customEvent:levels_unlocked`. Universal metadata are dimensions and
623
+ * metrics applicable to any property such as `country` and `totalUsers`.
624
+ *
625
+ * @param {Object} request
626
+ * The request object that will be sent.
627
+ * @param {string} request.name
628
+ * Required. The resource name of the metadata to retrieve. This name field is
629
+ * specified in the URL path and not URL parameters. Property is a numeric
630
+ * Google Analytics property identifier. To learn more, see [where to find
631
+ * your Property
632
+ * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
633
+ *
634
+ * Example: properties/1234/metadata
635
+ *
636
+ * Set the Property ID to 0 for dimensions and metrics common to all
637
+ * properties. In this special mode, this method will not return custom
638
+ * dimensions and metrics.
639
+ * @param {object} [options]
640
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
641
+ * @returns {Promise} - The promise which resolves to an array.
642
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.Metadata|Metadata}.
643
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
644
+ * for more details and examples.
645
+ * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.get_metadata.js</caption>
646
+ * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_async
647
+ */
648
+ getMetadata(request?: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options?: CallOptions): Promise<[
649
+ protos.google.analytics.data.v1alpha.IMetadata,
650
+ protos.google.analytics.data.v1alpha.IGetMetadataRequest | undefined,
651
+ {} | undefined
652
+ ]>;
653
+ getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
654
+ getMetadata(request: protos.google.analytics.data.v1alpha.IGetMetadataRequest, callback: Callback<protos.google.analytics.data.v1alpha.IMetadata, protos.google.analytics.data.v1alpha.IGetMetadataRequest | null | undefined, {} | null | undefined>): void;
559
655
  /**
560
656
  * Creates an audience list for later retrieval. This method quickly returns
561
657
  * the audience list's resource name and initiates a long running asynchronous
@@ -1127,6 +1223,21 @@ export declare class AlphaAnalyticsDataClient {
1127
1223
  * @returns {string} A string representing the audience_list.
1128
1224
  */
1129
1225
  matchAudienceListFromAudienceListName(audienceListName: string): string | number;
1226
+ /**
1227
+ * Return a fully-qualified metadata resource name string.
1228
+ *
1229
+ * @param {string} property
1230
+ * @returns {string} Resource name string.
1231
+ */
1232
+ metadataPath(property: string): string;
1233
+ /**
1234
+ * Parse the property from Metadata resource.
1235
+ *
1236
+ * @param {string} metadataName
1237
+ * A fully-qualified path representing Metadata resource.
1238
+ * @returns {string} A string representing the property.
1239
+ */
1240
+ matchPropertyFromMetadataName(metadataName: string): string | number;
1130
1241
  /**
1131
1242
  * Return a fully-qualified property resource name string.
1132
1243
  *
@@ -162,6 +162,7 @@ class AlphaAnalyticsDataClient {
162
162
  // Create useful helper objects for these.
163
163
  this.pathTemplates = {
164
164
  audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceLists/{audience_list}'),
165
+ metadataPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/metadata'),
165
166
  propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
166
167
  propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/propertyQuotasSnapshot'),
167
168
  recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/recurringAudienceLists/{recurring_audience_list}'),
@@ -229,7 +230,7 @@ class AlphaAnalyticsDataClient {
229
230
  this._protos.google.analytics.data.v1alpha.AlphaAnalyticsData, this._opts, this._providedCustomServicePath);
230
231
  // Iterate over each of the methods that the service provides
231
232
  // and create an API call method for each.
232
- const alphaAnalyticsDataStubMethods = ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'sheetExportAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks'];
233
+ const alphaAnalyticsDataStubMethods = ['runFunnelReport', 'createAudienceList', 'queryAudienceList', 'getAudienceList', 'listAudienceLists', 'createRecurringAudienceList', 'getRecurringAudienceList', 'listRecurringAudienceLists', 'getPropertyQuotasSnapshot', 'createReportTask', 'queryReportTask', 'getReportTask', 'listReportTasks', 'runReport', 'getMetadata'];
233
234
  for (const methodName of alphaAnalyticsDataStubMethods) {
234
235
  const callPromise = this.alphaAnalyticsDataStub.then(stub => (...args) => {
235
236
  if (this._terminated) {
@@ -295,10 +296,7 @@ class AlphaAnalyticsDataClient {
295
296
  static get scopes() {
296
297
  return [
297
298
  'https://www.googleapis.com/auth/analytics',
298
- 'https://www.googleapis.com/auth/analytics.readonly',
299
- 'https://www.googleapis.com/auth/drive',
300
- 'https://www.googleapis.com/auth/drive.file',
301
- 'https://www.googleapis.com/auth/spreadsheets'
299
+ 'https://www.googleapis.com/auth/analytics.readonly'
302
300
  ];
303
301
  }
304
302
  /**
@@ -384,42 +382,6 @@ class AlphaAnalyticsDataClient {
384
382
  throw error;
385
383
  });
386
384
  }
387
- sheetExportAudienceList(request, optionsOrCallback, callback) {
388
- request = request || {};
389
- let options;
390
- if (typeof optionsOrCallback === 'function' && callback === undefined) {
391
- callback = optionsOrCallback;
392
- options = {};
393
- }
394
- else {
395
- options = optionsOrCallback;
396
- }
397
- options = options || {};
398
- options.otherArgs = options.otherArgs || {};
399
- options.otherArgs.headers = options.otherArgs.headers || {};
400
- options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
401
- 'name': request.name ?? '',
402
- });
403
- this.initialize().catch(err => { throw err; });
404
- this._log.info('sheetExportAudienceList request %j', request);
405
- const wrappedCallback = callback
406
- ? (error, response, options, rawResponse) => {
407
- this._log.info('sheetExportAudienceList response %j', response);
408
- callback(error, response, options, rawResponse); // We verified callback above.
409
- }
410
- : undefined;
411
- return this.innerApiCalls.sheetExportAudienceList(request, options, wrappedCallback)
412
- ?.then(([response, options, rawResponse]) => {
413
- this._log.info('sheetExportAudienceList response %j', response);
414
- return [response, options, rawResponse];
415
- }).catch((error) => {
416
- if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
417
- const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
418
- error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
419
- }
420
- throw error;
421
- });
422
- }
423
385
  getAudienceList(request, optionsOrCallback, callback) {
424
386
  request = request || {};
425
387
  let options;
@@ -636,6 +598,78 @@ class AlphaAnalyticsDataClient {
636
598
  throw error;
637
599
  });
638
600
  }
601
+ runReport(request, optionsOrCallback, callback) {
602
+ request = request || {};
603
+ let options;
604
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
605
+ callback = optionsOrCallback;
606
+ options = {};
607
+ }
608
+ else {
609
+ options = optionsOrCallback;
610
+ }
611
+ options = options || {};
612
+ options.otherArgs = options.otherArgs || {};
613
+ options.otherArgs.headers = options.otherArgs.headers || {};
614
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
615
+ 'property': request.property ?? '',
616
+ });
617
+ this.initialize().catch(err => { throw err; });
618
+ this._log.info('runReport request %j', request);
619
+ const wrappedCallback = callback
620
+ ? (error, response, options, rawResponse) => {
621
+ this._log.info('runReport response %j', response);
622
+ callback(error, response, options, rawResponse); // We verified callback above.
623
+ }
624
+ : undefined;
625
+ return this.innerApiCalls.runReport(request, options, wrappedCallback)
626
+ ?.then(([response, options, rawResponse]) => {
627
+ this._log.info('runReport response %j', response);
628
+ return [response, options, rawResponse];
629
+ }).catch((error) => {
630
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
631
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
632
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
633
+ }
634
+ throw error;
635
+ });
636
+ }
637
+ getMetadata(request, optionsOrCallback, callback) {
638
+ request = request || {};
639
+ let options;
640
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
641
+ callback = optionsOrCallback;
642
+ options = {};
643
+ }
644
+ else {
645
+ options = optionsOrCallback;
646
+ }
647
+ options = options || {};
648
+ options.otherArgs = options.otherArgs || {};
649
+ options.otherArgs.headers = options.otherArgs.headers || {};
650
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
651
+ 'name': request.name ?? '',
652
+ });
653
+ this.initialize().catch(err => { throw err; });
654
+ this._log.info('getMetadata request %j', request);
655
+ const wrappedCallback = callback
656
+ ? (error, response, options, rawResponse) => {
657
+ this._log.info('getMetadata response %j', response);
658
+ callback(error, response, options, rawResponse); // We verified callback above.
659
+ }
660
+ : undefined;
661
+ return this.innerApiCalls.getMetadata(request, options, wrappedCallback)
662
+ ?.then(([response, options, rawResponse]) => {
663
+ this._log.info('getMetadata response %j', response);
664
+ return [response, options, rawResponse];
665
+ }).catch((error) => {
666
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
667
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
668
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
669
+ }
670
+ throw error;
671
+ });
672
+ }
639
673
  createAudienceList(request, optionsOrCallback, callback) {
640
674
  request = request || {};
641
675
  let options;
@@ -1300,6 +1334,27 @@ class AlphaAnalyticsDataClient {
1300
1334
  matchAudienceListFromAudienceListName(audienceListName) {
1301
1335
  return this.pathTemplates.audienceListPathTemplate.match(audienceListName).audience_list;
1302
1336
  }
1337
+ /**
1338
+ * Return a fully-qualified metadata resource name string.
1339
+ *
1340
+ * @param {string} property
1341
+ * @returns {string} Resource name string.
1342
+ */
1343
+ metadataPath(property) {
1344
+ return this.pathTemplates.metadataPathTemplate.render({
1345
+ property: property,
1346
+ });
1347
+ }
1348
+ /**
1349
+ * Parse the property from Metadata resource.
1350
+ *
1351
+ * @param {string} metadataName
1352
+ * A fully-qualified path representing Metadata resource.
1353
+ * @returns {string} A string representing the property.
1354
+ */
1355
+ matchPropertyFromMetadataName(metadataName) {
1356
+ return this.pathTemplates.metadataPathTemplate.match(metadataName).property;
1357
+ }
1303
1358
  /**
1304
1359
  * Return a fully-qualified property resource name string.
1305
1360
  *
@@ -47,11 +47,6 @@
47
47
  "retry_codes_name": "unknown",
48
48
  "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
49
49
  },
50
- "SheetExportAudienceList": {
51
- "timeout_millis": 60000,
52
- "retry_codes_name": "unknown",
53
- "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
54
- },
55
50
  "GetAudienceList": {
56
51
  "timeout_millis": 60000,
57
52
  "retry_codes_name": "unknown",
@@ -101,6 +96,16 @@
101
96
  "timeout_millis": 60000,
102
97
  "retry_codes_name": "unknown",
103
98
  "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
99
+ },
100
+ "RunReport": {
101
+ "timeout_millis": 60000,
102
+ "retry_codes_name": "unknown",
103
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
104
+ },
105
+ "GetMetadata": {
106
+ "timeout_millis": 60000,
107
+ "retry_codes_name": "unknown",
108
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
104
109
  }
105
110
  }
106
111
  }
@@ -20,11 +20,6 @@
20
20
  "queryAudienceList"
21
21
  ]
22
22
  },
23
- "SheetExportAudienceList": {
24
- "methods": [
25
- "sheetExportAudienceList"
26
- ]
27
- },
28
23
  "GetAudienceList": {
29
24
  "methods": [
30
25
  "getAudienceList"
@@ -55,6 +50,16 @@
55
50
  "getReportTask"
56
51
  ]
57
52
  },
53
+ "RunReport": {
54
+ "methods": [
55
+ "runReport"
56
+ ]
57
+ },
58
+ "GetMetadata": {
59
+ "methods": [
60
+ "getMetadata"
61
+ ]
62
+ },
58
63
  "CreateAudienceList": {
59
64
  "methods": [
60
65
  "createAudienceList"
@@ -101,11 +106,6 @@
101
106
  "queryAudienceList"
102
107
  ]
103
108
  },
104
- "SheetExportAudienceList": {
105
- "methods": [
106
- "sheetExportAudienceList"
107
- ]
108
- },
109
109
  "GetAudienceList": {
110
110
  "methods": [
111
111
  "getAudienceList"
@@ -136,6 +136,16 @@
136
136
  "getReportTask"
137
137
  ]
138
138
  },
139
+ "RunReport": {
140
+ "methods": [
141
+ "runReport"
142
+ ]
143
+ },
144
+ "GetMetadata": {
145
+ "methods": [
146
+ "getMetadata"
147
+ ]
148
+ },
139
149
  "CreateAudienceList": {
140
150
  "methods": [
141
151
  "createAudienceList"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-analytics/data",
3
- "version": "5.2.2",
3
+ "version": "6.0.0",
4
4
  "description": "Data client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",