@bringg/dashboard-sdk 9.26.2 → 9.27.0-pre.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/Services/ServiceRequest.js +1 -1
- package/dist/Workflow/v2/workflows-api.d.ts +3 -5
- package/dist/Workflow/v2/workflows-api.js +3 -22
- package/dist/Workflow/v2/workflows-api.js.map +1 -1
- package/dist/Workflow/v2/workflows-service.d.ts +3 -6
- package/dist/Workflow/v2/workflows-service.js +3 -38
- package/dist/Workflow/v2/workflows-service.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +7 -61
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +3 -3
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -56,7 +56,7 @@ var lodash_1 = require("lodash");
|
|
|
56
56
|
var BringgException_1 = require("../Core/BringgException");
|
|
57
57
|
var Logger_1 = __importDefault(require("../Core/Logger"));
|
|
58
58
|
var abort_1 = require("../utils/abort");
|
|
59
|
-
var version = '9.
|
|
59
|
+
var version = '9.27.0-pre.1';
|
|
60
60
|
function logErrorResponse(response) {
|
|
61
61
|
var data = response.data, status = response.status;
|
|
62
62
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateWorkflowRequest, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, UpdateWorkflowRequest,
|
|
1
|
+
import { CreateWorkflowRequest, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, UpdateWorkflowRequest, WorkflowManualTriggersResponseV4, 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';
|
|
@@ -16,8 +16,6 @@ export default class WorkflowsApi<T extends DataEntity> {
|
|
|
16
16
|
get(id: number): T;
|
|
17
17
|
getAll(): T[];
|
|
18
18
|
getTemplates(commonOption?: CommonOptions): Promise<WorkflowTemplateResponse[]>;
|
|
19
|
-
manualTrigger(
|
|
20
|
-
|
|
21
|
-
getManualTriggers(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponse>;
|
|
22
|
-
getManualTriggersV4(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponseV4>;
|
|
19
|
+
manualTrigger(workflowId: number, triggerRequest: ManualTriggerRequest, commonOptions?: CommonOptions): Promise<ManualTriggerResponse>;
|
|
20
|
+
getManualTriggers(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponseV4>;
|
|
23
21
|
}
|
|
@@ -97,19 +97,11 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
97
97
|
});
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
WorkflowsApi.prototype.manualTrigger = function (
|
|
100
|
+
WorkflowsApi.prototype.manualTrigger = function (workflowId, triggerRequest, commonOptions) {
|
|
101
101
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
102
102
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
103
|
return __generator(this, function (_a) {
|
|
104
|
-
return [2 /*return*/, this.workflowsService.manualTrigger(
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
WorkflowsApi.prototype.manualTriggerV3 = function (workflowId, triggerRequest, commonOptions) {
|
|
109
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
110
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
-
return __generator(this, function (_a) {
|
|
112
|
-
return [2 /*return*/, this.workflowsService.manualTriggerV3(workflowId, triggerRequest, commonOptions)];
|
|
104
|
+
return [2 /*return*/, this.workflowsService.manualTrigger(workflowId, triggerRequest, commonOptions)];
|
|
113
105
|
});
|
|
114
106
|
});
|
|
115
107
|
};
|
|
@@ -118,18 +110,7 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
118
110
|
return __awaiter(this, void 0, void 0, function () {
|
|
119
111
|
return __generator(this, function (_a) {
|
|
120
112
|
switch (_a.label) {
|
|
121
|
-
case 0: return [4 /*yield*/, this.workflowsService.
|
|
122
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
WorkflowsApi.prototype.getManualTriggersV4 = function (commonOptions) {
|
|
128
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
129
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
-
return __generator(this, function (_a) {
|
|
131
|
-
switch (_a.label) {
|
|
132
|
-
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggersV4(commonOptions)];
|
|
113
|
+
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggers(commonOptions)];
|
|
133
114
|
case 1: return [2 /*return*/, _a.sent()];
|
|
134
115
|
}
|
|
135
116
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-api.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gEAAyC;AAEzC,sFAA8D;AAC9D,0EAAmD;AAEnD;IAKC,sBAAY,OAAgB,EAAE,MAA+C;QAC5E,IAAI,CAAC,aAAa,GAAG,IAAI,oBAAS,EAAK,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,IAAI,2BAAgB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,mBAAmB,GAAG,IAAI,+BAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAEM,8BAAO,GAAd,UAAe,OAAqB;QAApC,iBAEC;QADA,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAM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AV,UAAW,EAAU;QACpB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEM,6BAAM,GAAb;QACC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;IAEY,mCAAY,GAAzB,UAA0B,YAAgC;QAAhC,6BAAA,EAAA,iBAAgC;;;gBACzD,sBAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,YAAY,CAAC,EAAC;;;KACxD;IAEY,oCAAa,GAA1B,UACC,UAAkB,EAClB,cAAoC,EACpC,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;;;gBAEjC,sBAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC,EAAC;;;KACtF;IAEY,wCAAiB,GAA9B,UAA+B,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;;;;4BACxD,qBAAM,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAA;4BAAnE,sBAAO,SAA4D,EAAC;;;;KACpE;IACF,mBAAC;AAAD,CAAC,AA5DD,IA4DC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { CreateWorkflowRequest, CreateWorkflowResponse, GetAllWorkflowResponse, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, UpdateWorkflowRequest,
|
|
1
|
+
import { CreateWorkflowRequest, CreateWorkflowResponse, GetAllWorkflowResponse, ManualTriggerRequest, ManualTriggerResponse, PatchWorkflowRequest, UpdateWorkflowRequest, WorkflowManualTriggersResponseV4, 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
7
|
private manualTriggersCache;
|
|
8
|
-
private manualTriggersCacheV4;
|
|
9
8
|
constructor(session: Session);
|
|
10
9
|
loadAll(commonOptions?: CommonOptions): Promise<GetAllWorkflowResponse>;
|
|
11
10
|
delete(id: number, commonOptions?: CommonOptions): Promise<DELETE_RESPONSE>;
|
|
@@ -14,8 +13,6 @@ export default class WorkflowsService {
|
|
|
14
13
|
create(workflow: CreateWorkflowRequest, commonOptions?: CommonOptions): Promise<any>;
|
|
15
14
|
duplicate(workflowId: number, commonOptions?: CommonOptions): Promise<CreateWorkflowResponse>;
|
|
16
15
|
getTemplates(commonOptions?: CommonOptions): Promise<WorkflowTemplateResponse[]>;
|
|
17
|
-
manualTrigger(
|
|
18
|
-
|
|
19
|
-
getManualTriggersV3(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponse>;
|
|
20
|
-
getManualTriggersV4(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponseV4>;
|
|
16
|
+
manualTrigger(workflowId: number, triggerRequest: ManualTriggerRequest, commonOptions?: CommonOptions): Promise<ManualTriggerResponse>;
|
|
17
|
+
getManualTriggers(commonOptions?: CommonOptions): Promise<WorkflowManualTriggersResponseV4>;
|
|
21
18
|
}
|
|
@@ -47,7 +47,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
47
47
|
function WorkflowsService(session) {
|
|
48
48
|
this.service = new CrudService_1.default(session, entityName);
|
|
49
49
|
this.manualTriggersCache = new cached_item_1.CachedItem();
|
|
50
|
-
this.manualTriggersCacheV4 = new cached_item_1.CachedItem();
|
|
51
50
|
}
|
|
52
51
|
WorkflowsService.prototype.loadAll = function (commonOptions) {
|
|
53
52
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
@@ -62,7 +61,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
62
61
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
62
|
return __generator(this, function (_a) {
|
|
64
63
|
this.manualTriggersCache.invalidate();
|
|
65
|
-
this.manualTriggersCacheV4.invalidate();
|
|
66
64
|
return [2 /*return*/, this.service.delete(id, undefined, commonOptions)];
|
|
67
65
|
});
|
|
68
66
|
});
|
|
@@ -72,7 +70,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
72
70
|
return __awaiter(this, void 0, void 0, function () {
|
|
73
71
|
return __generator(this, function (_a) {
|
|
74
72
|
this.manualTriggersCache.invalidate();
|
|
75
|
-
this.manualTriggersCacheV4.invalidate();
|
|
76
73
|
return [2 /*return*/, this.service.update(id, workflow, commonOptions)];
|
|
77
74
|
});
|
|
78
75
|
});
|
|
@@ -82,7 +79,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
82
79
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
80
|
return __generator(this, function (_a) {
|
|
84
81
|
this.manualTriggersCache.invalidate();
|
|
85
|
-
this.manualTriggersCacheV4.invalidate();
|
|
86
82
|
return [2 /*return*/, this.service.patch(id, workflow, commonOptions)];
|
|
87
83
|
});
|
|
88
84
|
});
|
|
@@ -92,7 +88,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
92
88
|
return __awaiter(this, void 0, void 0, function () {
|
|
93
89
|
return __generator(this, function (_a) {
|
|
94
90
|
this.manualTriggersCache.invalidate();
|
|
95
|
-
this.manualTriggersCacheV4.invalidate();
|
|
96
91
|
return [2 /*return*/, this.service.create(workflow, commonOptions)];
|
|
97
92
|
});
|
|
98
93
|
});
|
|
@@ -116,16 +111,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
116
111
|
.withCommonOptions(commonOptions)
|
|
117
112
|
.invoke();
|
|
118
113
|
};
|
|
119
|
-
WorkflowsService.prototype.manualTrigger = function (
|
|
120
|
-
return this.service.routeGenerator
|
|
121
|
-
.post("".concat(baseRoute, "/v2/manual/{:name}"))
|
|
122
|
-
.withRouteParams({ name: triggerName })
|
|
123
|
-
.withPayload(triggerRequest)
|
|
124
|
-
.setException("failed to manual trigger: ".concat(triggerName))
|
|
125
|
-
.withCommonOptions(commonOptions)
|
|
126
|
-
.invoke();
|
|
127
|
-
};
|
|
128
|
-
WorkflowsService.prototype.manualTriggerV3 = function (workflowId, triggerRequest, commonOptions) {
|
|
114
|
+
WorkflowsService.prototype.manualTrigger = function (workflowId, triggerRequest, commonOptions) {
|
|
129
115
|
return this.service.routeGenerator
|
|
130
116
|
.post("".concat(baseRoute, "/v3/manual/{:workflow_id}"))
|
|
131
117
|
.withRouteParams({ workflow_id: workflowId })
|
|
@@ -134,7 +120,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
134
120
|
.withCommonOptions(commonOptions)
|
|
135
121
|
.invoke();
|
|
136
122
|
};
|
|
137
|
-
WorkflowsService.prototype.
|
|
123
|
+
WorkflowsService.prototype.getManualTriggers = function (commonOptions) {
|
|
138
124
|
return __awaiter(this, void 0, void 0, function () {
|
|
139
125
|
var _a, _b;
|
|
140
126
|
return __generator(this, function (_c) {
|
|
@@ -142,27 +128,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
142
128
|
case 0:
|
|
143
129
|
if (!!this.manualTriggersCache.isValid()) return [3 /*break*/, 2];
|
|
144
130
|
_b = (_a = this.manualTriggersCache).set;
|
|
145
|
-
return [4 /*yield*/, this.service.routeGenerator
|
|
146
|
-
.get("".concat(baseRoute, "/v3/manual"))
|
|
147
|
-
.setException('failed to get manual triggers configuration')
|
|
148
|
-
.withCommonOptions(commonOptions)
|
|
149
|
-
.invoke()];
|
|
150
|
-
case 1:
|
|
151
|
-
_b.apply(_a, [_c.sent()]);
|
|
152
|
-
_c.label = 2;
|
|
153
|
-
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
WorkflowsService.prototype.getManualTriggersV4 = function (commonOptions) {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
-
var _a, _b;
|
|
161
|
-
return __generator(this, function (_c) {
|
|
162
|
-
switch (_c.label) {
|
|
163
|
-
case 0:
|
|
164
|
-
if (!!this.manualTriggersCacheV4.isValid()) return [3 /*break*/, 2];
|
|
165
|
-
_b = (_a = this.manualTriggersCacheV4).set;
|
|
166
131
|
return [4 /*yield*/, this.service.routeGenerator
|
|
167
132
|
.get("".concat(baseRoute, "/v4/manual"))
|
|
168
133
|
.setException('failed to get manual triggers configuration')
|
|
@@ -171,7 +136,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
171
136
|
case 1:
|
|
172
137
|
_b.apply(_a, [_c.sent()]);
|
|
173
138
|
_c.label = 2;
|
|
174
|
-
case 2: return [2 /*return*/, this.
|
|
139
|
+
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
175
140
|
}
|
|
176
141
|
});
|
|
177
142
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-service.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,uEAAsE;AAGtE,uDAAqD;AAErD,IAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,IAAM,SAAS,GAAG,WAAI,UAAU,CAAE,CAAC;AAEnC;
|
|
1
|
+
{"version":3,"file":"workflows-service.js","sourceRoot":"","sources":["../../../src/Workflow/v2/workflows-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,uEAAsE;AAGtE,uDAAqD;AAErD,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;QACpD,IAAI,CAAC,mBAAmB,GAAG,IAAI,wBAAU,EAAoC,CAAC;IAC/E,CAAC;IAEY,kCAAO,GAApB,UAAqB,aAAiC;QAAjC,8BAAA,EAA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22632,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
22632
22632
|
var BringgException_1 = __webpack_require__(43605);
|
|
22633
22633
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
22634
22634
|
var abort_1 = __webpack_require__(34179);
|
|
22635
|
-
var version = '9.
|
|
22635
|
+
var version = '9.27.0-pre.1';
|
|
22636
22636
|
function logErrorResponse(response) {
|
|
22637
22637
|
var data = response.data, status = response.status;
|
|
22638
22638
|
try {
|
|
@@ -32427,19 +32427,11 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
32427
32427
|
});
|
|
32428
32428
|
});
|
|
32429
32429
|
};
|
|
32430
|
-
WorkflowsApi.prototype.manualTrigger = function (
|
|
32430
|
+
WorkflowsApi.prototype.manualTrigger = function (workflowId, triggerRequest, commonOptions) {
|
|
32431
32431
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
32432
32432
|
return __awaiter(this, void 0, void 0, function () {
|
|
32433
32433
|
return __generator(this, function (_a) {
|
|
32434
|
-
return [2 /*return*/, this.workflowsService.manualTrigger(
|
|
32435
|
-
});
|
|
32436
|
-
});
|
|
32437
|
-
};
|
|
32438
|
-
WorkflowsApi.prototype.manualTriggerV3 = function (workflowId, triggerRequest, commonOptions) {
|
|
32439
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
32440
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
32441
|
-
return __generator(this, function (_a) {
|
|
32442
|
-
return [2 /*return*/, this.workflowsService.manualTriggerV3(workflowId, triggerRequest, commonOptions)];
|
|
32434
|
+
return [2 /*return*/, this.workflowsService.manualTrigger(workflowId, triggerRequest, commonOptions)];
|
|
32443
32435
|
});
|
|
32444
32436
|
});
|
|
32445
32437
|
};
|
|
@@ -32448,18 +32440,7 @@ var WorkflowsApi = /** @class */ (function () {
|
|
|
32448
32440
|
return __awaiter(this, void 0, void 0, function () {
|
|
32449
32441
|
return __generator(this, function (_a) {
|
|
32450
32442
|
switch (_a.label) {
|
|
32451
|
-
case 0: return [4 /*yield*/, this.workflowsService.
|
|
32452
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
32453
|
-
}
|
|
32454
|
-
});
|
|
32455
|
-
});
|
|
32456
|
-
};
|
|
32457
|
-
WorkflowsApi.prototype.getManualTriggersV4 = function (commonOptions) {
|
|
32458
|
-
if (commonOptions === void 0) { commonOptions = {}; }
|
|
32459
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
32460
|
-
return __generator(this, function (_a) {
|
|
32461
|
-
switch (_a.label) {
|
|
32462
|
-
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggersV4(commonOptions)];
|
|
32443
|
+
case 0: return [4 /*yield*/, this.workflowsService.getManualTriggers(commonOptions)];
|
|
32463
32444
|
case 1: return [2 /*return*/, _a.sent()];
|
|
32464
32445
|
}
|
|
32465
32446
|
});
|
|
@@ -32525,7 +32506,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32525
32506
|
function WorkflowsService(session) {
|
|
32526
32507
|
this.service = new CrudService_1.default(session, entityName);
|
|
32527
32508
|
this.manualTriggersCache = new cached_item_1.CachedItem();
|
|
32528
|
-
this.manualTriggersCacheV4 = new cached_item_1.CachedItem();
|
|
32529
32509
|
}
|
|
32530
32510
|
WorkflowsService.prototype.loadAll = function (commonOptions) {
|
|
32531
32511
|
if (commonOptions === void 0) { commonOptions = {}; }
|
|
@@ -32540,7 +32520,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32540
32520
|
return __awaiter(this, void 0, void 0, function () {
|
|
32541
32521
|
return __generator(this, function (_a) {
|
|
32542
32522
|
this.manualTriggersCache.invalidate();
|
|
32543
|
-
this.manualTriggersCacheV4.invalidate();
|
|
32544
32523
|
return [2 /*return*/, this.service.delete(id, undefined, commonOptions)];
|
|
32545
32524
|
});
|
|
32546
32525
|
});
|
|
@@ -32550,7 +32529,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32550
32529
|
return __awaiter(this, void 0, void 0, function () {
|
|
32551
32530
|
return __generator(this, function (_a) {
|
|
32552
32531
|
this.manualTriggersCache.invalidate();
|
|
32553
|
-
this.manualTriggersCacheV4.invalidate();
|
|
32554
32532
|
return [2 /*return*/, this.service.update(id, workflow, commonOptions)];
|
|
32555
32533
|
});
|
|
32556
32534
|
});
|
|
@@ -32560,7 +32538,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32560
32538
|
return __awaiter(this, void 0, void 0, function () {
|
|
32561
32539
|
return __generator(this, function (_a) {
|
|
32562
32540
|
this.manualTriggersCache.invalidate();
|
|
32563
|
-
this.manualTriggersCacheV4.invalidate();
|
|
32564
32541
|
return [2 /*return*/, this.service.patch(id, workflow, commonOptions)];
|
|
32565
32542
|
});
|
|
32566
32543
|
});
|
|
@@ -32570,7 +32547,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32570
32547
|
return __awaiter(this, void 0, void 0, function () {
|
|
32571
32548
|
return __generator(this, function (_a) {
|
|
32572
32549
|
this.manualTriggersCache.invalidate();
|
|
32573
|
-
this.manualTriggersCacheV4.invalidate();
|
|
32574
32550
|
return [2 /*return*/, this.service.create(workflow, commonOptions)];
|
|
32575
32551
|
});
|
|
32576
32552
|
});
|
|
@@ -32594,16 +32570,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32594
32570
|
.withCommonOptions(commonOptions)
|
|
32595
32571
|
.invoke();
|
|
32596
32572
|
};
|
|
32597
|
-
WorkflowsService.prototype.manualTrigger = function (
|
|
32598
|
-
return this.service.routeGenerator
|
|
32599
|
-
.post("".concat(baseRoute, "/v2/manual/{:name}"))
|
|
32600
|
-
.withRouteParams({ name: triggerName })
|
|
32601
|
-
.withPayload(triggerRequest)
|
|
32602
|
-
.setException("failed to manual trigger: ".concat(triggerName))
|
|
32603
|
-
.withCommonOptions(commonOptions)
|
|
32604
|
-
.invoke();
|
|
32605
|
-
};
|
|
32606
|
-
WorkflowsService.prototype.manualTriggerV3 = function (workflowId, triggerRequest, commonOptions) {
|
|
32573
|
+
WorkflowsService.prototype.manualTrigger = function (workflowId, triggerRequest, commonOptions) {
|
|
32607
32574
|
return this.service.routeGenerator
|
|
32608
32575
|
.post("".concat(baseRoute, "/v3/manual/{:workflow_id}"))
|
|
32609
32576
|
.withRouteParams({ workflow_id: workflowId })
|
|
@@ -32612,7 +32579,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32612
32579
|
.withCommonOptions(commonOptions)
|
|
32613
32580
|
.invoke();
|
|
32614
32581
|
};
|
|
32615
|
-
WorkflowsService.prototype.
|
|
32582
|
+
WorkflowsService.prototype.getManualTriggers = function (commonOptions) {
|
|
32616
32583
|
return __awaiter(this, void 0, void 0, function () {
|
|
32617
32584
|
var _a, _b;
|
|
32618
32585
|
return __generator(this, function (_c) {
|
|
@@ -32620,27 +32587,6 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32620
32587
|
case 0:
|
|
32621
32588
|
if (!!this.manualTriggersCache.isValid()) return [3 /*break*/, 2];
|
|
32622
32589
|
_b = (_a = this.manualTriggersCache).set;
|
|
32623
|
-
return [4 /*yield*/, this.service.routeGenerator
|
|
32624
|
-
.get("".concat(baseRoute, "/v3/manual"))
|
|
32625
|
-
.setException('failed to get manual triggers configuration')
|
|
32626
|
-
.withCommonOptions(commonOptions)
|
|
32627
|
-
.invoke()];
|
|
32628
|
-
case 1:
|
|
32629
|
-
_b.apply(_a, [_c.sent()]);
|
|
32630
|
-
_c.label = 2;
|
|
32631
|
-
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
32632
|
-
}
|
|
32633
|
-
});
|
|
32634
|
-
});
|
|
32635
|
-
};
|
|
32636
|
-
WorkflowsService.prototype.getManualTriggersV4 = function (commonOptions) {
|
|
32637
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
32638
|
-
var _a, _b;
|
|
32639
|
-
return __generator(this, function (_c) {
|
|
32640
|
-
switch (_c.label) {
|
|
32641
|
-
case 0:
|
|
32642
|
-
if (!!this.manualTriggersCacheV4.isValid()) return [3 /*break*/, 2];
|
|
32643
|
-
_b = (_a = this.manualTriggersCacheV4).set;
|
|
32644
32590
|
return [4 /*yield*/, this.service.routeGenerator
|
|
32645
32591
|
.get("".concat(baseRoute, "/v4/manual"))
|
|
32646
32592
|
.setException('failed to get manual triggers configuration')
|
|
@@ -32649,7 +32595,7 @@ var WorkflowsService = /** @class */ (function () {
|
|
|
32649
32595
|
case 1:
|
|
32650
32596
|
_b.apply(_a, [_c.sent()]);
|
|
32651
32597
|
_c.label = 2;
|
|
32652
|
-
case 2: return [2 /*return*/, this.
|
|
32598
|
+
case 2: return [2 /*return*/, this.manualTriggersCache.get()];
|
|
32653
32599
|
}
|
|
32654
32600
|
});
|
|
32655
32601
|
});
|