@google-analytics/data 4.7.0 → 4.9.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": {
@@ -4373,6 +4435,11 @@
4373
4435
  "rule": "repeated",
4374
4436
  "type": "MetricMetadata",
4375
4437
  "id": 2
4438
+ },
4439
+ "comparisons": {
4440
+ "rule": "repeated",
4441
+ "type": "ComparisonMetadata",
4442
+ "id": 4
4376
4443
  }
4377
4444
  }
4378
4445
  },
@@ -4438,6 +4505,14 @@
4438
4505
  "returnPropertyQuota": {
4439
4506
  "type": "bool",
4440
4507
  "id": 14
4508
+ },
4509
+ "comparisons": {
4510
+ "rule": "repeated",
4511
+ "type": "Comparison",
4512
+ "id": 15,
4513
+ "options": {
4514
+ "(google.api.field_behavior)": "OPTIONAL"
4515
+ }
4441
4516
  }
4442
4517
  }
4443
4518
  },
@@ -4540,6 +4615,14 @@
4540
4615
  "returnPropertyQuota": {
4541
4616
  "type": "bool",
4542
4617
  "id": 11
4618
+ },
4619
+ "comparisons": {
4620
+ "rule": "repeated",
4621
+ "type": "Comparison",
4622
+ "id": 12,
4623
+ "options": {
4624
+ "(google.api.field_behavior)": "OPTIONAL"
4625
+ }
4543
4626
  }
4544
4627
  }
4545
4628
  },
@@ -5170,6 +5253,38 @@
5170
5253
  }
5171
5254
  }
5172
5255
  },
5256
+ "Comparison": {
5257
+ "oneofs": {
5258
+ "_name": {
5259
+ "oneof": [
5260
+ "name"
5261
+ ]
5262
+ },
5263
+ "oneComparison": {
5264
+ "oneof": [
5265
+ "dimensionFilter",
5266
+ "comparison"
5267
+ ]
5268
+ }
5269
+ },
5270
+ "fields": {
5271
+ "name": {
5272
+ "type": "string",
5273
+ "id": 1,
5274
+ "options": {
5275
+ "proto3_optional": true
5276
+ }
5277
+ },
5278
+ "dimensionFilter": {
5279
+ "type": "FilterExpression",
5280
+ "id": 2
5281
+ },
5282
+ "comparison": {
5283
+ "type": "string",
5284
+ "id": 3
5285
+ }
5286
+ }
5287
+ },
5173
5288
  "FilterExpression": {
5174
5289
  "oneofs": {
5175
5290
  "expr": {
@@ -5872,6 +5987,22 @@
5872
5987
  }
5873
5988
  }
5874
5989
  },
5990
+ "ComparisonMetadata": {
5991
+ "fields": {
5992
+ "apiName": {
5993
+ "type": "string",
5994
+ "id": 1
5995
+ },
5996
+ "uiName": {
5997
+ "type": "string",
5998
+ "id": 2
5999
+ },
6000
+ "description": {
6001
+ "type": "string",
6002
+ "id": 3
6003
+ }
6004
+ }
6005
+ },
5875
6006
  "DimensionCompatibility": {
5876
6007
  "oneofs": {
5877
6008
  "_dimensionMetadata": {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type * as gax from 'google-gax';
3
2
  import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4
3
  import { Transform } from 'stream';
@@ -137,9 +136,9 @@ export declare class AlphaAnalyticsDataClient {
137
136
  * @param {Object} request
138
137
  * The request object that will be sent.
139
138
  * @param {string} [request.property]
140
- * Optional. A Google Analytics GA4 property identifier whose events are
141
- * tracked. Specified in the URL path and not the body. To learn more, see
142
- * [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
143
142
  * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
144
143
  * Within a batch request, this property should either be unspecified or
145
144
  * consistent with the batch-level property.
@@ -451,6 +450,31 @@ export declare class AlphaAnalyticsDataClient {
451
450
  ]>;
452
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;
453
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;
454
478
  /**
455
479
  * Retrieves a report task's content. After requesting the `CreateReportTask`,
456
480
  * you are able to retrieve the report content once the report is
@@ -600,6 +624,12 @@ export declare class AlphaAnalyticsDataClient {
600
624
  * asynchronous request to form a customized report of your Google Analytics
601
625
  * event data.
602
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
+ *
603
633
  * @param {Object} request
604
634
  * The request object that will be sent.
605
635
  * @param {string} request.parent
@@ -1111,6 +1141,21 @@ export declare class AlphaAnalyticsDataClient {
1111
1141
  * @returns {string} A string representing the property.
1112
1142
  */
1113
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;
1114
1159
  /**
1115
1160
  * Return a fully-qualified recurringAudienceList resource name string.
1116
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",
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type * as gax from 'google-gax';
3
2
  import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4
3
  import { Transform } from 'stream';
@@ -206,6 +205,10 @@ export declare class BetaAnalyticsDataClient {
206
205
  * @param {boolean} request.returnPropertyQuota
207
206
  * Toggles whether to return the current state of this Analytics Property's
208
207
  * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
208
+ * @param {number[]} [request.comparisons]
209
+ * Optional. The configuration of comparisons requested and displayed. The
210
+ * request only requires a comparisons field in order to receive a comparison
211
+ * column in the response.
209
212
  * @param {object} [options]
210
213
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
211
214
  * @returns {Promise} - The promise which resolves to an array.
@@ -285,6 +288,10 @@ export declare class BetaAnalyticsDataClient {
285
288
  * @param {boolean} request.returnPropertyQuota
286
289
  * Toggles whether to return the current state of this Analytics Property's
287
290
  * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
291
+ * @param {number[]} [request.comparisons]
292
+ * Optional. The configuration of comparisons requested and displayed. The
293
+ * request requires both a comparisons field and a comparisons dimension to
294
+ * receive a comparison column in the response.
288
295
  * @param {object} [options]
289
296
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
290
297
  * @returns {Promise} - The promise which resolves to an array.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-analytics/data",
3
- "version": "4.7.0",
3
+ "version": "4.9.0",
4
4
  "description": "Data client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,7 +61,7 @@
61
61
  "long": "^5.2.3",
62
62
  "mocha": "^9.2.2",
63
63
  "pack-n-play": "^2.0.0",
64
- "sinon": "^17.0.0",
64
+ "sinon": "^18.0.0",
65
65
  "typescript": "^5.1.6"
66
66
  },
67
67
  "engines": {