@oomol-lab/open-flow 0.1.0-alpha.5 → 0.1.0-alpha.7
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/browser/{addNodeOptions-B6tOfd2Y.js → addNodeOptions-DRndy4EK.js} +2237 -2599
- package/dist/browser/{createLucideIcon-BlEx4FzJ.js → createLucideIcon-CqjqCezK.js} +835 -869
- package/dist/browser/{createResourceDialog-CrBp3E8P.js → createResourceDialog-A64dDFCG.js} +140 -140
- package/dist/browser/{esm-CoE5_2w7.js → esm-YIGXG-Js.js} +1 -11
- package/dist/browser/{field-Daq9Lk-Y.js → field-CKGQHCIi.js} +88 -88
- package/dist/browser/{project-authoring-edge.d.ts → flow-authoring-edge.d.ts} +1 -1
- package/dist/browser/{project-authoring-module.d.ts → flow-authoring-module.d.ts} +1 -1
- package/dist/browser/{project-authoring-node.d.ts → flow-authoring-node.d.ts} +6 -12
- package/dist/browser/flow-authoring.d.ts +3 -0
- package/dist/browser/{project-authoring.js → flow-authoring.js} +72 -87
- package/dist/browser/{project-change.d.ts → flow-change.d.ts} +27 -36
- package/dist/browser/{project-change.js → flow-change.js} +69 -97
- package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
- package/dist/browser/{flowWorkspace-CylW6hge.js → flowWorkspace-D7-rBA1-.js} +17147 -12754
- package/dist/browser/licenses.md +514 -0
- package/dist/browser/workbench-contract.d.ts +4 -4
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -1
- package/dist/browser/workbench.js +969 -1073
- package/dist/common/control-api-conformance.js +219 -352
- package/dist/common/control-api-errors.d.ts +16 -24
- package/dist/common/control-api.d.ts +39 -68
- package/dist/common/control-api.js +136 -189
- package/dist/common/cron-trigger.d.ts +1 -1
- package/dist/common/flow-encoding.d.ts +11 -0
- package/dist/common/{project-encoding.js → flow-encoding.js} +14 -13
- package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
- package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +9 -12
- package/dist/common/{project-semantics.js → flow-semantics.js} +591 -592
- package/dist/common/integration-trigger.d.ts +1 -1
- package/dist/common/poll-trigger.d.ts +1 -1
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/scheduler.d.ts +3 -2
- package/dist/common/scheduler.js +159 -154
- package/dist/common/webhook-trigger.d.ts +1 -1
- package/dist/common/webhook-trigger.js +1 -1
- package/package.json +13 -13
- package/dist/browser/project-authoring-flow.d.ts +0 -4
- package/dist/browser/project-authoring.d.ts +0 -4
- package/dist/common/project-encoding.d.ts +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/flow/common/edgeChanges.ts
|
|
2
2
|
function e(e, t, r) {
|
|
3
3
|
let i = {
|
|
4
4
|
source: r.source,
|
|
@@ -26,36 +26,11 @@ function t(e, t, r) {
|
|
|
26
26
|
}];
|
|
27
27
|
}
|
|
28
28
|
function n(e, t) {
|
|
29
|
-
return t.kind == "flow" ? e.document.
|
|
29
|
+
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region src/
|
|
33
|
-
function r(e
|
|
34
|
-
return [{
|
|
35
|
-
flow: {
|
|
36
|
-
graph: { nodes: {} },
|
|
37
|
-
name: t
|
|
38
|
-
},
|
|
39
|
-
flowId: e,
|
|
40
|
-
kind: "flow.create"
|
|
41
|
-
}];
|
|
42
|
-
}
|
|
43
|
-
function i(e, t) {
|
|
44
|
-
return [{
|
|
45
|
-
flowId: e,
|
|
46
|
-
kind: "flow.rename",
|
|
47
|
-
name: t
|
|
48
|
-
}];
|
|
49
|
-
}
|
|
50
|
-
function a(e) {
|
|
51
|
-
return [{
|
|
52
|
-
flowId: e,
|
|
53
|
-
kind: "flow.delete"
|
|
54
|
-
}];
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region src/project/common/moduleChanges.ts
|
|
58
|
-
async function o(e) {
|
|
32
|
+
//#region src/flow/common/moduleChanges.ts
|
|
33
|
+
async function r(e) {
|
|
59
34
|
try {
|
|
60
35
|
let { parse: t } = await import("./lib-GrGxYjsJ.js"), n = t(e, {
|
|
61
36
|
errorRecovery: !0,
|
|
@@ -71,7 +46,7 @@ async function o(e) {
|
|
|
71
46
|
return [];
|
|
72
47
|
}
|
|
73
48
|
}
|
|
74
|
-
function
|
|
49
|
+
function i(e, t, n) {
|
|
75
50
|
return [{
|
|
76
51
|
imports: n,
|
|
77
52
|
kind: "module.source.replace",
|
|
@@ -79,7 +54,7 @@ function s(e, t, n) {
|
|
|
79
54
|
source: t
|
|
80
55
|
}];
|
|
81
56
|
}
|
|
82
|
-
function
|
|
57
|
+
function a(e, t) {
|
|
83
58
|
return [{
|
|
84
59
|
kind: "module.rename",
|
|
85
60
|
moduleId: e,
|
|
@@ -87,20 +62,22 @@ function c(e, t) {
|
|
|
87
62
|
}];
|
|
88
63
|
}
|
|
89
64
|
//#endregion
|
|
90
|
-
//#region src/
|
|
91
|
-
function
|
|
65
|
+
//#region src/flow/common/nodeChanges.ts
|
|
66
|
+
function o(e, t, n, r = {
|
|
92
67
|
imports: [],
|
|
93
68
|
source: "export default function run(input) {\n return { result: input.value }\n}\n"
|
|
94
69
|
}, i = {
|
|
95
|
-
inputs: {
|
|
70
|
+
inputs: [{
|
|
71
|
+
handle: "value",
|
|
96
72
|
jsonSchema: {},
|
|
97
73
|
nullable: !0,
|
|
98
74
|
value: null
|
|
99
|
-
}
|
|
100
|
-
outputs: {
|
|
75
|
+
}],
|
|
76
|
+
outputs: [{
|
|
77
|
+
handle: "result",
|
|
101
78
|
jsonSchema: {},
|
|
102
79
|
nullable: !0
|
|
103
|
-
}
|
|
80
|
+
}]
|
|
104
81
|
}) {
|
|
105
82
|
return [{
|
|
106
83
|
kind: "module.create",
|
|
@@ -113,7 +90,7 @@ function l(e, t, n, r = {
|
|
|
113
90
|
kind: "graph.node.create",
|
|
114
91
|
node: {
|
|
115
92
|
concurrency: 1,
|
|
116
|
-
inputs:
|
|
93
|
+
inputs: b(i.inputs),
|
|
117
94
|
kind: "task",
|
|
118
95
|
name: n,
|
|
119
96
|
task: {
|
|
@@ -127,7 +104,7 @@ function l(e, t, n, r = {
|
|
|
127
104
|
target: e
|
|
128
105
|
}];
|
|
129
106
|
}
|
|
130
|
-
function
|
|
107
|
+
function s(e, t, n) {
|
|
131
108
|
return [{
|
|
132
109
|
kind: "task.create",
|
|
133
110
|
task: n,
|
|
@@ -136,7 +113,7 @@ function u(e, t, n) {
|
|
|
136
113
|
kind: "graph.node.create",
|
|
137
114
|
node: {
|
|
138
115
|
concurrency: 1,
|
|
139
|
-
inputs:
|
|
116
|
+
inputs: b(n.inputs),
|
|
140
117
|
kind: "task",
|
|
141
118
|
name: n.name,
|
|
142
119
|
taskId: t.taskId
|
|
@@ -145,54 +122,60 @@ function u(e, t, n) {
|
|
|
145
122
|
target: e
|
|
146
123
|
}];
|
|
147
124
|
}
|
|
148
|
-
function
|
|
125
|
+
function c(e, t, n, r, i, a = {}) {
|
|
149
126
|
let o = a.inputs ?? {};
|
|
150
|
-
return
|
|
127
|
+
return s(e, t, {
|
|
151
128
|
executor: {
|
|
152
129
|
kind: "llm",
|
|
153
130
|
mode: r
|
|
154
131
|
},
|
|
155
|
-
inputs:
|
|
156
|
-
|
|
132
|
+
inputs: [
|
|
133
|
+
{
|
|
134
|
+
handle: "messages",
|
|
157
135
|
jsonSchema: {
|
|
158
136
|
items: { type: "object" },
|
|
159
137
|
type: "array"
|
|
160
138
|
},
|
|
161
139
|
nullable: !0,
|
|
162
|
-
value:
|
|
140
|
+
value: x(o, "messages", null)
|
|
163
141
|
},
|
|
164
|
-
|
|
142
|
+
{
|
|
143
|
+
handle: "input",
|
|
165
144
|
jsonSchema: { type: "string" },
|
|
166
145
|
nullable: !1,
|
|
167
|
-
value:
|
|
146
|
+
value: x(o, "input", "Alex")
|
|
168
147
|
},
|
|
169
|
-
|
|
148
|
+
{
|
|
149
|
+
handle: "template",
|
|
170
150
|
jsonSchema: {
|
|
171
151
|
items: { type: "object" },
|
|
172
152
|
minItems: 1,
|
|
173
153
|
type: "array"
|
|
174
154
|
},
|
|
175
155
|
nullable: !1,
|
|
176
|
-
value:
|
|
156
|
+
value: x(o, "template", [{
|
|
177
157
|
content: "Hello, I'm {{input}}",
|
|
178
158
|
role: "user"
|
|
179
159
|
}])
|
|
180
160
|
},
|
|
181
|
-
|
|
161
|
+
{
|
|
162
|
+
handle: "model",
|
|
182
163
|
jsonSchema: { type: "object" },
|
|
183
164
|
nullable: !1,
|
|
184
|
-
value:
|
|
165
|
+
value: x(o, "model", { model: "deepseek-v4-flash" })
|
|
185
166
|
}
|
|
186
|
-
|
|
167
|
+
],
|
|
187
168
|
name: n,
|
|
188
|
-
outputs: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
169
|
+
outputs: [{
|
|
170
|
+
...a.output,
|
|
171
|
+
description: a.output?.description ?? i,
|
|
172
|
+
handle: "output",
|
|
173
|
+
jsonSchema: a.output?.jsonSchema ?? (r == "chat" ? { type: "string" } : {}),
|
|
174
|
+
nullable: a.output?.nullable ?? !1
|
|
175
|
+
}]
|
|
193
176
|
});
|
|
194
177
|
}
|
|
195
|
-
function
|
|
178
|
+
function l(e, t, n) {
|
|
196
179
|
return [{
|
|
197
180
|
kind: "graph.node.create",
|
|
198
181
|
node: {
|
|
@@ -223,7 +206,7 @@ function f(e, t, n) {
|
|
|
223
206
|
target: e
|
|
224
207
|
}];
|
|
225
208
|
}
|
|
226
|
-
function
|
|
209
|
+
function u(e, t, n) {
|
|
227
210
|
return [{
|
|
228
211
|
kind: "graph.node.create",
|
|
229
212
|
node: {
|
|
@@ -231,17 +214,18 @@ function p(e, t, n) {
|
|
|
231
214
|
inputs: {},
|
|
232
215
|
kind: "value",
|
|
233
216
|
name: n,
|
|
234
|
-
values: {
|
|
217
|
+
values: [{
|
|
218
|
+
handle: "value",
|
|
235
219
|
jsonSchema: {},
|
|
236
220
|
nullable: !0,
|
|
237
221
|
value: null
|
|
238
|
-
}
|
|
222
|
+
}]
|
|
239
223
|
},
|
|
240
224
|
nodeId: t,
|
|
241
225
|
target: e
|
|
242
226
|
}];
|
|
243
227
|
}
|
|
244
|
-
function
|
|
228
|
+
function d(e, t, n) {
|
|
245
229
|
return [{
|
|
246
230
|
kind: "graph.node.create",
|
|
247
231
|
node: n,
|
|
@@ -249,7 +233,7 @@ function m(e, t, n) {
|
|
|
249
233
|
target: e
|
|
250
234
|
}];
|
|
251
235
|
}
|
|
252
|
-
function
|
|
236
|
+
function f(e, t, n, r) {
|
|
253
237
|
let i = r.name ?? n.displayName, a = n.type == "poll" ? {
|
|
254
238
|
bindingId: t.bindingId,
|
|
255
239
|
config: r.config,
|
|
@@ -282,8 +266,8 @@ function h(e, t, n, r) {
|
|
|
282
266
|
target: e
|
|
283
267
|
}];
|
|
284
268
|
}
|
|
285
|
-
function
|
|
286
|
-
let r =
|
|
269
|
+
function p(e, t, n) {
|
|
270
|
+
let r = y(e, t)?.nodes;
|
|
287
271
|
if (r == null) return [];
|
|
288
272
|
let i = new Set(n), a = n.flatMap((e) => {
|
|
289
273
|
let n = r[e];
|
|
@@ -301,35 +285,35 @@ function g(e, t, n) {
|
|
|
301
285
|
let t = r[e];
|
|
302
286
|
return t?.kind == "poll" || t?.kind == "integration" ? [t.bindingId] : [];
|
|
303
287
|
}));
|
|
304
|
-
for (let
|
|
305
|
-
bindingId:
|
|
288
|
+
for (let t of o) Object.entries(e.document.graph.nodes).some(([e, n]) => !i.has(e) && (n.kind == "poll" || n.kind == "integration") && n.bindingId == t) || a.push({
|
|
289
|
+
bindingId: t,
|
|
306
290
|
kind: "binding.delete"
|
|
307
291
|
});
|
|
308
292
|
return a;
|
|
309
293
|
}
|
|
310
|
-
function
|
|
311
|
-
let i =
|
|
294
|
+
function m(e, t, n, r) {
|
|
295
|
+
let i = y(e, t)?.nodes[n];
|
|
312
296
|
if (i == null || !("inputs" in i)) return;
|
|
313
297
|
let { concurrency: a, name: o, timeoutMs: s, ...c } = i;
|
|
314
|
-
return
|
|
298
|
+
return S(t, n, {
|
|
315
299
|
...c,
|
|
316
300
|
...r
|
|
317
301
|
});
|
|
318
302
|
}
|
|
319
|
-
function
|
|
320
|
-
let i =
|
|
303
|
+
function h(e, t, n, r) {
|
|
304
|
+
let i = y(e, t)?.nodes[n];
|
|
321
305
|
if (i == null || !("inputs" in i)) return;
|
|
322
306
|
let a = { ...i.inputs };
|
|
323
307
|
for (let [e, t] of Object.entries(r)) t === void 0 ? delete a[e] : a[e] = {
|
|
324
308
|
kind: "value",
|
|
325
309
|
value: t
|
|
326
310
|
};
|
|
327
|
-
return
|
|
311
|
+
return S(t, n, {
|
|
328
312
|
...i,
|
|
329
313
|
inputs: a
|
|
330
314
|
});
|
|
331
315
|
}
|
|
332
|
-
function
|
|
316
|
+
function g(e, t, n) {
|
|
333
317
|
let r = e.document.tasks[t];
|
|
334
318
|
if (!(r == null || !("executor" in r) || r.executor.kind != "connector")) return [{
|
|
335
319
|
kind: "task.replace",
|
|
@@ -343,11 +327,12 @@ function y(e, t, n) {
|
|
|
343
327
|
taskId: t
|
|
344
328
|
}];
|
|
345
329
|
}
|
|
346
|
-
function
|
|
347
|
-
let i = e.document.
|
|
330
|
+
function _(e, t, n, r) {
|
|
331
|
+
let i = e.document.graph.nodes[n];
|
|
348
332
|
if (i == null) return;
|
|
349
333
|
let a = {
|
|
350
334
|
...r.description == null ? {} : { description: r.description },
|
|
335
|
+
icon: i.icon,
|
|
351
336
|
name: r.name
|
|
352
337
|
}, o;
|
|
353
338
|
switch (r.kind) {
|
|
@@ -389,10 +374,10 @@ function b(e, t, n, r) {
|
|
|
389
374
|
config: r.config
|
|
390
375
|
};
|
|
391
376
|
}
|
|
392
|
-
return
|
|
377
|
+
return S(t, n, o);
|
|
393
378
|
}
|
|
394
|
-
function
|
|
395
|
-
let i = e.document.
|
|
379
|
+
function v(e, t, n, r) {
|
|
380
|
+
let i = e.document.graph.nodes[n];
|
|
396
381
|
if (!(i == null || i.kind != "poll" && i.kind != "integration") && e.document.bindings[i.bindingId]?.kind == "connection") return [{
|
|
397
382
|
binding: {
|
|
398
383
|
kind: "connection",
|
|
@@ -402,19 +387,19 @@ function x(e, t, n, r) {
|
|
|
402
387
|
kind: "binding.replace"
|
|
403
388
|
}];
|
|
404
389
|
}
|
|
405
|
-
function
|
|
406
|
-
return t.kind == "flow" ? e.document.
|
|
390
|
+
function y(e, t) {
|
|
391
|
+
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
407
392
|
}
|
|
408
|
-
function
|
|
409
|
-
return Object.fromEntries(
|
|
393
|
+
function b(e) {
|
|
394
|
+
return Object.fromEntries(e.flatMap((e) => Object.hasOwn(e, "value") ? [[e.handle, {
|
|
410
395
|
kind: "value",
|
|
411
|
-
value:
|
|
396
|
+
value: e.value
|
|
412
397
|
}]] : []));
|
|
413
398
|
}
|
|
414
|
-
function
|
|
399
|
+
function x(e, t, n) {
|
|
415
400
|
return e != null && Object.hasOwn(e, t) ? e[t] : n;
|
|
416
401
|
}
|
|
417
|
-
function
|
|
402
|
+
function S(e, t, n) {
|
|
418
403
|
return [{
|
|
419
404
|
kind: "graph.node.replace",
|
|
420
405
|
node: n,
|
|
@@ -423,4 +408,4 @@ function T(e, t, n) {
|
|
|
423
408
|
}];
|
|
424
409
|
}
|
|
425
410
|
//#endregion
|
|
426
|
-
export { e as connect,
|
|
411
|
+
export { e as connect, d as createBuiltinTrigger, o as createCodeTask, l as createCondition, c as createLlmTask, s as createManagedTask, f as createProviderTrigger, u as createValue, p as deleteNodes, t as disconnect, r as moduleImports, a as renameModule, i as replaceModuleSource, g as setConnectorConnection, h as setInputValues, v as setTriggerConnection, m as updateSettings, _ as updateTrigger };
|
|
@@ -12,6 +12,13 @@ export interface PortDefinition {
|
|
|
12
12
|
export interface InputPortDefinition extends PortDefinition {
|
|
13
13
|
readonly value?: JsonValue;
|
|
14
14
|
}
|
|
15
|
+
export interface Port extends PortDefinition {
|
|
16
|
+
readonly handle: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InputPort extends InputPortDefinition {
|
|
19
|
+
readonly handle: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function portsByHandle<Value extends Port>(ports: readonly Value[]): Readonly<Record<string, Value>>;
|
|
15
22
|
export interface NodeSource {
|
|
16
23
|
readonly kind: 'node';
|
|
17
24
|
readonly nodeId: string;
|
|
@@ -38,6 +45,7 @@ export interface OutputMapping {
|
|
|
38
45
|
interface GraphNodeBase {
|
|
39
46
|
readonly concurrency: number;
|
|
40
47
|
readonly description?: string;
|
|
48
|
+
readonly icon?: string;
|
|
41
49
|
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
42
50
|
readonly name?: string;
|
|
43
51
|
readonly timeoutMs?: number;
|
|
@@ -48,7 +56,7 @@ export interface SubflowNode extends GraphNodeBase {
|
|
|
48
56
|
}
|
|
49
57
|
export interface ValueNode extends GraphNodeBase {
|
|
50
58
|
readonly kind: 'value';
|
|
51
|
-
readonly values:
|
|
59
|
+
readonly values: readonly InputPort[];
|
|
52
60
|
}
|
|
53
61
|
export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
|
|
54
62
|
export interface ConditionExpression {
|
|
@@ -64,9 +72,7 @@ export interface ConditionCase {
|
|
|
64
72
|
export interface ConditionNode extends GraphNodeBase {
|
|
65
73
|
readonly cases: readonly ConditionCase[];
|
|
66
74
|
readonly defaultOutput?: string;
|
|
67
|
-
readonly input:
|
|
68
|
-
readonly handle: string;
|
|
69
|
-
};
|
|
75
|
+
readonly input: InputPort;
|
|
70
76
|
readonly kind: 'condition';
|
|
71
77
|
}
|
|
72
78
|
export type ManagedTaskExecutor = {
|
|
@@ -83,9 +89,9 @@ export interface ConnectorCapability {
|
|
|
83
89
|
readonly kind: 'connector';
|
|
84
90
|
}
|
|
85
91
|
interface TaskDefinitionBase {
|
|
86
|
-
readonly inputs:
|
|
92
|
+
readonly inputs: readonly InputPort[];
|
|
87
93
|
readonly name: string;
|
|
88
|
-
readonly outputs:
|
|
94
|
+
readonly outputs: readonly Port[];
|
|
89
95
|
}
|
|
90
96
|
export interface InlineTaskDefinition extends TaskDefinitionBase {
|
|
91
97
|
readonly capabilities?: readonly ConnectorCapability[];
|
|
@@ -143,8 +149,7 @@ export type TriggerKeySnapshot = (TriggerKeySnapshotBase & {
|
|
|
143
149
|
readonly endpoint: IntegrationEndpointDeclaration;
|
|
144
150
|
readonly type: 'integration';
|
|
145
151
|
});
|
|
146
|
-
export interface WebhookInputDefinition extends
|
|
147
|
-
readonly handle: string;
|
|
152
|
+
export interface WebhookInputDefinition extends InputPort {
|
|
148
153
|
}
|
|
149
154
|
export interface WebhookOptions {
|
|
150
155
|
readonly allowedMethods?: readonly string[];
|
|
@@ -156,6 +161,7 @@ export interface WebhookOptions {
|
|
|
156
161
|
}
|
|
157
162
|
interface TriggerNodeBase {
|
|
158
163
|
readonly description?: string;
|
|
164
|
+
readonly icon?: string;
|
|
159
165
|
readonly name: string;
|
|
160
166
|
}
|
|
161
167
|
export type TriggerNode = (TriggerNodeBase & {
|
|
@@ -182,20 +188,17 @@ export type TriggerNode = (TriggerNodeBase & {
|
|
|
182
188
|
readonly kind: 'integration';
|
|
183
189
|
});
|
|
184
190
|
export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode;
|
|
185
|
-
export interface
|
|
191
|
+
export interface FlowDocument {
|
|
186
192
|
readonly bindings: Readonly<Record<string, {
|
|
187
193
|
readonly kind: 'connection' | 'secret';
|
|
188
194
|
readonly target: string;
|
|
189
195
|
}>>;
|
|
190
|
-
readonly
|
|
191
|
-
readonly graph: Graph;
|
|
192
|
-
readonly name: string;
|
|
193
|
-
}>>;
|
|
196
|
+
readonly graph: Graph;
|
|
194
197
|
readonly subflows: Readonly<Record<string, {
|
|
195
198
|
readonly graph: Graph;
|
|
196
|
-
readonly inputs:
|
|
199
|
+
readonly inputs: readonly InputPort[];
|
|
197
200
|
readonly name: string;
|
|
198
|
-
readonly outputs:
|
|
201
|
+
readonly outputs: readonly (OutputMapping & Port)[];
|
|
199
202
|
}>>;
|
|
200
203
|
readonly tasks: Readonly<Record<string, ManagedTaskDefinition>>;
|
|
201
204
|
}
|
|
@@ -205,12 +208,11 @@ export interface CodeModule {
|
|
|
205
208
|
readonly source: string;
|
|
206
209
|
}
|
|
207
210
|
export interface RevisionContent {
|
|
208
|
-
readonly document:
|
|
211
|
+
readonly document: FlowDocument;
|
|
209
212
|
readonly modelVersion: 1;
|
|
210
213
|
readonly modules: Readonly<Record<string, CodeModule>>;
|
|
211
214
|
}
|
|
212
215
|
export type GraphTarget = {
|
|
213
|
-
readonly id: string;
|
|
214
216
|
readonly kind: 'flow';
|
|
215
217
|
} | {
|
|
216
218
|
readonly id: string;
|
|
@@ -223,27 +225,16 @@ export interface GraphEdge {
|
|
|
223
225
|
readonly targetHandle: string;
|
|
224
226
|
}
|
|
225
227
|
export type ChangeOperation = {
|
|
226
|
-
readonly binding:
|
|
228
|
+
readonly binding: FlowDocument['bindings'][string];
|
|
227
229
|
readonly bindingId: string;
|
|
228
230
|
readonly kind: 'binding.create';
|
|
229
231
|
} | {
|
|
230
|
-
readonly binding:
|
|
232
|
+
readonly binding: FlowDocument['bindings'][string];
|
|
231
233
|
readonly bindingId: string;
|
|
232
234
|
readonly kind: 'binding.replace';
|
|
233
235
|
} | {
|
|
234
236
|
readonly bindingId: string;
|
|
235
237
|
readonly kind: 'binding.delete';
|
|
236
|
-
} | {
|
|
237
|
-
readonly flow: ProjectDocument['flows'][string];
|
|
238
|
-
readonly flowId: string;
|
|
239
|
-
readonly kind: 'flow.create';
|
|
240
|
-
} | {
|
|
241
|
-
readonly flowId: string;
|
|
242
|
-
readonly kind: 'flow.delete';
|
|
243
|
-
} | {
|
|
244
|
-
readonly flowId: string;
|
|
245
|
-
readonly kind: 'flow.rename';
|
|
246
|
-
readonly name: string;
|
|
247
238
|
} | {
|
|
248
239
|
readonly kind: 'graph.edge.connect';
|
|
249
240
|
readonly edge: GraphEdge;
|
|
@@ -284,10 +275,10 @@ export type ChangeOperation = {
|
|
|
284
275
|
readonly source: string;
|
|
285
276
|
} | {
|
|
286
277
|
readonly kind: 'subflow.create';
|
|
287
|
-
readonly subflow:
|
|
278
|
+
readonly subflow: FlowDocument['subflows'][string];
|
|
288
279
|
readonly subflowId: string;
|
|
289
280
|
} | {
|
|
290
|
-
readonly definition: Omit<
|
|
281
|
+
readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
|
|
291
282
|
readonly kind: 'subflow.definition.replace';
|
|
292
283
|
readonly subflowId: string;
|
|
293
284
|
} | {
|
|
@@ -295,17 +286,17 @@ export type ChangeOperation = {
|
|
|
295
286
|
readonly subflowId: string;
|
|
296
287
|
} | {
|
|
297
288
|
readonly kind: 'task.create';
|
|
298
|
-
readonly task:
|
|
289
|
+
readonly task: FlowDocument['tasks'][string];
|
|
299
290
|
readonly taskId: string;
|
|
300
291
|
} | {
|
|
301
292
|
readonly kind: 'task.delete';
|
|
302
293
|
readonly taskId: string;
|
|
303
294
|
} | {
|
|
304
295
|
readonly kind: 'task.replace';
|
|
305
|
-
readonly task:
|
|
296
|
+
readonly task: FlowDocument['tasks'][string];
|
|
306
297
|
readonly taskId: string;
|
|
307
298
|
};
|
|
308
|
-
export declare class
|
|
299
|
+
export declare class FlowChangeError extends Error {
|
|
309
300
|
}
|
|
310
|
-
export declare function
|
|
301
|
+
export declare function applyFlowChanges(content: RevisionContent, operations: readonly ChangeOperation[]): RevisionContent;
|
|
311
302
|
export {};
|