@google-analytics/data 4.8.0 → 4.10.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.
@@ -1,4 +1,7 @@
1
1
  {
2
+ "options": {
3
+ "syntax": "proto3"
4
+ },
2
5
  "nested": {
3
6
  "google": {
4
7
  "nested": {
@@ -1514,6 +1517,24 @@
1514
1517
  }
1515
1518
  ]
1516
1519
  },
1520
+ "GetPropertyQuotasSnapshot": {
1521
+ "requestType": "GetPropertyQuotasSnapshotRequest",
1522
+ "responseType": "PropertyQuotasSnapshot",
1523
+ "options": {
1524
+ "(google.api.http).get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}",
1525
+ "(google.api.method_signature)": "name"
1526
+ },
1527
+ "parsedOptions": [
1528
+ {
1529
+ "(google.api.http)": {
1530
+ "get": "/v1alpha/{name=properties/*/propertyQuotasSnapshot}"
1531
+ }
1532
+ },
1533
+ {
1534
+ "(google.api.method_signature)": "name"
1535
+ }
1536
+ ]
1537
+ },
1517
1538
  "CreateReportTask": {
1518
1539
  "requestType": "CreateReportTaskRequest",
1519
1540
  "responseType": "google.longrunning.Operation",
@@ -1787,6 +1808,47 @@
1787
1808
  }
1788
1809
  }
1789
1810
  },
1811
+ "GetPropertyQuotasSnapshotRequest": {
1812
+ "fields": {
1813
+ "name": {
1814
+ "type": "string",
1815
+ "id": 1,
1816
+ "options": {
1817
+ "(google.api.field_behavior)": "REQUIRED",
1818
+ "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot"
1819
+ }
1820
+ }
1821
+ }
1822
+ },
1823
+ "PropertyQuotasSnapshot": {
1824
+ "options": {
1825
+ "(google.api.resource).type": "analyticsadmin.googleapis.com/PropertyQuotasSnapshot",
1826
+ "(google.api.resource).pattern": "properties/{property}/propertyQuotasSnapshot",
1827
+ "(google.api.resource).plural": "propertyQuotasSnapshots",
1828
+ "(google.api.resource).singular": "propertyQuotasSnapshot"
1829
+ },
1830
+ "fields": {
1831
+ "name": {
1832
+ "type": "string",
1833
+ "id": 4,
1834
+ "options": {
1835
+ "(google.api.field_behavior)": "IDENTIFIER"
1836
+ }
1837
+ },
1838
+ "corePropertyQuota": {
1839
+ "type": "PropertyQuota",
1840
+ "id": 1
1841
+ },
1842
+ "realtimePropertyQuota": {
1843
+ "type": "PropertyQuota",
1844
+ "id": 2
1845
+ },
1846
+ "funnelPropertyQuota": {
1847
+ "type": "PropertyQuota",
1848
+ "id": 3
1849
+ }
1850
+ }
1851
+ },
1790
1852
  "GetAudienceListRequest": {
1791
1853
  "fields": {
1792
1854
  "name": {
@@ -2331,6 +2393,13 @@
2331
2393
  },
2332
2394
  "nested": {
2333
2395
  "ReportDefinition": {
2396
+ "oneofs": {
2397
+ "_samplingLevel": {
2398
+ "oneof": [
2399
+ "samplingLevel"
2400
+ ]
2401
+ }
2402
+ },
2334
2403
  "fields": {
2335
2404
  "dimensions": {
2336
2405
  "rule": "repeated",
@@ -2420,6 +2489,14 @@
2420
2489
  "options": {
2421
2490
  "(google.api.field_behavior)": "OPTIONAL"
2422
2491
  }
2492
+ },
2493
+ "samplingLevel": {
2494
+ "type": "SamplingLevel",
2495
+ "id": 14,
2496
+ "options": {
2497
+ "(google.api.field_behavior)": "OPTIONAL",
2498
+ "proto3_optional": true
2499
+ }
2423
2500
  }
2424
2501
  }
2425
2502
  },
@@ -4091,6 +4168,14 @@
4091
4168
  "COST_DATA": 1,
4092
4169
  "REVENUE_DATA": 2
4093
4170
  }
4171
+ },
4172
+ "SamplingLevel": {
4173
+ "values": {
4174
+ "SAMPLING_LEVEL_UNSPECIFIED": 0,
4175
+ "LOW": 1,
4176
+ "MEDIUM": 2,
4177
+ "UNSAMPLED": 3
4178
+ }
4094
4179
  }
4095
4180
  }
4096
4181
  },
@@ -136,9 +136,9 @@ export declare class AlphaAnalyticsDataClient {
136
136
  * @param {Object} request
137
137
  * The request object that will be sent.
138
138
  * @param {string} [request.property]
139
- * Optional. A Google Analytics GA4 property identifier whose events are
140
- * tracked. Specified in the URL path and not the body. To learn more, see
141
- * [where to find your Property
139
+ * Optional. A Google Analytics property identifier whose events are tracked.
140
+ * Specified in the URL path and not the body. To learn more, see [where to
141
+ * find your Property
142
142
  * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
143
143
  * Within a batch request, this property should either be unspecified or
144
144
  * consistent with the batch-level property.
@@ -450,6 +450,31 @@ export declare class AlphaAnalyticsDataClient {
450
450
  ]>;
451
451
  getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
452
452
  getRecurringAudienceList(request: protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest, callback: Callback<protos.google.analytics.data.v1alpha.IRecurringAudienceList, protos.google.analytics.data.v1alpha.IGetRecurringAudienceListRequest | null | undefined, {} | null | undefined>): void;
453
+ /**
454
+ * Get all property quotas organized by quota category for a given property.
455
+ * This will charge 1 property quota from the category with the most quota.
456
+ *
457
+ * @param {Object} request
458
+ * The request object that will be sent.
459
+ * @param {string} request.name
460
+ * Required. Quotas from this property will be listed in the response.
461
+ * Format: `properties/{property}/propertyQuotasSnapshot`
462
+ * @param {object} [options]
463
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
464
+ * @returns {Promise} - The promise which resolves to an array.
465
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1alpha.PropertyQuotasSnapshot|PropertyQuotasSnapshot}.
466
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
467
+ * for more details and examples.
468
+ * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.get_property_quotas_snapshot.js</caption>
469
+ * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetPropertyQuotasSnapshot_async
470
+ */
471
+ getPropertyQuotasSnapshot(request?: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, options?: CallOptions): Promise<[
472
+ protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot,
473
+ (protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest | undefined),
474
+ {} | undefined
475
+ ]>;
476
+ getPropertyQuotasSnapshot(request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, options: CallOptions, callback: Callback<protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest | null | undefined, {} | null | undefined>): void;
477
+ getPropertyQuotasSnapshot(request: protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest, callback: Callback<protos.google.analytics.data.v1alpha.IPropertyQuotasSnapshot, protos.google.analytics.data.v1alpha.IGetPropertyQuotasSnapshotRequest | null | undefined, {} | null | undefined>): void;
453
478
  /**
454
479
  * Retrieves a report task's content. After requesting the `CreateReportTask`,
455
480
  * you are able to retrieve the report content once the report is
@@ -599,6 +624,12 @@ export declare class AlphaAnalyticsDataClient {
599
624
  * asynchronous request to form a customized report of your Google Analytics
600
625
  * event data.
601
626
  *
627
+ * A report task will be retained and available for querying for 72 hours
628
+ * after it has been created.
629
+ *
630
+ * A report task created by one user can be listed and queried by all users
631
+ * who have access to the property.
632
+ *
602
633
  * @param {Object} request
603
634
  * The request object that will be sent.
604
635
  * @param {string} request.parent
@@ -1110,6 +1141,21 @@ export declare class AlphaAnalyticsDataClient {
1110
1141
  * @returns {string} A string representing the property.
1111
1142
  */
1112
1143
  matchPropertyFromPropertyName(propertyName: string): string | number;
1144
+ /**
1145
+ * Return a fully-qualified propertyQuotasSnapshot resource name string.
1146
+ *
1147
+ * @param {string} property
1148
+ * @returns {string} Resource name string.
1149
+ */
1150
+ propertyQuotasSnapshotPath(property: string): string;
1151
+ /**
1152
+ * Parse the property from PropertyQuotasSnapshot resource.
1153
+ *
1154
+ * @param {string} propertyQuotasSnapshotName
1155
+ * A fully-qualified path representing PropertyQuotasSnapshot resource.
1156
+ * @returns {string} A string representing the property.
1157
+ */
1158
+ matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName: string): string | number;
1113
1159
  /**
1114
1160
  * Return a fully-qualified recurringAudienceList resource name string.
1115
1161
  *
@@ -150,6 +150,7 @@ class AlphaAnalyticsDataClient {
150
150
  this.pathTemplates = {
151
151
  audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/audienceLists/{audience_list}'),
152
152
  propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{property}'),
153
+ propertyQuotasSnapshotPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/propertyQuotasSnapshot'),
153
154
  recurringAudienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/recurringAudienceLists/{recurring_audience_list}'),
154
155
  reportTaskPathTemplate: new this._gaxModule.PathTemplate('properties/{property}/reportTasks/{report_task}'),
155
156
  };
@@ -228,6 +229,7 @@ class AlphaAnalyticsDataClient {
228
229
  'createRecurringAudienceList',
229
230
  'getRecurringAudienceList',
230
231
  'listRecurringAudienceLists',
232
+ 'getPropertyQuotasSnapshot',
231
233
  'createReportTask',
232
234
  'queryReportTask',
233
235
  'getReportTask',
@@ -443,6 +445,27 @@ class AlphaAnalyticsDataClient {
443
445
  this.initialize();
444
446
  return this.innerApiCalls.getRecurringAudienceList(request, options, callback);
445
447
  }
448
+ getPropertyQuotasSnapshot(request, optionsOrCallback, callback) {
449
+ var _a;
450
+ request = request || {};
451
+ let options;
452
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
453
+ callback = optionsOrCallback;
454
+ options = {};
455
+ }
456
+ else {
457
+ options = optionsOrCallback;
458
+ }
459
+ options = options || {};
460
+ options.otherArgs = options.otherArgs || {};
461
+ options.otherArgs.headers = options.otherArgs.headers || {};
462
+ options.otherArgs.headers['x-goog-request-params'] =
463
+ this._gaxModule.routingHeader.fromParams({
464
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
465
+ });
466
+ this.initialize();
467
+ return this.innerApiCalls.getPropertyQuotasSnapshot(request, options, callback);
468
+ }
446
469
  queryReportTask(request, optionsOrCallback, callback) {
447
470
  var _a;
448
471
  request = request || {};
@@ -1076,6 +1099,27 @@ class AlphaAnalyticsDataClient {
1076
1099
  matchPropertyFromPropertyName(propertyName) {
1077
1100
  return this.pathTemplates.propertyPathTemplate.match(propertyName).property;
1078
1101
  }
1102
+ /**
1103
+ * Return a fully-qualified propertyQuotasSnapshot resource name string.
1104
+ *
1105
+ * @param {string} property
1106
+ * @returns {string} Resource name string.
1107
+ */
1108
+ propertyQuotasSnapshotPath(property) {
1109
+ return this.pathTemplates.propertyQuotasSnapshotPathTemplate.render({
1110
+ property: property,
1111
+ });
1112
+ }
1113
+ /**
1114
+ * Parse the property from PropertyQuotasSnapshot resource.
1115
+ *
1116
+ * @param {string} propertyQuotasSnapshotName
1117
+ * A fully-qualified path representing PropertyQuotasSnapshot resource.
1118
+ * @returns {string} A string representing the property.
1119
+ */
1120
+ matchPropertyFromPropertyQuotasSnapshotName(propertyQuotasSnapshotName) {
1121
+ return this.pathTemplates.propertyQuotasSnapshotPathTemplate.match(propertyQuotasSnapshotName).property;
1122
+ }
1079
1123
  /**
1080
1124
  * Return a fully-qualified recurringAudienceList resource name string.
1081
1125
  *
@@ -77,6 +77,11 @@
77
77
  "retry_codes_name": "unknown",
78
78
  "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
79
79
  },
80
+ "GetPropertyQuotasSnapshot": {
81
+ "timeout_millis": 60000,
82
+ "retry_codes_name": "unknown",
83
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
84
+ },
80
85
  "CreateReportTask": {
81
86
  "timeout_millis": 60000,
82
87
  "retry_codes_name": "unknown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-analytics/data",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "description": "Data client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",