@or-sdk/flows 0.27.3-beta.582.0 → 0.27.3-next.599.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/README.md +1 -1
- package/dist/cjs/Flows.js +101 -126
- package/dist/cjs/Flows.js.map +1 -1
- package/dist/cjs/constants.js +3 -5
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Flows.js +73 -87
- package/dist/esm/Flows.js.map +1 -1
- package/dist/esm/constants.js +1 -9
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/Flows.d.ts +8 -7
- package/dist/types/Flows.d.ts.map +1 -1
- package/dist/types/constants.d.ts +1 -3
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +45 -10
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Flows.ts +126 -115
- package/src/constants.ts +1 -11
- package/src/index.ts +2 -0
- package/src/types.ts +50 -11
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ import { Flows } from '@or-sdk/flows'
|
|
|
10
10
|
// with direct api url
|
|
11
11
|
const flows = new Flows({
|
|
12
12
|
token: 'my-account-token-string',
|
|
13
|
-
|
|
13
|
+
dataHubSvcUrl: 'http://example.data-hub-svc/endpoint',
|
|
14
14
|
deployerUrl: 'http://example.flows/endpoint'
|
|
15
15
|
});
|
|
16
16
|
|
package/dist/cjs/Flows.js
CHANGED
|
@@ -46,31 +46,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
-
if (ar || !(i in from)) {
|
|
52
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
-
ar[i] = from[i];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
-
};
|
|
58
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
50
|
exports.Flows = void 0;
|
|
60
51
|
var base_1 = require("@or-sdk/base");
|
|
61
|
-
var
|
|
52
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
62
53
|
var deployer_1 = require("@or-sdk/deployer");
|
|
63
|
-
var constants_1 = require("./constants");
|
|
64
54
|
var tags_1 = require("@or-sdk/tags");
|
|
65
55
|
var utils_1 = require("./utils");
|
|
66
56
|
var Flows = (function () {
|
|
67
57
|
function Flows(params) {
|
|
68
|
-
var discoveryUrl = params.discoveryUrl, token = params.token, accountId = params.accountId,
|
|
69
|
-
this.
|
|
58
|
+
var discoveryUrl = params.discoveryUrl, token = params.token, accountId = params.accountId, dataHubSvcUrl = params.dataHubSvcUrl, deployerUrl = params.deployerUrl;
|
|
59
|
+
this.dataHubSvc = new data_hub_svc_1.DataHubSvc({
|
|
70
60
|
token: token,
|
|
71
61
|
discoveryUrl: discoveryUrl,
|
|
72
62
|
accountId: accountId,
|
|
73
|
-
|
|
63
|
+
dataHubSvcUrl: dataHubSvcUrl,
|
|
74
64
|
});
|
|
75
65
|
this.deployer = new deployer_1.Deployer({
|
|
76
66
|
token: token,
|
|
@@ -82,147 +72,97 @@ var Flows = (function () {
|
|
|
82
72
|
token: token,
|
|
83
73
|
discoveryUrl: discoveryUrl,
|
|
84
74
|
accountId: accountId,
|
|
85
|
-
|
|
75
|
+
dataHubSvcUrl: dataHubSvcUrl,
|
|
86
76
|
});
|
|
87
77
|
}
|
|
88
|
-
Flows.prototype.
|
|
78
|
+
Flows.prototype.listFlows = function (botId, params, paginationOptions) {
|
|
79
|
+
if (params === void 0) { params = {}; }
|
|
80
|
+
if (paginationOptions === void 0) { paginationOptions = {}; }
|
|
89
81
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
+
var includeQuery, paramsToSend, result;
|
|
90
83
|
return __generator(this, function (_a) {
|
|
91
84
|
switch (_a.label) {
|
|
92
|
-
case 0:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
case 0:
|
|
86
|
+
includeQuery = {};
|
|
87
|
+
if (params.includeDeleted === false || (params.includeDeleted === undefined && params.includeExisting !== false)) {
|
|
88
|
+
includeQuery = { isDeleted: false };
|
|
89
|
+
}
|
|
90
|
+
if (params.includeExisting === false) {
|
|
91
|
+
includeQuery = { isDeleted: true };
|
|
92
|
+
}
|
|
93
|
+
paramsToSend = __assign(__assign(__assign(__assign({}, params), { query: __assign(__assign({}, params.query), includeQuery) }), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {});
|
|
94
|
+
delete paramsToSend.includeDeleted;
|
|
95
|
+
delete paramsToSend.includeExisting;
|
|
96
|
+
return [4, this.dataHubSvc.makeRequest({
|
|
97
|
+
method: 'GET',
|
|
98
|
+
route: 'flows',
|
|
99
|
+
params: paramsToSend,
|
|
100
|
+
})];
|
|
97
101
|
case 1:
|
|
98
|
-
_a.sent();
|
|
99
|
-
return [2];
|
|
102
|
+
result = _a.sent();
|
|
103
|
+
return [2, (0, base_1.makeList)(result)];
|
|
100
104
|
}
|
|
101
105
|
});
|
|
102
106
|
});
|
|
103
107
|
};
|
|
104
|
-
Flows.prototype.
|
|
108
|
+
Flows.prototype.getFlow = function (id, params) {
|
|
109
|
+
if (params === void 0) { params = {}; }
|
|
105
110
|
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
var requestParams, route, result, flowList, query, projection;
|
|
107
111
|
return __generator(this, function (_a) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
'botId',
|
|
114
|
-
'data.label',
|
|
115
|
-
'data.color',
|
|
116
|
-
'data.description',
|
|
117
|
-
'data.isHidden',
|
|
118
|
-
'tags',
|
|
119
|
-
'dateModified',
|
|
120
|
-
] }, params);
|
|
121
|
-
route = "/v2/".concat(this.dataHub.currentAccountId ? this.dataHub.currentAccountId : 'current', "/flows");
|
|
122
|
-
flowList = [];
|
|
123
|
-
query = { botId: botId ? botId : undefined };
|
|
124
|
-
projection = JSON.stringify(requestParams.projection);
|
|
125
|
-
_a.label = 1;
|
|
126
|
-
case 1: return [4, this.dataHub.makeRequest({
|
|
127
|
-
method: 'GET',
|
|
128
|
-
route: route,
|
|
129
|
-
params: {
|
|
130
|
-
includeDeleted: requestParams.includeDeleted,
|
|
131
|
-
includeExisting: requestParams.includeExisting,
|
|
132
|
-
projection: projection,
|
|
133
|
-
query: JSON.stringify(query),
|
|
134
|
-
},
|
|
135
|
-
})];
|
|
136
|
-
case 2:
|
|
137
|
-
result = _a.sent();
|
|
138
|
-
flowList = __spreadArray(__spreadArray([], flowList, true), result.items, true);
|
|
139
|
-
query.last = result.last;
|
|
140
|
-
_a.label = 3;
|
|
141
|
-
case 3:
|
|
142
|
-
if (result.last) return [3, 1];
|
|
143
|
-
_a.label = 4;
|
|
144
|
-
case 4: return [2, (0, base_1.makeList)(flowList)];
|
|
145
|
-
}
|
|
112
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
113
|
+
method: 'GET',
|
|
114
|
+
route: "flows/".concat(id),
|
|
115
|
+
params: __assign(__assign({}, params), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
116
|
+
})];
|
|
146
117
|
});
|
|
147
118
|
});
|
|
148
119
|
};
|
|
149
|
-
Flows.prototype.
|
|
120
|
+
Flows.prototype.saveFlow = function (source) {
|
|
150
121
|
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
-
var
|
|
122
|
+
var result;
|
|
152
123
|
return __generator(this, function (_a) {
|
|
153
124
|
switch (_a.label) {
|
|
154
|
-
case 0:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
case 1: return [2, _a.sent()];
|
|
125
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
126
|
+
method: 'POST',
|
|
127
|
+
route: "flows/".concat((source.id && source.id !== 'new') ? source.id : 'new'),
|
|
128
|
+
data: {
|
|
129
|
+
flow: (source.id && source.id !== 'new') ? source : __assign(__assign({}, source), { id: 'new' }),
|
|
130
|
+
previousVersion: (source.id && source.id !== 'new') ? source.version : undefined,
|
|
131
|
+
},
|
|
132
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
133
|
+
})];
|
|
134
|
+
case 1:
|
|
135
|
+
result = _a.sent();
|
|
136
|
+
return [2, (0, data_hub_svc_1.setDiff)(source, result)];
|
|
167
137
|
}
|
|
168
138
|
});
|
|
169
139
|
});
|
|
170
140
|
};
|
|
171
|
-
Flows.prototype.
|
|
141
|
+
Flows.prototype.deleteFlow = function (flowId, temporarily) {
|
|
142
|
+
if (temporarily === void 0) { temporarily = true; }
|
|
172
143
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
|
-
var
|
|
144
|
+
var flowSourceId;
|
|
174
145
|
return __generator(this, function (_a) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
route: route,
|
|
185
|
-
data: data,
|
|
186
|
-
})];
|
|
187
|
-
case 1: return [2, _a.sent()];
|
|
188
|
-
}
|
|
146
|
+
flowSourceId = typeof flowId === 'string' ? flowId : flowId.id;
|
|
147
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
148
|
+
method: 'DELETE',
|
|
149
|
+
route: "flows/".concat(flowId),
|
|
150
|
+
data: {
|
|
151
|
+
temporarily: temporarily,
|
|
152
|
+
},
|
|
153
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
154
|
+
})];
|
|
189
155
|
});
|
|
190
156
|
});
|
|
191
157
|
};
|
|
192
|
-
Flows.prototype.
|
|
193
|
-
if (flowAlias === void 0) { flowAlias = 'dev'; }
|
|
158
|
+
Flows.prototype.recoverFlow = function (flowId) {
|
|
194
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
195
|
-
var variables, operationName, data, result;
|
|
196
160
|
return __generator(this, function (_a) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
variables = {
|
|
203
|
-
entity: constants_1.ENTITY_NAME,
|
|
204
|
-
data: {
|
|
205
|
-
id: source.id,
|
|
206
|
-
flowAlias: flowAlias,
|
|
207
|
-
subscribe: true,
|
|
208
|
-
role: source.data.deploy.role,
|
|
209
|
-
},
|
|
210
|
-
};
|
|
211
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.DELETE_TEMPORARILY);
|
|
212
|
-
data = {
|
|
213
|
-
operationName: operationName,
|
|
214
|
-
query: constants_1.QUERY_DELETE,
|
|
215
|
-
variables: variables,
|
|
216
|
-
};
|
|
217
|
-
return [4, this.dataHub.makeRequest({
|
|
218
|
-
method: 'POST',
|
|
219
|
-
route: '/graphql',
|
|
220
|
-
data: data,
|
|
221
|
-
})];
|
|
222
|
-
case 1:
|
|
223
|
-
result = _a.sent();
|
|
224
|
-
return [2, this.dataHub.subscribe(result.data[operationName].requestId)];
|
|
225
|
-
}
|
|
161
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
162
|
+
method: 'PATCH',
|
|
163
|
+
route: "flows/".concat(flowId),
|
|
164
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
165
|
+
})];
|
|
226
166
|
});
|
|
227
167
|
});
|
|
228
168
|
};
|
|
@@ -242,6 +182,25 @@ var Flows = (function () {
|
|
|
242
182
|
});
|
|
243
183
|
});
|
|
244
184
|
};
|
|
185
|
+
Flows.prototype.listDataOuts = function (paginationOptions, params) {
|
|
186
|
+
if (paginationOptions === void 0) { paginationOptions = {}; }
|
|
187
|
+
if (params === void 0) { params = {}; }
|
|
188
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
189
|
+
var result;
|
|
190
|
+
return __generator(this, function (_a) {
|
|
191
|
+
switch (_a.label) {
|
|
192
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
193
|
+
method: 'GET',
|
|
194
|
+
route: '/flows/data-outs',
|
|
195
|
+
params: __assign(__assign(__assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
196
|
+
})];
|
|
197
|
+
case 1:
|
|
198
|
+
result = _a.sent();
|
|
199
|
+
return [2, (0, base_1.makeList)(result)];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
};
|
|
245
204
|
Flows.prototype.addTags = function (source, tagNames) {
|
|
246
205
|
return __awaiter(this, void 0, void 0, function () {
|
|
247
206
|
var tags, tagIds, newIds;
|
|
@@ -278,6 +237,22 @@ var Flows = (function () {
|
|
|
278
237
|
});
|
|
279
238
|
});
|
|
280
239
|
};
|
|
240
|
+
Flows.prototype.downloadTemplate = function (flowTemplateId, botId, shouldUpdateSteps) {
|
|
241
|
+
if (shouldUpdateSteps === void 0) { shouldUpdateSteps = false; }
|
|
242
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
243
|
+
return __generator(this, function (_a) {
|
|
244
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
245
|
+
method: 'PUT',
|
|
246
|
+
route: "flows/".concat(botId),
|
|
247
|
+
data: {
|
|
248
|
+
flowId: flowTemplateId,
|
|
249
|
+
shouldUpdateSteps: shouldUpdateSteps,
|
|
250
|
+
},
|
|
251
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
252
|
+
})];
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
};
|
|
281
256
|
Flows.listUnusedStepTemplates = function (source) {
|
|
282
257
|
return (0, utils_1.listUnusedStepTemplates)(source);
|
|
283
258
|
};
|
package/dist/cjs/Flows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.js","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Flows.js","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8C;AAC9C,qDAA2D;AAC3D,6CAAiI;AASjI,qCAAsF;AACtF,iCAA6E;AAE7E;IAKE,eAAY,MAAmB;QACrB,IAAA,YAAY,GAAmD,MAAM,aAAzD,EAAE,KAAK,GAA4C,MAAM,MAAlD,EAAE,SAAS,GAAiC,MAAM,UAAvC,EAAE,aAAa,GAAkB,MAAM,cAAxB,EAAE,WAAW,GAAK,MAAM,YAAX,CAAY;QAE9E,IAAI,CAAC,UAAU,GAAG,IAAI,yBAAU,CAAC;YAC/B,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,aAAa,eAAA;SACd,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC;YAC3B,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,WAAW,aAAA;SACZ,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC;YACnB,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,aAAa,eAAA;SACd,C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AC,YAAtC,CAAuC;wBAE1D,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;4BACvB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;yBACnC;wBAED,WAAO,IAAI,CAAC,QAAQ,uBACf,MAAM,KACT,IAAI,EAAE,IAAA,mBAAY,EAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,IAC5C,EAAC;;;;KACJ;IAQY,gCAAgB,GAA7B,UAA8B,cAAsB,EAAE,KAAa,EAAE,iBAAyB;QAAzB,kCAAA,EAAA,yBAAyB;;;gBAC5F,WAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAyB;wBACzD,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,gBAAS,KAAK,CAAE;wBACvB,IAAI,EAAE;4BACJ,MAAM,EAAE,cAAc;4BACtB,iBAAiB,mBAAA;yBAClB;wBACD,MAAM,eACA,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1F;qBACF,CAAC,EAAC;;;KACJ;IAQa,6BAAuB,GAArC,UAAsC,MAAY;QAChD,OAAO,IAAA,+BAAuB,EAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAUa,+BAAyB,GAAvC,UAAwC,MAAY,EAAE,aAA0C;QAA1C,8BAAA,EAAA,kBAA0C;QAC9F,OAAO,IAAA,iCAAyB,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;IAEH,YAAC;AAAD,CAAC,AAjRD,IAiRC;AAjRY,sBAAK"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.DEPLOYER_SERVICE_KEY = exports.DATA_HUB_SVC_SERVICE_KEY = void 0;
|
|
4
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
5
|
+
Object.defineProperty(exports, "DATA_HUB_SVC_SERVICE_KEY", { enumerable: true, get: function () { return data_hub_svc_1.DATA_HUB_SVC_SERVICE_KEY; } });
|
|
6
6
|
var deployer_1 = require("@or-sdk/deployer");
|
|
7
7
|
Object.defineProperty(exports, "DEPLOYER_SERVICE_KEY", { enumerable: true, get: function () { return deployer_1.DEPLOYER_SERVICE_KEY; } });
|
|
8
|
-
exports.QUERY_DELETE = "mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {\n deleteTemporarily(entity: $entity, data: $data) {\n ... on AsyncRequest {\n requestId\n }\n }\n}";
|
|
9
|
-
exports.ENTITY_NAME = 'FLOW';
|
|
10
8
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,qDAAgE;AAAvD,wHAAA,wBAAwB,OAAA;AACjC,6CAAwD;AAA/C,gHAAA,oBAAoB,OAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,4 +18,5 @@ exports.Flows = void 0;
|
|
|
18
18
|
var Flows_1 = require("./Flows");
|
|
19
19
|
Object.defineProperty(exports, "Flows", { enumerable: true, get: function () { return Flows_1.Flows; } });
|
|
20
20
|
__exportStar(require("./types"), exports);
|
|
21
|
+
__exportStar(require("./constants"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,0CAAwB;AACxB,8CAA4B"}
|
package/dist/esm/Flows.js
CHANGED
|
@@ -8,19 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { makeList } from '@or-sdk/base';
|
|
11
|
-
import {
|
|
11
|
+
import { DataHubSvc, setDiff } from '@or-sdk/data-hub-svc';
|
|
12
12
|
import { Deployer } from '@or-sdk/deployer';
|
|
13
|
-
import { QUERY_DELETE, ENTITY_NAME } from './constants';
|
|
14
13
|
import { Tags, filterTagIds, addTagsIds, removeTagIds } from '@or-sdk/tags';
|
|
15
14
|
import { listUnusedStepTemplates, deleteUnusedStepTemplates } from './utils';
|
|
16
15
|
export class Flows {
|
|
17
16
|
constructor(params) {
|
|
18
|
-
const { discoveryUrl, token, accountId,
|
|
19
|
-
this.
|
|
17
|
+
const { discoveryUrl, token, accountId, dataHubSvcUrl, deployerUrl } = params;
|
|
18
|
+
this.dataHubSvc = new DataHubSvc({
|
|
20
19
|
token,
|
|
21
20
|
discoveryUrl,
|
|
22
21
|
accountId,
|
|
23
|
-
|
|
22
|
+
dataHubSvcUrl,
|
|
24
23
|
});
|
|
25
24
|
this.deployer = new Deployer({
|
|
26
25
|
token,
|
|
@@ -32,108 +31,72 @@ export class Flows {
|
|
|
32
31
|
token,
|
|
33
32
|
discoveryUrl,
|
|
34
33
|
accountId,
|
|
35
|
-
|
|
34
|
+
dataHubSvcUrl,
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
|
-
|
|
37
|
+
listFlows(botId, params = {}, paginationOptions = {}) {
|
|
39
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'data.isHidden',
|
|
57
|
-
'tags',
|
|
58
|
-
'dateModified',
|
|
59
|
-
] }, params);
|
|
60
|
-
const route = `/v2/${this.dataHub.currentAccountId ? this.dataHub.currentAccountId : 'current'}/flows`;
|
|
61
|
-
let result;
|
|
62
|
-
let flowList = [];
|
|
63
|
-
const query = { botId: botId ? botId : undefined };
|
|
64
|
-
const projection = JSON.stringify(requestParams.projection);
|
|
65
|
-
do {
|
|
66
|
-
result = yield this.dataHub.makeRequest({
|
|
67
|
-
method: 'GET',
|
|
68
|
-
route,
|
|
69
|
-
params: {
|
|
70
|
-
includeDeleted: requestParams.includeDeleted,
|
|
71
|
-
includeExisting: requestParams.includeExisting,
|
|
72
|
-
projection,
|
|
73
|
-
query: JSON.stringify(query),
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
flowList = [...flowList, ...result.items];
|
|
77
|
-
query.last = result.last;
|
|
78
|
-
} while (result.last);
|
|
79
|
-
return makeList(flowList);
|
|
39
|
+
let includeQuery = {};
|
|
40
|
+
if (params.includeDeleted === false || (params.includeDeleted === undefined && params.includeExisting !== false)) {
|
|
41
|
+
includeQuery = { isDeleted: false };
|
|
42
|
+
}
|
|
43
|
+
if (params.includeExisting === false) {
|
|
44
|
+
includeQuery = { isDeleted: true };
|
|
45
|
+
}
|
|
46
|
+
const paramsToSend = Object.assign(Object.assign(Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, params.query), includeQuery) }), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {});
|
|
47
|
+
delete paramsToSend.includeDeleted;
|
|
48
|
+
delete paramsToSend.includeExisting;
|
|
49
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
50
|
+
method: 'GET',
|
|
51
|
+
route: 'flows',
|
|
52
|
+
params: paramsToSend,
|
|
53
|
+
});
|
|
54
|
+
return makeList(result);
|
|
80
55
|
});
|
|
81
56
|
}
|
|
82
|
-
getFlow(id) {
|
|
57
|
+
getFlow(id, params = {}) {
|
|
83
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
|
|
85
|
-
const params = {
|
|
86
|
-
includeDeleted: false,
|
|
87
|
-
includeExisting: true,
|
|
88
|
-
sandbox: false,
|
|
89
|
-
};
|
|
90
|
-
return yield this.dataHub.makeRequest({
|
|
59
|
+
return this.dataHubSvc.makeRequest({
|
|
91
60
|
method: 'GET',
|
|
92
|
-
route
|
|
93
|
-
params,
|
|
61
|
+
route: `flows/${id}`,
|
|
62
|
+
params: Object.assign(Object.assign({}, params), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
94
63
|
});
|
|
95
64
|
});
|
|
96
65
|
}
|
|
97
66
|
saveFlow(source) {
|
|
98
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const
|
|
100
|
-
const data = {
|
|
101
|
-
flow: source,
|
|
102
|
-
previousVersion: source.id ? source.version : undefined,
|
|
103
|
-
};
|
|
104
|
-
return yield this.dataHub.makeRequest({
|
|
68
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
105
69
|
method: 'POST',
|
|
106
|
-
route
|
|
107
|
-
data
|
|
70
|
+
route: `flows/${(source.id && source.id !== 'new') ? source.id : 'new'}`,
|
|
71
|
+
data: {
|
|
72
|
+
flow: (source.id && source.id !== 'new') ? source : Object.assign(Object.assign({}, source), { id: 'new' }),
|
|
73
|
+
previousVersion: (source.id && source.id !== 'new') ? source.version : undefined,
|
|
74
|
+
},
|
|
75
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
108
76
|
});
|
|
77
|
+
return setDiff(source, result);
|
|
109
78
|
});
|
|
110
79
|
}
|
|
111
|
-
deleteFlow(
|
|
80
|
+
deleteFlow(flowId, temporarily = true) {
|
|
112
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
entity: ENTITY_NAME,
|
|
82
|
+
const flowSourceId = typeof flowId === 'string' ? flowId : flowId.id;
|
|
83
|
+
return this.dataHubSvc.makeRequest({
|
|
84
|
+
method: 'DELETE',
|
|
85
|
+
route: `flows/${flowId}`,
|
|
118
86
|
data: {
|
|
119
|
-
|
|
120
|
-
flowAlias,
|
|
121
|
-
subscribe: true,
|
|
122
|
-
role: source.data.deploy.role,
|
|
87
|
+
temporarily,
|
|
123
88
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
data,
|
|
89
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
recoverFlow(flowId) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
return this.dataHubSvc.makeRequest({
|
|
96
|
+
method: 'PATCH',
|
|
97
|
+
route: `flows/${flowId}`,
|
|
98
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
135
99
|
});
|
|
136
|
-
return this.dataHub.subscribe(result.data[operationName].requestId);
|
|
137
100
|
});
|
|
138
101
|
}
|
|
139
102
|
activateFlow(source, interactiveDebug = false) {
|
|
@@ -146,6 +109,16 @@ export class Flows {
|
|
|
146
109
|
return this.deployer.deactivateFlow(source, flowAlias, deleteLambda);
|
|
147
110
|
});
|
|
148
111
|
}
|
|
112
|
+
listDataOuts(paginationOptions = {}, params = {}) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
115
|
+
method: 'GET',
|
|
116
|
+
route: '/flows/data-outs',
|
|
117
|
+
params: Object.assign(Object.assign(Object.assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
118
|
+
});
|
|
119
|
+
return makeList(result);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
149
122
|
addTags(source, tagNames) {
|
|
150
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
124
|
const tags = yield this.tags.getMultipleTagsByName(tagNames, true);
|
|
@@ -168,6 +141,19 @@ export class Flows {
|
|
|
168
141
|
return this.saveFlow(Object.assign(Object.assign({}, source), { tags: removeTagIds(source.tags, existingIds) }));
|
|
169
142
|
});
|
|
170
143
|
}
|
|
144
|
+
downloadTemplate(flowTemplateId, botId, shouldUpdateSteps = false) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
return this.dataHubSvc.makeRequest({
|
|
147
|
+
method: 'PUT',
|
|
148
|
+
route: `flows/${botId}`,
|
|
149
|
+
data: {
|
|
150
|
+
flowId: flowTemplateId,
|
|
151
|
+
shouldUpdateSteps,
|
|
152
|
+
},
|
|
153
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
171
157
|
static listUnusedStepTemplates(source) {
|
|
172
158
|
return listUnusedStepTemplates(source);
|
|
173
159
|
}
|
package/dist/esm/Flows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.js","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Flows.js","sourceRoot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AAC,MAAY;QAChD,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAUM,MAAM,CAAC,yBAAyB,CAAC,MAAY,EAAE,gBAAwC,EAAE;QAC9F,OAAO,yBAAyB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;CAEF"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DATA_HUB_SVC_SERVICE_KEY } from '@or-sdk/data-hub-svc';
|
|
2
2
|
export { DEPLOYER_SERVICE_KEY } from '@or-sdk/deployer';
|
|
3
|
-
export const QUERY_DELETE = `mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {
|
|
4
|
-
deleteTemporarily(entity: $entity, data: $data) {
|
|
5
|
-
... on AsyncRequest {
|
|
6
|
-
requestId
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}`;
|
|
10
|
-
export const ENTITY_NAME = 'FLOW';
|
|
11
3
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
package/dist/types/Flows.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { List } from '@or-sdk/base';
|
|
2
|
-
import { GraphqlResponseCheckExecution } from '@or-sdk/data-hub';
|
|
3
2
|
import { Flow, PollingResultActivateSuccess, PollingResultDeactivateSuccess, StepTemplateRaw } from '@or-sdk/deployer';
|
|
4
|
-
import { FlowsConfig, ListFlowsParams, StepTemplateToDelete } from './types';
|
|
3
|
+
import { FlowsConfig, ListFlowsParams, StepTemplateToDelete, PaginationOptions, DownloadTemplateResult, ListDataOutsParams, DataOut, GetFlowParams } from './types';
|
|
5
4
|
import { Taggable } from '@or-sdk/tags';
|
|
6
5
|
export declare class Flows implements Taggable<Flow> {
|
|
7
|
-
private readonly
|
|
6
|
+
private readonly dataHubSvc;
|
|
8
7
|
private readonly deployer;
|
|
9
8
|
private readonly tags;
|
|
10
9
|
constructor(params: FlowsConfig);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getFlow(id: string): Promise<Flow>;
|
|
10
|
+
listFlows(botId?: string, params?: ListFlowsParams, paginationOptions?: PaginationOptions): Promise<List<Flow>>;
|
|
11
|
+
getFlow(id: string, params?: GetFlowParams): Promise<Flow>;
|
|
14
12
|
saveFlow(source: Flow): Promise<Flow>;
|
|
15
|
-
deleteFlow(
|
|
13
|
+
deleteFlow(flowId: string | Flow, temporarily?: boolean): Promise<void>;
|
|
14
|
+
recoverFlow(flowId: string): Promise<void>;
|
|
16
15
|
activateFlow(source: Flow, interactiveDebug?: boolean): Promise<PollingResultActivateSuccess>;
|
|
17
16
|
deactivateFlow(source: Flow, flowAlias: string, deleteLambda?: boolean): Promise<PollingResultDeactivateSuccess>;
|
|
17
|
+
listDataOuts(paginationOptions?: PaginationOptions, params?: ListDataOutsParams): Promise<List<DataOut>>;
|
|
18
18
|
addTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
19
19
|
removeTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
20
|
+
downloadTemplate(flowTemplateId: string, botId: string, shouldUpdateSteps?: boolean): Promise<DownloadTemplateResult>;
|
|
20
21
|
static listUnusedStepTemplates(source: Flow): StepTemplateRaw[];
|
|
21
22
|
static deleteUnusedStepTemplates(source: Flow, stepTemplates?: StepTemplateToDelete[]): Flow;
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.d.ts","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Flows.d.ts","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAY,IAAI,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjI,OAAO,EACL,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAC3C,MAAM,SAAS,CAAC;AACjB,OAAO,EAAQ,QAAQ,EAA0C,MAAM,cAAc,CAAC;AAGtF,qBAAa,KAAM,YAAW,QAAQ,CAAC,IAAI,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,MAAM,EAAE,WAAW;IA6BlB,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,eAAoB,EAAE,iBAAiB,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAsCvH,OAAO,CAAC,EAAE,EAA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EY } from '@or-sdk/deployer';
|
|
3
|
-
export declare const QUERY_DELETE = "mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {\n deleteTemporarily(entity: $entity, data: $data) {\n ... on AsyncRequest {\n requestId\n }\n }\n}";
|
|
4
|
-
export declare const ENTITY_NAME = "FLOW";
|
|
5
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,24 +1,59 @@
|
|
|
1
1
|
import { Token } from '@or-sdk/base';
|
|
2
|
-
import { Flow } from '@or-sdk/deployer';
|
|
3
2
|
export declare type FlowsConfig = {
|
|
4
3
|
token: Token;
|
|
5
4
|
discoveryUrl?: string;
|
|
6
5
|
accountId?: string;
|
|
7
|
-
|
|
6
|
+
dataHubSvcUrl?: string;
|
|
8
7
|
deployerUrl?: string;
|
|
9
8
|
};
|
|
10
|
-
export declare type FlowListResponse = {
|
|
11
|
-
count: number;
|
|
12
|
-
items: Flow[];
|
|
13
|
-
last?: string;
|
|
14
|
-
};
|
|
15
9
|
export declare type ListFlowsParams = {
|
|
16
|
-
includeDeleted
|
|
17
|
-
includeExisting
|
|
18
|
-
|
|
10
|
+
includeDeleted?: boolean;
|
|
11
|
+
includeExisting?: boolean;
|
|
12
|
+
query?: {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
projection?: string[];
|
|
16
|
+
group?: string[];
|
|
17
|
+
sandbox?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare type ListDataOutsParams = {
|
|
20
|
+
query?: {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
projection?: string[];
|
|
24
|
+
group?: string[];
|
|
25
|
+
sandbox?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare type PaginationOptions = {
|
|
28
|
+
limit?: number;
|
|
29
|
+
offset?: number;
|
|
30
|
+
};
|
|
31
|
+
export declare type GetFlowParams = {
|
|
32
|
+
query?: {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
projection?: string[];
|
|
36
|
+
sandbox?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare type DataOut = {
|
|
39
|
+
flowId: string;
|
|
40
|
+
botId: string;
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
ttl: number;
|
|
44
|
+
meta: string;
|
|
45
|
+
outputExample: string;
|
|
46
|
+
stepLabel: string;
|
|
47
|
+
stepId: string;
|
|
19
48
|
};
|
|
20
49
|
export declare type StepTemplateToDelete = {
|
|
21
50
|
id: string;
|
|
22
51
|
[key: string]: unknown;
|
|
23
52
|
};
|
|
53
|
+
export declare type DownloadTemplateResult = {
|
|
54
|
+
id: string;
|
|
55
|
+
data: {
|
|
56
|
+
label: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
24
59
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,oBAAY,WAAW,GAAG;IAIxB,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/flows",
|
|
3
|
-
"version": "0.27.3-
|
|
3
|
+
"version": "0.27.3-next.599.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@or-sdk/base": "^0.26.3",
|
|
21
|
-
"@or-sdk/data-hub": "^
|
|
22
|
-
"@or-sdk/deployer": "^0.25.2-
|
|
23
|
-
"@or-sdk/tags": "^0.25.
|
|
21
|
+
"@or-sdk/data-hub-svc": "^1.1.6-next.599.0",
|
|
22
|
+
"@or-sdk/deployer": "^0.25.2-next.599.0",
|
|
23
|
+
"@or-sdk/tags": "^0.25.3-next.599.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"concurrently": "^6.4.0",
|
package/src/Flows.ts
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { List, makeList } from '@or-sdk/base';
|
|
2
|
-
import {
|
|
2
|
+
import { DataHubSvc, setDiff } from '@or-sdk/data-hub-svc';
|
|
3
3
|
import { Deployer, Flow, PollingResultActivateSuccess, PollingResultDeactivateSuccess, StepTemplateRaw } from '@or-sdk/deployer';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
FlowsConfig,
|
|
6
|
+
ListFlowsParams,
|
|
7
|
+
StepTemplateToDelete,
|
|
8
|
+
PaginationOptions,
|
|
9
|
+
DownloadTemplateResult,
|
|
10
|
+
ListDataOutsParams, DataOut, GetFlowParams,
|
|
11
|
+
} from './types';
|
|
6
12
|
import { Tags, Taggable, filterTagIds, addTagsIds, removeTagIds } from '@or-sdk/tags';
|
|
7
13
|
import { listUnusedStepTemplates, deleteUnusedStepTemplates } from './utils';
|
|
8
14
|
|
|
9
15
|
export class Flows implements Taggable<Flow> {
|
|
10
|
-
private readonly
|
|
16
|
+
private readonly dataHubSvc: DataHubSvc;
|
|
11
17
|
private readonly deployer: Deployer;
|
|
12
18
|
private readonly tags: Tags;
|
|
13
19
|
|
|
14
|
-
/**
|
|
15
|
-
* ```typescript
|
|
16
|
-
* import { Flows } from '@or-sdk/flows'
|
|
17
|
-
* const flows = new Flows({token: 'my-account-token-string', baseUrl: 'http://example.flows/endpoint'});
|
|
18
|
-
* await flows.init();
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
20
|
constructor(params: FlowsConfig) {
|
|
22
|
-
const { discoveryUrl, token, accountId,
|
|
21
|
+
const { discoveryUrl, token, accountId, dataHubSvcUrl, deployerUrl } = params;
|
|
23
22
|
|
|
24
|
-
this.
|
|
23
|
+
this.dataHubSvc = new DataHubSvc({
|
|
25
24
|
token,
|
|
26
25
|
discoveryUrl,
|
|
27
26
|
accountId,
|
|
28
|
-
|
|
27
|
+
dataHubSvcUrl,
|
|
29
28
|
});
|
|
30
29
|
this.deployer = new Deployer({
|
|
31
30
|
token,
|
|
@@ -37,72 +36,46 @@ export class Flows implements Taggable<Flow> {
|
|
|
37
36
|
token,
|
|
38
37
|
discoveryUrl,
|
|
39
38
|
accountId,
|
|
40
|
-
|
|
39
|
+
dataHubSvcUrl,
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
async init() {
|
|
45
|
-
await Promise.all([
|
|
46
|
-
this.dataHub.init(),
|
|
47
|
-
this.deployer.init(),
|
|
48
|
-
this.tags.init(),
|
|
49
|
-
]);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
43
|
/**
|
|
53
|
-
* List
|
|
54
|
-
*
|
|
55
|
-
* If botId is passed - lists flows from the specified bot
|
|
44
|
+
* List flows
|
|
56
45
|
* ```typescript
|
|
57
|
-
* const flowsList = await flows.listFlows(
|
|
46
|
+
* const flowsList = await flows.listFlows();
|
|
58
47
|
* ```
|
|
59
48
|
*/
|
|
60
|
-
public async listFlows(botId?: string, params
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'data.label',
|
|
70
|
-
'data.color',
|
|
71
|
-
'data.description',
|
|
72
|
-
'data.isHidden',
|
|
73
|
-
'tags',
|
|
74
|
-
'dateModified',
|
|
75
|
-
],
|
|
49
|
+
public async listFlows(botId?: string, params: ListFlowsParams = {}, paginationOptions: PaginationOptions = {}): Promise<List<Flow>> {
|
|
50
|
+
let includeQuery = {};
|
|
51
|
+
|
|
52
|
+
if (params.includeDeleted === false || (params.includeDeleted === undefined && params.includeExisting !== false)) {
|
|
53
|
+
includeQuery = { isDeleted: false };
|
|
54
|
+
}
|
|
55
|
+
if (params.includeExisting === false) {
|
|
56
|
+
includeQuery = { isDeleted: true };
|
|
57
|
+
}
|
|
76
58
|
|
|
77
|
-
|
|
59
|
+
const paramsToSend = {
|
|
78
60
|
...params,
|
|
61
|
+
query: {
|
|
62
|
+
...params.query,
|
|
63
|
+
...includeQuery,
|
|
64
|
+
},
|
|
65
|
+
...paginationOptions,
|
|
66
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
79
67
|
};
|
|
80
68
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
let result: FlowListResponse;
|
|
84
|
-
let flowList: Flow[] = [];
|
|
85
|
-
const query: { botId?: string; last?: string; } = { botId: botId ? botId : undefined };
|
|
86
|
-
const projection = JSON.stringify(requestParams.projection);
|
|
69
|
+
delete paramsToSend.includeDeleted;
|
|
70
|
+
delete paramsToSend.includeExisting;
|
|
87
71
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
includeDeleted: requestParams.includeDeleted,
|
|
94
|
-
includeExisting: requestParams.includeExisting,
|
|
95
|
-
projection,
|
|
96
|
-
query: JSON.stringify(query),
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
flowList = [...flowList, ...result.items];
|
|
101
|
-
query.last = result.last;
|
|
102
|
-
|
|
103
|
-
} while (result.last);
|
|
72
|
+
const result = await this.dataHubSvc.makeRequest<Flow[]>({
|
|
73
|
+
method: 'GET',
|
|
74
|
+
route: 'flows',
|
|
75
|
+
params: paramsToSend,
|
|
76
|
+
});
|
|
104
77
|
|
|
105
|
-
return makeList<Flow>(
|
|
78
|
+
return makeList<Flow>(result);
|
|
106
79
|
}
|
|
107
80
|
|
|
108
81
|
/**
|
|
@@ -111,19 +84,14 @@ export class Flows implements Taggable<Flow> {
|
|
|
111
84
|
* const flow = await flows.getFlow('flow-id');
|
|
112
85
|
* ```
|
|
113
86
|
*/
|
|
114
|
-
public async getFlow(id: string): Promise<Flow> {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const params = {
|
|
118
|
-
includeDeleted: false,
|
|
119
|
-
includeExisting: true,
|
|
120
|
-
sandbox: false,
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
return await this.dataHub.makeRequest<Flow>({
|
|
87
|
+
public async getFlow(id: string, params: GetFlowParams = {}): Promise<Flow> {
|
|
88
|
+
return this.dataHubSvc.makeRequest<Flow>({
|
|
124
89
|
method: 'GET',
|
|
125
|
-
route
|
|
126
|
-
params
|
|
90
|
+
route: `flows/${id}`,
|
|
91
|
+
params: {
|
|
92
|
+
...params,
|
|
93
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
94
|
+
},
|
|
127
95
|
});
|
|
128
96
|
}
|
|
129
97
|
|
|
@@ -136,56 +104,59 @@ export class Flows implements Taggable<Flow> {
|
|
|
136
104
|
* ```
|
|
137
105
|
*/
|
|
138
106
|
public async saveFlow(source: Flow): Promise<Flow> {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
const data = {
|
|
142
|
-
flow: source,
|
|
143
|
-
previousVersion: source.id ? source.version : undefined,
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
return await this.dataHub.makeRequest<Flow>({
|
|
107
|
+
const result = await this.dataHubSvc.makeRequest<{ id: string; version: string; }>({
|
|
147
108
|
method: 'POST',
|
|
148
|
-
route
|
|
149
|
-
data
|
|
109
|
+
route: `flows/${(source.id && source.id !== 'new') ? source.id : 'new'}`,
|
|
110
|
+
data: {
|
|
111
|
+
flow: (source.id && source.id !== 'new') ? source : {
|
|
112
|
+
...source,
|
|
113
|
+
id: 'new', //TODO: remove later
|
|
114
|
+
},
|
|
115
|
+
previousVersion: (source.id && source.id !== 'new') ? source.version : undefined,
|
|
116
|
+
},
|
|
117
|
+
params: {
|
|
118
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
119
|
+
},
|
|
150
120
|
});
|
|
121
|
+
|
|
122
|
+
return setDiff<Flow>(source, result);
|
|
151
123
|
}
|
|
152
124
|
|
|
153
125
|
/**
|
|
154
126
|
* Delete flow
|
|
155
127
|
* ```typescript
|
|
156
|
-
*
|
|
128
|
+
* await flows.deleteFlow('flow-id');
|
|
157
129
|
* ```
|
|
158
130
|
*/
|
|
159
|
-
public async deleteFlow(
|
|
160
|
-
|
|
161
|
-
throw Error('Cross-account deleting is not implemented.');
|
|
162
|
-
}
|
|
131
|
+
public async deleteFlow(flowId: string | Flow, temporarily = true): Promise<void> {
|
|
132
|
+
const flowSourceId = typeof flowId === 'string' ? flowId : flowId.id;
|
|
163
133
|
|
|
164
|
-
|
|
165
|
-
|
|
134
|
+
return this.dataHubSvc.makeRequest<void>({
|
|
135
|
+
method: 'DELETE',
|
|
136
|
+
route: `flows/${flowId}`,
|
|
166
137
|
data: {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
138
|
+
temporarily,
|
|
139
|
+
},
|
|
140
|
+
params: {
|
|
141
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
171
142
|
},
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
const operationName = this.dataHub.getOperationName(OperationNames.DELETE_TEMPORARILY);
|
|
175
|
-
|
|
176
|
-
const data = {
|
|
177
|
-
operationName,
|
|
178
|
-
query: QUERY_DELETE,
|
|
179
|
-
variables,
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
const result = await this.dataHub.makeRequest<GraphqlResponse<void>>({
|
|
183
|
-
method: 'POST',
|
|
184
|
-
route: '/graphql',
|
|
185
|
-
data,
|
|
186
143
|
});
|
|
144
|
+
}
|
|
187
145
|
|
|
188
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Recover flow
|
|
148
|
+
* ```typescript
|
|
149
|
+
* await flows.recoverFlow('flow-id');
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
public async recoverFlow(flowId: string): Promise<void> {
|
|
153
|
+
return this.dataHubSvc.makeRequest<void>({
|
|
154
|
+
method: 'PATCH',
|
|
155
|
+
route: `flows/${flowId}`,
|
|
156
|
+
params: {
|
|
157
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
158
|
+
},
|
|
159
|
+
});
|
|
189
160
|
}
|
|
190
161
|
|
|
191
162
|
/**
|
|
@@ -208,6 +179,26 @@ export class Flows implements Taggable<Flow> {
|
|
|
208
179
|
return this.deployer.deactivateFlow(source, flowAlias, deleteLambda);
|
|
209
180
|
}
|
|
210
181
|
|
|
182
|
+
/**
|
|
183
|
+
* List data outs
|
|
184
|
+
* ```typescript
|
|
185
|
+
* const result = await flows.downloadTemplate('flow-template-id', 'bot-id');
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
public async listDataOuts(paginationOptions: PaginationOptions = {}, params: ListDataOutsParams = {}): Promise<List<DataOut>> {
|
|
189
|
+
const result = await this.dataHubSvc.makeRequest<DataOut[]>({
|
|
190
|
+
method: 'GET',
|
|
191
|
+
route: '/flows/data-outs',
|
|
192
|
+
params: {
|
|
193
|
+
...params,
|
|
194
|
+
...paginationOptions,
|
|
195
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
return makeList<DataOut>(result);
|
|
200
|
+
}
|
|
201
|
+
|
|
211
202
|
/**
|
|
212
203
|
* Add tags
|
|
213
204
|
* ```typescript
|
|
@@ -252,6 +243,26 @@ export class Flows implements Taggable<Flow> {
|
|
|
252
243
|
});
|
|
253
244
|
}
|
|
254
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Download flow template to account
|
|
248
|
+
* ```typescript
|
|
249
|
+
* const result = await flows.downloadTemplate('flow-template-id', 'bot-id');
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
public async downloadTemplate(flowTemplateId: string, botId: string, shouldUpdateSteps = false): Promise<DownloadTemplateResult> {
|
|
253
|
+
return this.dataHubSvc.makeRequest<DownloadTemplateResult>({
|
|
254
|
+
method: 'PUT',
|
|
255
|
+
route: `flows/${botId}`,
|
|
256
|
+
data: {
|
|
257
|
+
flowId: flowTemplateId,
|
|
258
|
+
shouldUpdateSteps,
|
|
259
|
+
},
|
|
260
|
+
params: {
|
|
261
|
+
... this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {},
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
255
266
|
/**
|
|
256
267
|
* List unused step templates from flow source
|
|
257
268
|
* ```typescript
|
package/src/constants.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { DATA_HUB_SVC_SERVICE_KEY } from '@or-sdk/data-hub-svc';
|
|
2
2
|
export { DEPLOYER_SERVICE_KEY } from '@or-sdk/deployer';
|
|
3
|
-
|
|
4
|
-
export const QUERY_DELETE = `mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {
|
|
5
|
-
deleteTemporarily(entity: $entity, data: $data) {
|
|
6
|
-
... on AsyncRequest {
|
|
7
|
-
requestId
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}`;
|
|
11
|
-
|
|
12
|
-
export const ENTITY_NAME = 'FLOW';
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Token } from '@or-sdk/base';
|
|
2
|
-
import { Flow } from '@or-sdk/deployer';
|
|
3
2
|
|
|
4
3
|
export type FlowsConfig = {
|
|
5
4
|
/**
|
|
@@ -18,9 +17,9 @@ export type FlowsConfig = {
|
|
|
18
17
|
accountId?: string;
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
|
-
* Url of OneReach
|
|
20
|
+
* Url of OneReach DataHubSvc api
|
|
22
21
|
*/
|
|
23
|
-
|
|
22
|
+
dataHubSvcUrl?: string;
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Url of OneReach Deployer api
|
|
@@ -28,19 +27,59 @@ export type FlowsConfig = {
|
|
|
28
27
|
deployerUrl?: string;
|
|
29
28
|
};
|
|
30
29
|
|
|
31
|
-
export type
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
export type ListFlowsParams = {
|
|
31
|
+
includeDeleted?: boolean;
|
|
32
|
+
includeExisting?: boolean;
|
|
33
|
+
query?: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
projection?: string[];
|
|
37
|
+
group?: string[];
|
|
38
|
+
sandbox?: boolean;
|
|
35
39
|
};
|
|
36
40
|
|
|
37
|
-
export type
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
export type ListDataOutsParams = {
|
|
42
|
+
query?: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
projection?: string[];
|
|
46
|
+
group?: string[];
|
|
47
|
+
sandbox?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type PaginationOptions = {
|
|
51
|
+
limit?: number;
|
|
52
|
+
offset?: number;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type GetFlowParams = {
|
|
56
|
+
query?: {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
projection?: string[];
|
|
60
|
+
sandbox?: boolean;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type DataOut = {
|
|
64
|
+
flowId: string;
|
|
65
|
+
botId: string;
|
|
66
|
+
name: string;
|
|
67
|
+
type: string;
|
|
68
|
+
ttl: number;
|
|
69
|
+
meta: string;
|
|
70
|
+
outputExample: string;
|
|
71
|
+
stepLabel: string;
|
|
72
|
+
stepId: string;
|
|
41
73
|
};
|
|
42
74
|
|
|
43
75
|
export type StepTemplateToDelete = {
|
|
44
76
|
id: string;
|
|
45
77
|
[key: string]: unknown;
|
|
46
78
|
};
|
|
79
|
+
|
|
80
|
+
export type DownloadTemplateResult = {
|
|
81
|
+
id: string;
|
|
82
|
+
data: {
|
|
83
|
+
label: string;
|
|
84
|
+
};
|
|
85
|
+
};
|