@google-analytics/data 5.0.0 → 5.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/data-v5.0.0...data-v5.1.0) (2025-03-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf))
9
+
3
10
  ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.12.1...data-v5.0.0) (2025-03-18)
4
11
 
5
12
 
@@ -1044,7 +1044,7 @@ export declare class AlphaAnalyticsDataClient {
1044
1044
  * // doThingsWith(response)
1045
1045
  * ```
1046
1046
  */
1047
- listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
1047
+ listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;
1048
1048
  /**
1049
1049
  * Starts asynchronous cancellation on a long-running operation. The server
1050
1050
  * makes a best effort to cancel the operation, but success is not
@@ -355,7 +355,9 @@ class AlphaAnalyticsDataClient {
355
355
  this._gaxModule.routingHeader.fromParams({
356
356
  property: request.property ?? '',
357
357
  });
358
- this.initialize();
358
+ this.initialize().catch(err => {
359
+ throw err;
360
+ });
359
361
  this._log.info('runFunnelReport request %j', request);
360
362
  const wrappedCallback = callback
361
363
  ? (error, response, options, rawResponse) => {
@@ -387,7 +389,9 @@ class AlphaAnalyticsDataClient {
387
389
  this._gaxModule.routingHeader.fromParams({
388
390
  name: request.name ?? '',
389
391
  });
390
- this.initialize();
392
+ this.initialize().catch(err => {
393
+ throw err;
394
+ });
391
395
  this._log.info('queryAudienceList request %j', request);
392
396
  const wrappedCallback = callback
393
397
  ? (error, response, options, rawResponse) => {
@@ -419,7 +423,9 @@ class AlphaAnalyticsDataClient {
419
423
  this._gaxModule.routingHeader.fromParams({
420
424
  name: request.name ?? '',
421
425
  });
422
- this.initialize();
426
+ this.initialize().catch(err => {
427
+ throw err;
428
+ });
423
429
  this._log.info('sheetExportAudienceList request %j', request);
424
430
  const wrappedCallback = callback
425
431
  ? (error, response, options, rawResponse) => {
@@ -451,7 +457,9 @@ class AlphaAnalyticsDataClient {
451
457
  this._gaxModule.routingHeader.fromParams({
452
458
  name: request.name ?? '',
453
459
  });
454
- this.initialize();
460
+ this.initialize().catch(err => {
461
+ throw err;
462
+ });
455
463
  this._log.info('getAudienceList request %j', request);
456
464
  const wrappedCallback = callback
457
465
  ? (error, response, options, rawResponse) => {
@@ -483,7 +491,9 @@ class AlphaAnalyticsDataClient {
483
491
  this._gaxModule.routingHeader.fromParams({
484
492
  parent: request.parent ?? '',
485
493
  });
486
- this.initialize();
494
+ this.initialize().catch(err => {
495
+ throw err;
496
+ });
487
497
  this._log.info('createRecurringAudienceList request %j', request);
488
498
  const wrappedCallback = callback
489
499
  ? (error, response, options, rawResponse) => {
@@ -515,7 +525,9 @@ class AlphaAnalyticsDataClient {
515
525
  this._gaxModule.routingHeader.fromParams({
516
526
  name: request.name ?? '',
517
527
  });
518
- this.initialize();
528
+ this.initialize().catch(err => {
529
+ throw err;
530
+ });
519
531
  this._log.info('getRecurringAudienceList request %j', request);
520
532
  const wrappedCallback = callback
521
533
  ? (error, response, options, rawResponse) => {
@@ -547,7 +559,9 @@ class AlphaAnalyticsDataClient {
547
559
  this._gaxModule.routingHeader.fromParams({
548
560
  name: request.name ?? '',
549
561
  });
550
- this.initialize();
562
+ this.initialize().catch(err => {
563
+ throw err;
564
+ });
551
565
  this._log.info('getPropertyQuotasSnapshot request %j', request);
552
566
  const wrappedCallback = callback
553
567
  ? (error, response, options, rawResponse) => {
@@ -579,7 +593,9 @@ class AlphaAnalyticsDataClient {
579
593
  this._gaxModule.routingHeader.fromParams({
580
594
  name: request.name ?? '',
581
595
  });
582
- this.initialize();
596
+ this.initialize().catch(err => {
597
+ throw err;
598
+ });
583
599
  this._log.info('queryReportTask request %j', request);
584
600
  const wrappedCallback = callback
585
601
  ? (error, response, options, rawResponse) => {
@@ -611,7 +627,9 @@ class AlphaAnalyticsDataClient {
611
627
  this._gaxModule.routingHeader.fromParams({
612
628
  name: request.name ?? '',
613
629
  });
614
- this.initialize();
630
+ this.initialize().catch(err => {
631
+ throw err;
632
+ });
615
633
  this._log.info('getReportTask request %j', request);
616
634
  const wrappedCallback = callback
617
635
  ? (error, response, options, rawResponse) => {
@@ -643,7 +661,9 @@ class AlphaAnalyticsDataClient {
643
661
  this._gaxModule.routingHeader.fromParams({
644
662
  parent: request.parent ?? '',
645
663
  });
646
- this.initialize();
664
+ this.initialize().catch(err => {
665
+ throw err;
666
+ });
647
667
  const wrappedCallback = callback
648
668
  ? (error, response, rawResponse, _) => {
649
669
  this._log.info('createAudienceList response %j', rawResponse);
@@ -693,7 +713,9 @@ class AlphaAnalyticsDataClient {
693
713
  this._gaxModule.routingHeader.fromParams({
694
714
  parent: request.parent ?? '',
695
715
  });
696
- this.initialize();
716
+ this.initialize().catch(err => {
717
+ throw err;
718
+ });
697
719
  const wrappedCallback = callback
698
720
  ? (error, response, rawResponse, _) => {
699
721
  this._log.info('createReportTask response %j', rawResponse);
@@ -743,7 +765,9 @@ class AlphaAnalyticsDataClient {
743
765
  this._gaxModule.routingHeader.fromParams({
744
766
  parent: request.parent ?? '',
745
767
  });
746
- this.initialize();
768
+ this.initialize().catch(err => {
769
+ throw err;
770
+ });
747
771
  const wrappedCallback = callback
748
772
  ? (error, values, nextPageRequest, rawResponse) => {
749
773
  this._log.info('listAudienceLists values %j', values);
@@ -798,7 +822,9 @@ class AlphaAnalyticsDataClient {
798
822
  });
799
823
  const defaultCallSettings = this._defaults['listAudienceLists'];
800
824
  const callSettings = defaultCallSettings.merge(options);
801
- this.initialize();
825
+ this.initialize().catch(err => {
826
+ throw err;
827
+ });
802
828
  this._log.info('listAudienceLists stream %j', request);
803
829
  return this.descriptors.page.listAudienceLists.createStream(this.innerApiCalls.listAudienceLists, request, callSettings);
804
830
  }
@@ -845,7 +871,9 @@ class AlphaAnalyticsDataClient {
845
871
  });
846
872
  const defaultCallSettings = this._defaults['listAudienceLists'];
847
873
  const callSettings = defaultCallSettings.merge(options);
848
- this.initialize();
874
+ this.initialize().catch(err => {
875
+ throw err;
876
+ });
849
877
  this._log.info('listAudienceLists iterate %j', request);
850
878
  return this.descriptors.page.listAudienceLists.asyncIterate(this.innerApiCalls['listAudienceLists'], request, callSettings);
851
879
  }
@@ -866,7 +894,9 @@ class AlphaAnalyticsDataClient {
866
894
  this._gaxModule.routingHeader.fromParams({
867
895
  parent: request.parent ?? '',
868
896
  });
869
- this.initialize();
897
+ this.initialize().catch(err => {
898
+ throw err;
899
+ });
870
900
  const wrappedCallback = callback
871
901
  ? (error, values, nextPageRequest, rawResponse) => {
872
902
  this._log.info('listRecurringAudienceLists values %j', values);
@@ -923,7 +953,9 @@ class AlphaAnalyticsDataClient {
923
953
  });
924
954
  const defaultCallSettings = this._defaults['listRecurringAudienceLists'];
925
955
  const callSettings = defaultCallSettings.merge(options);
926
- this.initialize();
956
+ this.initialize().catch(err => {
957
+ throw err;
958
+ });
927
959
  this._log.info('listRecurringAudienceLists stream %j', request);
928
960
  return this.descriptors.page.listRecurringAudienceLists.createStream(this.innerApiCalls.listRecurringAudienceLists, request, callSettings);
929
961
  }
@@ -972,7 +1004,9 @@ class AlphaAnalyticsDataClient {
972
1004
  });
973
1005
  const defaultCallSettings = this._defaults['listRecurringAudienceLists'];
974
1006
  const callSettings = defaultCallSettings.merge(options);
975
- this.initialize();
1007
+ this.initialize().catch(err => {
1008
+ throw err;
1009
+ });
976
1010
  this._log.info('listRecurringAudienceLists iterate %j', request);
977
1011
  return this.descriptors.page.listRecurringAudienceLists.asyncIterate(this.innerApiCalls['listRecurringAudienceLists'], request, callSettings);
978
1012
  }
@@ -993,7 +1027,9 @@ class AlphaAnalyticsDataClient {
993
1027
  this._gaxModule.routingHeader.fromParams({
994
1028
  parent: request.parent ?? '',
995
1029
  });
996
- this.initialize();
1030
+ this.initialize().catch(err => {
1031
+ throw err;
1032
+ });
997
1033
  const wrappedCallback = callback
998
1034
  ? (error, values, nextPageRequest, rawResponse) => {
999
1035
  this._log.info('listReportTasks values %j', values);
@@ -1042,7 +1078,9 @@ class AlphaAnalyticsDataClient {
1042
1078
  });
1043
1079
  const defaultCallSettings = this._defaults['listReportTasks'];
1044
1080
  const callSettings = defaultCallSettings.merge(options);
1045
- this.initialize();
1081
+ this.initialize().catch(err => {
1082
+ throw err;
1083
+ });
1046
1084
  this._log.info('listReportTasks stream %j', request);
1047
1085
  return this.descriptors.page.listReportTasks.createStream(this.innerApiCalls.listReportTasks, request, callSettings);
1048
1086
  }
@@ -1083,7 +1121,9 @@ class AlphaAnalyticsDataClient {
1083
1121
  });
1084
1122
  const defaultCallSettings = this._defaults['listReportTasks'];
1085
1123
  const callSettings = defaultCallSettings.merge(options);
1086
- this.initialize();
1124
+ this.initialize().catch(err => {
1125
+ throw err;
1126
+ });
1087
1127
  this._log.info('listReportTasks iterate %j', request);
1088
1128
  return this.descriptors.page.listReportTasks.asyncIterate(this.innerApiCalls['listReportTasks'], request, callSettings);
1089
1129
  }
@@ -886,7 +886,7 @@ export declare class BetaAnalyticsDataClient {
886
886
  * // doThingsWith(response)
887
887
  * ```
888
888
  */
889
- listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
889
+ listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;
890
890
  /**
891
891
  * Starts asynchronous cancellation on a long-running operation. The server
892
892
  * makes a best effort to cancel the operation, but success is not
@@ -341,7 +341,9 @@ class BetaAnalyticsDataClient {
341
341
  this._gaxModule.routingHeader.fromParams({
342
342
  property: request.property ?? '',
343
343
  });
344
- this.initialize();
344
+ this.initialize().catch(err => {
345
+ throw err;
346
+ });
345
347
  this._log.info('runReport request %j', request);
346
348
  const wrappedCallback = callback
347
349
  ? (error, response, options, rawResponse) => {
@@ -373,7 +375,9 @@ class BetaAnalyticsDataClient {
373
375
  this._gaxModule.routingHeader.fromParams({
374
376
  property: request.property ?? '',
375
377
  });
376
- this.initialize();
378
+ this.initialize().catch(err => {
379
+ throw err;
380
+ });
377
381
  this._log.info('runPivotReport request %j', request);
378
382
  const wrappedCallback = callback
379
383
  ? (error, response, options, rawResponse) => {
@@ -405,7 +409,9 @@ class BetaAnalyticsDataClient {
405
409
  this._gaxModule.routingHeader.fromParams({
406
410
  property: request.property ?? '',
407
411
  });
408
- this.initialize();
412
+ this.initialize().catch(err => {
413
+ throw err;
414
+ });
409
415
  this._log.info('batchRunReports request %j', request);
410
416
  const wrappedCallback = callback
411
417
  ? (error, response, options, rawResponse) => {
@@ -437,7 +443,9 @@ class BetaAnalyticsDataClient {
437
443
  this._gaxModule.routingHeader.fromParams({
438
444
  property: request.property ?? '',
439
445
  });
440
- this.initialize();
446
+ this.initialize().catch(err => {
447
+ throw err;
448
+ });
441
449
  this._log.info('batchRunPivotReports request %j', request);
442
450
  const wrappedCallback = callback
443
451
  ? (error, response, options, rawResponse) => {
@@ -469,7 +477,9 @@ class BetaAnalyticsDataClient {
469
477
  this._gaxModule.routingHeader.fromParams({
470
478
  name: request.name ?? '',
471
479
  });
472
- this.initialize();
480
+ this.initialize().catch(err => {
481
+ throw err;
482
+ });
473
483
  this._log.info('getMetadata request %j', request);
474
484
  const wrappedCallback = callback
475
485
  ? (error, response, options, rawResponse) => {
@@ -501,7 +511,9 @@ class BetaAnalyticsDataClient {
501
511
  this._gaxModule.routingHeader.fromParams({
502
512
  property: request.property ?? '',
503
513
  });
504
- this.initialize();
514
+ this.initialize().catch(err => {
515
+ throw err;
516
+ });
505
517
  this._log.info('runRealtimeReport request %j', request);
506
518
  const wrappedCallback = callback
507
519
  ? (error, response, options, rawResponse) => {
@@ -533,7 +545,9 @@ class BetaAnalyticsDataClient {
533
545
  this._gaxModule.routingHeader.fromParams({
534
546
  property: request.property ?? '',
535
547
  });
536
- this.initialize();
548
+ this.initialize().catch(err => {
549
+ throw err;
550
+ });
537
551
  this._log.info('checkCompatibility request %j', request);
538
552
  const wrappedCallback = callback
539
553
  ? (error, response, options, rawResponse) => {
@@ -565,7 +579,9 @@ class BetaAnalyticsDataClient {
565
579
  this._gaxModule.routingHeader.fromParams({
566
580
  name: request.name ?? '',
567
581
  });
568
- this.initialize();
582
+ this.initialize().catch(err => {
583
+ throw err;
584
+ });
569
585
  this._log.info('queryAudienceExport request %j', request);
570
586
  const wrappedCallback = callback
571
587
  ? (error, response, options, rawResponse) => {
@@ -597,7 +613,9 @@ class BetaAnalyticsDataClient {
597
613
  this._gaxModule.routingHeader.fromParams({
598
614
  name: request.name ?? '',
599
615
  });
600
- this.initialize();
616
+ this.initialize().catch(err => {
617
+ throw err;
618
+ });
601
619
  this._log.info('getAudienceExport request %j', request);
602
620
  const wrappedCallback = callback
603
621
  ? (error, response, options, rawResponse) => {
@@ -629,7 +647,9 @@ class BetaAnalyticsDataClient {
629
647
  this._gaxModule.routingHeader.fromParams({
630
648
  parent: request.parent ?? '',
631
649
  });
632
- this.initialize();
650
+ this.initialize().catch(err => {
651
+ throw err;
652
+ });
633
653
  const wrappedCallback = callback
634
654
  ? (error, response, rawResponse, _) => {
635
655
  this._log.info('createAudienceExport response %j', rawResponse);
@@ -679,7 +699,9 @@ class BetaAnalyticsDataClient {
679
699
  this._gaxModule.routingHeader.fromParams({
680
700
  parent: request.parent ?? '',
681
701
  });
682
- this.initialize();
702
+ this.initialize().catch(err => {
703
+ throw err;
704
+ });
683
705
  const wrappedCallback = callback
684
706
  ? (error, values, nextPageRequest, rawResponse) => {
685
707
  this._log.info('listAudienceExports values %j', values);
@@ -734,7 +756,9 @@ class BetaAnalyticsDataClient {
734
756
  });
735
757
  const defaultCallSettings = this._defaults['listAudienceExports'];
736
758
  const callSettings = defaultCallSettings.merge(options);
737
- this.initialize();
759
+ this.initialize().catch(err => {
760
+ throw err;
761
+ });
738
762
  this._log.info('listAudienceExports stream %j', request);
739
763
  return this.descriptors.page.listAudienceExports.createStream(this.innerApiCalls.listAudienceExports, request, callSettings);
740
764
  }
@@ -781,7 +805,9 @@ class BetaAnalyticsDataClient {
781
805
  });
782
806
  const defaultCallSettings = this._defaults['listAudienceExports'];
783
807
  const callSettings = defaultCallSettings.merge(options);
784
- this.initialize();
808
+ this.initialize().catch(err => {
809
+ throw err;
810
+ });
785
811
  this._log.info('listAudienceExports iterate %j', request);
786
812
  return this.descriptors.page.listAudienceExports.asyncIterate(this.innerApiCalls['listAudienceExports'], request, callSettings);
787
813
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-analytics/data",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Data client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,7 +45,7 @@
45
45
  "test": "c8 mocha build/test"
46
46
  },
47
47
  "dependencies": {
48
- "google-gax": "^5.0.0-rc.0"
48
+ "google-gax": "^5.0.1-rc.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/mocha": "^10.0.10",