@bringg/dashboard-sdk 8.21.0-pre → 8.21.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.
- package/dist/ExclusionWindow/v2/exclusion-window-api.d.ts +7 -7
- package/dist/ExclusionWindow/v2/exclusion-window-api.js +54 -28
- package/dist/ExclusionWindow/v2/exclusion-window-api.js.map +1 -1
- package/dist/LookUp/lookup.consts.d.ts +1 -0
- package/dist/PlannedDeliveryWindows/planned-delivery-windows-api.d.ts +7 -7
- package/dist/PlannedDeliveryWindows/planned-delivery-windows-api.js +77 -27
- package/dist/PlannedDeliveryWindows/planned-delivery-windows-api.js.map +1 -1
- package/dist/RouteOptimization/RouteOptimizationApi.d.ts +1 -3
- package/dist/RouteOptimization/RouteOptimizationApi.js +0 -9
- package/dist/RouteOptimization/RouteOptimizationApi.js.map +1 -1
- package/dist/ServiceArea/v2/service-area-api.d.ts +4 -4
- package/dist/ServiceArea/v2/service-area-api.js +35 -7
- package/dist/ServiceArea/v2/service-area-api.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/TaskRejectReason/v2/task-reject-reasons-api.d.ts +5 -5
- package/dist/TaskRejectReason/v2/task-reject-reasons-api.js +71 -6
- package/dist/TaskRejectReason/v2/task-reject-reasons-api.js.map +1 -1
- package/dist/TaskRejectReason/v2/task-reject-reasons-service.d.ts +5 -5
- package/dist/TaskRejectReason/v2/task-reject-reasons-service.js.map +1 -1
- package/dist/Workflow/v2/workflows-api.d.ts +6 -6
- package/dist/Workflow/v2/workflows-api.js +35 -6
- package/dist/Workflow/v2/workflows-api.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +279 -182
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +10 -21
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/dist/storable-data-service.js +4 -3
- package/dist/storable-data-service.js.map +1 -1
- package/package.json +1 -1
- package/dist/storable-api-builder.d.ts +0 -7
- package/dist/storable-api-builder.js +0 -86
- package/dist/storable-api-builder.js.map +0 -1
|
@@ -9055,6 +9055,17 @@ exports["default"] = ExclusionWindowApi;
|
|
|
9055
9055
|
|
|
9056
9056
|
"use strict";
|
|
9057
9057
|
|
|
9058
|
+
var __assign = (this && this.__assign) || function () {
|
|
9059
|
+
__assign = Object.assign || function(t) {
|
|
9060
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9061
|
+
s = arguments[i];
|
|
9062
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
9063
|
+
t[p] = s[p];
|
|
9064
|
+
}
|
|
9065
|
+
return t;
|
|
9066
|
+
};
|
|
9067
|
+
return __assign.apply(this, arguments);
|
|
9068
|
+
};
|
|
9058
9069
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9059
9070
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9060
9071
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9094,7 +9105,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
9094
9105
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9095
9106
|
exports.ExclusionWindowApi = void 0;
|
|
9096
9107
|
var data_store_1 = __webpack_require__(73135);
|
|
9097
|
-
var storable_api_builder_1 = __webpack_require__(57670);
|
|
9098
9108
|
var storable_data_service_1 = __webpack_require__(45297);
|
|
9099
9109
|
var exclusion_window_consts_1 = __webpack_require__(41277);
|
|
9100
9110
|
var exclusion_window_service_1 = __webpack_require__(36665);
|
|
@@ -9109,34 +9119,50 @@ var ExclusionWindowApi = /** @class */ (function () {
|
|
|
9109
9119
|
this.exclusionWindowStore = new data_store_1.default(groupFilters);
|
|
9110
9120
|
this.exclusionWindowService = new exclusion_window_service_1.default(session);
|
|
9111
9121
|
this.storableDataService = new storable_data_service_1.default(this.exclusionWindowStore);
|
|
9112
|
-
Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.exclusionWindowService, {
|
|
9113
|
-
modify: ['update', 'create'],
|
|
9114
|
-
modifyMany: ['createMany'],
|
|
9115
|
-
delete: ['delete'],
|
|
9116
|
-
load: ['load'],
|
|
9117
|
-
loadAll: [
|
|
9118
|
-
{
|
|
9119
|
-
action: 'loadAllByTeam',
|
|
9120
|
-
getOptions: function (_a) {
|
|
9121
|
-
var team_id = _a.team_id;
|
|
9122
|
-
return {
|
|
9123
|
-
groupType: exclusion_window_consts_1.ExclusionWindowsFilterGroups.Team,
|
|
9124
|
-
groupValue: team_id
|
|
9125
|
-
};
|
|
9126
|
-
}
|
|
9127
|
-
},
|
|
9128
|
-
{
|
|
9129
|
-
action: 'loadAllWithoutTeam',
|
|
9130
|
-
getOptions: function () {
|
|
9131
|
-
return {
|
|
9132
|
-
groupType: exclusion_window_consts_1.ExclusionWindowsFilterGroups.Team,
|
|
9133
|
-
groupValue: null
|
|
9134
|
-
};
|
|
9135
|
-
}
|
|
9136
|
-
}
|
|
9137
|
-
]
|
|
9138
|
-
}));
|
|
9139
9122
|
}
|
|
9123
|
+
ExclusionWindowApi.prototype.loadAllByTeam = function (request, options) {
|
|
9124
|
+
var _this = this;
|
|
9125
|
+
return this.storableDataService.loadAll('loadAllByTeam', function () { return _this.exclusionWindowService.loadAllByTeam(request); }, __assign(__assign({}, options), { groupType: exclusion_window_consts_1.ExclusionWindowsFilterGroups.Team, groupValue: request.team_id }));
|
|
9126
|
+
};
|
|
9127
|
+
ExclusionWindowApi.prototype.loadAllWithoutTeam = function (request, options) {
|
|
9128
|
+
var _this = this;
|
|
9129
|
+
return this.storableDataService.loadAll('loadAllWithoutTeam', function () { return _this.exclusionWindowService.loadAllWithoutTeam(request); }, __assign(__assign({}, options), { groupType: exclusion_window_consts_1.ExclusionWindowsFilterGroups.Team, groupValue: null }));
|
|
9130
|
+
};
|
|
9131
|
+
ExclusionWindowApi.prototype.create = function (request) {
|
|
9132
|
+
var _this = this;
|
|
9133
|
+
return this.storableDataService.modify('create', function () { return _this.exclusionWindowService.create(request); });
|
|
9134
|
+
};
|
|
9135
|
+
ExclusionWindowApi.prototype.update = function (id, request) {
|
|
9136
|
+
var _this = this;
|
|
9137
|
+
return this.storableDataService.modify('update', function () { return _this.exclusionWindowService.update(id, request); });
|
|
9138
|
+
};
|
|
9139
|
+
ExclusionWindowApi.prototype.createMany = function (request) {
|
|
9140
|
+
var _this = this;
|
|
9141
|
+
return this.storableDataService.modifyMany('createMany', function () { return _this.exclusionWindowService.createMany(request); });
|
|
9142
|
+
};
|
|
9143
|
+
ExclusionWindowApi.prototype.delete = function (id) {
|
|
9144
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9145
|
+
var response;
|
|
9146
|
+
var _this = this;
|
|
9147
|
+
return __generator(this, function (_a) {
|
|
9148
|
+
switch (_a.label) {
|
|
9149
|
+
case 0: return [4 /*yield*/, this.storableDataService.delete('delete', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
9150
|
+
return __generator(this, function (_a) {
|
|
9151
|
+
switch (_a.label) {
|
|
9152
|
+
case 0: return [4 /*yield*/, this.exclusionWindowService.delete(id)];
|
|
9153
|
+
case 1:
|
|
9154
|
+
response = _a.sent();
|
|
9155
|
+
return [2 /*return*/];
|
|
9156
|
+
}
|
|
9157
|
+
});
|
|
9158
|
+
}); }, id)];
|
|
9159
|
+
case 1:
|
|
9160
|
+
_a.sent();
|
|
9161
|
+
return [2 /*return*/, response];
|
|
9162
|
+
}
|
|
9163
|
+
});
|
|
9164
|
+
});
|
|
9165
|
+
};
|
|
9140
9166
|
ExclusionWindowApi.prototype.copyFromMerchant = function (teamId, exclusionWindowId) {
|
|
9141
9167
|
return __awaiter(this, void 0, void 0, function () {
|
|
9142
9168
|
return __generator(this, function (_a) {
|
|
@@ -14664,13 +14690,59 @@ exports["default"] = Photo;
|
|
|
14664
14690
|
/***/ }),
|
|
14665
14691
|
|
|
14666
14692
|
/***/ 44524:
|
|
14667
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
14693
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
14668
14694
|
|
|
14669
14695
|
"use strict";
|
|
14670
14696
|
|
|
14697
|
+
var __assign = (this && this.__assign) || function () {
|
|
14698
|
+
__assign = Object.assign || function(t) {
|
|
14699
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14700
|
+
s = arguments[i];
|
|
14701
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14702
|
+
t[p] = s[p];
|
|
14703
|
+
}
|
|
14704
|
+
return t;
|
|
14705
|
+
};
|
|
14706
|
+
return __assign.apply(this, arguments);
|
|
14707
|
+
};
|
|
14708
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14709
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14710
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14711
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
14712
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
14713
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14714
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14715
|
+
});
|
|
14716
|
+
};
|
|
14717
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14718
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
14719
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14720
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14721
|
+
function step(op) {
|
|
14722
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
14723
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
14724
|
+
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;
|
|
14725
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
14726
|
+
switch (op[0]) {
|
|
14727
|
+
case 0: case 1: t = op; break;
|
|
14728
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
14729
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
14730
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
14731
|
+
default:
|
|
14732
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
14733
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
14734
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
14735
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
14736
|
+
if (t[2]) _.ops.pop();
|
|
14737
|
+
_.trys.pop(); continue;
|
|
14738
|
+
}
|
|
14739
|
+
op = body.call(thisArg, _);
|
|
14740
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
14741
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
14742
|
+
}
|
|
14743
|
+
};
|
|
14671
14744
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14672
14745
|
var data_store_1 = __webpack_require__(73135);
|
|
14673
|
-
var storable_api_builder_1 = __webpack_require__(57670);
|
|
14674
14746
|
var storable_data_service_1 = __webpack_require__(45297);
|
|
14675
14747
|
var planned_delivery_windows_consts_1 = __webpack_require__(13684);
|
|
14676
14748
|
var planned_delivery_windows_service_1 = __webpack_require__(78419);
|
|
@@ -14685,33 +14757,37 @@ var PlannedDeliveryWindowsApi = /** @class */ (function () {
|
|
|
14685
14757
|
this.deliveryWindowsStore = new data_store_1.default(groupFilters);
|
|
14686
14758
|
this.deliveryWindowsService = new planned_delivery_windows_service_1.default(session);
|
|
14687
14759
|
this.storableDataService = new storable_data_service_1.default(this.deliveryWindowsStore);
|
|
14688
|
-
Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.deliveryWindowsService, {
|
|
14689
|
-
modify: ['update'],
|
|
14690
|
-
modifyMany: ['create'],
|
|
14691
|
-
delete: ['delete'],
|
|
14692
|
-
load: ['load'],
|
|
14693
|
-
loadAll: [
|
|
14694
|
-
{
|
|
14695
|
-
action: 'loadAllByTeam',
|
|
14696
|
-
getOptions: function (teamId) {
|
|
14697
|
-
return {
|
|
14698
|
-
groupType: planned_delivery_windows_consts_1.PlannedDeliveryWindowsFilterGroups.Team,
|
|
14699
|
-
groupValue: teamId
|
|
14700
|
-
};
|
|
14701
|
-
}
|
|
14702
|
-
},
|
|
14703
|
-
{
|
|
14704
|
-
action: 'loadAllWithoutTeam',
|
|
14705
|
-
getOptions: function () {
|
|
14706
|
-
return {
|
|
14707
|
-
groupType: planned_delivery_windows_consts_1.PlannedDeliveryWindowsFilterGroups.Team,
|
|
14708
|
-
groupValue: null
|
|
14709
|
-
};
|
|
14710
|
-
}
|
|
14711
|
-
}
|
|
14712
|
-
]
|
|
14713
|
-
}));
|
|
14714
14760
|
}
|
|
14761
|
+
PlannedDeliveryWindowsApi.prototype.load = function (id, options) {
|
|
14762
|
+
var _this = this;
|
|
14763
|
+
return this.storableDataService.load('load', function () { return _this.deliveryWindowsService.load(id); }, id, options);
|
|
14764
|
+
};
|
|
14765
|
+
PlannedDeliveryWindowsApi.prototype.loadAllWithoutTeam = function (startTime, endTime, options) {
|
|
14766
|
+
var _this = this;
|
|
14767
|
+
return this.storableDataService.loadAll('loadAllWithoutTeam', function () { return _this.deliveryWindowsService.loadAllWithoutTeam(startTime, endTime); }, __assign(__assign({}, options), { groupType: planned_delivery_windows_consts_1.PlannedDeliveryWindowsFilterGroups.Team, groupValue: null }));
|
|
14768
|
+
};
|
|
14769
|
+
PlannedDeliveryWindowsApi.prototype.loadAllByTeam = function (teamId, startTime, endTime, options) {
|
|
14770
|
+
var _this = this;
|
|
14771
|
+
return this.storableDataService.loadAll('loadAllByTeam', function () { return _this.deliveryWindowsService.loadAllByTeam(teamId, startTime, endTime); }, __assign(__assign({}, options), { groupType: planned_delivery_windows_consts_1.PlannedDeliveryWindowsFilterGroups.Team, groupValue: teamId }));
|
|
14772
|
+
};
|
|
14773
|
+
PlannedDeliveryWindowsApi.prototype.create = function (plannedDeliveryWindowsData) {
|
|
14774
|
+
var _this = this;
|
|
14775
|
+
return this.storableDataService.modifyMany('create', function () {
|
|
14776
|
+
return _this.deliveryWindowsService.create(plannedDeliveryWindowsData);
|
|
14777
|
+
});
|
|
14778
|
+
};
|
|
14779
|
+
PlannedDeliveryWindowsApi.prototype.delete = function (id, recurrenceOptions) {
|
|
14780
|
+
var _this = this;
|
|
14781
|
+
return this.storableDataService.delete('delete', function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
14782
|
+
return [2 /*return*/, this.deliveryWindowsService.delete(id, recurrenceOptions)];
|
|
14783
|
+
}); }); }, id);
|
|
14784
|
+
};
|
|
14785
|
+
PlannedDeliveryWindowsApi.prototype.update = function (id, plannedDeliveryWindow, recurrenceOptions) {
|
|
14786
|
+
var _this = this;
|
|
14787
|
+
return this.storableDataService.modify('update', function () {
|
|
14788
|
+
return _this.deliveryWindowsService.update(id, plannedDeliveryWindow, recurrenceOptions);
|
|
14789
|
+
});
|
|
14790
|
+
};
|
|
14715
14791
|
PlannedDeliveryWindowsApi.prototype.get = function (id) {
|
|
14716
14792
|
return this.deliveryWindowsStore.get(id);
|
|
14717
14793
|
};
|
|
@@ -16576,7 +16652,6 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
16576
16652
|
_this.update_user_modified_data = new Route_1.Route('/route_optimizations/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
16577
16653
|
_this.update_user_modified_data_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
16578
16654
|
_this.assign_user_manual_optimization = new Route_1.Route('/route_optimizations/assign_user_manual_optimization', 1 /* HttpMethod.POST */);
|
|
16579
|
-
_this.calculate_planned_eta = new Route_1.Route('/own-fleet-optimization-service/route_optimization/calculate_planned_eta', 1 /* HttpMethod.POST */);
|
|
16580
16655
|
return _this;
|
|
16581
16656
|
}
|
|
16582
16657
|
RouteOptimizationApi.prototype.cancelRequests = function (requestUuids, v2) {
|
|
@@ -16633,14 +16708,6 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
16633
16708
|
timeout: fiveMinutesInMs
|
|
16634
16709
|
});
|
|
16635
16710
|
};
|
|
16636
|
-
RouteOptimizationApi.prototype.calculatePlannedEta = function (route) {
|
|
16637
|
-
return this.handleAuthorizedRequest({
|
|
16638
|
-
route: this.calculate_planned_eta,
|
|
16639
|
-
extractor: RouteGenerator_1.defaultExtractor,
|
|
16640
|
-
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to calculate planned eta'),
|
|
16641
|
-
payload: __assign({}, route)
|
|
16642
|
-
});
|
|
16643
|
-
};
|
|
16644
16711
|
return RouteOptimizationApi;
|
|
16645
16712
|
}(SessionBasedService_1.SessionBasedService));
|
|
16646
16713
|
exports["default"] = RouteOptimizationApi;
|
|
@@ -18419,7 +18486,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
18419
18486
|
exports.ServiceAreaApi = void 0;
|
|
18420
18487
|
var data_entity_1 = __webpack_require__(91083);
|
|
18421
18488
|
var data_store_1 = __webpack_require__(73135);
|
|
18422
|
-
var storable_api_builder_1 = __webpack_require__(57670);
|
|
18423
18489
|
var storable_data_service_1 = __webpack_require__(45297);
|
|
18424
18490
|
var service_area_consts_1 = __webpack_require__(16410);
|
|
18425
18491
|
var service_area_service_1 = __webpack_require__(5314);
|
|
@@ -18434,13 +18500,42 @@ var ServiceAreaApi = /** @class */ (function () {
|
|
|
18434
18500
|
this.serviceAreaStore = new data_store_1.default(groupFilters);
|
|
18435
18501
|
this.serviceAreaService = new service_area_service_1.default(session);
|
|
18436
18502
|
this.storableDataService = new storable_data_service_1.default(this.serviceAreaStore);
|
|
18437
|
-
Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.serviceAreaService, {
|
|
18438
|
-
modify: ['update', 'create'],
|
|
18439
|
-
delete: ['delete'],
|
|
18440
|
-
load: ['load'],
|
|
18441
|
-
loadAll: ['loadAll']
|
|
18442
|
-
}));
|
|
18443
18503
|
}
|
|
18504
|
+
ServiceAreaApi.prototype.loadAll = function (options) {
|
|
18505
|
+
var _this = this;
|
|
18506
|
+
return this.storableDataService.loadAll('loadAll', function () { return _this.serviceAreaService.loadAll(options); }, options);
|
|
18507
|
+
};
|
|
18508
|
+
ServiceAreaApi.prototype.create = function (request) {
|
|
18509
|
+
var _this = this;
|
|
18510
|
+
return this.storableDataService.modify('create', function () { return _this.serviceAreaService.create(request); });
|
|
18511
|
+
};
|
|
18512
|
+
ServiceAreaApi.prototype.update = function (id, request) {
|
|
18513
|
+
var _this = this;
|
|
18514
|
+
return this.storableDataService.modify('update', function () { return _this.serviceAreaService.update(id, request); });
|
|
18515
|
+
};
|
|
18516
|
+
ServiceAreaApi.prototype.delete = function (id) {
|
|
18517
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
18518
|
+
var response;
|
|
18519
|
+
var _this = this;
|
|
18520
|
+
return __generator(this, function (_a) {
|
|
18521
|
+
switch (_a.label) {
|
|
18522
|
+
case 0: return [4 /*yield*/, this.storableDataService.delete('delete', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
18523
|
+
return __generator(this, function (_a) {
|
|
18524
|
+
switch (_a.label) {
|
|
18525
|
+
case 0: return [4 /*yield*/, this.serviceAreaService.delete(id)];
|
|
18526
|
+
case 1:
|
|
18527
|
+
response = _a.sent();
|
|
18528
|
+
return [2 /*return*/];
|
|
18529
|
+
}
|
|
18530
|
+
});
|
|
18531
|
+
}); }, id)];
|
|
18532
|
+
case 1:
|
|
18533
|
+
_a.sent();
|
|
18534
|
+
return [2 /*return*/, response];
|
|
18535
|
+
}
|
|
18536
|
+
});
|
|
18537
|
+
});
|
|
18538
|
+
};
|
|
18444
18539
|
ServiceAreaApi.prototype.loadAllByTeams = function (request, options) {
|
|
18445
18540
|
if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }
|
|
18446
18541
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -20222,7 +20317,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
20222
20317
|
var BringgException_1 = __webpack_require__(43605);
|
|
20223
20318
|
var Logger_1 = __webpack_require__(55860);
|
|
20224
20319
|
var abort_1 = __webpack_require__(34179);
|
|
20225
|
-
var version = '8.21.
|
|
20320
|
+
var version = '8.21.1';
|
|
20226
20321
|
function logErrorResponse(response) {
|
|
20227
20322
|
var data = response.data, status = response.status;
|
|
20228
20323
|
try {
|
|
@@ -23965,13 +24060,48 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
23965
24060
|
/***/ }),
|
|
23966
24061
|
|
|
23967
24062
|
/***/ 62954:
|
|
23968
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
24063
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23969
24064
|
|
|
23970
24065
|
"use strict";
|
|
23971
24066
|
|
|
24067
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24068
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
24069
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24070
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24071
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
24072
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
24073
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24074
|
+
});
|
|
24075
|
+
};
|
|
24076
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24077
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24078
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24079
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
24080
|
+
function step(op) {
|
|
24081
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
24082
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24083
|
+
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;
|
|
24084
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
24085
|
+
switch (op[0]) {
|
|
24086
|
+
case 0: case 1: t = op; break;
|
|
24087
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
24088
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24089
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24090
|
+
default:
|
|
24091
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
24092
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
24093
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
24094
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
24095
|
+
if (t[2]) _.ops.pop();
|
|
24096
|
+
_.trys.pop(); continue;
|
|
24097
|
+
}
|
|
24098
|
+
op = body.call(thisArg, _);
|
|
24099
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
24100
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
24101
|
+
}
|
|
24102
|
+
};
|
|
23972
24103
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23973
24104
|
var data_store_1 = __webpack_require__(73135);
|
|
23974
|
-
var storable_api_builder_1 = __webpack_require__(57670);
|
|
23975
24105
|
var storable_data_service_1 = __webpack_require__(45297);
|
|
23976
24106
|
var task_reject_reasons_service_1 = __webpack_require__(90194);
|
|
23977
24107
|
var TaskRejectReasonsApi = /** @class */ (function () {
|
|
@@ -23979,12 +24109,42 @@ var TaskRejectReasonsApi = /** @class */ (function () {
|
|
|
23979
24109
|
this.taskRejectReasonsStore = new data_store_1.default();
|
|
23980
24110
|
this.taskRejectReasonsService = new task_reject_reasons_service_1.default(session);
|
|
23981
24111
|
this.storableDataService = new storable_data_service_1.default(this.taskRejectReasonsStore, mapper);
|
|
23982
|
-
Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.taskRejectReasonsService, {
|
|
23983
|
-
modify: ['update', 'create', 'patch'],
|
|
23984
|
-
delete: ['delete'],
|
|
23985
|
-
loadAll: ['loadAll']
|
|
23986
|
-
}));
|
|
23987
24112
|
}
|
|
24113
|
+
TaskRejectReasonsApi.prototype.loadAll = function (options) {
|
|
24114
|
+
var _this = this;
|
|
24115
|
+
return this.storableDataService.loadAll('loadAll', function () { return _this.taskRejectReasonsService.loadAll(options); }, options);
|
|
24116
|
+
};
|
|
24117
|
+
TaskRejectReasonsApi.prototype.delete = function (id, commonOption) {
|
|
24118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
24119
|
+
var _this = this;
|
|
24120
|
+
return __generator(this, function (_a) {
|
|
24121
|
+
switch (_a.label) {
|
|
24122
|
+
case 0: return [4 /*yield*/, this.storableDataService.delete('delete', function () { return _this.taskRejectReasonsService.delete(id); }, id)];
|
|
24123
|
+
case 1:
|
|
24124
|
+
_a.sent();
|
|
24125
|
+
return [2 /*return*/];
|
|
24126
|
+
}
|
|
24127
|
+
});
|
|
24128
|
+
});
|
|
24129
|
+
};
|
|
24130
|
+
TaskRejectReasonsApi.prototype.update = function (id, taskRejectReason, commonOption) {
|
|
24131
|
+
var _this = this;
|
|
24132
|
+
return this.storableDataService.modify('update', function () {
|
|
24133
|
+
return _this.taskRejectReasonsService.update(id, taskRejectReason, commonOption);
|
|
24134
|
+
});
|
|
24135
|
+
};
|
|
24136
|
+
TaskRejectReasonsApi.prototype.patch = function (id, taskRejectReason, commonOption) {
|
|
24137
|
+
var _this = this;
|
|
24138
|
+
return this.storableDataService.modify('patch', function () {
|
|
24139
|
+
return _this.taskRejectReasonsService.patch(id, taskRejectReason, commonOption);
|
|
24140
|
+
});
|
|
24141
|
+
};
|
|
24142
|
+
TaskRejectReasonsApi.prototype.create = function (taskRejectReason, commonOption) {
|
|
24143
|
+
var _this = this;
|
|
24144
|
+
return this.storableDataService.modify('create', function () {
|
|
24145
|
+
return _this.taskRejectReasonsService.create(taskRejectReason, commonOption);
|
|
24146
|
+
});
|
|
24147
|
+
};
|
|
23988
24148
|
TaskRejectReasonsApi.prototype.get = function (id) {
|
|
23989
24149
|
return this.taskRejectReasonsStore.get(id);
|
|
23990
24150
|
};
|
|
@@ -28680,7 +28840,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28680
28840
|
};
|
|
28681
28841
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
28682
28842
|
var data_store_1 = __webpack_require__(73135);
|
|
28683
|
-
var storable_api_builder_1 = __webpack_require__(57670);
|
|
28684
28843
|
var storable_data_service_1 = __webpack_require__(45297);
|
|
28685
28844
|
var workflows_service_1 = __webpack_require__(37329);
|
|
28686
28845
|
var WorkflowsApi = /** @class */ (function () {
|
|
@@ -28688,12 +28847,42 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
28688
28847
|
this.workflowStore = new data_store_1.default();
|
|
28689
28848
|
this.workflowsService = new workflows_service_1.default(session);
|
|
28690
28849
|
this.storableDataService = new storable_data_service_1.default(this.workflowStore, mapper);
|
|
28691
|
-
Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.workflowsService, {
|
|
28692
|
-
modify: ['update', 'create', 'patch', 'duplicate'],
|
|
28693
|
-
delete: ['delete'],
|
|
28694
|
-
loadAll: ['loadAll']
|
|
28695
|
-
}));
|
|
28696
28850
|
}
|
|
28851
|
+
WorkflowsApi.prototype.loadAll = function (options) {
|
|
28852
|
+
var _this = this;
|
|
28853
|
+
return this.storableDataService.loadAll('loadAll', function () { return _this.workflowsService.loadAll(options); }, options);
|
|
28854
|
+
};
|
|
28855
|
+
WorkflowsApi.prototype.duplicate = function (id, commonOption) {
|
|
28856
|
+
var _this = this;
|
|
28857
|
+
return this.storableDataService.modify('duplicate', function () { return _this.workflowsService.duplicate(id, commonOption); });
|
|
28858
|
+
};
|
|
28859
|
+
WorkflowsApi.prototype.delete = function (id, commonOption) {
|
|
28860
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
28861
|
+
var _this = this;
|
|
28862
|
+
return __generator(this, function (_a) {
|
|
28863
|
+
switch (_a.label) {
|
|
28864
|
+
case 0: return [4 /*yield*/, this.storableDataService.delete('delete', function () { return _this.workflowsService.delete(id, commonOption); }, id)];
|
|
28865
|
+
case 1:
|
|
28866
|
+
_a.sent();
|
|
28867
|
+
return [2 /*return*/];
|
|
28868
|
+
}
|
|
28869
|
+
});
|
|
28870
|
+
});
|
|
28871
|
+
};
|
|
28872
|
+
WorkflowsApi.prototype.update = function (id, workflow, commonOption) {
|
|
28873
|
+
var _this = this;
|
|
28874
|
+
return this.storableDataService.modify('update', function () {
|
|
28875
|
+
return _this.workflowsService.update(id, workflow, commonOption);
|
|
28876
|
+
});
|
|
28877
|
+
};
|
|
28878
|
+
WorkflowsApi.prototype.patch = function (id, workflow, commonOption) {
|
|
28879
|
+
var _this = this;
|
|
28880
|
+
return this.storableDataService.modify('patch', function () { return _this.workflowsService.patch(id, workflow, commonOption); });
|
|
28881
|
+
};
|
|
28882
|
+
WorkflowsApi.prototype.create = function (workflow, commonOption) {
|
|
28883
|
+
var _this = this;
|
|
28884
|
+
return this.storableDataService.modify('create', function () { return _this.workflowsService.create(workflow, commonOption); });
|
|
28885
|
+
};
|
|
28697
28886
|
WorkflowsApi.prototype.get = function (id) {
|
|
28698
28887
|
return this.workflowStore.get(id);
|
|
28699
28888
|
};
|
|
@@ -29404,99 +29593,6 @@ exports["default"] = RealtimeSubscriptions;
|
|
|
29404
29593
|
|
|
29405
29594
|
/***/ }),
|
|
29406
29595
|
|
|
29407
|
-
/***/ 57670:
|
|
29408
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
29409
|
-
|
|
29410
|
-
"use strict";
|
|
29411
|
-
|
|
29412
|
-
var __assign = (this && this.__assign) || function () {
|
|
29413
|
-
__assign = Object.assign || function(t) {
|
|
29414
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
29415
|
-
s = arguments[i];
|
|
29416
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
29417
|
-
t[p] = s[p];
|
|
29418
|
-
}
|
|
29419
|
-
return t;
|
|
29420
|
-
};
|
|
29421
|
-
return __assign.apply(this, arguments);
|
|
29422
|
-
};
|
|
29423
|
-
var __values = (this && this.__values) || function(o) {
|
|
29424
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
29425
|
-
if (m) return m.call(o);
|
|
29426
|
-
if (o && typeof o.length === "number") return {
|
|
29427
|
-
next: function () {
|
|
29428
|
-
if (o && i >= o.length) o = void 0;
|
|
29429
|
-
return { value: o && o[i++], done: !o };
|
|
29430
|
-
}
|
|
29431
|
-
};
|
|
29432
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
29433
|
-
};
|
|
29434
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29435
|
-
var data_entity_1 = __webpack_require__(91083);
|
|
29436
|
-
function build(storableDataService, dataService, storableActions) {
|
|
29437
|
-
var e_1, _a;
|
|
29438
|
-
var api = {};
|
|
29439
|
-
var _loop_1 = function (storableAction) {
|
|
29440
|
-
var e_2, _d;
|
|
29441
|
-
var apis = storableActions[storableAction];
|
|
29442
|
-
var _loop_2 = function (apiParams) {
|
|
29443
|
-
var action = apiParams.action || apiParams;
|
|
29444
|
-
api[action] = function () {
|
|
29445
|
-
var _a;
|
|
29446
|
-
var args = [];
|
|
29447
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
29448
|
-
args[_i] = arguments[_i];
|
|
29449
|
-
}
|
|
29450
|
-
var dataServiceFunc = function () {
|
|
29451
|
-
// eslint-disable-next-line prefer-spread
|
|
29452
|
-
return dataService[action].apply(dataService, args);
|
|
29453
|
-
};
|
|
29454
|
-
var storableDataServiceArgs = args;
|
|
29455
|
-
if (apiParams.getOptions) {
|
|
29456
|
-
var optionsPassed = typeof ((_a = args[args.length - 1]) === null || _a === void 0 ? void 0 : _a.useCache) === 'boolean';
|
|
29457
|
-
var extraOptions = apiParams.getOptions.apply(null, args);
|
|
29458
|
-
storableDataServiceArgs = [
|
|
29459
|
-
__assign(__assign({}, (optionsPassed ? args[args.length - 1] : data_entity_1.DEFAULT_OPTIONS)), extraOptions)
|
|
29460
|
-
];
|
|
29461
|
-
}
|
|
29462
|
-
// eslint-disable-next-line prefer-spread
|
|
29463
|
-
return storableDataService[storableAction].apply(storableDataService, [action, dataServiceFunc].concat(storableDataServiceArgs));
|
|
29464
|
-
};
|
|
29465
|
-
};
|
|
29466
|
-
try {
|
|
29467
|
-
for (var apis_1 = (e_2 = void 0, __values(apis)), apis_1_1 = apis_1.next(); !apis_1_1.done; apis_1_1 = apis_1.next()) {
|
|
29468
|
-
var apiParams = apis_1_1.value;
|
|
29469
|
-
_loop_2(apiParams);
|
|
29470
|
-
}
|
|
29471
|
-
}
|
|
29472
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
29473
|
-
finally {
|
|
29474
|
-
try {
|
|
29475
|
-
if (apis_1_1 && !apis_1_1.done && (_d = apis_1.return)) _d.call(apis_1);
|
|
29476
|
-
}
|
|
29477
|
-
finally { if (e_2) throw e_2.error; }
|
|
29478
|
-
}
|
|
29479
|
-
};
|
|
29480
|
-
try {
|
|
29481
|
-
for (var _b = __values(Object.keys(storableActions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
29482
|
-
var storableAction = _c.value;
|
|
29483
|
-
_loop_1(storableAction);
|
|
29484
|
-
}
|
|
29485
|
-
}
|
|
29486
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
29487
|
-
finally {
|
|
29488
|
-
try {
|
|
29489
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
29490
|
-
}
|
|
29491
|
-
finally { if (e_1) throw e_1.error; }
|
|
29492
|
-
}
|
|
29493
|
-
return api;
|
|
29494
|
-
}
|
|
29495
|
-
exports["default"] = { build: build };
|
|
29496
|
-
//# sourceMappingURL=storable-api-builder.js.map
|
|
29497
|
-
|
|
29498
|
-
/***/ }),
|
|
29499
|
-
|
|
29500
29596
|
/***/ 45297:
|
|
29501
29597
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
29502
29598
|
|
|
@@ -29539,6 +29635,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29539
29635
|
}
|
|
29540
29636
|
};
|
|
29541
29637
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29638
|
+
var lodash_1 = __webpack_require__(96486);
|
|
29542
29639
|
var BringgDashboardSDK_1 = __webpack_require__(5655);
|
|
29543
29640
|
var data_entity_1 = __webpack_require__(91083);
|
|
29544
29641
|
var StorableDataService = /** @class */ (function () {
|
|
@@ -29549,13 +29646,13 @@ var StorableDataService = /** @class */ (function () {
|
|
|
29549
29646
|
this.mapper = mapper || (function (item) { return ({ current: item, diff: _this.dataStore.get(item.id) }); });
|
|
29550
29647
|
}
|
|
29551
29648
|
StorableDataService.prototype.loadAll = function (action, loadFunc, options) {
|
|
29552
|
-
if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }
|
|
29553
29649
|
return __awaiter(this, void 0, void 0, function () {
|
|
29554
29650
|
var unloadedItems, shouldLoad, groupValue, loadFnIdsParams, items, mappedItems_1;
|
|
29555
29651
|
var _this = this;
|
|
29556
29652
|
return __generator(this, function (_a) {
|
|
29557
29653
|
switch (_a.label) {
|
|
29558
29654
|
case 0:
|
|
29655
|
+
options = (0, lodash_1.defaults)(options, data_entity_1.DEFAULT_OPTIONS);
|
|
29559
29656
|
unloadedItems = [];
|
|
29560
29657
|
shouldLoad = false;
|
|
29561
29658
|
if (Array.isArray(options.groupValue)) {
|
|
@@ -29592,13 +29689,13 @@ var StorableDataService = /** @class */ (function () {
|
|
|
29592
29689
|
});
|
|
29593
29690
|
};
|
|
29594
29691
|
StorableDataService.prototype.loadMany = function (action, loadFunc, ids, options) {
|
|
29595
|
-
if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }
|
|
29596
29692
|
return __awaiter(this, void 0, void 0, function () {
|
|
29597
29693
|
var items, mappedItems_2, unloadedIds, items, clientItems;
|
|
29598
29694
|
var _this = this;
|
|
29599
29695
|
return __generator(this, function (_a) {
|
|
29600
29696
|
switch (_a.label) {
|
|
29601
29697
|
case 0:
|
|
29698
|
+
options = (0, lodash_1.defaults)(options, data_entity_1.DEFAULT_OPTIONS);
|
|
29602
29699
|
if (!!options.useCache) return [3 /*break*/, 2];
|
|
29603
29700
|
return [4 /*yield*/, loadFunc(ids)];
|
|
29604
29701
|
case 1:
|
|
@@ -29630,12 +29727,12 @@ var StorableDataService = /** @class */ (function () {
|
|
|
29630
29727
|
});
|
|
29631
29728
|
};
|
|
29632
29729
|
StorableDataService.prototype.load = function (action, loadFunc, id, options) {
|
|
29633
|
-
if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }
|
|
29634
29730
|
return __awaiter(this, void 0, void 0, function () {
|
|
29635
29731
|
var item;
|
|
29636
29732
|
return __generator(this, function (_a) {
|
|
29637
29733
|
switch (_a.label) {
|
|
29638
29734
|
case 0:
|
|
29735
|
+
options = (0, lodash_1.defaults)(options, data_entity_1.DEFAULT_OPTIONS);
|
|
29639
29736
|
if (!(!options.useCache || !this.dataStore.get(id))) return [3 /*break*/, 2];
|
|
29640
29737
|
return [4 /*yield*/, loadFunc()];
|
|
29641
29738
|
case 1:
|