@google-analytics/data 3.2.2 → 4.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.
@@ -134,6 +134,39 @@ class AlphaAnalyticsDataClient {
134
134
  }
135
135
  // Load the applicable protos.
136
136
  this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
137
+ // This API contains "path templates"; forward-slash-separated
138
+ // identifiers to uniquely identify resources within the API.
139
+ // Create useful helper objects for these.
140
+ this.pathTemplates = {
141
+ audienceListPathTemplate: new this._gaxModule.PathTemplate('properties/{propertyId}/audienceLists/{audienceListId}'),
142
+ propertyPathTemplate: new this._gaxModule.PathTemplate('properties/{propertyId}'),
143
+ };
144
+ // Some of the methods on this service return "paged" results,
145
+ // (e.g. 50 results at a time, with tokens to get subsequent
146
+ // pages). Denote the keys used for pagination and results.
147
+ this.descriptors.page = {
148
+ listAudienceLists: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'audienceLists'),
149
+ };
150
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
151
+ // This API contains "long-running operations", which return a
152
+ // an Operation object that allows for tracking of the operation,
153
+ // rather than holding a request open.
154
+ const lroOptions = {
155
+ auth: this.auth,
156
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
157
+ };
158
+ if (opts.fallback === 'rest') {
159
+ lroOptions.protoJson = protoFilesRoot;
160
+ lroOptions.httpRules = [];
161
+ }
162
+ this.operationsClient = this._gaxModule
163
+ .lro(lroOptions)
164
+ .operationsClient(opts);
165
+ const createAudienceListResponse = protoFilesRoot.lookup('.google.analytics.data.v1alpha.AudienceList');
166
+ const createAudienceListMetadata = protoFilesRoot.lookup('.google.analytics.data.v1alpha.AudienceListMetadata');
167
+ this.descriptors.longrunning = {
168
+ createAudienceList: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAudienceListResponse.decode.bind(createAudienceListResponse), createAudienceListMetadata.decode.bind(createAudienceListMetadata)),
169
+ };
137
170
  // Put together the default options sent with requests.
138
171
  this._defaults = this._gaxGrpc.constructSettings('google.analytics.data.v1alpha.AlphaAnalyticsData', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
139
172
  // Set up a dictionary of "inner API calls"; the core implementation
@@ -168,7 +201,13 @@ class AlphaAnalyticsDataClient {
168
201
  .AlphaAnalyticsData, this._opts, this._providedCustomServicePath);
169
202
  // Iterate over each of the methods that the service provides
170
203
  // and create an API call method for each.
171
- const alphaAnalyticsDataStubMethods = ['runFunnelReport'];
204
+ const alphaAnalyticsDataStubMethods = [
205
+ 'runFunnelReport',
206
+ 'createAudienceList',
207
+ 'queryAudienceList',
208
+ 'getAudienceList',
209
+ 'listAudienceLists',
210
+ ];
172
211
  for (const methodName of alphaAnalyticsDataStubMethods) {
173
212
  const callPromise = this.alphaAnalyticsDataStub.then(stub => (...args) => {
174
213
  if (this._terminated) {
@@ -179,7 +218,9 @@ class AlphaAnalyticsDataClient {
179
218
  }, (err) => () => {
180
219
  throw err;
181
220
  });
182
- const descriptor = undefined;
221
+ const descriptor = this.descriptors.page[methodName] ||
222
+ this.descriptors.longrunning[methodName] ||
223
+ undefined;
183
224
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
184
225
  this.innerApiCalls[methodName] = apiCall;
185
226
  }
@@ -250,6 +291,258 @@ class AlphaAnalyticsDataClient {
250
291
  this.initialize();
251
292
  return this.innerApiCalls.runFunnelReport(request, options, callback);
252
293
  }
294
+ queryAudienceList(request, optionsOrCallback, callback) {
295
+ var _a;
296
+ request = request || {};
297
+ let options;
298
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
299
+ callback = optionsOrCallback;
300
+ options = {};
301
+ }
302
+ else {
303
+ options = optionsOrCallback;
304
+ }
305
+ options = options || {};
306
+ options.otherArgs = options.otherArgs || {};
307
+ options.otherArgs.headers = options.otherArgs.headers || {};
308
+ options.otherArgs.headers['x-goog-request-params'] =
309
+ this._gaxModule.routingHeader.fromParams({
310
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
311
+ });
312
+ this.initialize();
313
+ return this.innerApiCalls.queryAudienceList(request, options, callback);
314
+ }
315
+ getAudienceList(request, optionsOrCallback, callback) {
316
+ var _a;
317
+ request = request || {};
318
+ let options;
319
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
320
+ callback = optionsOrCallback;
321
+ options = {};
322
+ }
323
+ else {
324
+ options = optionsOrCallback;
325
+ }
326
+ options = options || {};
327
+ options.otherArgs = options.otherArgs || {};
328
+ options.otherArgs.headers = options.otherArgs.headers || {};
329
+ options.otherArgs.headers['x-goog-request-params'] =
330
+ this._gaxModule.routingHeader.fromParams({
331
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
332
+ });
333
+ this.initialize();
334
+ return this.innerApiCalls.getAudienceList(request, options, callback);
335
+ }
336
+ createAudienceList(request, optionsOrCallback, callback) {
337
+ var _a;
338
+ request = request || {};
339
+ let options;
340
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
341
+ callback = optionsOrCallback;
342
+ options = {};
343
+ }
344
+ else {
345
+ options = optionsOrCallback;
346
+ }
347
+ options = options || {};
348
+ options.otherArgs = options.otherArgs || {};
349
+ options.otherArgs.headers = options.otherArgs.headers || {};
350
+ options.otherArgs.headers['x-goog-request-params'] =
351
+ this._gaxModule.routingHeader.fromParams({
352
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
353
+ });
354
+ this.initialize();
355
+ return this.innerApiCalls.createAudienceList(request, options, callback);
356
+ }
357
+ /**
358
+ * Check the status of the long running operation returned by `createAudienceList()`.
359
+ * @param {String} name
360
+ * The operation name that will be passed.
361
+ * @returns {Promise} - The promise which resolves to an object.
362
+ * The decoded operation object has result and metadata field to get information from.
363
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
364
+ * for more details and examples.
365
+ * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.create_audience_list.js</caption>
366
+ * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_CreateAudienceList_async
367
+ */
368
+ async checkCreateAudienceListProgress(name) {
369
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
370
+ const [operation] = await this.operationsClient.getOperation(request);
371
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAudienceList, this._gaxModule.createDefaultBackoffSettings());
372
+ return decodeOperation;
373
+ }
374
+ listAudienceLists(request, optionsOrCallback, callback) {
375
+ var _a;
376
+ request = request || {};
377
+ let options;
378
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
379
+ callback = optionsOrCallback;
380
+ options = {};
381
+ }
382
+ else {
383
+ options = optionsOrCallback;
384
+ }
385
+ options = options || {};
386
+ options.otherArgs = options.otherArgs || {};
387
+ options.otherArgs.headers = options.otherArgs.headers || {};
388
+ options.otherArgs.headers['x-goog-request-params'] =
389
+ this._gaxModule.routingHeader.fromParams({
390
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
391
+ });
392
+ this.initialize();
393
+ return this.innerApiCalls.listAudienceLists(request, options, callback);
394
+ }
395
+ /**
396
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
397
+ * @param {Object} request
398
+ * The request object that will be sent.
399
+ * @param {string} request.parent
400
+ * Required. All audience lists for this property will be listed in the
401
+ * response. Format: `properties/{propertyId}`
402
+ * @param {number} request.pageSize
403
+ * The maximum number of audience lists to return. The service may return
404
+ * fewer than this value. If unspecified, at most 200 audience lists will be
405
+ * returned. The maximum value is 1000 (higher values will be coerced to the
406
+ * maximum).
407
+ * @param {string} request.pageToken
408
+ * A page token, received from a previous `ListAudienceLists` call. Provide
409
+ * this to retrieve the subsequent page.
410
+ *
411
+ * When paginating, all other parameters provided to `ListAudienceLists` must
412
+ * match the call that provided the page token.
413
+ * @param {object} [options]
414
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
415
+ * @returns {Stream}
416
+ * An object stream which emits an object representing {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList} on 'data' event.
417
+ * The client library will perform auto-pagination by default: it will call the API as many
418
+ * times as needed. Note that it can affect your quota.
419
+ * We recommend using `listAudienceListsAsync()`
420
+ * method described below for async iteration which you can stop as needed.
421
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
422
+ * for more details and examples.
423
+ */
424
+ listAudienceListsStream(request, options) {
425
+ var _a;
426
+ request = request || {};
427
+ options = options || {};
428
+ options.otherArgs = options.otherArgs || {};
429
+ options.otherArgs.headers = options.otherArgs.headers || {};
430
+ options.otherArgs.headers['x-goog-request-params'] =
431
+ this._gaxModule.routingHeader.fromParams({
432
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
433
+ });
434
+ const defaultCallSettings = this._defaults['listAudienceLists'];
435
+ const callSettings = defaultCallSettings.merge(options);
436
+ this.initialize();
437
+ return this.descriptors.page.listAudienceLists.createStream(this.innerApiCalls.listAudienceLists, request, callSettings);
438
+ }
439
+ /**
440
+ * Equivalent to `listAudienceLists`, but returns an iterable object.
441
+ *
442
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
443
+ * @param {Object} request
444
+ * The request object that will be sent.
445
+ * @param {string} request.parent
446
+ * Required. All audience lists for this property will be listed in the
447
+ * response. Format: `properties/{propertyId}`
448
+ * @param {number} request.pageSize
449
+ * The maximum number of audience lists to return. The service may return
450
+ * fewer than this value. If unspecified, at most 200 audience lists will be
451
+ * returned. The maximum value is 1000 (higher values will be coerced to the
452
+ * maximum).
453
+ * @param {string} request.pageToken
454
+ * A page token, received from a previous `ListAudienceLists` call. Provide
455
+ * this to retrieve the subsequent page.
456
+ *
457
+ * When paginating, all other parameters provided to `ListAudienceLists` must
458
+ * match the call that provided the page token.
459
+ * @param {object} [options]
460
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
461
+ * @returns {Object}
462
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
463
+ * When you iterate the returned iterable, each element will be an object representing
464
+ * {@link protos.google.analytics.data.v1alpha.AudienceList|AudienceList}. The API will be called under the hood as needed, once per the page,
465
+ * so you can stop the iteration when you don't need more results.
466
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
467
+ * for more details and examples.
468
+ * @example <caption>include:samples/generated/v1alpha/alpha_analytics_data.list_audience_lists.js</caption>
469
+ * region_tag:analyticsdata_v1alpha_generated_AlphaAnalyticsData_ListAudienceLists_async
470
+ */
471
+ listAudienceListsAsync(request, options) {
472
+ var _a;
473
+ request = request || {};
474
+ options = options || {};
475
+ options.otherArgs = options.otherArgs || {};
476
+ options.otherArgs.headers = options.otherArgs.headers || {};
477
+ options.otherArgs.headers['x-goog-request-params'] =
478
+ this._gaxModule.routingHeader.fromParams({
479
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
480
+ });
481
+ const defaultCallSettings = this._defaults['listAudienceLists'];
482
+ const callSettings = defaultCallSettings.merge(options);
483
+ this.initialize();
484
+ return this.descriptors.page.listAudienceLists.asyncIterate(this.innerApiCalls['listAudienceLists'], request, callSettings);
485
+ }
486
+ // --------------------
487
+ // -- Path templates --
488
+ // --------------------
489
+ /**
490
+ * Return a fully-qualified audienceList resource name string.
491
+ *
492
+ * @param {string} propertyId
493
+ * @param {string} audienceListId
494
+ * @returns {string} Resource name string.
495
+ */
496
+ audienceListPath(propertyId, audienceListId) {
497
+ return this.pathTemplates.audienceListPathTemplate.render({
498
+ propertyId: propertyId,
499
+ audienceListId: audienceListId,
500
+ });
501
+ }
502
+ /**
503
+ * Parse the propertyId from AudienceList resource.
504
+ *
505
+ * @param {string} audienceListName
506
+ * A fully-qualified path representing AudienceList resource.
507
+ * @returns {string} A string representing the propertyId.
508
+ */
509
+ matchPropertyIdFromAudienceListName(audienceListName) {
510
+ return this.pathTemplates.audienceListPathTemplate.match(audienceListName)
511
+ .propertyId;
512
+ }
513
+ /**
514
+ * Parse the audienceListId from AudienceList resource.
515
+ *
516
+ * @param {string} audienceListName
517
+ * A fully-qualified path representing AudienceList resource.
518
+ * @returns {string} A string representing the audienceListId.
519
+ */
520
+ matchAudienceListIdFromAudienceListName(audienceListName) {
521
+ return this.pathTemplates.audienceListPathTemplate.match(audienceListName)
522
+ .audienceListId;
523
+ }
524
+ /**
525
+ * Return a fully-qualified property resource name string.
526
+ *
527
+ * @param {string} propertyId
528
+ * @returns {string} Resource name string.
529
+ */
530
+ propertyPath(propertyId) {
531
+ return this.pathTemplates.propertyPathTemplate.render({
532
+ propertyId: propertyId,
533
+ });
534
+ }
535
+ /**
536
+ * Parse the propertyId from Property resource.
537
+ *
538
+ * @param {string} propertyName
539
+ * A fully-qualified path representing Property resource.
540
+ * @returns {string} A string representing the propertyId.
541
+ */
542
+ matchPropertyIdFromPropertyName(propertyName) {
543
+ return this.pathTemplates.propertyPathTemplate.match(propertyName)
544
+ .propertyId;
545
+ }
253
546
  /**
254
547
  * Terminate the gRPC channel and close the client.
255
548
  *
@@ -261,6 +554,7 @@ class AlphaAnalyticsDataClient {
261
554
  return this.alphaAnalyticsDataStub.then(stub => {
262
555
  this._terminated = true;
263
556
  stub.close();
557
+ this.operationsClient.close();
264
558
  });
265
559
  }
266
560
  return Promise.resolve();
@@ -6,6 +6,9 @@
6
6
  "idempotent": [
7
7
  "DEADLINE_EXCEEDED",
8
8
  "UNAVAILABLE"
9
+ ],
10
+ "unknown": [
11
+ "UNKNOWN"
9
12
  ]
10
13
  },
11
14
  "retry_params": {
@@ -17,6 +20,15 @@
17
20
  "rpc_timeout_multiplier": 1,
18
21
  "max_rpc_timeout_millis": 60000,
19
22
  "total_timeout_millis": 600000
23
+ },
24
+ "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": {
25
+ "initial_retry_delay_millis": 1000,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 60000,
28
+ "initial_rpc_timeout_millis": 60000,
29
+ "rpc_timeout_multiplier": 1,
30
+ "max_rpc_timeout_millis": 60000,
31
+ "total_timeout_millis": 600000
20
32
  }
21
33
  },
22
34
  "methods": {
@@ -24,6 +36,26 @@
24
36
  "timeout_millis": 60000,
25
37
  "retry_codes_name": "non_idempotent",
26
38
  "retry_params_name": "default"
39
+ },
40
+ "CreateAudienceList": {
41
+ "timeout_millis": 60000,
42
+ "retry_codes_name": "unknown",
43
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
44
+ },
45
+ "QueryAudienceList": {
46
+ "timeout_millis": 60000,
47
+ "retry_codes_name": "unknown",
48
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
49
+ },
50
+ "GetAudienceList": {
51
+ "timeout_millis": 60000,
52
+ "retry_codes_name": "unknown",
53
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
54
+ },
55
+ "ListAudienceLists": {
56
+ "timeout_millis": 60000,
57
+ "retry_codes_name": "unknown",
58
+ "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c"
27
59
  }
28
60
  }
29
61
  }
@@ -140,7 +140,7 @@ export declare class BetaAnalyticsDataClient {
140
140
  * response rows for both date ranges. In a cohort request, this `dateRanges`
141
141
  * must be unspecified.
142
142
  * @param {google.analytics.data.v1beta.FilterExpression} request.dimensionFilter
143
- * Dimension filters allow you to ask for only specific dimension values in
143
+ * Dimension filters let you ask for only specific dimension values in
144
144
  * the report. To learn more, see [Fundamentals of Dimension
145
145
  * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
146
146
  * for examples. Metrics cannot be used in this filter.
@@ -159,7 +159,7 @@ export declare class BetaAnalyticsDataClient {
159
159
  * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
160
160
  * @param {number} request.limit
161
161
  * The number of rows to return. If unspecified, 10,000 rows are returned. The
162
- * API returns a maximum of 100,000 rows per request, no matter how many you
162
+ * API returns a maximum of 250,000 rows per request, no matter how many you
163
163
  * ask for. `limit` must be positive.
164
164
  *
165
165
  * The API can also return fewer rows than the requested `limit`, if there
@@ -185,15 +185,21 @@ export declare class BetaAnalyticsDataClient {
185
185
  * If false or unspecified, each row with all metrics equal to 0 will not be
186
186
  * returned. If true, these rows will be returned if they are not separately
187
187
  * removed by a filter.
188
+ *
189
+ * Regardless of this `keep_empty_rows` setting, only data recorded by the
190
+ * Google Analytics (GA4) property can be displayed in a report.
191
+ *
192
+ * For example if a property never logs a `purchase` event, then a query for
193
+ * the `eventName` dimension and `eventCount` metric will not have a row
194
+ * eventName: "purchase" and eventCount: 0.
188
195
  * @param {boolean} request.returnPropertyQuota
189
196
  * Toggles whether to return the current state of this Analytics Property's
190
197
  * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
191
198
  * @param {object} [options]
192
199
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
193
200
  * @returns {Promise} - The promise which resolves to an array.
194
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.RunReportResponse | RunReportResponse}.
195
- * Please see the
196
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
201
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunReportResponse|RunReportResponse}.
202
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
197
203
  * for more details and examples.
198
204
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_report.js</caption>
199
205
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunReport_async
@@ -258,15 +264,21 @@ export declare class BetaAnalyticsDataClient {
258
264
  * If false or unspecified, each row with all metrics equal to 0 will not be
259
265
  * returned. If true, these rows will be returned if they are not separately
260
266
  * removed by a filter.
267
+ *
268
+ * Regardless of this `keep_empty_rows` setting, only data recorded by the
269
+ * Google Analytics (GA4) property can be displayed in a report.
270
+ *
271
+ * For example if a property never logs a `purchase` event, then a query for
272
+ * the `eventName` dimension and `eventCount` metric will not have a row
273
+ * eventName: "purchase" and eventCount: 0.
261
274
  * @param {boolean} request.returnPropertyQuota
262
275
  * Toggles whether to return the current state of this Analytics Property's
263
276
  * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
264
277
  * @param {object} [options]
265
278
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
266
279
  * @returns {Promise} - The promise which resolves to an array.
267
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.RunPivotReportResponse | RunPivotReportResponse}.
268
- * Please see the
269
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
280
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunPivotReportResponse|RunPivotReportResponse}.
281
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
270
282
  * for more details and examples.
271
283
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_pivot_report.js</caption>
272
284
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunPivotReport_async
@@ -300,9 +312,8 @@ export declare class BetaAnalyticsDataClient {
300
312
  * @param {object} [options]
301
313
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
302
314
  * @returns {Promise} - The promise which resolves to an array.
303
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.BatchRunReportsResponse | BatchRunReportsResponse}.
304
- * Please see the
305
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
315
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunReportsResponse|BatchRunReportsResponse}.
316
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
306
317
  * for more details and examples.
307
318
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.batch_run_reports.js</caption>
308
319
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunReports_async
@@ -336,9 +347,8 @@ export declare class BetaAnalyticsDataClient {
336
347
  * @param {object} [options]
337
348
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
338
349
  * @returns {Promise} - The promise which resolves to an array.
339
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.BatchRunPivotReportsResponse | BatchRunPivotReportsResponse}.
340
- * Please see the
341
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
350
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.BatchRunPivotReportsResponse|BatchRunPivotReportsResponse}.
351
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
342
352
  * for more details and examples.
343
353
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js</caption>
344
354
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_BatchRunPivotReports_async
@@ -379,9 +389,8 @@ export declare class BetaAnalyticsDataClient {
379
389
  * @param {object} [options]
380
390
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
381
391
  * @returns {Promise} - The promise which resolves to an array.
382
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.Metadata | Metadata}.
383
- * Please see the
384
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
392
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.Metadata|Metadata}.
393
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
385
394
  * for more details and examples.
386
395
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.get_metadata.js</caption>
387
396
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_GetMetadata_async
@@ -424,7 +433,7 @@ export declare class BetaAnalyticsDataClient {
424
433
  * SQL having-clause. Dimensions cannot be used in this filter.
425
434
  * @param {number} request.limit
426
435
  * The number of rows to return. If unspecified, 10,000 rows are returned. The
427
- * API returns a maximum of 100,000 rows per request, no matter how many you
436
+ * API returns a maximum of 250,000 rows per request, no matter how many you
428
437
  * ask for. `limit` must be positive.
429
438
  *
430
439
  * The API can also return fewer rows than the requested `limit`, if there
@@ -449,9 +458,8 @@ export declare class BetaAnalyticsDataClient {
449
458
  * @param {object} [options]
450
459
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
451
460
  * @returns {Promise} - The promise which resolves to an array.
452
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.RunRealtimeReportResponse | RunRealtimeReportResponse}.
453
- * Please see the
454
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
461
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.RunRealtimeReportResponse|RunRealtimeReportResponse}.
462
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
455
463
  * for more details and examples.
456
464
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.run_realtime_report.js</caption>
457
465
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_RunRealtimeReport_async
@@ -484,10 +492,6 @@ export declare class BetaAnalyticsDataClient {
484
492
  * `property` should be the same value as in your `runReport` request.
485
493
  *
486
494
  * Example: properties/1234
487
- *
488
- * Set the Property ID to 0 for compatibility checking on dimensions and
489
- * metrics common to all properties. In this special mode, this method will
490
- * not return custom dimensions and metrics.
491
495
  * @param {number[]} request.dimensions
492
496
  * The dimensions in this report. `dimensions` should be the same value as in
493
497
  * your `runReport` request.
@@ -507,9 +511,8 @@ export declare class BetaAnalyticsDataClient {
507
511
  * @param {object} [options]
508
512
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
509
513
  * @returns {Promise} - The promise which resolves to an array.
510
- * The first element of the array is an object representing {@link google.analytics.data.v1beta.CheckCompatibilityResponse | CheckCompatibilityResponse}.
511
- * Please see the
512
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
514
+ * The first element of the array is an object representing {@link protos.google.analytics.data.v1beta.CheckCompatibilityResponse|CheckCompatibilityResponse}.
515
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
513
516
  * for more details and examples.
514
517
  * @example <caption>include:samples/generated/v1beta/beta_analytics_data.check_compatibility.js</caption>
515
518
  * region_tag:analyticsdata_v1beta_generated_BetaAnalyticsData_CheckCompatibility_async
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-analytics/data",
3
- "version": "3.2.2",
3
+ "version": "4.0.0",
4
4
  "description": "Data client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,43 +30,42 @@
30
30
  ],
31
31
  "scripts": {
32
32
  "clean": "gts clean",
33
- "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
33
+ "compile": "tsc -p . && cp -r protos build/",
34
34
  "compile-protos": "compileProtos src",
35
35
  "docs": "jsdoc -c .jsdoc.js",
36
36
  "predocs-test": "npm run docs",
37
37
  "docs-test": "linkinator docs",
38
38
  "fix": "gts fix",
39
39
  "lint": "gts check",
40
- "prelint": "cd samples; npm link ../; npm i",
41
40
  "prepare": "npm run compile-protos && npm run compile",
42
- "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test",
43
- "system-test": "npm run compile && c8 mocha build/system-test",
41
+ "prelint": "cd samples; npm link ../; npm i",
42
+ "postpack": "minifyProtoJson",
43
+ "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
44
+ "system-test": "c8 mocha build/system-test",
44
45
  "test": "c8 mocha build/test"
45
46
  },
46
47
  "dependencies": {
47
- "google-gax": "^3.5.8"
48
+ "google-gax": "^4.0.3"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@types/mocha": "^9.0.0",
51
- "@types/node": "^18.0.0",
52
+ "@types/node": "^20.4.5",
52
53
  "@types/sinon": "^10.0.0",
53
- "c8": "^7.2.0",
54
- "gts": "^3.1.0",
54
+ "c8": "^8.0.1",
55
+ "gapic-tools": "^0.1.8",
56
+ "gts": "^5.0.0",
55
57
  "jsdoc": "^4.0.0",
56
58
  "jsdoc-fresh": "^2.0.0",
57
59
  "jsdoc-region-tag": "^2.0.0",
58
- "linkinator": "^4.0.0",
60
+ "linkinator": "4.1.2",
61
+ "long": "^5.2.3",
59
62
  "mocha": "^9.2.2",
60
- "null-loader": "^4.0.0",
61
63
  "pack-n-play": "^1.0.0-2",
62
64
  "sinon": "^15.0.0",
63
- "ts-loader": "^9.0.0",
64
- "typescript": "^4.6.4",
65
- "webpack": "^5.0.0",
66
- "webpack-cli": "^5.0.0"
65
+ "typescript": "^5.1.6"
67
66
  },
68
67
  "engines": {
69
- "node": ">=12.0.0"
68
+ "node": ">=14.0.0"
70
69
  },
71
70
  "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-data"
72
71
  }