@googleapis/analyticsdata 1.6.0 → 3.0.1

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.
package/v1beta.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -1387,6 +1387,64 @@ export namespace analyticsdata_v1beta {
1387
1387
 
1388
1388
  /**
1389
1389
  * Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.
1390
+ * @example
1391
+ * ```js
1392
+ * // Before running the sample:
1393
+ * // - Enable the API at:
1394
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1395
+ * // - Login into gcloud by running:
1396
+ * // ```sh
1397
+ * // $ gcloud auth application-default login
1398
+ * // ```
1399
+ * // - Install the npm module by running:
1400
+ * // ```sh
1401
+ * // $ npm install googleapis
1402
+ * // ```
1403
+ *
1404
+ * const {google} = require('googleapis');
1405
+ * const analyticsdata = google.analyticsdata('v1beta');
1406
+ *
1407
+ * async function main() {
1408
+ * const auth = new google.auth.GoogleAuth({
1409
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1410
+ * scopes: [
1411
+ * 'https://www.googleapis.com/auth/analytics',
1412
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1413
+ * ],
1414
+ * });
1415
+ *
1416
+ * // Acquire an auth client, and bind it to all future calls
1417
+ * const authClient = await auth.getClient();
1418
+ * google.options({auth: authClient});
1419
+ *
1420
+ * // Do the magic
1421
+ * const res = await analyticsdata.properties.batchRunPivotReports({
1422
+ * // 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
1423
+ * property: 'properties/my-propertie',
1424
+ *
1425
+ * // Request body metadata
1426
+ * requestBody: {
1427
+ * // request body parameters
1428
+ * // {
1429
+ * // "requests": []
1430
+ * // }
1431
+ * },
1432
+ * });
1433
+ * console.log(res.data);
1434
+ *
1435
+ * // Example response
1436
+ * // {
1437
+ * // "kind": "my_kind",
1438
+ * // "pivotReports": []
1439
+ * // }
1440
+ * }
1441
+ *
1442
+ * main().catch(e => {
1443
+ * console.error(e);
1444
+ * throw e;
1445
+ * });
1446
+ *
1447
+ * ```
1390
1448
  *
1391
1449
  * @param params - Parameters for request
1392
1450
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1396,11 +1454,11 @@ export namespace analyticsdata_v1beta {
1396
1454
  batchRunPivotReports(
1397
1455
  params: Params$Resource$Properties$Batchrunpivotreports,
1398
1456
  options: StreamMethodOptions
1399
- ): GaxiosPromise<Readable>;
1457
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1400
1458
  batchRunPivotReports(
1401
1459
  params?: Params$Resource$Properties$Batchrunpivotreports,
1402
1460
  options?: MethodOptions
1403
- ): GaxiosPromise<Schema$BatchRunPivotReportsResponse>;
1461
+ ): Promise<GaxiosResponseWithHTTP2<Schema$BatchRunPivotReportsResponse>>;
1404
1462
  batchRunPivotReports(
1405
1463
  params: Params$Resource$Properties$Batchrunpivotreports,
1406
1464
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1435,8 +1493,8 @@ export namespace analyticsdata_v1beta {
1435
1493
  | BodyResponseCallback<Readable>
1436
1494
  ):
1437
1495
  | void
1438
- | GaxiosPromise<Schema$BatchRunPivotReportsResponse>
1439
- | GaxiosPromise<Readable> {
1496
+ | Promise<GaxiosResponseWithHTTP2<Schema$BatchRunPivotReportsResponse>>
1497
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1440
1498
  let params = (paramsOrCallback ||
1441
1499
  {}) as Params$Resource$Properties$Batchrunpivotreports;
1442
1500
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1485,6 +1543,64 @@ export namespace analyticsdata_v1beta {
1485
1543
 
1486
1544
  /**
1487
1545
  * Returns multiple reports in a batch. All reports must be for the same Google Analytics property.
1546
+ * @example
1547
+ * ```js
1548
+ * // Before running the sample:
1549
+ * // - Enable the API at:
1550
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1551
+ * // - Login into gcloud by running:
1552
+ * // ```sh
1553
+ * // $ gcloud auth application-default login
1554
+ * // ```
1555
+ * // - Install the npm module by running:
1556
+ * // ```sh
1557
+ * // $ npm install googleapis
1558
+ * // ```
1559
+ *
1560
+ * const {google} = require('googleapis');
1561
+ * const analyticsdata = google.analyticsdata('v1beta');
1562
+ *
1563
+ * async function main() {
1564
+ * const auth = new google.auth.GoogleAuth({
1565
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1566
+ * scopes: [
1567
+ * 'https://www.googleapis.com/auth/analytics',
1568
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1569
+ * ],
1570
+ * });
1571
+ *
1572
+ * // Acquire an auth client, and bind it to all future calls
1573
+ * const authClient = await auth.getClient();
1574
+ * google.options({auth: authClient});
1575
+ *
1576
+ * // Do the magic
1577
+ * const res = await analyticsdata.properties.batchRunReports({
1578
+ * // 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
1579
+ * property: 'properties/my-propertie',
1580
+ *
1581
+ * // Request body metadata
1582
+ * requestBody: {
1583
+ * // request body parameters
1584
+ * // {
1585
+ * // "requests": []
1586
+ * // }
1587
+ * },
1588
+ * });
1589
+ * console.log(res.data);
1590
+ *
1591
+ * // Example response
1592
+ * // {
1593
+ * // "kind": "my_kind",
1594
+ * // "reports": []
1595
+ * // }
1596
+ * }
1597
+ *
1598
+ * main().catch(e => {
1599
+ * console.error(e);
1600
+ * throw e;
1601
+ * });
1602
+ *
1603
+ * ```
1488
1604
  *
1489
1605
  * @param params - Parameters for request
1490
1606
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1494,11 +1610,11 @@ export namespace analyticsdata_v1beta {
1494
1610
  batchRunReports(
1495
1611
  params: Params$Resource$Properties$Batchrunreports,
1496
1612
  options: StreamMethodOptions
1497
- ): GaxiosPromise<Readable>;
1613
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1498
1614
  batchRunReports(
1499
1615
  params?: Params$Resource$Properties$Batchrunreports,
1500
1616
  options?: MethodOptions
1501
- ): GaxiosPromise<Schema$BatchRunReportsResponse>;
1617
+ ): Promise<GaxiosResponseWithHTTP2<Schema$BatchRunReportsResponse>>;
1502
1618
  batchRunReports(
1503
1619
  params: Params$Resource$Properties$Batchrunreports,
1504
1620
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1533,8 +1649,8 @@ export namespace analyticsdata_v1beta {
1533
1649
  | BodyResponseCallback<Readable>
1534
1650
  ):
1535
1651
  | void
1536
- | GaxiosPromise<Schema$BatchRunReportsResponse>
1537
- | GaxiosPromise<Readable> {
1652
+ | Promise<GaxiosResponseWithHTTP2<Schema$BatchRunReportsResponse>>
1653
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1538
1654
  let params = (paramsOrCallback ||
1539
1655
  {}) as Params$Resource$Properties$Batchrunreports;
1540
1656
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1581,6 +1697,68 @@ export namespace analyticsdata_v1beta {
1581
1697
 
1582
1698
  /**
1583
1699
  * 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.
1700
+ * @example
1701
+ * ```js
1702
+ * // Before running the sample:
1703
+ * // - Enable the API at:
1704
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1705
+ * // - Login into gcloud by running:
1706
+ * // ```sh
1707
+ * // $ gcloud auth application-default login
1708
+ * // ```
1709
+ * // - Install the npm module by running:
1710
+ * // ```sh
1711
+ * // $ npm install googleapis
1712
+ * // ```
1713
+ *
1714
+ * const {google} = require('googleapis');
1715
+ * const analyticsdata = google.analyticsdata('v1beta');
1716
+ *
1717
+ * async function main() {
1718
+ * const auth = new google.auth.GoogleAuth({
1719
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1720
+ * scopes: [
1721
+ * 'https://www.googleapis.com/auth/analytics',
1722
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1723
+ * ],
1724
+ * });
1725
+ *
1726
+ * // Acquire an auth client, and bind it to all future calls
1727
+ * const authClient = await auth.getClient();
1728
+ * google.options({auth: authClient});
1729
+ *
1730
+ * // Do the magic
1731
+ * const res = await analyticsdata.properties.checkCompatibility({
1732
+ * // 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
1733
+ * property: 'properties/my-propertie',
1734
+ *
1735
+ * // Request body metadata
1736
+ * requestBody: {
1737
+ * // request body parameters
1738
+ * // {
1739
+ * // "compatibilityFilter": "my_compatibilityFilter",
1740
+ * // "dimensionFilter": {},
1741
+ * // "dimensions": [],
1742
+ * // "metricFilter": {},
1743
+ * // "metrics": []
1744
+ * // }
1745
+ * },
1746
+ * });
1747
+ * console.log(res.data);
1748
+ *
1749
+ * // Example response
1750
+ * // {
1751
+ * // "dimensionCompatibilities": [],
1752
+ * // "metricCompatibilities": []
1753
+ * // }
1754
+ * }
1755
+ *
1756
+ * main().catch(e => {
1757
+ * console.error(e);
1758
+ * throw e;
1759
+ * });
1760
+ *
1761
+ * ```
1584
1762
  *
1585
1763
  * @param params - Parameters for request
1586
1764
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1590,11 +1768,11 @@ export namespace analyticsdata_v1beta {
1590
1768
  checkCompatibility(
1591
1769
  params: Params$Resource$Properties$Checkcompatibility,
1592
1770
  options: StreamMethodOptions
1593
- ): GaxiosPromise<Readable>;
1771
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1594
1772
  checkCompatibility(
1595
1773
  params?: Params$Resource$Properties$Checkcompatibility,
1596
1774
  options?: MethodOptions
1597
- ): GaxiosPromise<Schema$CheckCompatibilityResponse>;
1775
+ ): Promise<GaxiosResponseWithHTTP2<Schema$CheckCompatibilityResponse>>;
1598
1776
  checkCompatibility(
1599
1777
  params: Params$Resource$Properties$Checkcompatibility,
1600
1778
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1629,8 +1807,8 @@ export namespace analyticsdata_v1beta {
1629
1807
  | BodyResponseCallback<Readable>
1630
1808
  ):
1631
1809
  | void
1632
- | GaxiosPromise<Schema$CheckCompatibilityResponse>
1633
- | GaxiosPromise<Readable> {
1810
+ | Promise<GaxiosResponseWithHTTP2<Schema$CheckCompatibilityResponse>>
1811
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1634
1812
  let params = (paramsOrCallback ||
1635
1813
  {}) as Params$Resource$Properties$Checkcompatibility;
1636
1814
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1677,6 +1855,58 @@ export namespace analyticsdata_v1beta {
1677
1855
 
1678
1856
  /**
1679
1857
  * 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`.
1858
+ * @example
1859
+ * ```js
1860
+ * // Before running the sample:
1861
+ * // - Enable the API at:
1862
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1863
+ * // - Login into gcloud by running:
1864
+ * // ```sh
1865
+ * // $ gcloud auth application-default login
1866
+ * // ```
1867
+ * // - Install the npm module by running:
1868
+ * // ```sh
1869
+ * // $ npm install googleapis
1870
+ * // ```
1871
+ *
1872
+ * const {google} = require('googleapis');
1873
+ * const analyticsdata = google.analyticsdata('v1beta');
1874
+ *
1875
+ * async function main() {
1876
+ * const auth = new google.auth.GoogleAuth({
1877
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1878
+ * scopes: [
1879
+ * 'https://www.googleapis.com/auth/analytics',
1880
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1881
+ * ],
1882
+ * });
1883
+ *
1884
+ * // Acquire an auth client, and bind it to all future calls
1885
+ * const authClient = await auth.getClient();
1886
+ * google.options({auth: authClient});
1887
+ *
1888
+ * // Do the magic
1889
+ * const res = await analyticsdata.properties.getMetadata({
1890
+ * // 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.
1891
+ * name: 'properties/my-propertie/metadata',
1892
+ * });
1893
+ * console.log(res.data);
1894
+ *
1895
+ * // Example response
1896
+ * // {
1897
+ * // "comparisons": [],
1898
+ * // "dimensions": [],
1899
+ * // "metrics": [],
1900
+ * // "name": "my_name"
1901
+ * // }
1902
+ * }
1903
+ *
1904
+ * main().catch(e => {
1905
+ * console.error(e);
1906
+ * throw e;
1907
+ * });
1908
+ *
1909
+ * ```
1680
1910
  *
1681
1911
  * @param params - Parameters for request
1682
1912
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1686,11 +1916,11 @@ export namespace analyticsdata_v1beta {
1686
1916
  getMetadata(
1687
1917
  params: Params$Resource$Properties$Getmetadata,
1688
1918
  options: StreamMethodOptions
1689
- ): GaxiosPromise<Readable>;
1919
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1690
1920
  getMetadata(
1691
1921
  params?: Params$Resource$Properties$Getmetadata,
1692
1922
  options?: MethodOptions
1693
- ): GaxiosPromise<Schema$Metadata>;
1923
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Metadata>>;
1694
1924
  getMetadata(
1695
1925
  params: Params$Resource$Properties$Getmetadata,
1696
1926
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1719,7 +1949,10 @@ export namespace analyticsdata_v1beta {
1719
1949
  callback?:
1720
1950
  | BodyResponseCallback<Schema$Metadata>
1721
1951
  | BodyResponseCallback<Readable>
1722
- ): void | GaxiosPromise<Schema$Metadata> | GaxiosPromise<Readable> {
1952
+ ):
1953
+ | void
1954
+ | Promise<GaxiosResponseWithHTTP2<Schema$Metadata>>
1955
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1723
1956
  let params = (paramsOrCallback ||
1724
1957
  {}) as Params$Resource$Properties$Getmetadata;
1725
1958
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1763,6 +1996,81 @@ export namespace analyticsdata_v1beta {
1763
1996
 
1764
1997
  /**
1765
1998
  * 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.
1999
+ * @example
2000
+ * ```js
2001
+ * // Before running the sample:
2002
+ * // - Enable the API at:
2003
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2004
+ * // - Login into gcloud by running:
2005
+ * // ```sh
2006
+ * // $ gcloud auth application-default login
2007
+ * // ```
2008
+ * // - Install the npm module by running:
2009
+ * // ```sh
2010
+ * // $ npm install googleapis
2011
+ * // ```
2012
+ *
2013
+ * const {google} = require('googleapis');
2014
+ * const analyticsdata = google.analyticsdata('v1beta');
2015
+ *
2016
+ * async function main() {
2017
+ * const auth = new google.auth.GoogleAuth({
2018
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2019
+ * scopes: [
2020
+ * 'https://www.googleapis.com/auth/analytics',
2021
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2022
+ * ],
2023
+ * });
2024
+ *
2025
+ * // Acquire an auth client, and bind it to all future calls
2026
+ * const authClient = await auth.getClient();
2027
+ * google.options({auth: authClient});
2028
+ *
2029
+ * // Do the magic
2030
+ * const res = await analyticsdata.properties.runPivotReport({
2031
+ * // 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
2032
+ * property: 'properties/my-propertie',
2033
+ *
2034
+ * // Request body metadata
2035
+ * requestBody: {
2036
+ * // request body parameters
2037
+ * // {
2038
+ * // "cohortSpec": {},
2039
+ * // "comparisons": [],
2040
+ * // "currencyCode": "my_currencyCode",
2041
+ * // "dateRanges": [],
2042
+ * // "dimensionFilter": {},
2043
+ * // "dimensions": [],
2044
+ * // "keepEmptyRows": false,
2045
+ * // "metricFilter": {},
2046
+ * // "metrics": [],
2047
+ * // "pivots": [],
2048
+ * // "property": "my_property",
2049
+ * // "returnPropertyQuota": false
2050
+ * // }
2051
+ * },
2052
+ * });
2053
+ * console.log(res.data);
2054
+ *
2055
+ * // Example response
2056
+ * // {
2057
+ * // "aggregates": [],
2058
+ * // "dimensionHeaders": [],
2059
+ * // "kind": "my_kind",
2060
+ * // "metadata": {},
2061
+ * // "metricHeaders": [],
2062
+ * // "pivotHeaders": [],
2063
+ * // "propertyQuota": {},
2064
+ * // "rows": []
2065
+ * // }
2066
+ * }
2067
+ *
2068
+ * main().catch(e => {
2069
+ * console.error(e);
2070
+ * throw e;
2071
+ * });
2072
+ *
2073
+ * ```
1766
2074
  *
1767
2075
  * @param params - Parameters for request
1768
2076
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1772,11 +2080,11 @@ export namespace analyticsdata_v1beta {
1772
2080
  runPivotReport(
1773
2081
  params: Params$Resource$Properties$Runpivotreport,
1774
2082
  options: StreamMethodOptions
1775
- ): GaxiosPromise<Readable>;
2083
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1776
2084
  runPivotReport(
1777
2085
  params?: Params$Resource$Properties$Runpivotreport,
1778
2086
  options?: MethodOptions
1779
- ): GaxiosPromise<Schema$RunPivotReportResponse>;
2087
+ ): Promise<GaxiosResponseWithHTTP2<Schema$RunPivotReportResponse>>;
1780
2088
  runPivotReport(
1781
2089
  params: Params$Resource$Properties$Runpivotreport,
1782
2090
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1811,8 +2119,8 @@ export namespace analyticsdata_v1beta {
1811
2119
  | BodyResponseCallback<Readable>
1812
2120
  ):
1813
2121
  | void
1814
- | GaxiosPromise<Schema$RunPivotReportResponse>
1815
- | GaxiosPromise<Readable> {
2122
+ | Promise<GaxiosResponseWithHTTP2<Schema$RunPivotReportResponse>>
2123
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1816
2124
  let params = (paramsOrCallback ||
1817
2125
  {}) as Params$Resource$Properties$Runpivotreport;
1818
2126
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1859,6 +2167,79 @@ export namespace analyticsdata_v1beta {
1859
2167
 
1860
2168
  /**
1861
2169
  * 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).
2170
+ * @example
2171
+ * ```js
2172
+ * // Before running the sample:
2173
+ * // - Enable the API at:
2174
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2175
+ * // - Login into gcloud by running:
2176
+ * // ```sh
2177
+ * // $ gcloud auth application-default login
2178
+ * // ```
2179
+ * // - Install the npm module by running:
2180
+ * // ```sh
2181
+ * // $ npm install googleapis
2182
+ * // ```
2183
+ *
2184
+ * const {google} = require('googleapis');
2185
+ * const analyticsdata = google.analyticsdata('v1beta');
2186
+ *
2187
+ * async function main() {
2188
+ * const auth = new google.auth.GoogleAuth({
2189
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2190
+ * scopes: [
2191
+ * 'https://www.googleapis.com/auth/analytics',
2192
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2193
+ * ],
2194
+ * });
2195
+ *
2196
+ * // Acquire an auth client, and bind it to all future calls
2197
+ * const authClient = await auth.getClient();
2198
+ * google.options({auth: authClient});
2199
+ *
2200
+ * // Do the magic
2201
+ * const res = await analyticsdata.properties.runRealtimeReport({
2202
+ * // 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
2203
+ * property: 'properties/my-propertie',
2204
+ *
2205
+ * // Request body metadata
2206
+ * requestBody: {
2207
+ * // request body parameters
2208
+ * // {
2209
+ * // "dimensionFilter": {},
2210
+ * // "dimensions": [],
2211
+ * // "limit": "my_limit",
2212
+ * // "metricAggregations": [],
2213
+ * // "metricFilter": {},
2214
+ * // "metrics": [],
2215
+ * // "minuteRanges": [],
2216
+ * // "orderBys": [],
2217
+ * // "returnPropertyQuota": false
2218
+ * // }
2219
+ * },
2220
+ * });
2221
+ * console.log(res.data);
2222
+ *
2223
+ * // Example response
2224
+ * // {
2225
+ * // "dimensionHeaders": [],
2226
+ * // "kind": "my_kind",
2227
+ * // "maximums": [],
2228
+ * // "metricHeaders": [],
2229
+ * // "minimums": [],
2230
+ * // "propertyQuota": {},
2231
+ * // "rowCount": 0,
2232
+ * // "rows": [],
2233
+ * // "totals": []
2234
+ * // }
2235
+ * }
2236
+ *
2237
+ * main().catch(e => {
2238
+ * console.error(e);
2239
+ * throw e;
2240
+ * });
2241
+ *
2242
+ * ```
1862
2243
  *
1863
2244
  * @param params - Parameters for request
1864
2245
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1868,11 +2249,11 @@ export namespace analyticsdata_v1beta {
1868
2249
  runRealtimeReport(
1869
2250
  params: Params$Resource$Properties$Runrealtimereport,
1870
2251
  options: StreamMethodOptions
1871
- ): GaxiosPromise<Readable>;
2252
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1872
2253
  runRealtimeReport(
1873
2254
  params?: Params$Resource$Properties$Runrealtimereport,
1874
2255
  options?: MethodOptions
1875
- ): GaxiosPromise<Schema$RunRealtimeReportResponse>;
2256
+ ): Promise<GaxiosResponseWithHTTP2<Schema$RunRealtimeReportResponse>>;
1876
2257
  runRealtimeReport(
1877
2258
  params: Params$Resource$Properties$Runrealtimereport,
1878
2259
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1907,8 +2288,8 @@ export namespace analyticsdata_v1beta {
1907
2288
  | BodyResponseCallback<Readable>
1908
2289
  ):
1909
2290
  | void
1910
- | GaxiosPromise<Schema$RunRealtimeReportResponse>
1911
- | GaxiosPromise<Readable> {
2291
+ | Promise<GaxiosResponseWithHTTP2<Schema$RunRealtimeReportResponse>>
2292
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1912
2293
  let params = (paramsOrCallback ||
1913
2294
  {}) as Params$Resource$Properties$Runrealtimereport;
1914
2295
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1955,6 +2336,86 @@ export namespace analyticsdata_v1beta {
1955
2336
 
1956
2337
  /**
1957
2338
  * 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).
2339
+ * @example
2340
+ * ```js
2341
+ * // Before running the sample:
2342
+ * // - Enable the API at:
2343
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2344
+ * // - Login into gcloud by running:
2345
+ * // ```sh
2346
+ * // $ gcloud auth application-default login
2347
+ * // ```
2348
+ * // - Install the npm module by running:
2349
+ * // ```sh
2350
+ * // $ npm install googleapis
2351
+ * // ```
2352
+ *
2353
+ * const {google} = require('googleapis');
2354
+ * const analyticsdata = google.analyticsdata('v1beta');
2355
+ *
2356
+ * async function main() {
2357
+ * const auth = new google.auth.GoogleAuth({
2358
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2359
+ * scopes: [
2360
+ * 'https://www.googleapis.com/auth/analytics',
2361
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2362
+ * ],
2363
+ * });
2364
+ *
2365
+ * // Acquire an auth client, and bind it to all future calls
2366
+ * const authClient = await auth.getClient();
2367
+ * google.options({auth: authClient});
2368
+ *
2369
+ * // Do the magic
2370
+ * const res = await analyticsdata.properties.runReport({
2371
+ * // 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
2372
+ * property: 'properties/my-propertie',
2373
+ *
2374
+ * // Request body metadata
2375
+ * requestBody: {
2376
+ * // request body parameters
2377
+ * // {
2378
+ * // "cohortSpec": {},
2379
+ * // "comparisons": [],
2380
+ * // "currencyCode": "my_currencyCode",
2381
+ * // "dateRanges": [],
2382
+ * // "dimensionFilter": {},
2383
+ * // "dimensions": [],
2384
+ * // "keepEmptyRows": false,
2385
+ * // "limit": "my_limit",
2386
+ * // "metricAggregations": [],
2387
+ * // "metricFilter": {},
2388
+ * // "metrics": [],
2389
+ * // "offset": "my_offset",
2390
+ * // "orderBys": [],
2391
+ * // "property": "my_property",
2392
+ * // "returnPropertyQuota": false
2393
+ * // }
2394
+ * },
2395
+ * });
2396
+ * console.log(res.data);
2397
+ *
2398
+ * // Example response
2399
+ * // {
2400
+ * // "dimensionHeaders": [],
2401
+ * // "kind": "my_kind",
2402
+ * // "maximums": [],
2403
+ * // "metadata": {},
2404
+ * // "metricHeaders": [],
2405
+ * // "minimums": [],
2406
+ * // "propertyQuota": {},
2407
+ * // "rowCount": 0,
2408
+ * // "rows": [],
2409
+ * // "totals": []
2410
+ * // }
2411
+ * }
2412
+ *
2413
+ * main().catch(e => {
2414
+ * console.error(e);
2415
+ * throw e;
2416
+ * });
2417
+ *
2418
+ * ```
1958
2419
  *
1959
2420
  * @param params - Parameters for request
1960
2421
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1964,11 +2425,11 @@ export namespace analyticsdata_v1beta {
1964
2425
  runReport(
1965
2426
  params: Params$Resource$Properties$Runreport,
1966
2427
  options: StreamMethodOptions
1967
- ): GaxiosPromise<Readable>;
2428
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1968
2429
  runReport(
1969
2430
  params?: Params$Resource$Properties$Runreport,
1970
2431
  options?: MethodOptions
1971
- ): GaxiosPromise<Schema$RunReportResponse>;
2432
+ ): Promise<GaxiosResponseWithHTTP2<Schema$RunReportResponse>>;
1972
2433
  runReport(
1973
2434
  params: Params$Resource$Properties$Runreport,
1974
2435
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1999,8 +2460,8 @@ export namespace analyticsdata_v1beta {
1999
2460
  | BodyResponseCallback<Readable>
2000
2461
  ):
2001
2462
  | void
2002
- | GaxiosPromise<Schema$RunReportResponse>
2003
- | GaxiosPromise<Readable> {
2463
+ | Promise<GaxiosResponseWithHTTP2<Schema$RunReportResponse>>
2464
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2004
2465
  let params = (paramsOrCallback ||
2005
2466
  {}) as Params$Resource$Properties$Runreport;
2006
2467
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2134,6 +2595,76 @@ export namespace analyticsdata_v1beta {
2134
2595
 
2135
2596
  /**
2136
2597
  * 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.
2598
+ * @example
2599
+ * ```js
2600
+ * // Before running the sample:
2601
+ * // - Enable the API at:
2602
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2603
+ * // - Login into gcloud by running:
2604
+ * // ```sh
2605
+ * // $ gcloud auth application-default login
2606
+ * // ```
2607
+ * // - Install the npm module by running:
2608
+ * // ```sh
2609
+ * // $ npm install googleapis
2610
+ * // ```
2611
+ *
2612
+ * const {google} = require('googleapis');
2613
+ * const analyticsdata = google.analyticsdata('v1beta');
2614
+ *
2615
+ * async function main() {
2616
+ * const auth = new google.auth.GoogleAuth({
2617
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2618
+ * scopes: [
2619
+ * 'https://www.googleapis.com/auth/analytics',
2620
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2621
+ * ],
2622
+ * });
2623
+ *
2624
+ * // Acquire an auth client, and bind it to all future calls
2625
+ * const authClient = await auth.getClient();
2626
+ * google.options({auth: authClient});
2627
+ *
2628
+ * // Do the magic
2629
+ * const res = await analyticsdata.properties.audienceExports.create({
2630
+ * // Required. The parent resource where this audience export will be created. Format: `properties/{property\}`
2631
+ * parent: 'properties/my-propertie',
2632
+ *
2633
+ * // Request body metadata
2634
+ * requestBody: {
2635
+ * // request body parameters
2636
+ * // {
2637
+ * // "audience": "my_audience",
2638
+ * // "audienceDisplayName": "my_audienceDisplayName",
2639
+ * // "beginCreatingTime": "my_beginCreatingTime",
2640
+ * // "creationQuotaTokensCharged": 0,
2641
+ * // "dimensions": [],
2642
+ * // "errorMessage": "my_errorMessage",
2643
+ * // "name": "my_name",
2644
+ * // "percentageCompleted": {},
2645
+ * // "rowCount": 0,
2646
+ * // "state": "my_state"
2647
+ * // }
2648
+ * },
2649
+ * });
2650
+ * console.log(res.data);
2651
+ *
2652
+ * // Example response
2653
+ * // {
2654
+ * // "done": false,
2655
+ * // "error": {},
2656
+ * // "metadata": {},
2657
+ * // "name": "my_name",
2658
+ * // "response": {}
2659
+ * // }
2660
+ * }
2661
+ *
2662
+ * main().catch(e => {
2663
+ * console.error(e);
2664
+ * throw e;
2665
+ * });
2666
+ *
2667
+ * ```
2137
2668
  *
2138
2669
  * @param params - Parameters for request
2139
2670
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2143,11 +2674,11 @@ export namespace analyticsdata_v1beta {
2143
2674
  create(
2144
2675
  params: Params$Resource$Properties$Audienceexports$Create,
2145
2676
  options: StreamMethodOptions
2146
- ): GaxiosPromise<Readable>;
2677
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2147
2678
  create(
2148
2679
  params?: Params$Resource$Properties$Audienceexports$Create,
2149
2680
  options?: MethodOptions
2150
- ): GaxiosPromise<Schema$Operation>;
2681
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2151
2682
  create(
2152
2683
  params: Params$Resource$Properties$Audienceexports$Create,
2153
2684
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2176,7 +2707,10 @@ export namespace analyticsdata_v1beta {
2176
2707
  callback?:
2177
2708
  | BodyResponseCallback<Schema$Operation>
2178
2709
  | BodyResponseCallback<Readable>
2179
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2710
+ ):
2711
+ | void
2712
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2713
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2180
2714
  let params = (paramsOrCallback ||
2181
2715
  {}) as Params$Resource$Properties$Audienceexports$Create;
2182
2716
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2223,6 +2757,64 @@ export namespace analyticsdata_v1beta {
2223
2757
 
2224
2758
  /**
2225
2759
  * 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.
2760
+ * @example
2761
+ * ```js
2762
+ * // Before running the sample:
2763
+ * // - Enable the API at:
2764
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2765
+ * // - Login into gcloud by running:
2766
+ * // ```sh
2767
+ * // $ gcloud auth application-default login
2768
+ * // ```
2769
+ * // - Install the npm module by running:
2770
+ * // ```sh
2771
+ * // $ npm install googleapis
2772
+ * // ```
2773
+ *
2774
+ * const {google} = require('googleapis');
2775
+ * const analyticsdata = google.analyticsdata('v1beta');
2776
+ *
2777
+ * async function main() {
2778
+ * const auth = new google.auth.GoogleAuth({
2779
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2780
+ * scopes: [
2781
+ * 'https://www.googleapis.com/auth/analytics',
2782
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2783
+ * ],
2784
+ * });
2785
+ *
2786
+ * // Acquire an auth client, and bind it to all future calls
2787
+ * const authClient = await auth.getClient();
2788
+ * google.options({auth: authClient});
2789
+ *
2790
+ * // Do the magic
2791
+ * const res = await analyticsdata.properties.audienceExports.get({
2792
+ * // Required. The audience export resource name. Format: `properties/{property\}/audienceExports/{audience_export\}`
2793
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
2794
+ * });
2795
+ * console.log(res.data);
2796
+ *
2797
+ * // Example response
2798
+ * // {
2799
+ * // "audience": "my_audience",
2800
+ * // "audienceDisplayName": "my_audienceDisplayName",
2801
+ * // "beginCreatingTime": "my_beginCreatingTime",
2802
+ * // "creationQuotaTokensCharged": 0,
2803
+ * // "dimensions": [],
2804
+ * // "errorMessage": "my_errorMessage",
2805
+ * // "name": "my_name",
2806
+ * // "percentageCompleted": {},
2807
+ * // "rowCount": 0,
2808
+ * // "state": "my_state"
2809
+ * // }
2810
+ * }
2811
+ *
2812
+ * main().catch(e => {
2813
+ * console.error(e);
2814
+ * throw e;
2815
+ * });
2816
+ *
2817
+ * ```
2226
2818
  *
2227
2819
  * @param params - Parameters for request
2228
2820
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2232,11 +2824,11 @@ export namespace analyticsdata_v1beta {
2232
2824
  get(
2233
2825
  params: Params$Resource$Properties$Audienceexports$Get,
2234
2826
  options: StreamMethodOptions
2235
- ): GaxiosPromise<Readable>;
2827
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2236
2828
  get(
2237
2829
  params?: Params$Resource$Properties$Audienceexports$Get,
2238
2830
  options?: MethodOptions
2239
- ): GaxiosPromise<Schema$AudienceExport>;
2831
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AudienceExport>>;
2240
2832
  get(
2241
2833
  params: Params$Resource$Properties$Audienceexports$Get,
2242
2834
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2265,7 +2857,10 @@ export namespace analyticsdata_v1beta {
2265
2857
  callback?:
2266
2858
  | BodyResponseCallback<Schema$AudienceExport>
2267
2859
  | BodyResponseCallback<Readable>
2268
- ): void | GaxiosPromise<Schema$AudienceExport> | GaxiosPromise<Readable> {
2860
+ ):
2861
+ | void
2862
+ | Promise<GaxiosResponseWithHTTP2<Schema$AudienceExport>>
2863
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2269
2864
  let params = (paramsOrCallback ||
2270
2865
  {}) as Params$Resource$Properties$Audienceexports$Get;
2271
2866
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2309,6 +2904,60 @@ export namespace analyticsdata_v1beta {
2309
2904
 
2310
2905
  /**
2311
2906
  * 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.
2907
+ * @example
2908
+ * ```js
2909
+ * // Before running the sample:
2910
+ * // - Enable the API at:
2911
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2912
+ * // - Login into gcloud by running:
2913
+ * // ```sh
2914
+ * // $ gcloud auth application-default login
2915
+ * // ```
2916
+ * // - Install the npm module by running:
2917
+ * // ```sh
2918
+ * // $ npm install googleapis
2919
+ * // ```
2920
+ *
2921
+ * const {google} = require('googleapis');
2922
+ * const analyticsdata = google.analyticsdata('v1beta');
2923
+ *
2924
+ * async function main() {
2925
+ * const auth = new google.auth.GoogleAuth({
2926
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2927
+ * scopes: [
2928
+ * 'https://www.googleapis.com/auth/analytics',
2929
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2930
+ * ],
2931
+ * });
2932
+ *
2933
+ * // Acquire an auth client, and bind it to all future calls
2934
+ * const authClient = await auth.getClient();
2935
+ * google.options({auth: authClient});
2936
+ *
2937
+ * // Do the magic
2938
+ * const res = await analyticsdata.properties.audienceExports.list({
2939
+ * // 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).
2940
+ * pageSize: 'placeholder-value',
2941
+ * // 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.
2942
+ * pageToken: 'placeholder-value',
2943
+ * // Required. All audience exports for this property will be listed in the response. Format: `properties/{property\}`
2944
+ * parent: 'properties/my-propertie',
2945
+ * });
2946
+ * console.log(res.data);
2947
+ *
2948
+ * // Example response
2949
+ * // {
2950
+ * // "audienceExports": [],
2951
+ * // "nextPageToken": "my_nextPageToken"
2952
+ * // }
2953
+ * }
2954
+ *
2955
+ * main().catch(e => {
2956
+ * console.error(e);
2957
+ * throw e;
2958
+ * });
2959
+ *
2960
+ * ```
2312
2961
  *
2313
2962
  * @param params - Parameters for request
2314
2963
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2318,11 +2967,11 @@ export namespace analyticsdata_v1beta {
2318
2967
  list(
2319
2968
  params: Params$Resource$Properties$Audienceexports$List,
2320
2969
  options: StreamMethodOptions
2321
- ): GaxiosPromise<Readable>;
2970
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2322
2971
  list(
2323
2972
  params?: Params$Resource$Properties$Audienceexports$List,
2324
2973
  options?: MethodOptions
2325
- ): GaxiosPromise<Schema$ListAudienceExportsResponse>;
2974
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListAudienceExportsResponse>>;
2326
2975
  list(
2327
2976
  params: Params$Resource$Properties$Audienceexports$List,
2328
2977
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2357,8 +3006,8 @@ export namespace analyticsdata_v1beta {
2357
3006
  | BodyResponseCallback<Readable>
2358
3007
  ):
2359
3008
  | void
2360
- | GaxiosPromise<Schema$ListAudienceExportsResponse>
2361
- | GaxiosPromise<Readable> {
3009
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListAudienceExportsResponse>>
3010
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2362
3011
  let params = (paramsOrCallback ||
2363
3012
  {}) as Params$Resource$Properties$Audienceexports$List;
2364
3013
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2405,6 +3054,66 @@ export namespace analyticsdata_v1beta {
2405
3054
 
2406
3055
  /**
2407
3056
  * 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.
3057
+ * @example
3058
+ * ```js
3059
+ * // Before running the sample:
3060
+ * // - Enable the API at:
3061
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
3062
+ * // - Login into gcloud by running:
3063
+ * // ```sh
3064
+ * // $ gcloud auth application-default login
3065
+ * // ```
3066
+ * // - Install the npm module by running:
3067
+ * // ```sh
3068
+ * // $ npm install googleapis
3069
+ * // ```
3070
+ *
3071
+ * const {google} = require('googleapis');
3072
+ * const analyticsdata = google.analyticsdata('v1beta');
3073
+ *
3074
+ * async function main() {
3075
+ * const auth = new google.auth.GoogleAuth({
3076
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3077
+ * scopes: [
3078
+ * 'https://www.googleapis.com/auth/analytics',
3079
+ * 'https://www.googleapis.com/auth/analytics.readonly',
3080
+ * ],
3081
+ * });
3082
+ *
3083
+ * // Acquire an auth client, and bind it to all future calls
3084
+ * const authClient = await auth.getClient();
3085
+ * google.options({auth: authClient});
3086
+ *
3087
+ * // Do the magic
3088
+ * const res = await analyticsdata.properties.audienceExports.query({
3089
+ * // Required. The name of the audience export to retrieve users from. Format: `properties/{property\}/audienceExports/{audience_export\}`
3090
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
3091
+ *
3092
+ * // Request body metadata
3093
+ * requestBody: {
3094
+ * // request body parameters
3095
+ * // {
3096
+ * // "limit": "my_limit",
3097
+ * // "offset": "my_offset"
3098
+ * // }
3099
+ * },
3100
+ * });
3101
+ * console.log(res.data);
3102
+ *
3103
+ * // Example response
3104
+ * // {
3105
+ * // "audienceExport": {},
3106
+ * // "audienceRows": [],
3107
+ * // "rowCount": 0
3108
+ * // }
3109
+ * }
3110
+ *
3111
+ * main().catch(e => {
3112
+ * console.error(e);
3113
+ * throw e;
3114
+ * });
3115
+ *
3116
+ * ```
2408
3117
  *
2409
3118
  * @param params - Parameters for request
2410
3119
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2414,11 +3123,11 @@ export namespace analyticsdata_v1beta {
2414
3123
  query(
2415
3124
  params: Params$Resource$Properties$Audienceexports$Query,
2416
3125
  options: StreamMethodOptions
2417
- ): GaxiosPromise<Readable>;
3126
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2418
3127
  query(
2419
3128
  params?: Params$Resource$Properties$Audienceexports$Query,
2420
3129
  options?: MethodOptions
2421
- ): GaxiosPromise<Schema$QueryAudienceExportResponse>;
3130
+ ): Promise<GaxiosResponseWithHTTP2<Schema$QueryAudienceExportResponse>>;
2422
3131
  query(
2423
3132
  params: Params$Resource$Properties$Audienceexports$Query,
2424
3133
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2453,8 +3162,8 @@ export namespace analyticsdata_v1beta {
2453
3162
  | BodyResponseCallback<Readable>
2454
3163
  ):
2455
3164
  | void
2456
- | GaxiosPromise<Schema$QueryAudienceExportResponse>
2457
- | GaxiosPromise<Readable> {
3165
+ | Promise<GaxiosResponseWithHTTP2<Schema$QueryAudienceExportResponse>>
3166
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2458
3167
  let params = (paramsOrCallback ||
2459
3168
  {}) as Params$Resource$Properties$Audienceexports$Query;
2460
3169
  let options = (optionsOrCallback || {}) as MethodOptions;