@bringg/dashboard-sdk 9.41.1 → 9.41.2-pre

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.
@@ -541,8 +541,14 @@ var AnalyticsReportsApi = /** @class */ (function () {
541
541
  AnalyticsReportsApi.prototype.getReport = function (reportId) {
542
542
  return this.analyticsReportsEntity.getReport(reportId);
543
543
  };
544
- AnalyticsReportsApi.prototype.deleteReport = function (reportId) {
545
- return this.analyticsReportsEntity.deleteReport(reportId);
544
+ AnalyticsReportsApi.prototype.createUserReport = function (report) {
545
+ return this.analyticsReportsEntity.createUserReport(report);
546
+ };
547
+ AnalyticsReportsApi.prototype.updateUserReport = function (reportId, report) {
548
+ return this.analyticsReportsEntity.updateUserReport(reportId, report);
549
+ };
550
+ AnalyticsReportsApi.prototype.deleteUserReport = function (reportId) {
551
+ return this.analyticsReportsEntity.deleteUserReport(reportId);
546
552
  };
547
553
  AnalyticsReportsApi.prototype.getUserReports = function (queryString) {
548
554
  return this.analyticsReportsEntity.getUserReports(queryString);
@@ -571,16 +577,29 @@ var AnalyticsReportsApi = /** @class */ (function () {
571
577
  AnalyticsReportsApi.prototype.getActiveReportExecutions = function () {
572
578
  return this.analyticsReportsEntity.getActiveReportExecutions();
573
579
  };
574
- AnalyticsReportsApi.prototype.exportReport = function (reportId, queryParams) {
575
- return this.analyticsReportsEntity.exportReport(reportId, queryParams);
580
+ AnalyticsReportsApi.prototype.exportUserReport = function (reportId, queryParams) {
581
+ return this.analyticsReportsEntity.exportUserReport(reportId, queryParams);
576
582
  };
577
- AnalyticsReportsApi.prototype.downloadReport = function (reportId, queryParams) {
578
- return this.analyticsReportsEntity.downloadReport(reportId, queryParams);
583
+ AnalyticsReportsApi.prototype.exportSystemReport = function (reportId, queryParams) {
584
+ return this.analyticsReportsEntity.exportSystemReport(reportId, queryParams);
579
585
  };
580
- AnalyticsReportsApi.prototype.retryReportExecution = function (executionId) {
586
+ AnalyticsReportsApi.prototype.downloadUserReport = function (reportId, queryParams) {
587
+ return this.analyticsReportsEntity.downloadUserReport(reportId, queryParams);
588
+ };
589
+ AnalyticsReportsApi.prototype.downloadSystemReport = function (reportId, queryParams) {
590
+ return this.analyticsReportsEntity.downloadSystemReport(reportId, queryParams);
591
+ };
592
+ AnalyticsReportsApi.prototype.retryUserReportExecution = function (executionId) {
581
593
  return __awaiter(this, void 0, void 0, function () {
582
594
  return __generator(this, function (_a) {
583
- return [2 /*return*/, this.analyticsReportsEntity.retryReportExecutions(executionId)];
595
+ return [2 /*return*/, this.analyticsReportsEntity.retryUserReportExecutions(executionId)];
596
+ });
597
+ });
598
+ };
599
+ AnalyticsReportsApi.prototype.retrySystemReportExecution = function (executionId) {
600
+ return __awaiter(this, void 0, void 0, function () {
601
+ return __generator(this, function (_a) {
602
+ return [2 /*return*/, this.analyticsReportsEntity.retrySystemReportExecutions(executionId)];
584
603
  });
585
604
  });
586
605
  };
@@ -597,17 +616,51 @@ var AnalyticsReportsApi = /** @class */ (function () {
597
616
  AnalyticsReportsApi.prototype.unsubscribeReportExecutions = function () {
598
617
  this.analyticsReportsEntity.unsubscribeReportExecutions();
599
618
  };
619
+ AnalyticsReportsApi.prototype.getReportRowsCount = function (queryJson, timezone) {
620
+ return this.analyticsReportsEntity.getReportRowsCount(queryJson, timezone);
621
+ };
622
+ AnalyticsReportsApi.prototype.optOutReport = function (reportId) {
623
+ return this.analyticsReportsEntity.optOutReport(reportId);
624
+ };
625
+ /**
626
+ * @deprecated Use createUserReport() instead
627
+ */
600
628
  AnalyticsReportsApi.prototype.createReport = function (report) {
601
629
  return this.analyticsReportsEntity.createReport(report);
602
630
  };
631
+ /**
632
+ * @deprecated Use updateUserReport() instead
633
+ */
603
634
  AnalyticsReportsApi.prototype.updateReport = function (reportId, report) {
604
635
  return this.analyticsReportsEntity.updateReport(reportId, report);
605
636
  };
606
- AnalyticsReportsApi.prototype.getReportRowsCount = function (queryJson, timezone) {
607
- return this.analyticsReportsEntity.getReportRowsCount(queryJson, timezone);
637
+ /**
638
+ * @deprecated Use deleteUserReport() instead
639
+ */
640
+ AnalyticsReportsApi.prototype.deleteReport = function (reportId) {
641
+ return this.analyticsReportsEntity.deleteReport(reportId);
608
642
  };
609
- AnalyticsReportsApi.prototype.optOutReport = function (reportId) {
610
- return this.analyticsReportsEntity.optOutReport(reportId);
643
+ /**
644
+ * @deprecated Use exportUserReport() or exportSystemReport() instead
645
+ */
646
+ AnalyticsReportsApi.prototype.exportReport = function (reportId, queryParams) {
647
+ return this.analyticsReportsEntity.exportReport(reportId, queryParams);
648
+ };
649
+ /**
650
+ * @deprecated Use downloadUserReport() or downloadSystemReport() instead
651
+ */
652
+ AnalyticsReportsApi.prototype.downloadReport = function (reportId, queryParams) {
653
+ return this.analyticsReportsEntity.downloadReport(reportId, queryParams);
654
+ };
655
+ /**
656
+ * @deprecated Use retryUserReportExecutions() or retrySystemReportExecutions() instead
657
+ */
658
+ AnalyticsReportsApi.prototype.retryReportExecution = function (executionId) {
659
+ return __awaiter(this, void 0, void 0, function () {
660
+ return __generator(this, function (_a) {
661
+ return [2 /*return*/, this.analyticsReportsEntity.retryReportExecutions(executionId)];
662
+ });
663
+ });
611
664
  };
612
665
  return AnalyticsReportsApi;
613
666
  }());
@@ -687,30 +740,41 @@ var createRoute = function (route, version) {
687
740
  if (version === void 0) { version = Version.v1; }
688
741
  return "".concat(BaseRoute, "/").concat(version).concat(route);
689
742
  };
690
- var Routes = {
691
- GET_USER_REPORTS: createRoute('/reports'),
692
- GET_SYSTEM_REPORTS: createRoute('/system-reports'),
693
- GET_REPORT: createRoute('/reports/{:reportId}'),
743
+ var DeprecatedRoutes = {
694
744
  CREATE_REPORT: createRoute('/reports'),
695
745
  UPDATE_REPORT: createRoute('/reports/{:reportId}'),
696
746
  DELETE_REPORT: createRoute('/reports/{:reportId}'),
747
+ START_EXPORT_REPORT: createRoute('/reports/{:reportId}/start-export'),
748
+ START_DOWNLOAD_REPORT: createRoute('/reports/{:reportId}/start-download'),
749
+ RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry')
750
+ };
751
+ var Routes = {
752
+ GET_USER_REPORTS: createRoute('/user-reports'),
753
+ CREATE_USER_REPORT: createRoute('/user-reports'),
754
+ UPDATE_USER_REPORT: createRoute('/user-reports/{:reportId}'),
755
+ DELETE_USER_REPORT: createRoute('/user-reports/{:reportId}'),
756
+ START_EXPORT_USER_REPORT: createRoute('/user-reports/{:reportId}/start-export'),
757
+ START_DOWNLOAD_USER_REPORT: createRoute('/user-reports/{:reportId}/start-download'),
758
+ OPT_OUT_SHARES: createRoute('/user-reports/{:reportId}/opt-out'),
759
+ GET_SYSTEM_REPORTS: createRoute('/system-reports'),
760
+ START_EXPORT_SYSTEM_REPORT: createRoute('/system-reports/{:reportId}/start-export'),
761
+ START_DOWNLOAD_SYSTEM_REPORT: createRoute('/system-reports/{:reportId}/start-download'),
697
762
  CREATE_SCHEDULE_JOB: createRoute('/scheduled-jobs'),
698
763
  UPDATE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
699
764
  GET_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
700
765
  DELETE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
701
766
  IS_WEBHOOK_USED_IN_SCHEDULED_JOBS: createRoute('/scheduled-jobs/webhook/{:webhookUuid}/is-used'),
702
- GET_API_LINK: createRoute('/api-link'),
703
- START_EXPORT_REPORT: createRoute('/reports/{:reportId}/start-export'),
704
- START_DOWNLOAD_REPORT: createRoute('/reports/{:reportId}/start-download'),
705
767
  GET_ACTIVE_REPORT_EXECUTIONS: createRoute('/report-executions/active'),
706
- RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry'),
707
768
  REMOVE_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}'),
708
- GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count'),
769
+ RETRY_USER_REPORT_EXECUTION: createRoute('/report-executions/user/{:executionId}/retry'),
770
+ RETRY_SYSTEM_REPORT_EXECUTION: createRoute('/report-executions/system/{:executionId}/retry'),
709
771
  SHARE_REPORT: createRoute('/reports/{:reportId}/shares'),
710
772
  UPDATE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),
711
773
  DELETE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),
712
774
  DELETE_ALL_REPORT_SHARES: createRoute('/reports/{:reportId}/shares'),
713
- OPT_OUT_SHARES: createRoute('/reports/{:reportId}/opt-out')
775
+ GET_REPORT: createRoute('/reports/{:reportId}'),
776
+ GET_API_LINK: createRoute('/api-link'),
777
+ GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count')
714
778
  };
715
779
  var AnalyticsReportsEntity = /** @class */ (function (_super) {
716
780
  __extends(AnalyticsReportsEntity, _super);
@@ -730,34 +794,37 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
730
794
  });
731
795
  });
732
796
  };
733
- AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {
797
+ AnalyticsReportsEntity.prototype.createUserReport = function (report) {
734
798
  return __awaiter(this, void 0, void 0, function () {
735
799
  return __generator(this, function (_a) {
736
800
  switch (_a.label) {
737
- case 0: return [4 /*yield*/, this.service.routeGenerator.delete(Routes.DELETE_REPORT).withRouteParams({ reportId: reportId }).invoke()];
801
+ case 0: return [4 /*yield*/, this.service.routeGenerator.post(Routes.CREATE_USER_REPORT).withPayload(report).invoke()];
738
802
  case 1: return [2 /*return*/, _a.sent()];
739
803
  }
740
804
  });
741
805
  });
742
806
  };
743
- AnalyticsReportsEntity.prototype.createReport = function (report) {
807
+ AnalyticsReportsEntity.prototype.updateUserReport = function (reportId, report) {
744
808
  return __awaiter(this, void 0, void 0, function () {
745
809
  return __generator(this, function (_a) {
746
810
  switch (_a.label) {
747
- case 0: return [4 /*yield*/, this.service.routeGenerator.post(Routes.CREATE_REPORT).withPayload(report).invoke()];
811
+ case 0: return [4 /*yield*/, this.service.routeGenerator
812
+ .put(Routes.UPDATE_USER_REPORT)
813
+ .withRouteParams({ reportId: reportId })
814
+ .withPayload(report)
815
+ .invoke()];
748
816
  case 1: return [2 /*return*/, _a.sent()];
749
817
  }
750
818
  });
751
819
  });
752
820
  };
753
- AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {
821
+ AnalyticsReportsEntity.prototype.deleteUserReport = function (reportId) {
754
822
  return __awaiter(this, void 0, void 0, function () {
755
823
  return __generator(this, function (_a) {
756
824
  switch (_a.label) {
757
825
  case 0: return [4 /*yield*/, this.service.routeGenerator
758
- .put(Routes.UPDATE_REPORT)
826
+ .delete(Routes.DELETE_USER_REPORT)
759
827
  .withRouteParams({ reportId: reportId })
760
- .withPayload(report)
761
828
  .invoke()];
762
829
  case 1: return [2 /*return*/, _a.sent()];
763
830
  }
@@ -851,12 +918,12 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
851
918
  });
852
919
  });
853
920
  };
854
- AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {
921
+ AnalyticsReportsEntity.prototype.exportUserReport = function (reportId, queryParams) {
855
922
  return __awaiter(this, void 0, void 0, function () {
856
923
  return __generator(this, function (_a) {
857
924
  switch (_a.label) {
858
925
  case 0: return [4 /*yield*/, this.service.routeGenerator
859
- .post(Routes.START_EXPORT_REPORT)
926
+ .post(Routes.START_EXPORT_USER_REPORT)
860
927
  .withRouteParams({ reportId: reportId })
861
928
  .withPayload(queryParams)
862
929
  .invoke()];
@@ -865,12 +932,40 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
865
932
  });
866
933
  });
867
934
  };
868
- AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {
935
+ AnalyticsReportsEntity.prototype.exportSystemReport = function (reportId, queryParams) {
936
+ return __awaiter(this, void 0, void 0, function () {
937
+ return __generator(this, function (_a) {
938
+ switch (_a.label) {
939
+ case 0: return [4 /*yield*/, this.service.routeGenerator
940
+ .post(Routes.START_EXPORT_SYSTEM_REPORT)
941
+ .withRouteParams({ reportId: reportId })
942
+ .withPayload(queryParams)
943
+ .invoke()];
944
+ case 1: return [2 /*return*/, _a.sent()];
945
+ }
946
+ });
947
+ });
948
+ };
949
+ AnalyticsReportsEntity.prototype.downloadUserReport = function (reportId, queryParams) {
950
+ return __awaiter(this, void 0, void 0, function () {
951
+ return __generator(this, function (_a) {
952
+ switch (_a.label) {
953
+ case 0: return [4 /*yield*/, this.service.routeGenerator
954
+ .post(Routes.START_DOWNLOAD_USER_REPORT)
955
+ .withRouteParams({ reportId: reportId })
956
+ .withPayload(queryParams)
957
+ .invoke()];
958
+ case 1: return [2 /*return*/, _a.sent()];
959
+ }
960
+ });
961
+ });
962
+ };
963
+ AnalyticsReportsEntity.prototype.downloadSystemReport = function (reportId, queryParams) {
869
964
  return __awaiter(this, void 0, void 0, function () {
870
965
  return __generator(this, function (_a) {
871
966
  switch (_a.label) {
872
967
  case 0: return [4 /*yield*/, this.service.routeGenerator
873
- .post(Routes.START_DOWNLOAD_REPORT)
968
+ .post(Routes.START_DOWNLOAD_SYSTEM_REPORT)
874
969
  .withRouteParams({ reportId: reportId })
875
970
  .withPayload(queryParams)
876
971
  .invoke()];
@@ -895,12 +990,25 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
895
990
  AnalyticsReportsEntity.prototype.unsubscribeReportExecutions = function () {
896
991
  this.service.session.persistentConnection.unsubscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'));
897
992
  };
898
- AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {
993
+ AnalyticsReportsEntity.prototype.retryUserReportExecutions = function (executionId) {
899
994
  return __awaiter(this, void 0, void 0, function () {
900
995
  return __generator(this, function (_a) {
901
996
  switch (_a.label) {
902
997
  case 0: return [4 /*yield*/, this.service.routeGenerator
903
- .post(Routes.RETRY_EXECUTION_REPORT)
998
+ .post(Routes.RETRY_USER_REPORT_EXECUTION)
999
+ .withRouteParams({ executionId: executionId })
1000
+ .invoke()];
1001
+ case 1: return [2 /*return*/, _a.sent()];
1002
+ }
1003
+ });
1004
+ });
1005
+ };
1006
+ AnalyticsReportsEntity.prototype.retrySystemReportExecutions = function (executionId) {
1007
+ return __awaiter(this, void 0, void 0, function () {
1008
+ return __generator(this, function (_a) {
1009
+ switch (_a.label) {
1010
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1011
+ .post(Routes.RETRY_SYSTEM_REPORT_EXECUTION)
904
1012
  .withRouteParams({ executionId: executionId })
905
1013
  .invoke()];
906
1014
  case 1: return [2 /*return*/, _a.sent()];
@@ -944,6 +1052,102 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
944
1052
  });
945
1053
  });
946
1054
  };
1055
+ /**
1056
+ * @deprecated Use createUserReport() instead
1057
+ */
1058
+ AnalyticsReportsEntity.prototype.createReport = function (report) {
1059
+ return __awaiter(this, void 0, void 0, function () {
1060
+ return __generator(this, function (_a) {
1061
+ switch (_a.label) {
1062
+ case 0: return [4 /*yield*/, this.service.routeGenerator.post(DeprecatedRoutes.CREATE_REPORT).withPayload(report).invoke()];
1063
+ case 1: return [2 /*return*/, _a.sent()];
1064
+ }
1065
+ });
1066
+ });
1067
+ };
1068
+ /**
1069
+ * @deprecated Use updateUserReport() instead
1070
+ */
1071
+ AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {
1072
+ return __awaiter(this, void 0, void 0, function () {
1073
+ return __generator(this, function (_a) {
1074
+ switch (_a.label) {
1075
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1076
+ .put(DeprecatedRoutes.UPDATE_REPORT)
1077
+ .withRouteParams({ reportId: reportId })
1078
+ .withPayload(report)
1079
+ .invoke()];
1080
+ case 1: return [2 /*return*/, _a.sent()];
1081
+ }
1082
+ });
1083
+ });
1084
+ };
1085
+ /**
1086
+ * @deprecated Use deleteUserReport() instead
1087
+ */
1088
+ AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {
1089
+ return __awaiter(this, void 0, void 0, function () {
1090
+ return __generator(this, function (_a) {
1091
+ switch (_a.label) {
1092
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1093
+ .delete(DeprecatedRoutes.DELETE_REPORT)
1094
+ .withRouteParams({ reportId: reportId })
1095
+ .invoke()];
1096
+ case 1: return [2 /*return*/, _a.sent()];
1097
+ }
1098
+ });
1099
+ });
1100
+ };
1101
+ /**
1102
+ * @deprecated Use exportUserReport() or exportSystemReport() instead
1103
+ */
1104
+ AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {
1105
+ return __awaiter(this, void 0, void 0, function () {
1106
+ return __generator(this, function (_a) {
1107
+ switch (_a.label) {
1108
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1109
+ .post(DeprecatedRoutes.START_EXPORT_REPORT)
1110
+ .withRouteParams({ reportId: reportId })
1111
+ .withPayload(queryParams)
1112
+ .invoke()];
1113
+ case 1: return [2 /*return*/, _a.sent()];
1114
+ }
1115
+ });
1116
+ });
1117
+ };
1118
+ /**
1119
+ * @deprecated Use downloadUserReport() or downloadSystemReport() instead
1120
+ */
1121
+ AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {
1122
+ return __awaiter(this, void 0, void 0, function () {
1123
+ return __generator(this, function (_a) {
1124
+ switch (_a.label) {
1125
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1126
+ .post(DeprecatedRoutes.START_DOWNLOAD_REPORT)
1127
+ .withRouteParams({ reportId: reportId })
1128
+ .withPayload(queryParams)
1129
+ .invoke()];
1130
+ case 1: return [2 /*return*/, _a.sent()];
1131
+ }
1132
+ });
1133
+ });
1134
+ };
1135
+ /**
1136
+ * @deprecated Use retryUserReportExecutions() or retrySystemReportExecutions() instead
1137
+ */
1138
+ AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {
1139
+ return __awaiter(this, void 0, void 0, function () {
1140
+ return __generator(this, function (_a) {
1141
+ switch (_a.label) {
1142
+ case 0: return [4 /*yield*/, this.service.routeGenerator
1143
+ .post(DeprecatedRoutes.RETRY_EXECUTION_REPORT)
1144
+ .withRouteParams({ executionId: executionId })
1145
+ .invoke()];
1146
+ case 1: return [2 /*return*/, _a.sent()];
1147
+ }
1148
+ });
1149
+ });
1150
+ };
947
1151
  return AnalyticsReportsEntity;
948
1152
  }(Entity_1.default));
949
1153
  exports["default"] = AnalyticsReportsEntity;
@@ -22711,7 +22915,7 @@ var lodash_1 = __webpack_require__(96486);
22711
22915
  var BringgException_1 = __webpack_require__(43605);
22712
22916
  var Logger_1 = __importDefault(__webpack_require__(55860));
22713
22917
  var abort_1 = __webpack_require__(34179);
22714
- var version = '9.41.1';
22918
+ var version = '9.41.2-pre';
22715
22919
  function logErrorResponse(response) {
22716
22920
  var data = response.data, status = response.status;
22717
22921
  try {