@bringg/dashboard-sdk 8.13.4-pre → 8.15.0-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.
- package/dist/CustomerAvailabilityHour/CustomerAvailabilityHourApi.js +0 -3
- package/dist/CustomerAvailabilityHour/CustomerAvailabilityHourApi.js.map +1 -1
- package/dist/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.d.ts +2 -3
- package/dist/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.js +4 -18
- package/dist/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.js.map +1 -1
- package/dist/RouteOptimization/RouteOptimizationApi.d.ts +8 -4
- package/dist/RouteOptimization/RouteOptimizationApi.js +16 -8
- package/dist/RouteOptimization/RouteOptimizationApi.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/Workflow/v2/workflows-api.d.ts +2 -3
- package/dist/Workflow/v2/workflows-api.js +11 -19
- package/dist/Workflow/v2/workflows-api.js.map +1 -1
- package/dist/Workflow/v2/workflows-service.d.ts +3 -2
- package/dist/Workflow/v2/workflows-service.js +21 -8
- package/dist/Workflow/v2/workflows-service.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +53 -57
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +6 -6
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -50,10 +50,7 @@ var CustomerAvailabilityHourApi = /** @class */ (function () {
|
|
|
50
50
|
};
|
|
51
51
|
CustomerAvailabilityHourApi.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
var a;
|
|
54
53
|
return __generator(this, function (_a) {
|
|
55
|
-
a = this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params);
|
|
56
|
-
console.log('a', a);
|
|
57
54
|
return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
|
|
58
55
|
});
|
|
59
56
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerAvailabilityHourApi.js","sourceRoot":"","sources":["../../src/CustomerAvailabilityHour/CustomerAvailabilityHourApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0FAAqF;AAErF;IAGC,qCAAY,OAAgB;QAC3B,IAAI,CAAC,8BAA8B,GAAG,IAAI,wCAA8B,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IAEY,sEAAgC,GAA7C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,8BAA8B,CAAC,gCAAgC,CAAC,MAAM,CAAC,EAAC;;;KACpF;IAEY,2EAAqC,GAAlD,UAAmD,MAAyD
|
|
1
|
+
{"version":3,"file":"CustomerAvailabilityHourApi.js","sourceRoot":"","sources":["../../src/CustomerAvailabilityHour/CustomerAvailabilityHourApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0FAAqF;AAErF;IAGC,qCAAY,OAAgB;QAC3B,IAAI,CAAC,8BAA8B,GAAG,IAAI,wCAA8B,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IAEY,sEAAgC,GAA7C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,8BAA8B,CAAC,gCAAgC,CAAC,MAAM,CAAC,EAAC;;;KACpF;IAEY,2EAAqC,GAAlD,UAAmD,MAAyD;;;gBAC3G,sBAAO,IAAI,CAAC,8BAA8B,CAAC,qCAAqC,CAAC,MAAM,CAAC,EAAC;;;KACzF;IACF,kCAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,kBAAe,2BAA2B,CAAC"}
|
|
@@ -10,12 +10,11 @@ export default class CustomerAvailabilityHourEntity extends StoreEntity<Customer
|
|
|
10
10
|
private taskCustomerAvailabilityHours;
|
|
11
11
|
constructor(session: Session);
|
|
12
12
|
getTaskCustomerAvailabilityHours(params: TaskCustomerAvailabilityHoursGetRequest): Promise<CustomerAvailabilityHour[]>;
|
|
13
|
+
private _getTaskCustomerAvailabilityHours;
|
|
14
|
+
private _getKey;
|
|
13
15
|
getBatchTaskCustomerAvailabilityHours(params: {
|
|
14
16
|
customers: {
|
|
15
17
|
[customerId: string]: number[];
|
|
16
18
|
};
|
|
17
19
|
}): Promise<CustomerAvailabilityHour[]>;
|
|
18
|
-
private _getTaskCustomerAvailabilityHours;
|
|
19
|
-
private _getKey;
|
|
20
|
-
private _getBatchTaskCustomerAvailabilityHours;
|
|
21
20
|
}
|
|
@@ -55,7 +55,7 @@ exports.Routes = void 0;
|
|
|
55
55
|
var StoreEntity_1 = require("../../Core/StoreEntity");
|
|
56
56
|
exports.Routes = {
|
|
57
57
|
GET_AVAILABILITY_HOURS: '/customer_availability_hours',
|
|
58
|
-
BATCH_GET_AVAILABILITY_HOURS: '/
|
|
58
|
+
BATCH_GET_AVAILABILITY_HOURS: '/customer_availability_hours/batch_get'
|
|
59
59
|
};
|
|
60
60
|
var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
61
61
|
__extends(CustomerAvailabilityHourEntity, _super);
|
|
@@ -86,20 +86,6 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
-
CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var response;
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
switch (_a.label) {
|
|
94
|
-
case 0: return [4 /*yield*/, this._getBatchTaskCustomerAvailabilityHours(params)];
|
|
95
|
-
case 1:
|
|
96
|
-
response = _a.sent();
|
|
97
|
-
console.log('response', response);
|
|
98
|
-
return [2 /*return*/, response];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
89
|
CustomerAvailabilityHourEntity.prototype._getTaskCustomerAvailabilityHours = function (params) {
|
|
104
90
|
return __awaiter(this, void 0, void 0, function () {
|
|
105
91
|
return __generator(this, function (_a) {
|
|
@@ -114,12 +100,12 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
|
114
100
|
CustomerAvailabilityHourEntity.prototype._getKey = function (customerId, taskId) {
|
|
115
101
|
return "customer_id:".concat(customerId, ":task_id:").concat(taskId);
|
|
116
102
|
};
|
|
117
|
-
CustomerAvailabilityHourEntity.prototype.
|
|
103
|
+
CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
118
104
|
return __awaiter(this, void 0, void 0, function () {
|
|
119
105
|
return __generator(this, function (_a) {
|
|
120
106
|
return [2 /*return*/, this.service.routeGenerator
|
|
121
|
-
.
|
|
122
|
-
.
|
|
107
|
+
.post(exports.Routes.BATCH_GET_AVAILABILITY_HOURS)
|
|
108
|
+
.withPayload(params)
|
|
123
109
|
.withExtractor(function (response) { return response.availability_hours; })
|
|
124
110
|
.invoke()];
|
|
125
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAiD;AAOpC,QAAA,MAAM,GAAG;IACrB,sBAAsB,EAAE,8BAA8B;IACtD,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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BAAO,QAAQ,EAAC;;;;KAChB;IAEa,0EAAiC,GAA/C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,GAAG,CAAC,cAAM,CAAC,sBAAsB,CAAC;yBAClC,eAAe,CAAC,MAAM,CAAC;yBACvB,aAAa,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,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,MAAyD;;;gBAC3G,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,EAAwE,EAAC;;;KACjF;IACF,qCAAC;AAAD,CAAC,AAhDD,CAA4D,qBAAW,GAgDtE"}
|
|
@@ -4,16 +4,20 @@ import { SessionBasedService } from '../Services/SessionBasedService';
|
|
|
4
4
|
import { AssignUserManualData, OptimizationResponseFailed, OptimizationResponseSuccess, OptimizationResult, RouteOptimizationRequest, RouteOptimizationResponse, TeamsToOptimize, UpdateOptimizationModifiedData } from './RouteOptimization.consts';
|
|
5
5
|
export default class RouteOptimizationApi extends SessionBasedService {
|
|
6
6
|
private optimization;
|
|
7
|
+
private optimization_v2;
|
|
7
8
|
private get_optimization_result;
|
|
9
|
+
private get_optimization_result_v2;
|
|
8
10
|
private cancel_requests;
|
|
11
|
+
private cancel_requests_v2;
|
|
9
12
|
private assign_users_by_ids;
|
|
10
13
|
private update_user_modified_data;
|
|
14
|
+
private update_user_modified_data_v2;
|
|
11
15
|
private assign_user_manual_optimization;
|
|
12
16
|
constructor(session: Session);
|
|
13
|
-
cancelRequests(requestUuids: string[]): Promise<RouteOptimizationResponse>;
|
|
14
|
-
optimize(optimizationProps: RouteOptimizationRequest): Promise<OptimizationResponseSuccess | OptimizationResponseFailed>;
|
|
15
|
-
optimizationResult(request_uuid: uuid): Promise<OptimizationResult>;
|
|
17
|
+
cancelRequests(requestUuids: string[], v2?: boolean): Promise<RouteOptimizationResponse>;
|
|
18
|
+
optimize(optimizationProps: RouteOptimizationRequest, v2?: boolean): Promise<OptimizationResponseSuccess | OptimizationResponseFailed>;
|
|
19
|
+
optimizationResult(request_uuid: uuid, v2?: boolean): Promise<OptimizationResult>;
|
|
16
20
|
assignUsersByIds(teams: TeamsToOptimize): Promise<RouteOptimizationResponse>;
|
|
17
|
-
updateOptimizationModifiedData(updateData: UpdateOptimizationModifiedData): Promise<RouteOptimizationResponse>;
|
|
21
|
+
updateOptimizationModifiedData(updateData: UpdateOptimizationModifiedData, v2?: boolean): Promise<RouteOptimizationResponse>;
|
|
18
22
|
assignUserManualOptimization(updateData: AssignUserManualData): Promise<RouteOptimizationResponse>;
|
|
19
23
|
}
|
|
@@ -35,32 +35,39 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
35
35
|
function RouteOptimizationApi(session) {
|
|
36
36
|
var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;
|
|
37
37
|
_this.optimization = new Route_1.Route('/route_optimizations/optimize', 1 /* HttpMethod.POST */);
|
|
38
|
+
_this.optimization_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/optimize', 1 /* HttpMethod.POST */);
|
|
38
39
|
_this.get_optimization_result = new Route_1.Route('/route_optimizations/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);
|
|
40
|
+
_this.get_optimization_result_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);
|
|
39
41
|
_this.cancel_requests = new Route_1.Route('/route_optimizations/optimization', 4 /* HttpMethod.DELETE */);
|
|
42
|
+
_this.cancel_requests_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/optimization', 4 /* HttpMethod.DELETE */);
|
|
40
43
|
_this.assign_users_by_ids = new Route_1.Route('/route_optimizations/assign_users_by_ids', 1 /* HttpMethod.POST */);
|
|
41
44
|
_this.update_user_modified_data = new Route_1.Route('/route_optimizations/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
45
|
+
_this.update_user_modified_data_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
42
46
|
_this.assign_user_manual_optimization = new Route_1.Route('/route_optimizations/assign_user_manual_optimization', 1 /* HttpMethod.POST */);
|
|
43
47
|
return _this;
|
|
44
48
|
}
|
|
45
|
-
RouteOptimizationApi.prototype.cancelRequests = function (requestUuids) {
|
|
49
|
+
RouteOptimizationApi.prototype.cancelRequests = function (requestUuids, v2) {
|
|
50
|
+
if (v2 === void 0) { v2 = false; }
|
|
46
51
|
return this.handleAuthorizedRequest({
|
|
47
|
-
route: this.cancel_requests,
|
|
52
|
+
route: v2 ? this.cancel_requests_v2 : this.cancel_requests,
|
|
48
53
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
49
54
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call cancel optimization requests'),
|
|
50
55
|
payload: { request_uuids: requestUuids }
|
|
51
56
|
});
|
|
52
57
|
};
|
|
53
|
-
RouteOptimizationApi.prototype.optimize = function (optimizationProps) {
|
|
58
|
+
RouteOptimizationApi.prototype.optimize = function (optimizationProps, v2) {
|
|
59
|
+
if (v2 === void 0) { v2 = false; }
|
|
54
60
|
return this.handleAuthorizedRequest({
|
|
55
|
-
route: this.optimization,
|
|
61
|
+
route: v2 ? this.optimization_v2 : this.optimization,
|
|
56
62
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
57
63
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call optimization requests'),
|
|
58
64
|
payload: optimizationProps
|
|
59
65
|
});
|
|
60
66
|
};
|
|
61
|
-
RouteOptimizationApi.prototype.optimizationResult = function (request_uuid) {
|
|
67
|
+
RouteOptimizationApi.prototype.optimizationResult = function (request_uuid, v2) {
|
|
68
|
+
if (v2 === void 0) { v2 = false; }
|
|
62
69
|
return this.handleAuthorizedRequest({
|
|
63
|
-
route: this.get_optimization_result,
|
|
70
|
+
route: v2 ? this.get_optimization_result_v2 : this.get_optimization_result,
|
|
64
71
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
65
72
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get optimization results'),
|
|
66
73
|
routeParams: { request_uuid: request_uuid }
|
|
@@ -74,9 +81,10 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
74
81
|
payload: { origin: 'route_optimization', teams: teams }
|
|
75
82
|
});
|
|
76
83
|
};
|
|
77
|
-
RouteOptimizationApi.prototype.updateOptimizationModifiedData = function (updateData) {
|
|
84
|
+
RouteOptimizationApi.prototype.updateOptimizationModifiedData = function (updateData, v2) {
|
|
85
|
+
if (v2 === void 0) { v2 = false; }
|
|
78
86
|
return this.handleAuthorizedRequest({
|
|
79
|
-
route: this.update_user_modified_data,
|
|
87
|
+
route: v2 ? this.update_user_modified_data_v2 : this.update_user_modified_data,
|
|
80
88
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
81
89
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update optimization user data'),
|
|
82
90
|
payload: __assign({}, updateData)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteOptimizationApi.js","sourceRoot":"","sources":["../../src/RouteOptimization/RouteOptimizationApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAA0D;AAE1D,yDAA0D;AAE1D,2CAA0C;AAC1C,uEAAsE;AAYtE;IAAkD,wCAAmB;
|
|
1
|
+
{"version":3,"file":"RouteOptimizationApi.js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,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC,IAAI,CAAC,yBAAyB;YAC9E,SAAS,EAAE,iCAAgB;YAC3B,iBAAiB,EAAE,iCAAe,CAAC,gBAAgB,CAAC,yCAAyC,CAAC;YAC9F,OAAO,eAAO,UAAU,CAAE;SAC1B,CAAC,CAAC;IACJ,CAAC;IAEM,2DAA4B,GAAnC,UAAoC,UAAgC;QACnE,IAAM,eAAe,GAAG,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC;QAEtC,OAAO,IAAI,CAAC,uBAAuB,CAAC;YACnC,KAAK,EAAE,IAAI,CAAC,+BAA+B;YAC3C,SAAS,EAAE,iCAAgB;YAC3B,iBAAiB,EAAE,iCAAe,CAAC,gBAAgB,CAAC,gDAAgD,CAAC;YACrG,OAAO,eAAO,UAAU,CAAE;YAC1B,OAAO,EAAE,eAAe;SACxB,CAAC,CAAC;IACJ,CAAC;IACF,2BAAC;AAAD,CAAC,AA7FD,CAAkD,yCAAmB,GA6FpE"}
|
|
@@ -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.
|
|
56
|
+
var version = '8.15.0-pre';
|
|
57
57
|
function logErrorResponse(response) {
|
|
58
58
|
var data = response.data, status = response.status;
|
|
59
59
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateWorkflowRequest, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, TasksManualParams, UpdateWorkflowRequest, WorkflowResponse, WorkflowTemplateResponse } from '@bringg/types';
|
|
1
|
+
import { CreateWorkflowRequest, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, TasksManualParams, UpdateWorkflowRequest, WorkflowManualTriggersResponse, WorkflowResponse, WorkflowTemplateResponse } from '@bringg/types';
|
|
2
2
|
import { CommonOptions } from '../../Core/RouteGenerator';
|
|
3
3
|
import { DataEntity, DataOptions, StorableItemMapper } from '../../data-entity';
|
|
4
4
|
import Session from '../../Services/Identity/Session';
|
|
@@ -6,7 +6,6 @@ export default class WorkflowsApi<T extends DataEntity> {
|
|
|
6
6
|
private readonly workflowStore;
|
|
7
7
|
private readonly workflowsService;
|
|
8
8
|
private readonly storableDataService;
|
|
9
|
-
private manualTriggers;
|
|
10
9
|
private manualTriggersConfig;
|
|
11
10
|
loadAll: <T extends DataEntity>(options?: DataOptions) => Promise<T[]>;
|
|
12
11
|
duplicate: <T extends DataEntity>(id: number, commonOption?: CommonOptions) => Promise<T>;
|
|
@@ -19,7 +18,7 @@ export default class WorkflowsApi<T extends DataEntity> {
|
|
|
19
18
|
getAll(): T[];
|
|
20
19
|
getTemplates(commonOption?: CommonOptions): Promise<WorkflowTemplateResponse[]>;
|
|
21
20
|
manualTrigger(triggerName: string, triggerRequest: ManualTriggerRequest, commonOptions?: CommonOptions): Promise<ManualTriggerResponse[]>;
|
|
22
|
-
getManualTriggers(commonOptions?: CommonOptions): Promise<string[]>;
|
|
23
21
|
syncGetManualTriggersConfig(): TasksManualParams[] | undefined;
|
|
24
22
|
getManualTriggersConfig(commonOptions?: CommonOptions): Promise<TasksManualParams[]>;
|
|
23
|
+
getManualTriggers(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponse>;
|
|
25
24
|
}
|
|
@@ -74,25 +74,6 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
//todo - remove https://bringg.atlassian.net/browse/BRNGG-24362
|
|
78
|
-
WorkflowsApi.prototype.getManualTriggers = function (commonOptions) {
|
|
79
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
var _a;
|
|
82
|
-
return __generator(this, function (_b) {
|
|
83
|
-
switch (_b.label) {
|
|
84
|
-
case 0:
|
|
85
|
-
if (!!this.manualTriggers) return [3 /*break*/, 2];
|
|
86
|
-
_a = this;
|
|
87
|
-
return [4 /*yield*/, this.workflowsService.getManualTriggers(commonOptions)];
|
|
88
|
-
case 1:
|
|
89
|
-
_a.manualTriggers = _b.sent();
|
|
90
|
-
_b.label = 2;
|
|
91
|
-
case 2: return [2 /*return*/, this.manualTriggers];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
77
|
WorkflowsApi.prototype.syncGetManualTriggersConfig = function () {
|
|
97
78
|
return this.manualTriggersConfig;
|
|
98
79
|
};
|
|
@@ -114,6 +95,17 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
114
95
|
});
|
|
115
96
|
});
|
|
116
97
|
};
|
|
98
|
+
WorkflowsApi.prototype.getManualTriggers = function (commonOptions) {
|
|
99
|
+
if (commonOptions === void 0) { commonOptions = {}; }
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggersV3(commonOptions)];
|
|
104
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
};
|
|
117
109
|
return WorkflowsApi;
|
|
118
110
|
}());
|
|
119
111
|
exports.default = WorkflowsApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-api.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workflows-api.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,+CAAyC;AAEzC,mEAA4D;AAC5D,qEAA8D;AA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;QAAjC,8BAAA,EAAA,kBAAiC;;;;;;6BACjE,CAAC,IAAI,CAAC,oBAAoB,EAA1B,wBAA0B;wBAC7B,KAAA,IAAI,CAAA;wBAAwB,qBAAM,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,aAAa,CAAC,EAAA;;wBAA9F,GAAK,oBAAoB,GAAG,SAAkE,CAAC;;4BAGhG,sBAAO,IAAI,CAAC,oBAAoB,EAAC;;;;KACjC;IAEY,wCAAiB,GAA9B,UAA+B,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;;;;4BACxD,qBAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAA;4BAArE,sBAAO,SAA8D,EAAC;;;;KACtE;IACF,mBAAC;AAAD,CAAC,AA9DD,IA8DC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CreateWorkflowRequest, CreateWorkflowResponse, GetAllWorkflowResponse, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, TasksManualParams, UpdateWorkflowRequest, WorkflowTemplateResponse } from '@bringg/types';
|
|
1
|
+
import { CreateWorkflowRequest, CreateWorkflowResponse, GetAllWorkflowResponse, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, TasksManualParams, UpdateWorkflowRequest, WorkflowManualTriggersResponse, WorkflowTemplateResponse } from '@bringg/types';
|
|
2
2
|
import { DELETE_RESPONSE } from '../../Core/CrudService';
|
|
3
3
|
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 manualTriggers;
|
|
7
8
|
constructor(session: Session);
|
|
8
9
|
loadAll(commonOptions?: CommonOptions): Promise<GetAllWorkflowResponse>;
|
|
9
10
|
delete(id: number, commonOptions?: CommonOptions): Promise<DELETE_RESPONSE>;
|
|
@@ -13,6 +14,6 @@ export default class WorkflowsService {
|
|
|
13
14
|
duplicate(workflowId: number, commonOptions?: CommonOptions): Promise<CreateWorkflowResponse>;
|
|
14
15
|
getTemplates(commonOptions?: CommonOptions): Promise<WorkflowTemplateResponse[]>;
|
|
15
16
|
manualTrigger(triggerName: string, triggerRequest: ManualTriggerRequest, commonOptions?: CommonOptions): Promise<ManualTriggerResponse[]>;
|
|
16
|
-
getManualTriggers(commonOptions?: CommonOptions): Promise<string[]>;
|
|
17
17
|
getManualTriggersConfig(commonOptions?: CommonOptions): Promise<TasksManualParams[]>;
|
|
18
|
+
getManualTriggersV3(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponse>;
|
|
18
19
|
}
|
|
@@ -112,14 +112,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
112
112
|
.withCommonOptions(commonOptions)
|
|
113
113
|
.invoke();
|
|
114
114
|
};
|
|
115
|
-
//todo - remove https://bringg.atlassian.net/browse/BRNGG-24362
|
|
116
|
-
WorkflowsService.prototype.getManualTriggers = function (commonOptions) {
|
|
117
|
-
return this.service.routeGenerator
|
|
118
|
-
.get("".concat(baseRoute, "/manual"))
|
|
119
|
-
.setException('failed to get manual triggers')
|
|
120
|
-
.withCommonOptions(commonOptions)
|
|
121
|
-
.invoke();
|
|
122
|
-
};
|
|
123
115
|
WorkflowsService.prototype.getManualTriggersConfig = function (commonOptions) {
|
|
124
116
|
return this.service.routeGenerator
|
|
125
117
|
.get("".concat(baseRoute, "/v2/manual"))
|
|
@@ -127,6 +119,27 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
127
119
|
.withCommonOptions(commonOptions)
|
|
128
120
|
.invoke();
|
|
129
121
|
};
|
|
122
|
+
WorkflowsService.prototype.getManualTriggersV3 = function (commonOptions) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
+
var _a;
|
|
125
|
+
return __generator(this, function (_b) {
|
|
126
|
+
switch (_b.label) {
|
|
127
|
+
case 0:
|
|
128
|
+
if (!!this.manualTriggers) return [3 /*break*/, 2];
|
|
129
|
+
_a = this;
|
|
130
|
+
return [4 /*yield*/, this.service.routeGenerator
|
|
131
|
+
.get("".concat(baseRoute, "/v3/manual"))
|
|
132
|
+
.setException('failed to get manual triggers configuration')
|
|
133
|
+
.withCommonOptions(commonOptions)
|
|
134
|
+
.invoke()];
|
|
135
|
+
case 1:
|
|
136
|
+
_a.manualTriggers = _b.sent();
|
|
137
|
+
_b.label = 2;
|
|
138
|
+
case 2: return [2 /*return*/, this.manualTriggers];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
};
|
|
130
143
|
return WorkflowsService;
|
|
131
144
|
}());
|
|
132
145
|
exports.default = WorkflowsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-service.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workflows-service.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,sDAAsE;AAItE,IAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,IAAM,SAAS,GAAG,WAAI,UAAU,CAAE,CAAC;AAEnC;IAIC,0BAAY,OAAgB;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;IAEY,kCAAO,GAApB,UAAqB,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;;;gBACrD,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,EAAC;;;KACrD;IAEY,iCAAM,GAAnB,UAAoB,EAAU,EAAE,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;;;gBAChE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SA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CAAC,cAAc;aAChC,IAAI,CAAC,UAAG,SAAS,oBAAiB,CAAC;aACnC,eAAe,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;aACtC,WAAW,CAAC,cAAc,CAAC;aAC3B,YAAY,CAAC,oCAA6B,WAAW,CAAE,CAAC;aACxD,iBAAiB,CAAC,aAAa,CAAC;aAChC,MAAM,EAAoD,CAAC;IAC9D,CAAC;IAEM,kDAAuB,GAA9B,UAA+B,aAA6B;QAC3D,OAAO,IAAI,CAAC,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,cAAc,EAApB,wBAAoB;wBACvB,KAAA,IAAI,CAAA;wBAAkB,qBAAM,IAAI,CAAC,OAAO,CAAC,cAAc;iCACrD,GAAG,CAAC,UAAG,SAAS,eAAY,CAAC;iCAC7B,YAAY,CAAC,6CAA6C,CAAC;iCAC3D,iBAAiB,CAAC,aAAa,CAAC;iCAChC,MAAM,EAAkE,EAAA;;wBAJ1E,GAAK,cAAc,GAAG,SAIoD,CAAC;;4BAG5E,sBAAO,IAAI,CAAC,cAAc,EAAC;;;;KAC3B;IACF,uBAAC;AAAD,CAAC,AA/ED,IA+EC"}
|
|
@@ -6567,10 +6567,7 @@ var CustomerAvailabilityHourApi = /** @class */ (function () {
|
|
|
6567
6567
|
};
|
|
6568
6568
|
CustomerAvailabilityHourApi.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
6569
6569
|
return __awaiter(this, void 0, void 0, function () {
|
|
6570
|
-
var a;
|
|
6571
6570
|
return __generator(this, function (_a) {
|
|
6572
|
-
a = this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params);
|
|
6573
|
-
console.log('a', a);
|
|
6574
6571
|
return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
|
|
6575
6572
|
});
|
|
6576
6573
|
});
|
|
@@ -6643,7 +6640,7 @@ exports.Routes = void 0;
|
|
|
6643
6640
|
var StoreEntity_1 = __webpack_require__(95574);
|
|
6644
6641
|
exports.Routes = {
|
|
6645
6642
|
GET_AVAILABILITY_HOURS: '/customer_availability_hours',
|
|
6646
|
-
BATCH_GET_AVAILABILITY_HOURS: '/
|
|
6643
|
+
BATCH_GET_AVAILABILITY_HOURS: '/customer_availability_hours/batch_get'
|
|
6647
6644
|
};
|
|
6648
6645
|
var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
6649
6646
|
__extends(CustomerAvailabilityHourEntity, _super);
|
|
@@ -6674,20 +6671,6 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
|
6674
6671
|
});
|
|
6675
6672
|
});
|
|
6676
6673
|
};
|
|
6677
|
-
CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
6678
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
6679
|
-
var response;
|
|
6680
|
-
return __generator(this, function (_a) {
|
|
6681
|
-
switch (_a.label) {
|
|
6682
|
-
case 0: return [4 /*yield*/, this._getBatchTaskCustomerAvailabilityHours(params)];
|
|
6683
|
-
case 1:
|
|
6684
|
-
response = _a.sent();
|
|
6685
|
-
console.log('response', response);
|
|
6686
|
-
return [2 /*return*/, response];
|
|
6687
|
-
}
|
|
6688
|
-
});
|
|
6689
|
-
});
|
|
6690
|
-
};
|
|
6691
6674
|
CustomerAvailabilityHourEntity.prototype._getTaskCustomerAvailabilityHours = function (params) {
|
|
6692
6675
|
return __awaiter(this, void 0, void 0, function () {
|
|
6693
6676
|
return __generator(this, function (_a) {
|
|
@@ -6702,12 +6685,12 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
|
|
|
6702
6685
|
CustomerAvailabilityHourEntity.prototype._getKey = function (customerId, taskId) {
|
|
6703
6686
|
return "customer_id:".concat(customerId, ":task_id:").concat(taskId);
|
|
6704
6687
|
};
|
|
6705
|
-
CustomerAvailabilityHourEntity.prototype.
|
|
6688
|
+
CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
|
|
6706
6689
|
return __awaiter(this, void 0, void 0, function () {
|
|
6707
6690
|
return __generator(this, function (_a) {
|
|
6708
6691
|
return [2 /*return*/, this.service.routeGenerator
|
|
6709
|
-
.
|
|
6710
|
-
.
|
|
6692
|
+
.post(exports.Routes.BATCH_GET_AVAILABILITY_HOURS)
|
|
6693
|
+
.withPayload(params)
|
|
6711
6694
|
.withExtractor(function (response) { return response.availability_hours; })
|
|
6712
6695
|
.invoke()];
|
|
6713
6696
|
});
|
|
@@ -16567,32 +16550,39 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
16567
16550
|
function RouteOptimizationApi(session) {
|
|
16568
16551
|
var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;
|
|
16569
16552
|
_this.optimization = new Route_1.Route('/route_optimizations/optimize', 1 /* HttpMethod.POST */);
|
|
16553
|
+
_this.optimization_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/optimize', 1 /* HttpMethod.POST */);
|
|
16570
16554
|
_this.get_optimization_result = new Route_1.Route('/route_optimizations/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);
|
|
16555
|
+
_this.get_optimization_result_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);
|
|
16571
16556
|
_this.cancel_requests = new Route_1.Route('/route_optimizations/optimization', 4 /* HttpMethod.DELETE */);
|
|
16557
|
+
_this.cancel_requests_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/optimization', 4 /* HttpMethod.DELETE */);
|
|
16572
16558
|
_this.assign_users_by_ids = new Route_1.Route('/route_optimizations/assign_users_by_ids', 1 /* HttpMethod.POST */);
|
|
16573
16559
|
_this.update_user_modified_data = new Route_1.Route('/route_optimizations/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
16560
|
+
_this.update_user_modified_data_v2 = new Route_1.Route('/own-fleet-optimization-service/route_optimization/update_user_modified_data', 1 /* HttpMethod.POST */);
|
|
16574
16561
|
_this.assign_user_manual_optimization = new Route_1.Route('/route_optimizations/assign_user_manual_optimization', 1 /* HttpMethod.POST */);
|
|
16575
16562
|
return _this;
|
|
16576
16563
|
}
|
|
16577
|
-
RouteOptimizationApi.prototype.cancelRequests = function (requestUuids) {
|
|
16564
|
+
RouteOptimizationApi.prototype.cancelRequests = function (requestUuids, v2) {
|
|
16565
|
+
if (v2 === void 0) { v2 = false; }
|
|
16578
16566
|
return this.handleAuthorizedRequest({
|
|
16579
|
-
route: this.cancel_requests,
|
|
16567
|
+
route: v2 ? this.cancel_requests_v2 : this.cancel_requests,
|
|
16580
16568
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
16581
16569
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call cancel optimization requests'),
|
|
16582
16570
|
payload: { request_uuids: requestUuids }
|
|
16583
16571
|
});
|
|
16584
16572
|
};
|
|
16585
|
-
RouteOptimizationApi.prototype.optimize = function (optimizationProps) {
|
|
16573
|
+
RouteOptimizationApi.prototype.optimize = function (optimizationProps, v2) {
|
|
16574
|
+
if (v2 === void 0) { v2 = false; }
|
|
16586
16575
|
return this.handleAuthorizedRequest({
|
|
16587
|
-
route: this.optimization,
|
|
16576
|
+
route: v2 ? this.optimization_v2 : this.optimization,
|
|
16588
16577
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
16589
16578
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call optimization requests'),
|
|
16590
16579
|
payload: optimizationProps
|
|
16591
16580
|
});
|
|
16592
16581
|
};
|
|
16593
|
-
RouteOptimizationApi.prototype.optimizationResult = function (request_uuid) {
|
|
16582
|
+
RouteOptimizationApi.prototype.optimizationResult = function (request_uuid, v2) {
|
|
16583
|
+
if (v2 === void 0) { v2 = false; }
|
|
16594
16584
|
return this.handleAuthorizedRequest({
|
|
16595
|
-
route: this.get_optimization_result,
|
|
16585
|
+
route: v2 ? this.get_optimization_result_v2 : this.get_optimization_result,
|
|
16596
16586
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
16597
16587
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get optimization results'),
|
|
16598
16588
|
routeParams: { request_uuid: request_uuid }
|
|
@@ -16606,9 +16596,10 @@ var RouteOptimizationApi = /** @class */ (function (_super) {
|
|
|
16606
16596
|
payload: { origin: 'route_optimization', teams: teams }
|
|
16607
16597
|
});
|
|
16608
16598
|
};
|
|
16609
|
-
RouteOptimizationApi.prototype.updateOptimizationModifiedData = function (updateData) {
|
|
16599
|
+
RouteOptimizationApi.prototype.updateOptimizationModifiedData = function (updateData, v2) {
|
|
16600
|
+
if (v2 === void 0) { v2 = false; }
|
|
16610
16601
|
return this.handleAuthorizedRequest({
|
|
16611
|
-
route: this.update_user_modified_data,
|
|
16602
|
+
route: v2 ? this.update_user_modified_data_v2 : this.update_user_modified_data,
|
|
16612
16603
|
extractor: RouteGenerator_1.defaultExtractor,
|
|
16613
16604
|
exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update optimization user data'),
|
|
16614
16605
|
payload: __assign({}, updateData)
|
|
@@ -20205,7 +20196,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
20205
20196
|
var BringgException_1 = __webpack_require__(43605);
|
|
20206
20197
|
var Logger_1 = __webpack_require__(55860);
|
|
20207
20198
|
var abort_1 = __webpack_require__(34179);
|
|
20208
|
-
var version = '8.
|
|
20199
|
+
var version = '8.15.0-pre';
|
|
20209
20200
|
function logErrorResponse(response) {
|
|
20210
20201
|
var data = response.data, status = response.status;
|
|
20211
20202
|
try {
|
|
@@ -28556,25 +28547,6 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
28556
28547
|
});
|
|
28557
28548
|
});
|
|
28558
28549
|
};
|
|
28559
|
-
//todo - remove https://bringg.atlassian.net/browse/BRNGG-24362
|
|
28560
|
-
WorkflowsApi.prototype.getManualTriggers = function (commonOptions) {
|
|
28561
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28562
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
28563
|
-
var _a;
|
|
28564
|
-
return __generator(this, function (_b) {
|
|
28565
|
-
switch (_b.label) {
|
|
28566
|
-
case 0:
|
|
28567
|
-
if (!!this.manualTriggers) return [3 /*break*/, 2];
|
|
28568
|
-
_a = this;
|
|
28569
|
-
return [4 /*yield*/, this.workflowsService.getManualTriggers(commonOptions)];
|
|
28570
|
-
case 1:
|
|
28571
|
-
_a.manualTriggers = _b.sent();
|
|
28572
|
-
_b.label = 2;
|
|
28573
|
-
case 2: return [2 /*return*/, this.manualTriggers];
|
|
28574
|
-
}
|
|
28575
|
-
});
|
|
28576
|
-
});
|
|
28577
|
-
};
|
|
28578
28550
|
WorkflowsApi.prototype.syncGetManualTriggersConfig = function () {
|
|
28579
28551
|
return this.manualTriggersConfig;
|
|
28580
28552
|
};
|
|
@@ -28596,6 +28568,17 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
28596
28568
|
});
|
|
28597
28569
|
});
|
|
28598
28570
|
};
|
|
28571
|
+
WorkflowsApi.prototype.getManualTriggers = function (commonOptions) {
|
|
28572
|
+
if (commonOptions === void 0) { commonOptions = {}; }
|
|
28573
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
28574
|
+
return __generator(this, function (_a) {
|
|
28575
|
+
switch (_a.label) {
|
|
28576
|
+
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggersV3(commonOptions)];
|
|
28577
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
28578
|
+
}
|
|
28579
|
+
});
|
|
28580
|
+
});
|
|
28581
|
+
};
|
|
28599
28582
|
return WorkflowsApi;
|
|
28600
28583
|
}());
|
|
28601
28584
|
exports["default"] = WorkflowsApi;
|
|
@@ -28721,14 +28704,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28721
28704
|
.withCommonOptions(commonOptions)
|
|
28722
28705
|
.invoke();
|
|
28723
28706
|
};
|
|
28724
|
-
//todo - remove https://bringg.atlassian.net/browse/BRNGG-24362
|
|
28725
|
-
WorkflowsService.prototype.getManualTriggers = function (commonOptions) {
|
|
28726
|
-
return this.service.routeGenerator
|
|
28727
|
-
.get("".concat(baseRoute, "/manual"))
|
|
28728
|
-
.setException('failed to get manual triggers')
|
|
28729
|
-
.withCommonOptions(commonOptions)
|
|
28730
|
-
.invoke();
|
|
28731
|
-
};
|
|
28732
28707
|
WorkflowsService.prototype.getManualTriggersConfig = function (commonOptions) {
|
|
28733
28708
|
return this.service.routeGenerator
|
|
28734
28709
|
.get("".concat(baseRoute, "/v2/manual"))
|
|
@@ -28736,6 +28711,27 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
28736
28711
|
.withCommonOptions(commonOptions)
|
|
28737
28712
|
.invoke();
|
|
28738
28713
|
};
|
|
28714
|
+
WorkflowsService.prototype.getManualTriggersV3 = function (commonOptions) {
|
|
28715
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
28716
|
+
var _a;
|
|
28717
|
+
return __generator(this, function (_b) {
|
|
28718
|
+
switch (_b.label) {
|
|
28719
|
+
case 0:
|
|
28720
|
+
if (!!this.manualTriggers) return [3 /*break*/, 2];
|
|
28721
|
+
_a = this;
|
|
28722
|
+
return [4 /*yield*/, this.service.routeGenerator
|
|
28723
|
+
.get("".concat(baseRoute, "/v3/manual"))
|
|
28724
|
+
.setException('failed to get manual triggers configuration')
|
|
28725
|
+
.withCommonOptions(commonOptions)
|
|
28726
|
+
.invoke()];
|
|
28727
|
+
case 1:
|
|
28728
|
+
_a.manualTriggers = _b.sent();
|
|
28729
|
+
_b.label = 2;
|
|
28730
|
+
case 2: return [2 /*return*/, this.manualTriggers];
|
|
28731
|
+
}
|
|
28732
|
+
});
|
|
28733
|
+
});
|
|
28734
|
+
};
|
|
28739
28735
|
return WorkflowsService;
|
|
28740
28736
|
}());
|
|
28741
28737
|
exports["default"] = WorkflowsService;
|