@oomol-lab/open-flow 0.1.0-beta.10 → 0.1.0-beta.11
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/DesignerIcon-ckcKnxxJ.js +2267 -0
- package/dist/browser/createResourceDialog-DhIU-HYW.js +111 -0
- package/dist/browser/{dist-meg_oHVR.js → dist-BZ5PTFAs.js} +335 -335
- package/dist/browser/dist-Bmb2mZvW.js +795 -0
- package/dist/browser/{dist-Cc0y2Pli.js → dist-Ce71Szg7.js} +622 -622
- package/dist/browser/dist-DSe6KRsr.js +1224 -0
- package/dist/browser/{dist-Dg_VXC8f.js → dist-DY4qlXTK.js} +134 -134
- package/dist/browser/{esm-yhVU_KbQ.js → esm-C64_h7HF.js} +59 -59
- package/dist/browser/flow-authoring-node.d.ts +11 -4
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +5018 -275
- package/dist/browser/flow-change-schema.d.ts +3 -0
- package/dist/browser/flow-change.d.ts +21 -8
- package/dist/browser/flow-change.js +5030 -155
- package/dist/browser/{flowChanges-B2ttnaj9.js → flowChanges-BINNGoug.js} +4397 -3766
- package/dist/browser/{flowRunInputEditorStore-DDidwd8h.js → flowRunInputEditorStore-NPGePkvP.js} +679 -689
- package/dist/browser/flowWorkspace-Dp_b8KXF.js +158409 -0
- package/dist/browser/{getPseudoElementBounds-5LArT6Xc.js → getPseudoElementBounds-Dfqo78k7.js} +691 -687
- package/dist/browser/{languages-DgJehE1g.js → languages-i3Xmpt6S.js} +6 -15
- package/dist/browser/licenses.md +82 -0
- package/dist/browser/{markdownContent-DUfLdnUt.js → markdownContent-BawLYUjh.js} +23 -23
- package/dist/browser/select-CbQHq-GM.js +6851 -0
- package/dist/browser/theme.css +34 -34
- package/dist/browser/{typeScriptSession-_TgJ_7Oq.js → typeScriptSession-BoV-FDl3.js} +257 -257
- package/dist/browser/waitNotificationInputs-fzyKN6mk.js +29 -0
- package/dist/browser/workbench-contract.d.ts +8 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +1256 -1006
- package/dist/browser/workbenchSelect-BjbJjlNd.js +435 -0
- package/dist/common/control-api-conformance.js +234 -85
- package/dist/common/control-api.d.ts +37 -10
- package/dist/common/control-api.js +421 -342
- package/dist/common/engine-contract.d.ts +1 -1
- package/dist/common/flow-encoding.js +9 -7
- package/dist/common/flow-graph.d.ts +6 -0
- package/dist/common/flow-modules.d.ts +20 -0
- package/dist/common/flow-schema.d.ts +8 -0
- package/dist/common/flow-semantics.d.ts +6 -5
- package/dist/common/flow-semantics.js +14651 -9824
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/run-events.d.ts +2 -2
- package/dist/common/run-events.js +8 -15
- package/dist/common/runtime-contract.d.ts +9 -1
- package/dist/common/runtime-contract.js +137 -27
- package/dist/common/scheduler.d.ts +11 -33
- package/dist/common/scheduler.js +7227 -428
- package/dist/index.d.ts +5 -5
- package/package.json +1 -1
- package/dist/browser/DesignerIcon-DjgOMYI5.js +0 -2065
- package/dist/browser/createResourceDialog-DNBueSYZ.js +0 -505
- package/dist/browser/dist-BMRLCebL.js +0 -1893
- package/dist/browser/flowWorkspace-Dr8-Hut9.js +0 -45541
- package/dist/browser/icons-KIOgjHpD.js +0 -730
- package/dist/browser/waitNotificationInputs-BPulOxYt.js +0 -26
- package/dist/browser/workbenchSelect-CbXrdwxW.js +0 -1375
|
@@ -19,7 +19,7 @@ function t(n, r) {
|
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/control/common/conformance.ts
|
|
22
|
-
var n = "open-flow-engine/
|
|
22
|
+
var n = "open-flow-engine/v2";
|
|
23
23
|
function r(e) {
|
|
24
24
|
throw Error(e);
|
|
25
25
|
}
|
|
@@ -79,9 +79,9 @@ function m(e, t, n, r = "marker", i) {
|
|
|
79
79
|
return p(e, t, n, [{
|
|
80
80
|
kind: "graph.node.create",
|
|
81
81
|
node: {
|
|
82
|
-
concurrency: 1,
|
|
83
82
|
inputs: {},
|
|
84
83
|
kind: "value",
|
|
84
|
+
name: r,
|
|
85
85
|
values: [{
|
|
86
86
|
handle: "ready",
|
|
87
87
|
jsonSchema: { type: "boolean" },
|
|
@@ -93,10 +93,21 @@ function m(e, t, n, r = "marker", i) {
|
|
|
93
93
|
target: { kind: "flow" }
|
|
94
94
|
}], i);
|
|
95
95
|
}
|
|
96
|
-
function h(e, t) {
|
|
96
|
+
async function h(e, t, n) {
|
|
97
|
+
return g(await c(await p(e, t, n, [{
|
|
98
|
+
kind: "graph.node.create",
|
|
99
|
+
node: {
|
|
100
|
+
kind: "manual",
|
|
101
|
+
name: "Start"
|
|
102
|
+
},
|
|
103
|
+
nodeId: "start",
|
|
104
|
+
target: { kind: "flow" }
|
|
105
|
+
}]), 200, "Add manual trigger"), "Manual trigger Revision");
|
|
106
|
+
}
|
|
107
|
+
function g(e, t) {
|
|
97
108
|
return s(a(e.revision, `${t} revision`).revisionId, `${t} revisionId`);
|
|
98
109
|
}
|
|
99
|
-
function
|
|
110
|
+
function _(e, t, r, i, a) {
|
|
100
111
|
return u(e, `/v1/flows/${encodeURIComponent(t)}/revisions/${encodeURIComponent(r)}/publications`, {
|
|
101
112
|
body: JSON.stringify({
|
|
102
113
|
engineContract: n,
|
|
@@ -107,7 +118,7 @@ function g(e, t, r, i, a) {
|
|
|
107
118
|
method: "POST"
|
|
108
119
|
});
|
|
109
120
|
}
|
|
110
|
-
async function
|
|
121
|
+
async function v(e, t, n, r) {
|
|
111
122
|
let o = await c(t, n, r), l = s(o.operationId, `${r} operationId`);
|
|
112
123
|
for (let t = 0; o.status == "pending" && t < 100; t += 1) await new Promise((e) => setTimeout(e, 10)), o = await c(await u(e, `/v1/flows/${s(o.flowId, `${r} flowId`)}/publish-operations/${l}`), 200, `${r} operation`);
|
|
113
124
|
i(o.status, "succeeded", `${r} terminal status`);
|
|
@@ -117,7 +128,7 @@ async function _(e, t, n, r) {
|
|
|
117
128
|
publication: f
|
|
118
129
|
};
|
|
119
130
|
}
|
|
120
|
-
function
|
|
131
|
+
function y(e, t, n, r, i) {
|
|
121
132
|
return u(e, `/v1/flows/${encodeURIComponent(t)}/publications/${encodeURIComponent(n)}/rollback`, {
|
|
122
133
|
body: JSON.stringify({
|
|
123
134
|
expectedLivePublicationId: r,
|
|
@@ -127,10 +138,14 @@ function v(e, t, n, r, i) {
|
|
|
127
138
|
method: "POST"
|
|
128
139
|
});
|
|
129
140
|
}
|
|
130
|
-
function
|
|
141
|
+
function b(e, t, n) {
|
|
131
142
|
return u(e, "/v1/runs", {
|
|
132
143
|
body: JSON.stringify({
|
|
133
144
|
inputs: {},
|
|
145
|
+
trigger: {
|
|
146
|
+
nodeId: "start",
|
|
147
|
+
payload: {}
|
|
148
|
+
},
|
|
134
149
|
publicationId: t,
|
|
135
150
|
version: 1
|
|
136
151
|
}),
|
|
@@ -138,7 +153,7 @@ function y(e, t, n) {
|
|
|
138
153
|
method: "POST"
|
|
139
154
|
});
|
|
140
155
|
}
|
|
141
|
-
var
|
|
156
|
+
var x = [
|
|
142
157
|
{
|
|
143
158
|
name: "manages deployment Variables with stable limits and exact-case identity",
|
|
144
159
|
async verify(e) {
|
|
@@ -200,7 +215,7 @@ var b = [
|
|
|
200
215
|
{
|
|
201
216
|
name: "commits immutable Draft Revisions for one Flow",
|
|
202
217
|
async verify(e) {
|
|
203
|
-
let t = await f(e, "Draft flow", "draft-flow"), n = s(t.flowId, "Draft Flow flowId"), r = s(t.draftRevisionId, "Draft Flow revisionId"), o = await c(await m(e, n, r, "marker", "draft-change"), 200, "Change Draft"), d =
|
|
218
|
+
let t = await f(e, "Draft flow", "draft-flow"), n = s(t.flowId, "Draft Flow flowId"), r = s(t.draftRevisionId, "Draft Flow revisionId"), o = await c(await m(e, n, r, "marker", "draft-change"), 200, "Change Draft"), d = g(o, "Changed Draft");
|
|
204
219
|
i(a(o.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), i(await c(await m(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), o, "Replayed Draft change"), await l(await m(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await l(await m(e, n, d, "marker"), 400, "flow.invalid", "Duplicate Draft Node", "A Node with this ID already exists"), await l(await p(e, n, d, [{
|
|
205
220
|
before: [{
|
|
206
221
|
handle: "ready",
|
|
@@ -218,17 +233,47 @@ var b = [
|
|
|
218
233
|
value: !0
|
|
219
234
|
}]
|
|
220
235
|
}]), 400, "flow.invalid", "No-op Draft change"), await l(await m(e, n, r, "stale"), 412, "flow.revision-conflict", "Stale Draft change"), i(a(a(a(a((await c(await u(e, `/v1/flows/${n}/revisions/${r}`), 200, "Read old Revision")).content, "Old content").document, "Old document").graph, "Old graph").nodes, "Old nodes"), {}, "Old Revision nodes"), i((await c(await u(e, `/v1/flows/${n}/draft`), 200, "Read Draft")).revisionId, d, "Draft revisionId");
|
|
221
|
-
let
|
|
222
|
-
i(
|
|
236
|
+
let h = await c(await u(e, `/v1/flows/${n}/draft/sync`), 200, "Sync Draft");
|
|
237
|
+
i(h.kind, "snapshot", "Draft sync kind"), i(a(h.draft, "Draft snapshot").revisionId, d, "Draft snapshot revisionId");
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "loads the current editor without changing Draft or Presentation",
|
|
242
|
+
async verify(e) {
|
|
243
|
+
let t = await f(e, "Editor flow", "editor-flow"), n = s(t.flowId, "Editor Flow identity"), r = await c(await m(e, n, s(t.draftRevisionId, "Editor Draft identity"), "marker"), 200, "Change editor Draft"), o = await c(await u(e, `/v1/flows/${n}/presentation`, {
|
|
244
|
+
method: "PUT",
|
|
245
|
+
body: JSON.stringify({
|
|
246
|
+
expectedRevision: 1,
|
|
247
|
+
value: { nodes: { marker: {
|
|
248
|
+
x: 12,
|
|
249
|
+
y: 24
|
|
250
|
+
} } },
|
|
251
|
+
version: 1
|
|
252
|
+
})
|
|
253
|
+
}), 200, "Update editor Presentation"), d = await c(await u(e, `/v1/flows/${n}/editor`), 200, "Read editor");
|
|
254
|
+
i(d.version, 1, "Editor version"), i(a(d.flow, "Editor Flow").draftRevisionId, g(r, "Editor change"), "Editor Draft head");
|
|
255
|
+
for (let t of [
|
|
256
|
+
"flow",
|
|
257
|
+
"draft",
|
|
258
|
+
"live",
|
|
259
|
+
"presentation"
|
|
260
|
+
]) {
|
|
261
|
+
let r = t == "flow" ? `/v1/flows/${n}` : `/v1/flows/${n}/${t}`;
|
|
262
|
+
i(d[t], await c(await u(e, r), 200, `Read editor ${t}`), `Editor ${t}`);
|
|
263
|
+
}
|
|
264
|
+
i(d.presentation, o, "Reading editor preserves Presentation"), await l(await u(e, "/v1/flows/missing-editor/editor"), 404, "flow.not-found", "Read missing editor");
|
|
223
265
|
}
|
|
224
266
|
},
|
|
225
267
|
{
|
|
226
268
|
name: "keeps Presentation CAS independent from the Draft head",
|
|
227
269
|
async verify(e) {
|
|
228
|
-
let t = await f(e, "Presentation flow", "presentation-flow"), n = s(t.flowId, "Presentation Flow flowId"), r = s(t.draftRevisionId, "Presentation Flow revisionId"), a = `/v1/flows/${n}/presentation`, o = {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
270
|
+
let t = await f(e, "Presentation flow", "presentation-flow"), n = s(t.flowId, "Presentation Flow flowId"), r = s(t.draftRevisionId, "Presentation Flow revisionId"), a = `/v1/flows/${n}/presentation`, o = {
|
|
271
|
+
edges: [],
|
|
272
|
+
nodes: { task: {
|
|
273
|
+
x: 120,
|
|
274
|
+
y: 80
|
|
275
|
+
} }
|
|
276
|
+
}, d = await c(await u(e, a, {
|
|
232
277
|
body: JSON.stringify({
|
|
233
278
|
expectedRevision: 1,
|
|
234
279
|
value: o,
|
|
@@ -256,7 +301,7 @@ var b = [
|
|
|
256
301
|
{
|
|
257
302
|
name: "validates, admits, lists, and cancels one Draft Run",
|
|
258
303
|
async verify(e) {
|
|
259
|
-
let t = await f(e, "Run flow", "run-flow"), r = s(t.flowId, "Run Flow flowId"), d = s(t.draftRevisionId, "Run Flow revisionId");
|
|
304
|
+
let t = await f(e, "Run flow", "run-flow"), r = s(t.flowId, "Run Flow flowId"), d = await h(e, r, s(t.draftRevisionId, "Run Flow revisionId"));
|
|
260
305
|
i((await c(await u(e, `/v1/flows/${r}/revisions/${d}/check`, {
|
|
261
306
|
body: JSON.stringify({
|
|
262
307
|
engineContract: n,
|
|
@@ -264,31 +309,72 @@ var b = [
|
|
|
264
309
|
}),
|
|
265
310
|
method: "POST"
|
|
266
311
|
}), 200, "Check Flow")).valid, !0, "Flow validity");
|
|
267
|
-
let p = `/v1/flows/${r}/revisions/${d}/runs
|
|
312
|
+
let p = `/v1/flows/${r}/revisions/${d}/runs`;
|
|
313
|
+
for (let t of [
|
|
314
|
+
void 0,
|
|
315
|
+
{
|
|
316
|
+
nodeId: "missing",
|
|
317
|
+
payload: {}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
nodeId: "start",
|
|
321
|
+
payload: { unexpected: !0 }
|
|
322
|
+
}
|
|
323
|
+
]) await l(await u(e, p, {
|
|
324
|
+
body: JSON.stringify({
|
|
325
|
+
engineContract: n,
|
|
326
|
+
inputs: {},
|
|
327
|
+
trigger: t,
|
|
328
|
+
version: 1
|
|
329
|
+
}),
|
|
330
|
+
headers: { "idempotency-key": `invalid-entry-${JSON.stringify(t)}` },
|
|
331
|
+
method: "POST"
|
|
332
|
+
}), 400, "run.invalid", "Reject invalid start node or payload");
|
|
333
|
+
let m = () => u(e, p, {
|
|
268
334
|
body: JSON.stringify({
|
|
269
335
|
engineContract: n,
|
|
270
336
|
inputs: {},
|
|
337
|
+
trigger: {
|
|
338
|
+
nodeId: "start",
|
|
339
|
+
payload: {}
|
|
340
|
+
},
|
|
271
341
|
version: 1
|
|
272
342
|
}),
|
|
273
343
|
headers: { "idempotency-key": "draft-run" },
|
|
274
344
|
method: "POST"
|
|
275
|
-
}),
|
|
276
|
-
i(await c(await m(), 200, "Replay Draft Run"),
|
|
277
|
-
let _ = s((await c(await u(e, p, {
|
|
345
|
+
}), g = await c(await m(), 202, "Create Draft Run"), _ = s(g.runId, "Draft Run runId");
|
|
346
|
+
i(await c(await m(), 200, "Replay Draft Run"), g, "Replayed Draft Run"), await l(await u(e, p, {
|
|
278
347
|
body: JSON.stringify({
|
|
279
348
|
engineContract: n,
|
|
280
349
|
inputs: {},
|
|
350
|
+
trigger: {
|
|
351
|
+
nodeId: "another",
|
|
352
|
+
payload: {}
|
|
353
|
+
},
|
|
354
|
+
version: 1
|
|
355
|
+
}),
|
|
356
|
+
headers: { "idempotency-key": "draft-run" },
|
|
357
|
+
method: "POST"
|
|
358
|
+
}), 409, "run.conflict", "Changing the entry conflicts with the original Run request"), await l(await u(e, `/v1/runs/${_}/result`), 409, "run.not-terminal", "Read queued Run result");
|
|
359
|
+
let v = s((await c(await u(e, p, {
|
|
360
|
+
body: JSON.stringify({
|
|
361
|
+
engineContract: n,
|
|
362
|
+
inputs: {},
|
|
363
|
+
trigger: {
|
|
364
|
+
nodeId: "start",
|
|
365
|
+
payload: {}
|
|
366
|
+
},
|
|
281
367
|
version: 1
|
|
282
368
|
}),
|
|
283
369
|
headers: { "idempotency-key": "draft-run-second" },
|
|
284
370
|
method: "POST"
|
|
285
|
-
}), 202, "Create second Draft Run")).runId, "Second Draft Run"),
|
|
286
|
-
i(o(
|
|
287
|
-
let
|
|
288
|
-
i(o((await c(await u(e, `/v1/flows/${r}/runs?limit=1&cursor=${encodeURIComponent(
|
|
371
|
+
}), 202, "Create second Draft Run")).runId, "Second Draft Run"), y = await c(await u(e, `/v1/flows/${r}/runs?limit=1`), 200, "List Runs");
|
|
372
|
+
i(o(y.runs, "Runs").map((e) => a(e, "Run").runId), [v], "Listed Runs");
|
|
373
|
+
let b = s(y.nextCursor, "Run cursor");
|
|
374
|
+
i(o((await c(await u(e, `/v1/flows/${r}/runs?limit=1&cursor=${encodeURIComponent(b)}`), 200, "List next Runs")).runs, "Next Runs").map((e) => a(e, "Run").runId), [_], "Listed next Runs"), await l(await u(e, `/v1/flows/${s((await f(e, "Other Run flow", "other-run-flow")).flowId, "Other Run Flow flowId")}/runs?limit=1&cursor=${encodeURIComponent(b)}`), 400, "page.invalid-cursor", "Reject Run cursor from another Flow"), i((await c(await u(e, `/v1/runs/${_}/cancel`, {
|
|
289
375
|
body: JSON.stringify({ version: 1 }),
|
|
290
376
|
method: "POST"
|
|
291
|
-
}), 200, "Cancel Run")).status, "canceled", "Canceled Run status"), i((await c(await u(e, `/v1/runs/${
|
|
377
|
+
}), 200, "Cancel Run")).status, "canceled", "Canceled Run status"), i((await c(await u(e, `/v1/runs/${_}/result`), 200, "Read canceled Run result")).status, "canceled", "Canceled Run result"), i((await c(await u(e, `/v1/runs/${_}/events`), 200, "Read canceled Run events")).done, !0, "Canceled Run events"), i((await c(await u(e, `/v1/runs/${v}/cancel`, {
|
|
292
378
|
body: JSON.stringify({ version: 1 }),
|
|
293
379
|
method: "POST"
|
|
294
380
|
}), 200, "Cancel second Draft Run")).status, "canceled", "Second canceled Run status");
|
|
@@ -298,11 +384,10 @@ var b = [
|
|
|
298
384
|
name: "pauses, resolves, resumes, and cancels waiting Draft Runs",
|
|
299
385
|
runtime: !0,
|
|
300
386
|
async verify(e) {
|
|
301
|
-
let t = await f(e, "Wait flow", "wait-flow"), d = s(t.flowId, "Wait Flow flowId"), m = `/v1/flows/${d}/revisions/${
|
|
387
|
+
let t = await f(e, "Wait flow", "wait-flow"), d = s(t.flowId, "Wait Flow flowId"), m = `/v1/flows/${d}/revisions/${g(await c(await p(e, d, await h(e, d, s(t.draftRevisionId, "Wait Flow revisionId")), [{
|
|
302
388
|
kind: "graph.node.create",
|
|
303
389
|
node: {
|
|
304
390
|
actions: ["approve", "reject"],
|
|
305
|
-
concurrency: 1,
|
|
306
391
|
input: {
|
|
307
392
|
handle: "value",
|
|
308
393
|
jsonSchema: {},
|
|
@@ -314,46 +399,58 @@ var b = [
|
|
|
314
399
|
value: { request: 1 }
|
|
315
400
|
} },
|
|
316
401
|
kind: "wait",
|
|
402
|
+
name: "Approval",
|
|
317
403
|
prompt: "Approve request 1?"
|
|
318
404
|
},
|
|
319
405
|
nodeId: "approval",
|
|
320
406
|
target: { kind: "flow" }
|
|
321
|
-
}
|
|
407
|
+
}, {
|
|
408
|
+
kind: "graph.edge.connect",
|
|
409
|
+
edge: {
|
|
410
|
+
source: "start",
|
|
411
|
+
target: "approval"
|
|
412
|
+
},
|
|
413
|
+
target: { kind: "flow" }
|
|
414
|
+
}]), 200, "Create Wait"), "Wait Revision")}/runs`, _ = async (t, r) => c(await u(e, m, {
|
|
322
415
|
body: JSON.stringify({
|
|
323
416
|
engineContract: n,
|
|
324
417
|
inputs: {},
|
|
418
|
+
trigger: {
|
|
419
|
+
nodeId: "start",
|
|
420
|
+
payload: {}
|
|
421
|
+
},
|
|
325
422
|
version: 1
|
|
326
423
|
}),
|
|
327
424
|
headers: { "idempotency-key": t },
|
|
328
425
|
method: "POST"
|
|
329
|
-
}), 202, r),
|
|
330
|
-
for (let t = 0;
|
|
331
|
-
i(
|
|
332
|
-
let
|
|
333
|
-
i(
|
|
334
|
-
let
|
|
335
|
-
i(o((await c(await u(e, `/v1/flows/${d}/runs?status=waiting`), 200, "List waiting Runs")).runs, "Waiting Runs").map((e) => a(e, "Waiting Run").runId), [
|
|
336
|
-
let
|
|
337
|
-
i(
|
|
338
|
-
let
|
|
426
|
+
}), 202, r), v = await _("wait-run", "Create Wait Run"), y = s(v.runId, "Wait Run runId"), b = v;
|
|
427
|
+
for (let t = 0; b.status != "waiting" && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), b = await c(await u(e, `/v1/runs/${y}`), 200, "Read Wait Run");
|
|
428
|
+
i(b.status, "waiting", "Wait Run status");
|
|
429
|
+
let x = a(b.waiting, "Active Wait");
|
|
430
|
+
i(x.actions, ["approve", "reject"], "Wait actions"), i(x.nodeId, "approval", "Wait node"), i(x.prompt, "Approve request 1?", "Wait prompt"), s(x.expiresAt, "Wait expiry"), s(x.waitingSince, "Wait start");
|
|
431
|
+
let S = s(x.waitId, "Wait id");
|
|
432
|
+
i(o((await c(await u(e, `/v1/flows/${d}/runs?status=waiting`), 200, "List waiting Runs")).runs, "Waiting Runs").map((e) => a(e, "Waiting Run").runId), [y], "Waiting Run list");
|
|
433
|
+
let C = await c(await u(e, `/v1/runs/${y}/events`), 200, "Read waiting Run events");
|
|
434
|
+
i(C.done, !1, "Waiting events done"), o(C.events, "Waiting events").some((e) => a(e, "Waiting event").kind == "run.waiting") || r("Waiting Run must contain run.waiting."), await l(await u(e, `/v1/runs/${y}/result`), 409, "run.not-terminal", "Read waiting Run result");
|
|
435
|
+
let w = `/v1/runs/${y}/waits/${S}/resolve`, T = (t) => u(e, w, {
|
|
339
436
|
body: JSON.stringify({
|
|
340
437
|
action: t,
|
|
341
438
|
version: 1
|
|
342
439
|
}),
|
|
343
440
|
method: "POST"
|
|
344
441
|
});
|
|
345
|
-
await l(await
|
|
346
|
-
let
|
|
347
|
-
i(
|
|
348
|
-
let
|
|
349
|
-
i(
|
|
350
|
-
for (let t = 0;
|
|
351
|
-
i(
|
|
352
|
-
let
|
|
353
|
-
i(
|
|
354
|
-
let
|
|
355
|
-
for (let t = 0;
|
|
356
|
-
i(
|
|
442
|
+
await l(await T("continue"), 400, "run.invalid", "Reject unsupported Wait action");
|
|
443
|
+
let E = await c(await T("approve"), 200, "Approve Wait");
|
|
444
|
+
i(E.action, "approve", "Approved action"), i(E.resolutionAccepted, !0, "Approved resolution"), i(E.status, "queued", "Resolved Run status"), s(E.resolvedAt, "Wait resolution time");
|
|
445
|
+
let D = await c(await T("reject"), 200, "Reject resolved Wait");
|
|
446
|
+
i(D.action, "approve", "Winning action"), i(D.resolutionAccepted, !1, "Competing resolution");
|
|
447
|
+
for (let t = 0; b.status != "completed" && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), b = await c(await u(e, `/v1/runs/${y}`), 200, "Read resumed Run");
|
|
448
|
+
i(b.status, "completed", "Resumed Run status"), i(b.waiting, void 0, "Completed Wait projection");
|
|
449
|
+
let O = await c(await T("approve"), 200, "Replay approved Wait");
|
|
450
|
+
i(O.resolutionAccepted, !0, "Replayed resolution"), i(O.status, "completed", "Replayed terminal status"), i(o((await c(await u(e, `/v1/runs/${y}/events`), 200, "Read resumed Run events")).events, "Completed events").filter((e) => a(e, "Completed event").kind == "run.resolved").length, 1, "Resolved event count");
|
|
451
|
+
let k = await _("wait-run-cancel", "Create cancelable Wait Run"), A = s(k.runId, "Cancelable Wait Run id"), j = k;
|
|
452
|
+
for (let t = 0; j.status != "waiting" && t < 200; t += 1) await new Promise((e) => setTimeout(e, 10)), j = await c(await u(e, `/v1/runs/${A}`), 200, "Read cancelable Wait Run");
|
|
453
|
+
i(j.status, "waiting", "Cancelable Wait status"), i((await c(await u(e, `/v1/runs/${A}/cancel`, {
|
|
357
454
|
body: JSON.stringify({ version: 1 }),
|
|
358
455
|
method: "POST"
|
|
359
456
|
}), 200, "Cancel waiting Run")).status, "canceled", "Canceled waiting Run status");
|
|
@@ -392,6 +489,10 @@ var b = [
|
|
|
392
489
|
body: JSON.stringify({
|
|
393
490
|
engineContract: n,
|
|
394
491
|
inputs: {},
|
|
492
|
+
trigger: {
|
|
493
|
+
nodeId: "start",
|
|
494
|
+
payload: {}
|
|
495
|
+
},
|
|
395
496
|
version: 1
|
|
396
497
|
}),
|
|
397
498
|
headers: { "idempotency-key": r },
|
|
@@ -400,35 +501,74 @@ var b = [
|
|
|
400
501
|
await l(await p(c, "unsupported-engine/v1", "unsupported-run"), 409, "engine.unsupported", "Run unsupported Engine"), await l(await p(r, n, "missing-revision-run"), 404, "flow.not-found", "Run missing Revision");
|
|
401
502
|
}
|
|
402
503
|
}
|
|
403
|
-
],
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}, {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
504
|
+
], S = [
|
|
505
|
+
{
|
|
506
|
+
name: "controls Live admission independently from publishing and Draft testing",
|
|
507
|
+
async verify(e) {
|
|
508
|
+
let t = await f(e, "Enabled flow", "enabled-flow"), r = s(t.flowId, "Flow id"), o = await h(e, r, s(t.draftRevisionId, "Draft id")), d = (t, n) => u(e, `/v1/flows/${r}/enabled`, {
|
|
509
|
+
method: "PUT",
|
|
510
|
+
body: JSON.stringify({
|
|
511
|
+
enabled: t,
|
|
512
|
+
expectedPublicationId: n,
|
|
513
|
+
version: 1
|
|
514
|
+
})
|
|
515
|
+
});
|
|
516
|
+
await l(await d(!0, "missing"), 409, "flow.conflict", "Cannot enable unpublished Flow");
|
|
517
|
+
let p = s((await v(e, await _(e, r, o, null, "enable-first"), 202, "Publish")).publication.publicationId, "Publication id"), m = await c(await d(!1, p), 200, "Disable");
|
|
518
|
+
i(m.live, {
|
|
519
|
+
enabled: !1,
|
|
520
|
+
publicationId: p,
|
|
521
|
+
revisionId: o
|
|
522
|
+
}, "Disabled summary"), i((await c(await u(e, "/v1/flows"), 200, "List disabled Flow")).flows, [m], "List includes Live state"), i((await c(await u(e, `/v1/flows/${r}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status"), await l(await b(e, p, "disabled-run"), 412, "live.conflict", "Disabled Live rejects Run"), await c(await u(e, `/v1/flows/${r}/revisions/${o}/runs`, {
|
|
523
|
+
method: "POST",
|
|
524
|
+
headers: { "idempotency-key": "disabled-draft" },
|
|
525
|
+
body: JSON.stringify({
|
|
526
|
+
engineContract: n,
|
|
527
|
+
inputs: {},
|
|
528
|
+
trigger: {
|
|
529
|
+
nodeId: "start",
|
|
530
|
+
payload: {}
|
|
531
|
+
},
|
|
532
|
+
version: 1
|
|
533
|
+
})
|
|
534
|
+
}), 202, "Disabled Flow permits Draft test");
|
|
535
|
+
let g = s((await v(e, await _(e, r, o, p, "enable-next"), 202, "Publish disabled Flow")).publication.publicationId, "Next Publication id");
|
|
536
|
+
i(a((await c(await u(e, `/v1/flows/${r}`), 200, "Read Flow")).live, "Live").enabled, !1, "Publish preserves disabled state"), await l(await d(!0, p), 409, "flow.conflict", "Stale switch rejects"), await c(await d(!0, g), 200, "Enable"), await c(await b(e, g, "enabled-run"), 202, "Enabled Live accepts Run");
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
name: "publishes one immutable Flow with idempotent Live CAS",
|
|
541
|
+
async verify(e) {
|
|
542
|
+
let t = await f(e, "Publication flow", "publication-flow"), n = s(t.flowId, "Publication Flow flowId"), r = await h(e, n, s(t.draftRevisionId, "Publication Flow revisionId"));
|
|
543
|
+
i((await c(await u(e, `/v1/flows/${n}/live`), 200, "Read Live")).status, "not-published", "Initial Live status");
|
|
544
|
+
let a = () => _(e, n, r, null, "publication-first"), o = await v(e, await a(), 202, "Publish Flow"), d = o.publication, p = s(d.publicationId, "Publication id");
|
|
545
|
+
i(await c(await a(), 202, "Replay Publish"), o.operation, "Replayed Publish operation"), await l(await _(e, n, r, p, "publication-first"), 409, "publication.conflict", "Conflicting replay");
|
|
546
|
+
let m = await c(await u(e, `/v1/flows/${n}/live`), 200, "Read published Live");
|
|
547
|
+
i(m.publication, d, "Live Publication"), i((await c(await u(e, `/v1/flows/${n}/editor`), 200, "Read published editor")).live, m, "Published editor Live projection");
|
|
548
|
+
let g = await c(await u(e, `/v1/flows/${n}/publications?includeTotal=true`), 200, "List Publications");
|
|
549
|
+
i(g.publications, [d], "Publication history"), i(g.total, 1, "Publication total"), await l(await u(e, `/v1/flows/${n}/revisions/${r}/publications`, {
|
|
550
|
+
body: JSON.stringify({
|
|
551
|
+
engineContract: "unsupported-engine/v1",
|
|
552
|
+
expectedLivePublicationId: p,
|
|
553
|
+
version: 1
|
|
554
|
+
}),
|
|
555
|
+
headers: { "idempotency-key": "unsupported-publication" },
|
|
556
|
+
method: "POST"
|
|
557
|
+
}), 409, "engine.unsupported", "Publish unsupported Engine"), await l(await _(e, n, "00000000-0000-7000-8000-000000000002", p, "missing-revision-publication"), 404, "flow.not-found", "Publish missing Revision"), await l(await y(e, n, "00000000-0000-7000-8000-000000000004", p, "missing-rollback"), 404, "publication.not-found", "Rollback missing Publication"), await l(await b(e, "00000000-0000-7000-8000-000000000004", "missing-publication-run"), 404, "publication.not-found", "Run missing Publication");
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "rolls back immutable history and fixes a Live Run target",
|
|
562
|
+
async verify(e) {
|
|
563
|
+
let t = await f(e, "Rollback flow", "rollback-flow"), n = s(t.flowId, "Rollback Flow flowId"), r = await h(e, n, s(t.draftRevisionId, "Rollback Flow revisionId")), a = (await v(e, await _(e, n, r, null, "publish-first"), 202, "Publish first Revision")).publication, o = s(a.publicationId, "First Publication"), d = (await v(e, await _(e, n, g(await c(await m(e, n, r), 200, "Change Draft"), "Second Revision"), o, "publish-second"), 202, "Publish second Revision")).publication, p = s(d.publicationId, "Second Publication");
|
|
564
|
+
await l(await b(e, o, "stale-live-run"), 412, "live.conflict", "Run stale Publication");
|
|
565
|
+
let x = () => y(e, n, o, p, "rollback-first"), S = await c(await x(), 201, "Rollback Flow"), C = s(S.publicationId, "Rollback Publication");
|
|
566
|
+
i(S.operation, "rollback", "Rollback operation"), i(S.sourcePublicationId, o, "Rollback source"), i(await c(await x(), 200, "Replay Rollback"), S, "Replayed Rollback");
|
|
567
|
+
let w = await c(await b(e, C, "rollback-run"), 202, "Create Live Run");
|
|
568
|
+
i(w.flowId, n, "Live Run flowId"), i(w.revisionId, r, "Live Run revisionId"), await c(await u(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await l(await b(e, C, "retired-run"), 409, "flow.busy", "Run retired Flow");
|
|
569
|
+
}
|
|
430
570
|
}
|
|
431
|
-
|
|
571
|
+
], C = [{
|
|
432
572
|
name: "exposes one deployment-scoped Trigger Key catalog",
|
|
433
573
|
async verify(e) {
|
|
434
574
|
let t = await c(await u(e, "/v1/trigger-keys"), 200, "List Trigger Keys"), n = await c(await u(e, "/v1/trigger-keys/catalog"), 200, "List Trigger definitions"), r = o(t.keys, "Trigger Keys").map((e) => a(e, "Trigger Key")), d = o(n.definitions, "Trigger definitions").map((e) => a(e, "Trigger definition"));
|
|
@@ -442,7 +582,7 @@ var b = [
|
|
|
442
582
|
}, {
|
|
443
583
|
name: "operates and retires one Live Trigger binding",
|
|
444
584
|
async verify(e) {
|
|
445
|
-
let t = await f(e, "Trigger flow", "trigger-flow"), n = s(t.flowId, "Trigger Flow flowId"), r =
|
|
585
|
+
let t = await f(e, "Trigger flow", "trigger-flow"), n = s(t.flowId, "Trigger Flow flowId"), r = g(await c(await p(e, n, s(t.draftRevisionId, "Trigger Flow revisionId"), [{
|
|
446
586
|
kind: "graph.node.create",
|
|
447
587
|
node: {
|
|
448
588
|
cronTimes: [{
|
|
@@ -464,20 +604,29 @@ var b = [
|
|
|
464
604
|
},
|
|
465
605
|
nodeId: "webhook",
|
|
466
606
|
target: { kind: "flow" }
|
|
467
|
-
}]), 200, "Create Trigger nodes"), "Trigger Revision"), l = (await
|
|
468
|
-
i(
|
|
469
|
-
for (let e of
|
|
607
|
+
}]), 200, "Create Trigger nodes"), "Trigger Revision"), l = (await v(e, await _(e, n, r, null, "trigger-publication"), 202, "Publish Trigger Flow")).publication, d = s(l.publicationId, "Trigger Publication"), m = `/v1/flows/${n}/triggers`, h = o((await c(await u(e, m), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => a(e, "Trigger binding"));
|
|
608
|
+
i(h.map((e) => e.triggerNodeId), ["cron", "webhook"], "Trigger binding order");
|
|
609
|
+
for (let e of h) i(e.currentPublicationId, d, "Trigger Publication");
|
|
470
610
|
let y = `${m}/webhook`, b = s(a((await c(await u(e, y), 200, "Read Webhook")).binding, "Webhook").endpointUrl, "Webhook endpoint"), x = (t) => u(e, `${y}/${t}`, {
|
|
471
611
|
body: JSON.stringify({ version: 1 }),
|
|
472
612
|
method: "POST"
|
|
473
613
|
});
|
|
474
|
-
i((await c(await x("pause"), 200, "Pause Webhook")).operatorState, "paused", "Paused state"), i((await e.request(new Request(b, { method: "POST" }))).status, 404, "Paused callback"), i((await c(await x("resume"), 200, "Resume Webhook")).operatorState, "active", "Resumed state"), i((await e.request(new Request(b, { method: "POST" }))).status, 200, "Resumed callback")
|
|
614
|
+
i((await c(await x("pause"), 200, "Pause Webhook")).operatorState, "paused", "Paused state"), i((await e.request(new Request(b, { method: "POST" }))).status, 404, "Paused callback"), i((await c(await x("resume"), 200, "Resume Webhook")).operatorState, "active", "Resumed state"), i((await e.request(new Request(b, { method: "POST" }))).status, 200, "Resumed callback");
|
|
615
|
+
let S = (t) => u(e, `/v1/flows/${n}/enabled`, {
|
|
616
|
+
method: "PUT",
|
|
617
|
+
body: JSON.stringify({
|
|
618
|
+
enabled: t,
|
|
619
|
+
expectedPublicationId: d,
|
|
620
|
+
version: 1
|
|
621
|
+
})
|
|
622
|
+
});
|
|
623
|
+
await c(await S(!1), 200, "Disable Trigger Flow"), i((await e.request(new Request(b, { method: "POST" }))).status, 404, "Disabled Flow blocks callback"), await c(await x("pause"), 200, "Pause binding while Flow disabled"), await c(await S(!0), 200, "Enable Trigger Flow"), i((await e.request(new Request(b, { method: "POST" }))).status, 404, "Enabling preserves binding pause"), await c(await x("resume"), 200, "Resume binding after enabling Flow"), i((await e.request(new Request(b, { method: "POST" }))).status, 200, "Enabled Flow permits callback"), await v(e, await _(e, n, g(await c(await p(e, n, r, [{
|
|
475
624
|
kind: "graph.node.delete",
|
|
476
625
|
nodeId: "webhook",
|
|
477
626
|
target: { kind: "flow" }
|
|
478
627
|
}]), 200, "Delete Webhook"), "Retired Trigger Revision"), d, "retire-trigger"), 202, "Publish retired Trigger"), i(a((await c(await u(e, y), 200, "Read retired Webhook")).binding, "Retired Webhook").currentPublicationId, void 0, "Retired Publication");
|
|
479
628
|
}
|
|
480
|
-
}],
|
|
629
|
+
}], w = [{
|
|
481
630
|
name: "projects the deployment Connector catalog and authorized Connections",
|
|
482
631
|
async verify(e) {
|
|
483
632
|
let t = o((await c(await u(e, "/v1/connector/providers"), 200, "List Connector Providers")).providers, "Connector Providers").map((e) => a(e, "Connector Provider")), n = o((await c(await u(e, "/v1/connector/actions"), 200, "List Connector Actions")).actions, "Connector Actions").map((e) => a(e, "Connector Action"));
|
|
@@ -499,4 +648,4 @@ var b = [
|
|
|
499
648
|
}
|
|
500
649
|
}];
|
|
501
650
|
//#endregion
|
|
502
|
-
export {
|
|
651
|
+
export { w as connectorControlApiConformanceCases, x as controlApiConformanceCases, S as publicationControlApiConformanceCases, C as triggerControlApiConformanceCases };
|
|
@@ -6,6 +6,11 @@ export { controlErrorCode, controlErrorMetadata, type ControlErrorCode } from '.
|
|
|
6
6
|
export type { FlowCatalogEvent, FlowChangeEvent } from './flow-notifications.js';
|
|
7
7
|
export type ControlRequest = (path: string, init?: RequestInit) => Promise<Response>;
|
|
8
8
|
export interface Flow {
|
|
9
|
+
readonly live?: {
|
|
10
|
+
readonly enabled: boolean;
|
|
11
|
+
readonly publicationId: string;
|
|
12
|
+
readonly revisionId: string;
|
|
13
|
+
};
|
|
9
14
|
readonly createdAt: string;
|
|
10
15
|
readonly draftRevisionId: string;
|
|
11
16
|
readonly flowId: string;
|
|
@@ -14,6 +19,12 @@ export interface Flow {
|
|
|
14
19
|
readonly updatedAt: string;
|
|
15
20
|
readonly version: 1;
|
|
16
21
|
}
|
|
22
|
+
export interface Presentation {
|
|
23
|
+
readonly revision: number;
|
|
24
|
+
readonly updatedAt: string;
|
|
25
|
+
readonly value: Readonly<Record<string, JsonValue>>;
|
|
26
|
+
readonly version: 1;
|
|
27
|
+
}
|
|
17
28
|
export interface FlowPage {
|
|
18
29
|
readonly flows: readonly Flow[];
|
|
19
30
|
readonly nextCursor?: string;
|
|
@@ -72,6 +83,7 @@ export interface PollTriggerTestResult {
|
|
|
72
83
|
readonly version: 1;
|
|
73
84
|
}
|
|
74
85
|
export interface ConnectorConnection {
|
|
86
|
+
readonly alias?: string;
|
|
75
87
|
readonly connectionId: string;
|
|
76
88
|
readonly displayName: string;
|
|
77
89
|
readonly isDefault: boolean;
|
|
@@ -79,6 +91,8 @@ export interface ConnectorConnection {
|
|
|
79
91
|
readonly status: 'active' | 'disconnected' | 'error' | 'reauth_required';
|
|
80
92
|
}
|
|
81
93
|
export interface ConnectorAction {
|
|
94
|
+
readonly inputSchema?: JsonValue;
|
|
95
|
+
readonly outputSchema?: JsonValue;
|
|
82
96
|
readonly actionId: string;
|
|
83
97
|
readonly authenticated: boolean;
|
|
84
98
|
readonly defaultConnection?: ConnectorConnection;
|
|
@@ -244,7 +258,7 @@ export interface RunPage {
|
|
|
244
258
|
readonly runs: readonly Run[];
|
|
245
259
|
readonly version: 1;
|
|
246
260
|
}
|
|
247
|
-
export type RunEventKind = 'node.artifact' | 'node.completed' | 'node.failed' | 'node.log' | 'node.
|
|
261
|
+
export type RunEventKind = 'node.artifact' | 'node.completed' | 'node.failed' | 'node.log' | 'node.progress' | 'node.started' | 'run.canceled' | 'run.completed' | 'run.events-truncated' | 'run.failed' | 'run.indeterminate' | 'run.progress' | 'run.queued' | 'run.resolved' | 'run.started' | 'run.waiting';
|
|
248
262
|
export interface RunEvent {
|
|
249
263
|
readonly createdAt: string;
|
|
250
264
|
readonly kind: RunEventKind;
|
|
@@ -289,6 +303,10 @@ export type RunResult = {
|
|
|
289
303
|
readonly version: 1;
|
|
290
304
|
};
|
|
291
305
|
interface RunOptions {
|
|
306
|
+
readonly trigger: {
|
|
307
|
+
readonly nodeId: string;
|
|
308
|
+
readonly payload: JsonValue;
|
|
309
|
+
};
|
|
292
310
|
readonly idempotencyKey?: string;
|
|
293
311
|
readonly inputs?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
294
312
|
}
|
|
@@ -322,7 +340,7 @@ export declare class ControlClient {
|
|
|
322
340
|
listTriggerKeys(signal?: AbortSignal): Promise<readonly TriggerKeySummary[]>;
|
|
323
341
|
listTriggerDefinitions(signal?: AbortSignal): Promise<readonly TriggerKeySnapshot[]>;
|
|
324
342
|
getTriggerKey(key: string, signal?: AbortSignal): Promise<TriggerKeySnapshot>;
|
|
325
|
-
listFlowTriggerBindings(flowId: string): Promise<readonly TriggerBinding[]>;
|
|
343
|
+
listFlowTriggerBindings(flowId: string, signal?: AbortSignal): Promise<readonly TriggerBinding[]>;
|
|
326
344
|
getFlowTriggerBinding(flowId: string, triggerNodeId: string): Promise<TriggerBindingDetail>;
|
|
327
345
|
listFlowTriggerActivities(flowId: string, triggerNodeId: string, options?: {
|
|
328
346
|
readonly cursor?: string;
|
|
@@ -331,6 +349,14 @@ export declare class ControlClient {
|
|
|
331
349
|
pauseFlowTrigger(flowId: string, triggerNodeId: string): Promise<TriggerBinding>;
|
|
332
350
|
resumeFlowTrigger(flowId: string, triggerNodeId: string): Promise<TriggerBinding>;
|
|
333
351
|
testFlowPollTrigger(flowId: string, triggerNodeId: string): Promise<PollTriggerTestResult>;
|
|
352
|
+
getEditor(flowId: string): Promise<{
|
|
353
|
+
readonly flow: Flow;
|
|
354
|
+
readonly draft: Draft;
|
|
355
|
+
readonly live: Live;
|
|
356
|
+
readonly presentation: Presentation;
|
|
357
|
+
readonly version: 1;
|
|
358
|
+
}>;
|
|
359
|
+
getPresentation(flowId: string): Promise<Presentation>;
|
|
334
360
|
getDraft(flowId: string): Promise<Draft>;
|
|
335
361
|
syncDraft(flowId: string): Promise<DraftSync>;
|
|
336
362
|
getRevision(flowId: string, revisionId: string): Promise<Draft>;
|
|
@@ -342,18 +368,19 @@ export declare class ControlClient {
|
|
|
342
368
|
createConnectorConnectionPage(serviceId: string, flowId?: string): Promise<string>;
|
|
343
369
|
changeDraft(flowId: string, expectedRevisionId: string, operations: readonly ChangeOperation[], changeId?: string): Promise<DraftChange>;
|
|
344
370
|
checkFlow(flowId: string, revisionId: string): Promise<FlowCheck>;
|
|
345
|
-
getLive(flowId: string): Promise<Live>;
|
|
371
|
+
getLive(flowId: string, signal?: AbortSignal): Promise<Live>;
|
|
346
372
|
listPublications(flowId: string, options?: {
|
|
347
373
|
readonly cursor?: string;
|
|
348
374
|
readonly includeTotal?: boolean;
|
|
349
375
|
readonly limit?: number;
|
|
350
|
-
}): Promise<PublicationPage>;
|
|
351
|
-
createDraftRun(flowId: string, revisionId: string, options
|
|
352
|
-
createLiveRun(publicationId: string, options
|
|
376
|
+
}, signal?: AbortSignal): Promise<PublicationPage>;
|
|
377
|
+
createDraftRun(flowId: string, revisionId: string, options: RunOptions): Promise<DraftRun>;
|
|
378
|
+
createLiveRun(publicationId: string, options: RunOptions): Promise<LiveRun>;
|
|
379
|
+
setFlowEnabled(flowId: string, publicationId: string, enabled: boolean): Promise<Flow>;
|
|
353
380
|
publishFlow(flowId: string, revisionId: string, expectedLivePublicationId: string | null, options?: PublicationOptions): Promise<PublishOperation>;
|
|
354
|
-
getPublishOperation(flowId: string, operationId: string): Promise<PublishOperation>;
|
|
381
|
+
getPublishOperation(flowId: string, operationId: string, signal?: AbortSignal): Promise<PublishOperation>;
|
|
355
382
|
rollbackFlow(flowId: string, publicationId: string, expectedLivePublicationId: string, options?: PublicationOptions): Promise<Publication>;
|
|
356
|
-
getRun(runId: string): Promise<RunDetails>;
|
|
383
|
+
getRun(runId: string, signal?: AbortSignal): Promise<RunDetails>;
|
|
357
384
|
listRuns(flowId: string, options?: {
|
|
358
385
|
readonly cursor?: string;
|
|
359
386
|
readonly limit?: number;
|
|
@@ -362,8 +389,8 @@ export declare class ControlClient {
|
|
|
362
389
|
getRunEvents(runId: string, options?: {
|
|
363
390
|
readonly after?: number;
|
|
364
391
|
readonly limit?: number;
|
|
365
|
-
}): Promise<RunEvents>;
|
|
366
|
-
getRunResult(runId: string): Promise<RunResult>;
|
|
392
|
+
}, signal?: AbortSignal): Promise<RunEvents>;
|
|
393
|
+
getRunResult(runId: string, signal?: AbortSignal): Promise<RunResult>;
|
|
367
394
|
cancelRun(runId: string): Promise<RunCancellation>;
|
|
368
395
|
resolveRunWait(runId: string, waitId: string, action: WaitAction): Promise<{
|
|
369
396
|
readonly action: WaitAction | null;
|