@bringg/dashboard-sdk 9.42.0 → 9.43.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.
@@ -541,9 +541,6 @@ 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);
546
- };
547
544
  AnalyticsReportsApi.prototype.getUserReports = function (queryString) {
548
545
  return this.analyticsReportsEntity.getUserReports(queryString);
549
546
  };
@@ -571,19 +568,6 @@ var AnalyticsReportsApi = /** @class */ (function () {
571
568
  AnalyticsReportsApi.prototype.getActiveReportExecutions = function () {
572
569
  return this.analyticsReportsEntity.getActiveReportExecutions();
573
570
  };
574
- AnalyticsReportsApi.prototype.exportReport = function (reportId, queryParams) {
575
- return this.analyticsReportsEntity.exportReport(reportId, queryParams);
576
- };
577
- AnalyticsReportsApi.prototype.downloadReport = function (reportId, queryParams) {
578
- return this.analyticsReportsEntity.downloadReport(reportId, queryParams);
579
- };
580
- AnalyticsReportsApi.prototype.retryReportExecution = function (executionId) {
581
- return __awaiter(this, void 0, void 0, function () {
582
- return __generator(this, function (_a) {
583
- return [2 /*return*/, this.analyticsReportsEntity.retryReportExecutions(executionId)];
584
- });
585
- });
586
- };
587
571
  AnalyticsReportsApi.prototype.removeReportExecution = function (executionId) {
588
572
  return __awaiter(this, void 0, void 0, function () {
589
573
  return __generator(this, function (_a) {
@@ -597,17 +581,51 @@ var AnalyticsReportsApi = /** @class */ (function () {
597
581
  AnalyticsReportsApi.prototype.unsubscribeReportExecutions = function () {
598
582
  this.analyticsReportsEntity.unsubscribeReportExecutions();
599
583
  };
584
+ AnalyticsReportsApi.prototype.getReportRowsCount = function (queryJson, timezone) {
585
+ return this.analyticsReportsEntity.getReportRowsCount(queryJson, timezone);
586
+ };
587
+ AnalyticsReportsApi.prototype.optOutReport = function (reportId) {
588
+ return this.analyticsReportsEntity.optOutReport(reportId);
589
+ };
590
+ /**
591
+ * @deprecated
592
+ */
600
593
  AnalyticsReportsApi.prototype.createReport = function (report) {
601
594
  return this.analyticsReportsEntity.createReport(report);
602
595
  };
596
+ /**
597
+ * @deprecated
598
+ */
603
599
  AnalyticsReportsApi.prototype.updateReport = function (reportId, report) {
604
600
  return this.analyticsReportsEntity.updateReport(reportId, report);
605
601
  };
606
- AnalyticsReportsApi.prototype.getReportRowsCount = function (queryJson, timezone) {
607
- return this.analyticsReportsEntity.getReportRowsCount(queryJson, timezone);
602
+ /**
603
+ * @deprecated
604
+ */
605
+ AnalyticsReportsApi.prototype.deleteReport = function (reportId) {
606
+ return this.analyticsReportsEntity.deleteReport(reportId);
608
607
  };
609
- AnalyticsReportsApi.prototype.optOutReport = function (reportId) {
610
- return this.analyticsReportsEntity.optOutReport(reportId);
608
+ /**
609
+ * @deprecated
610
+ */
611
+ AnalyticsReportsApi.prototype.exportReport = function (reportId, queryParams) {
612
+ return this.analyticsReportsEntity.exportReport(reportId, queryParams);
613
+ };
614
+ /**
615
+ * @deprecated
616
+ */
617
+ AnalyticsReportsApi.prototype.downloadReport = function (reportId, queryParams) {
618
+ return this.analyticsReportsEntity.downloadReport(reportId, queryParams);
619
+ };
620
+ /**
621
+ * @deprecated
622
+ */
623
+ AnalyticsReportsApi.prototype.retryReportExecution = function (executionId) {
624
+ return __awaiter(this, void 0, void 0, function () {
625
+ return __generator(this, function (_a) {
626
+ return [2 /*return*/, this.analyticsReportsEntity.retryReportExecutions(executionId)];
627
+ });
628
+ });
611
629
  };
612
630
  return AnalyticsReportsApi;
613
631
  }());
@@ -687,30 +705,34 @@ var createRoute = function (route, version) {
687
705
  if (version === void 0) { version = Version.v1; }
688
706
  return "".concat(BaseRoute, "/").concat(version).concat(route);
689
707
  };
690
- var Routes = {
691
- GET_USER_REPORTS: createRoute('/reports'),
692
- GET_SYSTEM_REPORTS: createRoute('/system-reports'),
693
- GET_REPORT: createRoute('/reports/{:reportId}'),
708
+ var DeprecatedRoutes = {
694
709
  CREATE_REPORT: createRoute('/reports'),
695
710
  UPDATE_REPORT: createRoute('/reports/{:reportId}'),
696
711
  DELETE_REPORT: createRoute('/reports/{:reportId}'),
712
+ START_EXPORT_REPORT: createRoute('/reports/{:reportId}/start-export'),
713
+ START_DOWNLOAD_REPORT: createRoute('/reports/{:reportId}/start-download'),
714
+ RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry')
715
+ };
716
+ var Routes = {
717
+ GET_USER_REPORTS: createRoute('/user-reports'),
718
+ GET_SYSTEM_REPORTS: createRoute('/system-reports'),
697
719
  CREATE_SCHEDULE_JOB: createRoute('/scheduled-jobs'),
698
720
  UPDATE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
699
721
  GET_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
700
722
  DELETE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),
701
723
  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
724
  GET_ACTIVE_REPORT_EXECUTIONS: createRoute('/report-executions/active'),
706
- RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry'),
707
725
  REMOVE_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}'),
708
- GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count'),
726
+ RETRY_USER_REPORT_EXECUTION: createRoute('/report-executions/user/{:executionId}/retry'),
727
+ RETRY_SYSTEM_REPORT_EXECUTION: createRoute('/report-executions/system/{:executionId}/retry'),
709
728
  SHARE_REPORT: createRoute('/reports/{:reportId}/shares'),
710
729
  UPDATE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),
711
730
  DELETE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),
712
731
  DELETE_ALL_REPORT_SHARES: createRoute('/reports/{:reportId}/shares'),
713
- OPT_OUT_SHARES: createRoute('/reports/{:reportId}/opt-out')
732
+ OPT_OUT_SHARES: createRoute('/user-reports/{:reportId}/opt-out'),
733
+ GET_REPORT: createRoute('/reports/{:reportId}'),
734
+ GET_API_LINK: createRoute('/api-link'),
735
+ GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count')
714
736
  };
715
737
  var AnalyticsReportsEntity = /** @class */ (function (_super) {
716
738
  __extends(AnalyticsReportsEntity, _super);
@@ -730,40 +752,6 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
730
752
  });
731
753
  });
732
754
  };
733
- AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {
734
- return __awaiter(this, void 0, void 0, function () {
735
- return __generator(this, function (_a) {
736
- switch (_a.label) {
737
- case 0: return [4 /*yield*/, this.service.routeGenerator.delete(Routes.DELETE_REPORT).withRouteParams({ reportId: reportId }).invoke()];
738
- case 1: return [2 /*return*/, _a.sent()];
739
- }
740
- });
741
- });
742
- };
743
- AnalyticsReportsEntity.prototype.createReport = function (report) {
744
- return __awaiter(this, void 0, void 0, function () {
745
- return __generator(this, function (_a) {
746
- switch (_a.label) {
747
- case 0: return [4 /*yield*/, this.service.routeGenerator.post(Routes.CREATE_REPORT).withPayload(report).invoke()];
748
- case 1: return [2 /*return*/, _a.sent()];
749
- }
750
- });
751
- });
752
- };
753
- AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {
754
- return __awaiter(this, void 0, void 0, function () {
755
- return __generator(this, function (_a) {
756
- switch (_a.label) {
757
- case 0: return [4 /*yield*/, this.service.routeGenerator
758
- .put(Routes.UPDATE_REPORT)
759
- .withRouteParams({ reportId: reportId })
760
- .withPayload(report)
761
- .invoke()];
762
- case 1: return [2 /*return*/, _a.sent()];
763
- }
764
- });
765
- });
766
- };
767
755
  AnalyticsReportsEntity.prototype.getUserReports = function (queryString) {
768
756
  return __awaiter(this, void 0, void 0, function () {
769
757
  return __generator(this, function (_a) {
@@ -851,94 +839,149 @@ var AnalyticsReportsEntity = /** @class */ (function (_super) {
851
839
  });
852
840
  });
853
841
  };
854
- AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {
842
+ AnalyticsReportsEntity.prototype.getActiveReportExecutions = function () {
843
+ return __awaiter(this, void 0, void 0, function () {
844
+ return __generator(this, function (_a) {
845
+ switch (_a.label) {
846
+ case 0: return [4 /*yield*/, this.service.routeGenerator.get(Routes.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];
847
+ case 1: return [2 /*return*/, _a.sent()];
848
+ }
849
+ });
850
+ });
851
+ };
852
+ AnalyticsReportsEntity.prototype.subscribeReportExecutions = function (handler) {
853
+ this.service.session.persistentConnection.subscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'), handler);
854
+ };
855
+ AnalyticsReportsEntity.prototype.unsubscribeReportExecutions = function () {
856
+ this.service.session.persistentConnection.unsubscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'));
857
+ };
858
+ AnalyticsReportsEntity.prototype.removeReportExecutions = function (executionId) {
855
859
  return __awaiter(this, void 0, void 0, function () {
856
860
  return __generator(this, function (_a) {
857
861
  switch (_a.label) {
858
862
  case 0: return [4 /*yield*/, this.service.routeGenerator
859
- .post(Routes.START_EXPORT_REPORT)
860
- .withRouteParams({ reportId: reportId })
861
- .withPayload(queryParams)
863
+ .delete(Routes.REMOVE_EXECUTION_REPORT)
864
+ .withRouteParams({ executionId: executionId })
862
865
  .invoke()];
863
866
  case 1: return [2 /*return*/, _a.sent()];
864
867
  }
865
868
  });
866
869
  });
867
870
  };
868
- AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {
871
+ AnalyticsReportsEntity.prototype.getReportRowsCount = function (queryJson, timeZone) {
869
872
  return __awaiter(this, void 0, void 0, function () {
870
873
  return __generator(this, function (_a) {
871
874
  switch (_a.label) {
872
875
  case 0: return [4 /*yield*/, this.service.routeGenerator
873
- .post(Routes.START_DOWNLOAD_REPORT)
874
- .withRouteParams({ reportId: reportId })
875
- .withPayload(queryParams)
876
+ .post(Routes.GET_REPORT_ROWS_COUNT)
877
+ .withPayload({ queryJson: queryJson, timeZone: timeZone })
876
878
  .invoke()];
877
879
  case 1: return [2 /*return*/, _a.sent()];
878
880
  }
879
881
  });
880
882
  });
881
883
  };
882
- AnalyticsReportsEntity.prototype.getActiveReportExecutions = function () {
884
+ AnalyticsReportsEntity.prototype.optOutReport = function (reportId) {
883
885
  return __awaiter(this, void 0, void 0, function () {
884
886
  return __generator(this, function (_a) {
885
887
  switch (_a.label) {
886
- case 0: return [4 /*yield*/, this.service.routeGenerator.get(Routes.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];
888
+ case 0: return [4 /*yield*/, this.service.routeGenerator.delete(Routes.OPT_OUT_SHARES).withRouteParams({ reportId: reportId }).invoke()];
887
889
  case 1: return [2 /*return*/, _a.sent()];
888
890
  }
889
891
  });
890
892
  });
891
893
  };
892
- AnalyticsReportsEntity.prototype.subscribeReportExecutions = function (handler) {
893
- this.service.session.persistentConnection.subscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'), handler);
894
+ /**
895
+ * @deprecated Use createUserReport() instead
896
+ */
897
+ AnalyticsReportsEntity.prototype.createReport = function (report) {
898
+ return __awaiter(this, void 0, void 0, function () {
899
+ return __generator(this, function (_a) {
900
+ switch (_a.label) {
901
+ case 0: return [4 /*yield*/, this.service.routeGenerator.post(DeprecatedRoutes.CREATE_REPORT).withPayload(report).invoke()];
902
+ case 1: return [2 /*return*/, _a.sent()];
903
+ }
904
+ });
905
+ });
894
906
  };
895
- AnalyticsReportsEntity.prototype.unsubscribeReportExecutions = function () {
896
- this.service.session.persistentConnection.unsubscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'));
907
+ /**
908
+ * @deprecated Use updateUserReport() instead
909
+ */
910
+ AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {
911
+ return __awaiter(this, void 0, void 0, function () {
912
+ return __generator(this, function (_a) {
913
+ switch (_a.label) {
914
+ case 0: return [4 /*yield*/, this.service.routeGenerator
915
+ .put(DeprecatedRoutes.UPDATE_REPORT)
916
+ .withRouteParams({ reportId: reportId })
917
+ .withPayload(report)
918
+ .invoke()];
919
+ case 1: return [2 /*return*/, _a.sent()];
920
+ }
921
+ });
922
+ });
897
923
  };
898
- AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {
924
+ /**
925
+ * @deprecated Use deleteUserReport() instead
926
+ */
927
+ AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {
899
928
  return __awaiter(this, void 0, void 0, function () {
900
929
  return __generator(this, function (_a) {
901
930
  switch (_a.label) {
902
931
  case 0: return [4 /*yield*/, this.service.routeGenerator
903
- .post(Routes.RETRY_EXECUTION_REPORT)
904
- .withRouteParams({ executionId: executionId })
932
+ .delete(DeprecatedRoutes.DELETE_REPORT)
933
+ .withRouteParams({ reportId: reportId })
905
934
  .invoke()];
906
935
  case 1: return [2 /*return*/, _a.sent()];
907
936
  }
908
937
  });
909
938
  });
910
939
  };
911
- AnalyticsReportsEntity.prototype.removeReportExecutions = function (executionId) {
940
+ /**
941
+ * @deprecated Use exportUserReport() or exportSystemReport() instead
942
+ */
943
+ AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {
912
944
  return __awaiter(this, void 0, void 0, function () {
913
945
  return __generator(this, function (_a) {
914
946
  switch (_a.label) {
915
947
  case 0: return [4 /*yield*/, this.service.routeGenerator
916
- .delete(Routes.REMOVE_EXECUTION_REPORT)
917
- .withRouteParams({ executionId: executionId })
948
+ .post(DeprecatedRoutes.START_EXPORT_REPORT)
949
+ .withRouteParams({ reportId: reportId })
950
+ .withPayload(queryParams)
918
951
  .invoke()];
919
952
  case 1: return [2 /*return*/, _a.sent()];
920
953
  }
921
954
  });
922
955
  });
923
956
  };
924
- AnalyticsReportsEntity.prototype.getReportRowsCount = function (queryJson, timeZone) {
957
+ /**
958
+ * @deprecated Use downloadUserReport() or downloadSystemReport() instead
959
+ */
960
+ AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {
925
961
  return __awaiter(this, void 0, void 0, function () {
926
962
  return __generator(this, function (_a) {
927
963
  switch (_a.label) {
928
964
  case 0: return [4 /*yield*/, this.service.routeGenerator
929
- .post(Routes.GET_REPORT_ROWS_COUNT)
930
- .withPayload({ queryJson: queryJson, timeZone: timeZone })
965
+ .post(DeprecatedRoutes.START_DOWNLOAD_REPORT)
966
+ .withRouteParams({ reportId: reportId })
967
+ .withPayload(queryParams)
931
968
  .invoke()];
932
969
  case 1: return [2 /*return*/, _a.sent()];
933
970
  }
934
971
  });
935
972
  });
936
973
  };
937
- AnalyticsReportsEntity.prototype.optOutReport = function (reportId) {
974
+ /**
975
+ * @deprecated Use retryUserReportExecutions() or retrySystemReportExecutions() instead
976
+ */
977
+ AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {
938
978
  return __awaiter(this, void 0, void 0, function () {
939
979
  return __generator(this, function (_a) {
940
980
  switch (_a.label) {
941
- case 0: return [4 /*yield*/, this.service.routeGenerator.delete(Routes.OPT_OUT_SHARES).withRouteParams({ reportId: reportId }).invoke()];
981
+ case 0: return [4 /*yield*/, this.service.routeGenerator
982
+ .post(DeprecatedRoutes.RETRY_EXECUTION_REPORT)
983
+ .withRouteParams({ executionId: executionId })
984
+ .invoke()];
942
985
  case 1: return [2 /*return*/, _a.sent()];
943
986
  }
944
987
  });
@@ -17889,13 +17932,13 @@ var RelayService = /** @class */ (function () {
17889
17932
  });
17890
17933
  });
17891
17934
  };
17892
- RelayService.prototype.createRelays = function (relayData) {
17935
+ RelayService.prototype.createRelays = function (relayData, commonOptions) {
17893
17936
  return __awaiter(this, void 0, void 0, function () {
17894
17937
  return __generator(this, function (_a) {
17895
17938
  return [2 /*return*/, this.service.routeGenerator
17896
17939
  .post(Relay_consts_1.Routes.RELAY)
17897
17940
  .withPayload(relayData)
17898
- .setException("failed to create relays with parkingSpot: ".concat(relayData.parking_spot_id, " for tasks: ").concat(relayData.task_ids))
17941
+ .withCommonOptions(commonOptions)
17899
17942
  .invoke()];
17900
17943
  });
17901
17944
  });
@@ -22727,7 +22770,7 @@ var lodash_1 = __webpack_require__(96486);
22727
22770
  var BringgException_1 = __webpack_require__(43605);
22728
22771
  var Logger_1 = __importDefault(__webpack_require__(55860));
22729
22772
  var abort_1 = __webpack_require__(34179);
22730
- var version = '9.42.0';
22773
+ var version = '9.43.0';
22731
22774
  function logErrorResponse(response) {
22732
22775
  var data = response.data, status = response.status;
22733
22776
  try {