@bringg/dashboard-sdk 9.59.4 → 9.60.1

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.
@@ -2751,6 +2751,7 @@ var RouteOptimizationService_1 = __importDefault(__webpack_require__(94121));
2751
2751
  var RuleApi_1 = __importDefault(__webpack_require__(80298));
2752
2752
  var runs_api_1 = __importDefault(__webpack_require__(83582));
2753
2753
  var ScanApi_1 = __importDefault(__webpack_require__(9008));
2754
+ var SecurityConfigurationApi_1 = __importDefault(__webpack_require__(70410));
2754
2755
  var ServiceApi_1 = __importDefault(__webpack_require__(65199));
2755
2756
  var ServiceAreaApi_1 = __importDefault(__webpack_require__(9463));
2756
2757
  var service_area_api_1 = __webpack_require__(35248);
@@ -2827,6 +2828,7 @@ var BringgDashboardSDK = /** @class */ (function () {
2827
2828
  this.reportPreferences = null;
2828
2829
  this.reports = null;
2829
2830
  this.rollouts = null;
2831
+ this.securityConfiguration = null;
2830
2832
  this.skills = null;
2831
2833
  this.speedFactor = null;
2832
2834
  this.taskConfigurations = null;
@@ -3137,6 +3139,7 @@ function init(session) {
3137
3139
  bringg.reports = new reports_1.default(session);
3138
3140
  bringg.scans = new ScanApi_1.default(session);
3139
3141
  bringg.rollouts = new RolloutsApi_1.default(session);
3142
+ bringg.securityConfiguration = new SecurityConfigurationApi_1.default(session);
3140
3143
  bringg.service = new ServiceApi_1.default(session);
3141
3144
  bringg.signatures = new Signature_1.default(session);
3142
3145
  bringg.skills = new SkillsApi_1.default(session);
@@ -4505,6 +4508,17 @@ exports["default"] = BaseService;
4505
4508
 
4506
4509
  "use strict";
4507
4510
 
4511
+ var __assign = (this && this.__assign) || function () {
4512
+ __assign = Object.assign || function(t) {
4513
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4514
+ s = arguments[i];
4515
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
4516
+ t[p] = s[p];
4517
+ }
4518
+ return t;
4519
+ };
4520
+ return __assign.apply(this, arguments);
4521
+ };
4508
4522
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4509
4523
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4510
4524
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -4564,8 +4578,13 @@ exports.ActionToFunction = (_a = {},
4564
4578
  _a[Actions.UPDATE] = 'onUpdate',
4565
4579
  _a);
4566
4580
  exports.THROTTLE_TIME = 1000;
4581
+ var applyDefaultConfig = function (config) {
4582
+ if (config === void 0) { config = {}; }
4583
+ return __assign({ realTime: { addItemsWhenHandlingUpdate: true } }, config);
4584
+ };
4567
4585
  var BaseStore = /** @class */ (function () {
4568
- function BaseStore() {
4586
+ function BaseStore(config) {
4587
+ if (config === void 0) { config = {}; }
4569
4588
  var _this = this;
4570
4589
  this.onItemUpdateEvents = [];
4571
4590
  this.onItemCreatedEvents = [];
@@ -4659,6 +4678,7 @@ var BaseStore = /** @class */ (function () {
4659
4678
  this.getItemsMap = function () {
4660
4679
  return _this._items;
4661
4680
  };
4681
+ this.config = applyDefaultConfig(config);
4662
4682
  this.items$ = new Subject_1.Subject();
4663
4683
  this.state$ = this.items$.pipe((0, operators_1.scan)(function (currentState, action) {
4664
4684
  var newState = _this.handleStateUpdate(currentState, action);
@@ -4702,7 +4722,7 @@ var BaseStore = /** @class */ (function () {
4702
4722
  this.onItemUpdateEvents.forEach(function (fn) { return fn(foundItem); });
4703
4723
  this.handleCalculations(item, Actions.UPDATE);
4704
4724
  }
4705
- else {
4725
+ else if (this.config.realTime.addItemsWhenHandlingUpdate) {
4706
4726
  this._addToStore(currentState, item);
4707
4727
  }
4708
4728
  return currentState;
@@ -20524,6 +20544,172 @@ exports["default"] = ScanApi;
20524
20544
 
20525
20545
  /***/ }),
20526
20546
 
20547
+ /***/ 48524:
20548
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
20549
+
20550
+ "use strict";
20551
+
20552
+ var __extends = (this && this.__extends) || (function () {
20553
+ var extendStatics = function (d, b) {
20554
+ extendStatics = Object.setPrototypeOf ||
20555
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20556
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20557
+ return extendStatics(d, b);
20558
+ };
20559
+ return function (d, b) {
20560
+ if (typeof b !== "function" && b !== null)
20561
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
20562
+ extendStatics(d, b);
20563
+ function __() { this.constructor = d; }
20564
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20565
+ };
20566
+ })();
20567
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
20568
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20569
+ return new (P || (P = Promise))(function (resolve, reject) {
20570
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20571
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20572
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20573
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20574
+ });
20575
+ };
20576
+ var __generator = (this && this.__generator) || function (thisArg, body) {
20577
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20578
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20579
+ function verb(n) { return function (v) { return step([n, v]); }; }
20580
+ function step(op) {
20581
+ if (f) throw new TypeError("Generator is already executing.");
20582
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
20583
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20584
+ if (y = 0, t) op = [op[0] & 2, t.value];
20585
+ switch (op[0]) {
20586
+ case 0: case 1: t = op; break;
20587
+ case 4: _.label++; return { value: op[1], done: false };
20588
+ case 5: _.label++; y = op[1]; op = [0]; continue;
20589
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
20590
+ default:
20591
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20592
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20593
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20594
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20595
+ if (t[2]) _.ops.pop();
20596
+ _.trys.pop(); continue;
20597
+ }
20598
+ op = body.call(thisArg, _);
20599
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20600
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20601
+ }
20602
+ };
20603
+ var __importDefault = (this && this.__importDefault) || function (mod) {
20604
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20605
+ };
20606
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20607
+ var Entity_1 = __importDefault(__webpack_require__(7483));
20608
+ var SecurityConfiguration_consts_1 = __webpack_require__(4293);
20609
+ var SecurityConfigurationEntity = /** @class */ (function (_super) {
20610
+ __extends(SecurityConfigurationEntity, _super);
20611
+ function SecurityConfigurationEntity(session) {
20612
+ return _super.call(this, {
20613
+ session: session,
20614
+ entityName: 'security_configuration',
20615
+ routes: []
20616
+ }) || this;
20617
+ }
20618
+ SecurityConfigurationEntity.prototype.update = function (config) {
20619
+ return __awaiter(this, void 0, void 0, function () {
20620
+ return __generator(this, function (_a) {
20621
+ return [2 /*return*/, this.service.routeGenerator
20622
+ .put(SecurityConfiguration_consts_1.BaseRoute)
20623
+ .withExtractor(function (response) { return response; })
20624
+ .setException('failed updating security_configuration')
20625
+ .withPayload(config)
20626
+ .invoke()];
20627
+ });
20628
+ });
20629
+ };
20630
+ return SecurityConfigurationEntity;
20631
+ }(Entity_1.default));
20632
+ exports["default"] = SecurityConfigurationEntity;
20633
+ //# sourceMappingURL=SecurityConfigurationEntity.js.map
20634
+
20635
+ /***/ }),
20636
+
20637
+ /***/ 4293:
20638
+ /***/ ((__unused_webpack_module, exports) => {
20639
+
20640
+ "use strict";
20641
+
20642
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20643
+ exports.BaseRoute = void 0;
20644
+ exports.BaseRoute = '/merchant/security_configuration';
20645
+ //# sourceMappingURL=SecurityConfiguration.consts.js.map
20646
+
20647
+ /***/ }),
20648
+
20649
+ /***/ 70410:
20650
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
20651
+
20652
+ "use strict";
20653
+
20654
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
20655
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20656
+ return new (P || (P = Promise))(function (resolve, reject) {
20657
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20658
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20659
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20660
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20661
+ });
20662
+ };
20663
+ var __generator = (this && this.__generator) || function (thisArg, body) {
20664
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20665
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20666
+ function verb(n) { return function (v) { return step([n, v]); }; }
20667
+ function step(op) {
20668
+ if (f) throw new TypeError("Generator is already executing.");
20669
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
20670
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20671
+ if (y = 0, t) op = [op[0] & 2, t.value];
20672
+ switch (op[0]) {
20673
+ case 0: case 1: t = op; break;
20674
+ case 4: _.label++; return { value: op[1], done: false };
20675
+ case 5: _.label++; y = op[1]; op = [0]; continue;
20676
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
20677
+ default:
20678
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20679
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20680
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20681
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20682
+ if (t[2]) _.ops.pop();
20683
+ _.trys.pop(); continue;
20684
+ }
20685
+ op = body.call(thisArg, _);
20686
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20687
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20688
+ }
20689
+ };
20690
+ var __importDefault = (this && this.__importDefault) || function (mod) {
20691
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20692
+ };
20693
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20694
+ var SecurityConfigurationEntity_1 = __importDefault(__webpack_require__(48524));
20695
+ var SecurityConfigurationApi = /** @class */ (function () {
20696
+ function SecurityConfigurationApi(session) {
20697
+ this.entity = new SecurityConfigurationEntity_1.default(session);
20698
+ }
20699
+ SecurityConfigurationApi.prototype.update = function (config) {
20700
+ return __awaiter(this, void 0, void 0, function () {
20701
+ return __generator(this, function (_a) {
20702
+ return [2 /*return*/, this.entity.update(config)];
20703
+ });
20704
+ });
20705
+ };
20706
+ return SecurityConfigurationApi;
20707
+ }());
20708
+ exports["default"] = SecurityConfigurationApi;
20709
+ //# sourceMappingURL=SecurityConfigurationApi.js.map
20710
+
20711
+ /***/ }),
20712
+
20527
20713
  /***/ 70348:
20528
20714
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
20529
20715
 
@@ -22872,7 +23058,7 @@ var lodash_1 = __webpack_require__(96486);
22872
23058
  var BringgException_1 = __webpack_require__(43605);
22873
23059
  var Logger_1 = __importDefault(__webpack_require__(55860));
22874
23060
  var abort_1 = __webpack_require__(34179);
22875
- var version = '9.59.4';
23061
+ var version = '9.60.1';
22876
23062
  function logErrorResponse(response) {
22877
23063
  var data = response.data, status = response.status;
22878
23064
  try {
@@ -29606,7 +29792,11 @@ var UsersStore = /** @class */ (function (_super) {
29606
29792
  __extends(UsersStore, _super);
29607
29793
  function UsersStore(session, throttleTimeValue) {
29608
29794
  var e_1, _a;
29609
- var _this = _super.call(this) || this;
29795
+ var _this = _super.call(this, {
29796
+ realTime: {
29797
+ addItemsWhenHandlingUpdate: false
29798
+ }
29799
+ }) || this;
29610
29800
  _this.groupUpdateEvents = [];
29611
29801
  _this.groupedValues = new Map();
29612
29802
  _this.drivers = [];
@@ -36372,6 +36562,7 @@ __exportStar(__webpack_require__(4443), exports);
36372
36562
  __exportStar(__webpack_require__(71836), exports);
36373
36563
  __exportStar(__webpack_require__(29289), exports);
36374
36564
  __exportStar(__webpack_require__(27215), exports);
36565
+ __exportStar(__webpack_require__(92922), exports);
36375
36566
  __exportStar(__webpack_require__(82042), exports);
36376
36567
  __exportStar(__webpack_require__(95314), exports);
36377
36568
  __exportStar(__webpack_require__(95908), exports);
@@ -38976,6 +39167,7 @@ var EventType;
38976
39167
  EventType["PackageUpdated"] = "package:updated";
38977
39168
  EventType["PackageDeleted"] = "package:deleted";
38978
39169
  EventType["FleetDeliveryActionCreateFailed"] = "fleet_delivery_action:create:failed";
39170
+ EventType["FleetDeliveryActionCancelledBeforePickup"] = "fleet_delivery_action:cancelled_before_pickup";
38979
39171
  EventType["FleetAssigned"] = "fleet:assigned";
38980
39172
  EventType["NoFleetFound"] = "fleet_router:no_fleet_found";
38981
39173
  EventType["SmsSendFailed"] = "sms:send:failed";
@@ -39689,6 +39881,7 @@ var NotificationTypes;
39689
39881
  NotificationTypes["PostRatingNegativeTitle"] = "post_rating_negative_title";
39690
39882
  NotificationTypes["CxSchedulingCustomerMessageTitle"] = "cx_scheduling_customer_message_title";
39691
39883
  NotificationTypes["CxSchedulingFreeCommentInputLabel"] = "cx_scheduling_free_comment_input_label";
39884
+ NotificationTypes["CxOnOrderCanceledTitleNotificationType"] = "cx_on_order_canceled_title";
39692
39885
  })(NotificationTypes || (exports.NotificationTypes = NotificationTypes = {}));
39693
39886
  //# sourceMappingURL=notification_type.js.map
39694
39887
 
@@ -40216,7 +40409,7 @@ var ApplicationType;
40216
40409
  "use strict";
40217
40410
 
40218
40411
  Object.defineProperty(exports, "__esModule", ({ value: true }));
40219
- exports.QuestionnaireStatus = exports.QuestionnaireTrigger = void 0;
40412
+ exports.QuestionnairePageLayout = exports.QuestionnaireStatus = exports.QuestionnaireTrigger = void 0;
40220
40413
  var QuestionnaireTrigger;
40221
40414
  (function (QuestionnaireTrigger) {
40222
40415
  QuestionnaireTrigger[QuestionnaireTrigger["Hidden"] = 0] = "Hidden";
@@ -40228,6 +40421,11 @@ var QuestionnaireStatus;
40228
40421
  QuestionnaireStatus[QuestionnaireStatus["Pending"] = 0] = "Pending";
40229
40422
  QuestionnaireStatus[QuestionnaireStatus["Completed"] = 1] = "Completed";
40230
40423
  })(QuestionnaireStatus || (exports.QuestionnaireStatus = QuestionnaireStatus = {}));
40424
+ var QuestionnairePageLayout;
40425
+ (function (QuestionnairePageLayout) {
40426
+ QuestionnairePageLayout["SinglePage"] = "single_page";
40427
+ QuestionnairePageLayout["OneQuestionPerPage"] = "one_question_per_page";
40428
+ })(QuestionnairePageLayout || (exports.QuestionnairePageLayout = QuestionnairePageLayout = {}));
40231
40429
  //# sourceMappingURL=questionnaire_data.js.map
40232
40430
 
40233
40431
  /***/ }),
@@ -40963,6 +41161,16 @@ var ScanType;
40963
41161
 
40964
41162
  /***/ }),
40965
41163
 
41164
+ /***/ 92922:
41165
+ /***/ ((__unused_webpack_module, exports) => {
41166
+
41167
+ "use strict";
41168
+
41169
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
41170
+ //# sourceMappingURL=security_configuration.js.map
41171
+
41172
+ /***/ }),
41173
+
40966
41174
  /***/ 82042:
40967
41175
  /***/ ((__unused_webpack_module, exports) => {
40968
41176