@bringg/dashboard-sdk 8.15.0-pre → 8.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CustomerAvailabilityHour/CustomerAvailabilityHour.consts.d.ts +5 -0
- package/dist/CustomerAvailabilityHour/CustomerAvailabilityHourApi.d.ts +1 -1
- package/dist/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.d.ts +2 -2
- package/dist/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/Workflow/v2/workflows-service.d.ts +1 -1
- package/dist/Workflow/v2/workflows-service.js +14 -8
- package/dist/Workflow/v2/workflows-service.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +46 -9
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +13 -2
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/dist/utils/cached-item.d.ts +9 -0
- package/dist/utils/cached-item.js +24 -0
- package/dist/utils/cached-item.js.map +1 -0
- package/package.json +1 -1
|
@@ -7,3 +7,8 @@ export interface TaskCustomerAvailabilityHoursGetResponse {
|
|
|
7
7
|
success: boolean;
|
|
8
8
|
availability_hours: CustomerAvailabilityHour[];
|
|
9
9
|
}
|
|
10
|
+
export interface BatchGetAvailabilityHours {
|
|
11
|
+
[customerId: string]: {
|
|
12
|
+
[taskId: string]: CustomerAvailabilityHour[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -9,6 +9,6 @@ declare class CustomerAvailabilityHourApi {
|
|
|
9
9
|
customers: {
|
|
10
10
|
[customerId: string]: number[];
|
|
11
11
|
};
|
|
12
|
-
}): Promise<CustomerAvailabilityHour
|
|
12
|
+
}): Promise<import("./CustomerAvailabilityHour.consts").BatchGetAvailabilityHours>;
|
|
13
13
|
}
|
|
14
14
|
export default CustomerAvailabilityHourApi;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomerAvailabilityHour } from '@bringg/types';
|
|
2
2
|
import StoreEntity from '../../Core/StoreEntity';
|
|
3
3
|
import Session from '../../Services/Identity/Session';
|
|
4
|
-
import { TaskCustomerAvailabilityHoursGetRequest } from '../CustomerAvailabilityHour.consts';
|
|
4
|
+
import { BatchGetAvailabilityHours, TaskCustomerAvailabilityHoursGetRequest } from '../CustomerAvailabilityHour.consts';
|
|
5
5
|
export declare const Routes: {
|
|
6
6
|
GET_AVAILABILITY_HOURS: string;
|
|
7
7
|
BATCH_GET_AVAILABILITY_HOURS: string;
|
|
@@ -16,5 +16,5 @@ export default class CustomerAvailabilityHourEntity extends StoreEntity<Customer
|
|
|
16
16
|
customers: {
|
|
17
17
|
[customerId: string]: number[];
|
|
18
18
|
};
|
|
19
|
-
}): Promise<
|
|
19
|
+
}): Promise<BatchGetAvailabilityHours>;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAiD;
|
|
1
|
+
{"version":3,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAiD;AAQpC,QAAA,MAAM,GAAG;IACrB,sBAAsB,EAAE,8BAA8B;IACtD,4BAA4B,EAAE,wCAAwC;CACtE,CAAC;AAEF;IAA4D,kDAAqC;IAGhG,wCAAY,OAAgB;QAA5B,YACC,kBAAM,EAAE,OAAO,SAAA,EAAE,UAAU,EAAE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AAC,kBAAkB,EAA3B,CAA2B,CAAC;yBACtD,MAAM,EAAwE,EAAC;;;KACjF;IAEO,gDAAO,GAAf,UAAgB,UAAkB,EAAE,MAAc;QACjD,OAAO,sBAAe,UAAU,sBAAY,MAAM,CAAE,CAAC;IACtD,CAAC;IAEY,8EAAqC,GAAlD,UAAmD,MAElD;;;gBACA,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,IAAI,CAAC,cAAM,CAAC,4BAA4B,CAAC;yBACzC,WAAW,CAAC,MAAM,CAAC;yBACnB,aAAa,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,kBAAkB,EAA3B,CAA2B,CAAC;yBACtD,MAAM,EAAuE,EAAC;;;KAChF;IACF,qCAAC;AAAD,CAAC,AAlDD,CAA4D,qBAAW,GAkDtE"}
|
|
@@ -53,7 +53,7 @@ var lodash_1 = require("lodash");
|
|
|
53
53
|
var BringgException_1 = require("../Core/BringgException");
|
|
54
54
|
var Logger_1 = require("../Core/Logger");
|
|
55
55
|
var abort_1 = require("../utils/abort");
|
|
56
|
-
var version = '8.15.0
|
|
56
|
+
var version = '8.15.0';
|
|
57
57
|
function logErrorResponse(response) {
|
|
58
58
|
var data = response.data, status = response.status;
|
|
59
59
|
try {
|
|
@@ -4,7 +4,7 @@ import { CommonOptions } from '../../Core/RouteGenerator';
|
|
|
4
4
|
import Session from '../../Services/Identity/Session';
|
|
5
5
|
export default class WorkflowsService {
|
|
6
6
|
private readonly service;
|
|
7
|
-
private
|
|
7
|
+
private manualTriggersCache;
|
|
8
8
|
constructor(session: Session);
|
|
9
9
|
loadAll(commonOptions?: CommonOptions): Promise<GetAllWorkflowResponse>;
|
|
10
10
|
delete(id: number, commonOptions?: CommonOptions): Promise<DELETE_RESPONSE>;
|
|
@@ -37,11 +37,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
var CrudService_1 = require("../../Core/CrudService");
|
|
40
|
+
var cached_item_1 = require("../../utils/cached-item");
|
|
40
41
|
var entityName = 'rule-service/workflow';
|
|
41
42
|
var baseRoute = "/".concat(entityName);
|
|
42
43
|
var WorkflowsService = /** @class */ (function () {
|
|
43
44
|
function WorkflowsService(session) {
|
|
44
45
|
this.service = new CrudService_1.default(session, entityName);
|
|
46
|
+
this.manualTriggersCache = new cached_item_1.CachedItem();
|
|
45
47
|
}
|
|
46
48
|
WorkflowsService.prototype.loadAll = function (commonOptions) {
|
|
47
49
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
@@ -55,6 +57,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
55
57
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
56
58
|
return __awaiter(this, void 0, void 0, function () {
|
|
57
59
|
return __generator(this, function (_a) {
|
|
60
|
+
this.manualTriggersCache.invalidate();
|
|
58
61
|
return [2 /*return*/, this.service.delete(id, undefined, commonOptions)];
|
|
59
62
|
});
|
|
60
63
|
});
|
|
@@ -63,6 +66,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
63
66
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
64
67
|
return __awaiter(this, void 0, void 0, function () {
|
|
65
68
|
return __generator(this, function (_a) {
|
|
69
|
+
this.manualTriggersCache.invalidate();
|
|
66
70
|
return [2 /*return*/, this.service.update(id, workflow, commonOptions)];
|
|
67
71
|
});
|
|
68
72
|
});
|
|
@@ -71,6 +75,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
71
75
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
72
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
73
77
|
return __generator(this, function (_a) {
|
|
78
|
+
this.manualTriggersCache.invalidate();
|
|
74
79
|
return [2 /*return*/, this.service.patch(id, workflow, commonOptions)];
|
|
75
80
|
});
|
|
76
81
|
});
|
|
@@ -79,6 +84,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
79
84
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
80
85
|
return __awaiter(this, void 0, void 0, function () {
|
|
81
86
|
return __generator(this, function (_a) {
|
|
87
|
+
this.manualTriggersCache.invalidate();
|
|
82
88
|
return [2 /*return*/, this.service.create(workflow, commonOptions)];
|
|
83
89
|
});
|
|
84
90
|
});
|
|
@@ -121,21 +127,21 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
121
127
|
};
|
|
122
128
|
WorkflowsService.prototype.getManualTriggersV3 = function (commonOptions) {
|
|
123
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
var _a;
|
|
125
|
-
return __generator(this, function (
|
|
126
|
-
switch (
|
|
130
|
+
var _a, _b;
|
|
131
|
+
return __generator(this, function (_c) {
|
|
132
|
+
switch (_c.label) {
|
|
127
133
|
case 0:
|
|
128
|
-
if (!!this.
|
|
129
|
-
_a = this;
|
|
134
|
+
if (!!this.manualTriggersCache.isValid()) return [3 /*break*/, 2];
|
|
135
|
+
_b = (_a = this.manualTriggersCache).set;
|
|
130
136
|
return [4 /*yield*/, this.service.routeGenerator
|
|
131
137
|
.get("".concat(baseRoute, "/v3/manual"))
|
|
132
138
|
.setException('failed to get manual triggers configuration')
|
|
133
139
|
.withCommonOptions(commonOptions)
|
|
134
140
|
.invoke()];
|
|
135
141
|
case 1:
|
|
136
|
-
_a
|
|
137
|
-
|
|
138
|
-
case 2: return [2 /*return*/, this.
|
|
142
|
+
_b.apply(_a, [_c.sent()]);
|
|
143
|
+
_c.label = 2;
|
|
144
|
+
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
139
145
|
}
|
|
140
146
|
});
|
|
141
147
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-service.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,sDAAsE;
|
|
1
|
+
{"version":3,"file":"workflows-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OAAO,CAAC,cAAc;aAChC,GAAG,CAAC,UAAG,SAAS,eAAY,CAAC;aAC7B,YAAY,CAAC,6CAA6C,CAAC;aAC3D,iBAAiB,CAAC,aAAa,CAAC;aAChC,MAAM,EAA4C,CAAC;IACtD,CAAC;IAEY,8CAAmB,GAAhC,UAAiC,aAA6B;;;;;;6BACzD,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAnC,wBAAmC;wBACtC,KAAA,CAAA,KAAA,IAAI,CAAC,mBAAmB,CAAA,CAAC,GAAG,CAAA;wBAC3B,qBAAM,IAAI,CAAC,OAAO,CAAC,cAAc;iCAC/B,GAAG,CAAC,UAAG,SAAS,eAAY,CAAC;iCAC7B,YAAY,CAAC,6CAA6C,CAAC;iCAC3D,iBAAiB,CAAC,aAAa,CAAC;iCAChC,MAAM,EAAkE,EAAA;;wBAL3E,cACC,SAI0E,EAC1E,CAAC;;4BAGH,sBAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,EAAC;;;;KACtC;IACF,uBAAC;AAAD,CAAC,AA1FD,IA0FC"}
|
|
@@ -20196,7 +20196,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
20196
20196
|
var BringgException_1 = __webpack_require__(43605);
|
|
20197
20197
|
var Logger_1 = __webpack_require__(55860);
|
|
20198
20198
|
var abort_1 = __webpack_require__(34179);
|
|
20199
|
-
var version = '8.15.0
|
|
20199
|
+
var version = '8.15.0';
|
|
20200
20200
|
function logErrorResponse(response) {
|
|
20201
20201
|
var data = response.data, status = response.status;
|
|
20202
20202
|
try {
|
|
@@ -28629,11 +28629,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
28629
28629
|
};
|
|
28630
28630
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
28631
28631
|
var CrudService_1 = __webpack_require__(14809);
|
|
28632
|
+
var cached_item_1 = __webpack_require__(24621);
|
|
28632
28633
|
var entityName = 'rule-service/workflow';
|
|
28633
28634
|
var baseRoute = "/".concat(entityName);
|
|
28634
28635
|
var WorkflowsService = /** @class */ (function () {
|
|
28635
28636
|
function WorkflowsService(session) {
|
|
28636
28637
|
this.service = new CrudService_1.default(session, entityName);
|
|
28638
|
+
this.manualTriggersCache = new cached_item_1.CachedItem();
|
|
28637
28639
|
}
|
|
28638
28640
|
WorkflowsService.prototype.loadAll = function (commonOptions) {
|
|
28639
28641
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
@@ -28647,6 +28649,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28647
28649
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28648
28650
|
return __awaiter(this, void 0, void 0, function () {
|
|
28649
28651
|
return __generator(this, function (_a) {
|
|
28652
|
+
this.manualTriggersCache.invalidate();
|
|
28650
28653
|
return [2 /*return*/, this.service.delete(id, undefined, commonOptions)];
|
|
28651
28654
|
});
|
|
28652
28655
|
});
|
|
@@ -28655,6 +28658,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28655
28658
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28656
28659
|
return __awaiter(this, void 0, void 0, function () {
|
|
28657
28660
|
return __generator(this, function (_a) {
|
|
28661
|
+
this.manualTriggersCache.invalidate();
|
|
28658
28662
|
return [2 /*return*/, this.service.update(id, workflow, commonOptions)];
|
|
28659
28663
|
});
|
|
28660
28664
|
});
|
|
@@ -28663,6 +28667,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28663
28667
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28664
28668
|
return __awaiter(this, void 0, void 0, function () {
|
|
28665
28669
|
return __generator(this, function (_a) {
|
|
28670
|
+
this.manualTriggersCache.invalidate();
|
|
28666
28671
|
return [2 /*return*/, this.service.patch(id, workflow, commonOptions)];
|
|
28667
28672
|
});
|
|
28668
28673
|
});
|
|
@@ -28671,6 +28676,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28671
28676
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28672
28677
|
return __awaiter(this, void 0, void 0, function () {
|
|
28673
28678
|
return __generator(this, function (_a) {
|
|
28679
|
+
this.manualTriggersCache.invalidate();
|
|
28674
28680
|
return [2 /*return*/, this.service.create(workflow, commonOptions)];
|
|
28675
28681
|
});
|
|
28676
28682
|
});
|
|
@@ -28713,21 +28719,21 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28713
28719
|
};
|
|
28714
28720
|
WorkflowsService.prototype.getManualTriggersV3 = function (commonOptions) {
|
|
28715
28721
|
return __awaiter(this, void 0, void 0, function () {
|
|
28716
|
-
var _a;
|
|
28717
|
-
return __generator(this, function (
|
|
28718
|
-
switch (
|
|
28722
|
+
var _a, _b;
|
|
28723
|
+
return __generator(this, function (_c) {
|
|
28724
|
+
switch (_c.label) {
|
|
28719
28725
|
case 0:
|
|
28720
|
-
if (!!this.
|
|
28721
|
-
_a = this;
|
|
28726
|
+
if (!!this.manualTriggersCache.isValid()) return [3 /*break*/, 2];
|
|
28727
|
+
_b = (_a = this.manualTriggersCache).set;
|
|
28722
28728
|
return [4 /*yield*/, this.service.routeGenerator
|
|
28723
28729
|
.get("".concat(baseRoute, "/v3/manual"))
|
|
28724
28730
|
.setException('failed to get manual triggers configuration')
|
|
28725
28731
|
.withCommonOptions(commonOptions)
|
|
28726
28732
|
.invoke()];
|
|
28727
28733
|
case 1:
|
|
28728
|
-
_a
|
|
28729
|
-
|
|
28730
|
-
case 2: return [2 /*return*/, this.
|
|
28734
|
+
_b.apply(_a, [_c.sent()]);
|
|
28735
|
+
_c.label = 2;
|
|
28736
|
+
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
28731
28737
|
}
|
|
28732
28738
|
});
|
|
28733
28739
|
});
|
|
@@ -29582,6 +29588,37 @@ exports.arrayUtils = { splitToChunks: splitToChunks };
|
|
|
29582
29588
|
|
|
29583
29589
|
/***/ }),
|
|
29584
29590
|
|
|
29591
|
+
/***/ 24621:
|
|
29592
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
29593
|
+
|
|
29594
|
+
"use strict";
|
|
29595
|
+
|
|
29596
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29597
|
+
exports.CachedItem = void 0;
|
|
29598
|
+
var CachedItem = /** @class */ (function () {
|
|
29599
|
+
function CachedItem() {
|
|
29600
|
+
this.valid = false;
|
|
29601
|
+
}
|
|
29602
|
+
CachedItem.prototype.set = function (toCache) {
|
|
29603
|
+
this.cached = toCache;
|
|
29604
|
+
this.valid = true;
|
|
29605
|
+
};
|
|
29606
|
+
CachedItem.prototype.isValid = function () {
|
|
29607
|
+
return this.valid;
|
|
29608
|
+
};
|
|
29609
|
+
CachedItem.prototype.get = function () {
|
|
29610
|
+
return this.isValid() ? this.cached : undefined;
|
|
29611
|
+
};
|
|
29612
|
+
CachedItem.prototype.invalidate = function () {
|
|
29613
|
+
this.valid = false;
|
|
29614
|
+
};
|
|
29615
|
+
return CachedItem;
|
|
29616
|
+
}());
|
|
29617
|
+
exports.CachedItem = CachedItem;
|
|
29618
|
+
//# sourceMappingURL=cached-item.js.map
|
|
29619
|
+
|
|
29620
|
+
/***/ }),
|
|
29621
|
+
|
|
29585
29622
|
/***/ 92400:
|
|
29586
29623
|
/***/ ((__unused_webpack_module, exports) => {
|
|
29587
29624
|
|