@oomol-lab/open-flow 0.1.0-alpha.0 → 0.1.0-alpha.10
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-BwrMvPQC.js +5230 -0
- package/dist/browser/assets/typeScriptWorker-CaA4llbX.js +59850 -0
- package/dist/browser/carbon-DMCVsjHo.js +53 -0
- package/dist/browser/{project-change.js → change-Cu6pQIit.js} +15 -45
- package/dist/browser/createLucideIcon-COMgwa_u.js +5317 -0
- package/dist/browser/createResourceDialog-YgMLylQz.js +467 -0
- package/dist/browser/{dist-o4dBuwiG.js → dist-3Mj8q8Pr.js} +28 -28
- package/dist/browser/{dist-CIq6ue3I.js → dist-BKuSVKCC.js} +1115 -1103
- package/dist/browser/{dist-DL0SDskM.js → dist-BMqL-qR5.js} +473 -906
- package/dist/browser/{dist-CLZJNoWB.js → dist-BN4ZCyOB.js} +10 -10
- package/dist/browser/{dist-zyY--HOV.js → dist-BpopSHwP.js} +3 -3
- package/dist/browser/dist-C46JByB-.js +252 -0
- package/dist/browser/{dist-BbyiRq3c.js → dist-CJpzJrLM.js} +294 -284
- package/dist/browser/{dist-Djd02JSy.js → dist-CPuF50D9.js} +198 -198
- package/dist/browser/{dist-CvcmLAMW.js → dist-CUSrALSX.js} +115 -115
- package/dist/browser/dist-CeSZ2xSM.js +444 -0
- package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
- package/dist/browser/{dist-B9OV3YTx.js → dist-DUzA0Ukh.js} +22 -22
- package/dist/browser/{dist-aWSZx4q1.js → dist-DWADUsVB.js} +75 -75
- package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
- package/dist/browser/{esm-DXw7EADW.js → esm-CvAs_mAS.js} +14 -24
- package/dist/browser/field-BrEG-7ap.js +312 -0
- package/dist/browser/flow-authoring-edge.d.ts +3 -0
- package/dist/browser/flow-authoring-module.d.ts +4 -0
- package/dist/browser/flow-authoring-node.d.ts +84 -0
- package/dist/browser/flow-authoring.d.ts +4 -0
- package/dist/browser/flow-authoring.js +522 -0
- package/dist/browser/{project-change.d.ts → flow-change.d.ts} +27 -36
- package/dist/browser/flow-change.js +231 -0
- package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
- package/dist/browser/flowRunInputEditorStore-DXOyyY7o.js +8219 -0
- package/dist/browser/flowWorkspace-X_T_DcQf.js +46003 -0
- package/dist/browser/{lib-S4ccuMeT.js → lib-GrGxYjsJ.js} +3 -5
- package/dist/browser/licenses.md +620 -12
- package/dist/browser/{markdownContent-ZZFfSRqO.js → markdownContent-BI-2PmDX.js} +4071 -4035
- package/dist/browser/typeScriptSession-Dagu_tRs.js +2549 -0
- package/dist/browser/workbench-contract.d.ts +4 -5
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +2 -1
- package/dist/browser/workbench.js +3920 -2138
- package/dist/common/connector-action.d.ts +6 -0
- package/dist/common/connector-action.js +38 -30
- package/dist/common/control-api-conformance.js +223 -359
- package/dist/common/control-api-errors.d.ts +20 -24
- package/dist/common/control-api.d.ts +44 -73
- package/dist/common/control-api.js +150 -203
- package/dist/common/cron-trigger.d.ts +1 -1
- package/dist/common/cron-trigger.js +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} +594 -597
- package/dist/common/integration-trigger.d.ts +2 -1
- package/dist/common/integration-trigger.js +1 -1
- package/dist/common/poll-trigger.d.ts +1 -1
- package/dist/common/provider-triggers.js +1057 -948
- package/dist/common/run-lifecycle.js +1 -1
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +1 -1
- package/dist/common/scheduler.d.ts +7 -7
- package/dist/common/scheduler.js +237 -232
- package/dist/common/webhook-trigger.d.ts +1 -1
- package/dist/common/webhook-trigger.js +35 -1
- package/package.json +20 -10
- package/dist/browser/addNodeOptions-DqoIueCR.js +0 -33746
- package/dist/browser/carbon-nMY84Amv.js +0 -53
- package/dist/browser/composite-7VwgfnXx.js +0 -6088
- package/dist/browser/createResourceDialog-ByuJWdSL.js +0 -439
- package/dist/browser/dist-n-z5HtaO.js +0 -4
- package/dist/browser/flowWorkspace-DwVMpcar.js +0 -22092
- package/dist/common/project-encoding.d.ts +0 -11
|
@@ -9,15 +9,13 @@ var e = {
|
|
|
9
9
|
engineUnsupported: "engine.unsupported",
|
|
10
10
|
flowInvalid: "flow.invalid",
|
|
11
11
|
flowNotFound: "flow.not-found",
|
|
12
|
+
flowBusy: "flow.busy",
|
|
13
|
+
flowConflict: "flow.conflict",
|
|
14
|
+
flowPresentationConflict: "flow.presentation-conflict",
|
|
15
|
+
flowRevisionConflict: "flow.revision-conflict",
|
|
12
16
|
liveConflict: "live.conflict",
|
|
13
17
|
liveNotFound: "live.not-found",
|
|
14
18
|
pageInvalidCursor: "page.invalid-cursor",
|
|
15
|
-
projectBusy: "project.busy",
|
|
16
|
-
projectConflict: "project.conflict",
|
|
17
|
-
projectInvalid: "project.invalid",
|
|
18
|
-
projectNotFound: "project.not-found",
|
|
19
|
-
projectPresentationConflict: "project.presentation-conflict",
|
|
20
|
-
projectRevisionConflict: "project.revision-conflict",
|
|
21
19
|
publicationConflict: "publication.conflict",
|
|
22
20
|
publicationNotFound: "publication.not-found",
|
|
23
21
|
routeNotFound: "route.not-found",
|
|
@@ -26,6 +24,7 @@ var e = {
|
|
|
26
24
|
runInvalid: "run.invalid",
|
|
27
25
|
runNotFound: "run.not-found",
|
|
28
26
|
runNotTerminal: "run.not-terminal",
|
|
27
|
+
runOverloaded: "run.overloaded",
|
|
29
28
|
triggerKeyInvalid: "trigger-key.invalid",
|
|
30
29
|
triggerKeyNotFound: "trigger-key.not-found",
|
|
31
30
|
triggerNotFound: "trigger.not-found"
|
|
@@ -39,15 +38,13 @@ var e = {
|
|
|
39
38
|
[e.engineUnsupported]: { status: 409 },
|
|
40
39
|
[e.flowInvalid]: { status: 400 },
|
|
41
40
|
[e.flowNotFound]: { status: 404 },
|
|
41
|
+
[e.flowBusy]: { status: 409 },
|
|
42
|
+
[e.flowConflict]: { status: 409 },
|
|
43
|
+
[e.flowPresentationConflict]: { status: 412 },
|
|
44
|
+
[e.flowRevisionConflict]: { status: 412 },
|
|
42
45
|
[e.liveConflict]: { status: 412 },
|
|
43
46
|
[e.liveNotFound]: { status: 404 },
|
|
44
47
|
[e.pageInvalidCursor]: { status: 400 },
|
|
45
|
-
[e.projectBusy]: { status: 409 },
|
|
46
|
-
[e.projectConflict]: { status: 409 },
|
|
47
|
-
[e.projectInvalid]: { status: 400 },
|
|
48
|
-
[e.projectNotFound]: { status: 404 },
|
|
49
|
-
[e.projectPresentationConflict]: { status: 412 },
|
|
50
|
-
[e.projectRevisionConflict]: { status: 412 },
|
|
51
48
|
[e.publicationConflict]: { status: 409 },
|
|
52
49
|
[e.publicationNotFound]: { status: 404 },
|
|
53
50
|
[e.routeNotFound]: { status: 404 },
|
|
@@ -56,6 +53,7 @@ var e = {
|
|
|
56
53
|
[e.runInvalid]: { status: 400 },
|
|
57
54
|
[e.runNotFound]: { status: 404 },
|
|
58
55
|
[e.runNotTerminal]: { status: 409 },
|
|
56
|
+
[e.runOverloaded]: { status: 429 },
|
|
59
57
|
[e.triggerKeyInvalid]: { status: 409 },
|
|
60
58
|
[e.triggerKeyNotFound]: { status: 404 },
|
|
61
59
|
[e.triggerNotFound]: { status: 404 }
|
|
@@ -69,7 +67,7 @@ var e = {
|
|
|
69
67
|
"starting"
|
|
70
68
|
], r = class extends Error {
|
|
71
69
|
constructor(e, t, n) {
|
|
72
|
-
super(n), this.
|
|
70
|
+
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
73
71
|
}
|
|
74
72
|
};
|
|
75
73
|
function i() {
|
|
@@ -259,7 +257,6 @@ function S(e) {
|
|
|
259
257
|
kind: r,
|
|
260
258
|
...t.lastErrorCode == null ? {} : { lastErrorCode: o(t.lastErrorCode) },
|
|
261
259
|
operatorState: s,
|
|
262
|
-
projectId: o(t.projectId),
|
|
263
260
|
runtimeVersion: l,
|
|
264
261
|
triggerNodeId: o(t.triggerNodeId),
|
|
265
262
|
updatedAt: o(t.updatedAt),
|
|
@@ -310,8 +307,8 @@ function D(e) {
|
|
|
310
307
|
return t.version != 1 || n != "active" && n != "retiring" ? i() : {
|
|
311
308
|
createdAt: o(t.createdAt),
|
|
312
309
|
draftRevisionId: o(t.draftRevisionId),
|
|
310
|
+
flowId: o(t.flowId),
|
|
313
311
|
name: o(t.name),
|
|
314
|
-
projectId: o(t.projectId),
|
|
315
312
|
status: n,
|
|
316
313
|
updatedAt: o(t.updatedAt),
|
|
317
314
|
version: 1
|
|
@@ -319,11 +316,11 @@ function D(e) {
|
|
|
319
316
|
}
|
|
320
317
|
function O(e) {
|
|
321
318
|
let t = a(e);
|
|
322
|
-
if (t.version != 1 || !Array.isArray(t.
|
|
319
|
+
if (t.version != 1 || !Array.isArray(t.flows)) return i();
|
|
323
320
|
let n = t.nextCursor, r = t.total;
|
|
324
321
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? i() : {
|
|
325
322
|
...n == null ? {} : { nextCursor: n },
|
|
326
|
-
|
|
323
|
+
flows: t.flows.map(D),
|
|
327
324
|
...r == null ? {} : { total: r },
|
|
328
325
|
version: 1
|
|
329
326
|
};
|
|
@@ -334,9 +331,9 @@ function k(e) {
|
|
|
334
331
|
actorId: o(t.actorId),
|
|
335
332
|
createdAt: o(t.createdAt),
|
|
336
333
|
digest: o(t.digest),
|
|
334
|
+
flowId: o(t.flowId),
|
|
337
335
|
modelVersion: c(t.modelVersion),
|
|
338
336
|
parentRevisionId: n,
|
|
339
|
-
projectId: o(t.projectId),
|
|
340
337
|
revisionId: o(t.revisionId),
|
|
341
338
|
version: 1
|
|
342
339
|
};
|
|
@@ -349,34 +346,19 @@ function A(e) {
|
|
|
349
346
|
}) : i();
|
|
350
347
|
}
|
|
351
348
|
function j(e) {
|
|
352
|
-
return Array.isArray(e) ? e.map((e) => {
|
|
353
|
-
let t = a(e);
|
|
354
|
-
return {
|
|
355
|
-
closureDigest: o(t.closureDigest),
|
|
356
|
-
flowId: o(t.flowId),
|
|
357
|
-
name: o(t.name)
|
|
358
|
-
};
|
|
359
|
-
}) : i();
|
|
360
|
-
}
|
|
361
|
-
function M(e) {
|
|
362
349
|
let t = a(e);
|
|
363
350
|
return t.version == 1 ? {
|
|
364
|
-
draftFlows: j(t.draftFlows),
|
|
365
351
|
revision: k(t.revision),
|
|
366
352
|
version: 1
|
|
367
353
|
} : i();
|
|
368
354
|
}
|
|
369
|
-
function
|
|
355
|
+
function M(e) {
|
|
370
356
|
let t = a(e);
|
|
371
|
-
|
|
372
|
-
let n = j(t.draftFlows);
|
|
373
|
-
return t.kind == "snapshot" ? {
|
|
357
|
+
return t.version == 1 ? t.kind == "snapshot" ? {
|
|
374
358
|
draft: A(t.draft),
|
|
375
|
-
draftFlows: n,
|
|
376
359
|
kind: "snapshot",
|
|
377
360
|
version: 1
|
|
378
361
|
} : t.kind != "changes" || !Array.isArray(t.revisions) ? i() : {
|
|
379
|
-
draftFlows: n,
|
|
380
362
|
kind: "changes",
|
|
381
363
|
revisions: t.revisions.map((e) => {
|
|
382
364
|
let t = a(e);
|
|
@@ -388,9 +370,9 @@ function N(e) {
|
|
|
388
370
|
};
|
|
389
371
|
}),
|
|
390
372
|
version: 1
|
|
391
|
-
};
|
|
373
|
+
} : i();
|
|
392
374
|
}
|
|
393
|
-
function
|
|
375
|
+
function N(e) {
|
|
394
376
|
let t = a(e), n = t.operation, r = t.sourcePublicationId;
|
|
395
377
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? i() : {
|
|
396
378
|
actorId: o(t.actorId),
|
|
@@ -400,7 +382,6 @@ function P(e) {
|
|
|
400
382
|
flowId: o(t.flowId),
|
|
401
383
|
modelVersion: c(t.modelVersion),
|
|
402
384
|
operation: n,
|
|
403
|
-
projectId: o(t.projectId),
|
|
404
385
|
publicationId: o(t.publicationId),
|
|
405
386
|
revisionDigest: o(t.revisionDigest),
|
|
406
387
|
revisionId: o(t.revisionId),
|
|
@@ -408,29 +389,7 @@ function P(e) {
|
|
|
408
389
|
version: 1
|
|
409
390
|
};
|
|
410
391
|
}
|
|
411
|
-
function
|
|
412
|
-
let t = a(e), n = t.draft == null ? null : a(t.draft), r = t.live == null ? null : a(t.live), s = r?.status;
|
|
413
|
-
return typeof t.hasUnpublishedChanges != "boolean" || r != null && s != "runnable" && s != "suspended" ? i() : {
|
|
414
|
-
draft: n == null ? null : {
|
|
415
|
-
closureDigest: o(n.closureDigest),
|
|
416
|
-
name: o(n.name),
|
|
417
|
-
revisionDigest: o(n.revisionDigest),
|
|
418
|
-
revisionId: o(n.revisionId)
|
|
419
|
-
},
|
|
420
|
-
flowId: o(t.flowId),
|
|
421
|
-
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
422
|
-
live: r == null ? null : {
|
|
423
|
-
publication: P(r.publication),
|
|
424
|
-
revision: c(r.revision),
|
|
425
|
-
status: s
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
function I(e) {
|
|
430
|
-
let t = a(e);
|
|
431
|
-
return t.version != 1 || !Array.isArray(t.flows) ? i() : (o(t.projectId), t.flows.map(F));
|
|
432
|
-
}
|
|
433
|
-
function L(e) {
|
|
392
|
+
function P(e) {
|
|
434
393
|
let t = a(e);
|
|
435
394
|
return {
|
|
436
395
|
code: o(t.code),
|
|
@@ -440,63 +399,60 @@ function L(e) {
|
|
|
440
399
|
path: typeof t.path == "string" ? t.path : i()
|
|
441
400
|
};
|
|
442
401
|
}
|
|
443
|
-
function
|
|
402
|
+
function F(e) {
|
|
444
403
|
let t = a(e);
|
|
445
404
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? i() : {
|
|
446
405
|
closureDigest: o(t.closureDigest),
|
|
447
|
-
diagnostics: t.diagnostics.map(
|
|
406
|
+
diagnostics: t.diagnostics.map(P),
|
|
448
407
|
engineContract: o(t.engineContract),
|
|
449
408
|
flowId: o(t.flowId),
|
|
450
409
|
modelVersion: c(t.modelVersion),
|
|
451
|
-
projectId: o(t.projectId),
|
|
452
410
|
revisionDigest: o(t.revisionDigest),
|
|
453
411
|
revisionId: o(t.revisionId),
|
|
454
412
|
valid: t.valid,
|
|
455
413
|
version: 1
|
|
456
414
|
};
|
|
457
415
|
}
|
|
458
|
-
function
|
|
416
|
+
function I(e) {
|
|
459
417
|
let t = a(e), n = t.status, r = t.publication;
|
|
460
418
|
return t.version != 1 || typeof t.hasUnpublishedChanges != "boolean" || n != "not-published" && n != "runnable" && n != "suspended" || n == "not-published" && r !== null || n != "not-published" && r === null ? i() : {
|
|
461
419
|
flowId: o(t.flowId),
|
|
462
420
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
463
|
-
|
|
464
|
-
publication: r === null ? null : P(r),
|
|
421
|
+
publication: r === null ? null : N(r),
|
|
465
422
|
revision: c(t.revision),
|
|
466
423
|
status: n,
|
|
467
424
|
version: 1
|
|
468
425
|
};
|
|
469
426
|
}
|
|
470
|
-
function
|
|
427
|
+
function L(e) {
|
|
471
428
|
let t = a(e), n = t.nextCursor, r = t.total;
|
|
472
429
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? i() : {
|
|
473
430
|
...n == null ? {} : { nextCursor: n },
|
|
474
|
-
publications: t.publications.map(
|
|
431
|
+
publications: t.publications.map(N),
|
|
475
432
|
...r == null ? {} : { total: r },
|
|
476
433
|
version: 1
|
|
477
434
|
};
|
|
478
435
|
}
|
|
479
|
-
var
|
|
480
|
-
function
|
|
481
|
-
return typeof e == "string" &&
|
|
436
|
+
var R = new Set(n);
|
|
437
|
+
function z(e) {
|
|
438
|
+
return typeof e == "string" && R.has(e) ? e : i();
|
|
482
439
|
}
|
|
483
|
-
function
|
|
440
|
+
function B(e) {
|
|
484
441
|
let t = a(e), n = t.source, r = t.startedAt, s = t.finishedAt;
|
|
485
442
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || s != null && typeof s != "string" ? i() : {
|
|
486
443
|
createdAt: o(t.createdAt),
|
|
487
444
|
...s == null ? {} : { finishedAt: s },
|
|
488
445
|
flowId: o(t.flowId),
|
|
489
|
-
projectId: o(t.projectId),
|
|
490
446
|
revisionId: o(t.revisionId),
|
|
491
447
|
runId: o(t.runId),
|
|
492
448
|
source: n,
|
|
493
449
|
...r == null ? {} : { startedAt: r },
|
|
494
|
-
status:
|
|
450
|
+
status: z(t.status),
|
|
495
451
|
version: 1
|
|
496
452
|
};
|
|
497
453
|
}
|
|
498
|
-
function
|
|
499
|
-
let t = a(e), n =
|
|
454
|
+
function V(e) {
|
|
455
|
+
let t = a(e), n = B(t), r = t.eventsExpiresAt;
|
|
500
456
|
if (r != null && typeof r != "string") return i();
|
|
501
457
|
let s = {
|
|
502
458
|
...n,
|
|
@@ -526,16 +482,16 @@ function W(e) {
|
|
|
526
482
|
};
|
|
527
483
|
}
|
|
528
484
|
}
|
|
529
|
-
function
|
|
485
|
+
function H(e) {
|
|
530
486
|
let t = a(e), n = t.nextCursor;
|
|
531
487
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? i() : {
|
|
488
|
+
flowId: o(t.flowId),
|
|
532
489
|
...n == null ? {} : { nextCursor: n },
|
|
533
|
-
|
|
534
|
-
runs: t.runs.map(U),
|
|
490
|
+
runs: t.runs.map(B),
|
|
535
491
|
version: 1
|
|
536
492
|
};
|
|
537
493
|
}
|
|
538
|
-
var
|
|
494
|
+
var U = /* @__PURE__ */ new Set([
|
|
539
495
|
"node.artifact",
|
|
540
496
|
"node.completed",
|
|
541
497
|
"node.failed",
|
|
@@ -552,9 +508,9 @@ var K = /* @__PURE__ */ new Set([
|
|
|
552
508
|
"run.queued",
|
|
553
509
|
"run.started"
|
|
554
510
|
]);
|
|
555
|
-
function
|
|
511
|
+
function W(e) {
|
|
556
512
|
let t = a(e), n = t.kind, r = c(t.sequence), s = t.sourceSequence;
|
|
557
|
-
return typeof n != "string" || !
|
|
513
|
+
return typeof n != "string" || !U.has(n) || r < 0 || s != null && (!Number.isSafeInteger(s) || s < 0) ? i() : {
|
|
558
514
|
createdAt: o(t.createdAt),
|
|
559
515
|
kind: n,
|
|
560
516
|
payload: a(t.payload),
|
|
@@ -562,11 +518,11 @@ function q(e) {
|
|
|
562
518
|
...s == null ? {} : { sourceSequence: s }
|
|
563
519
|
};
|
|
564
520
|
}
|
|
565
|
-
function
|
|
521
|
+
function G(e) {
|
|
566
522
|
let t = a(e), n = t.eventsExpiresAt, r = c(t.nextAfter);
|
|
567
523
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? i() : {
|
|
568
524
|
done: t.done,
|
|
569
|
-
events: t.events.map(
|
|
525
|
+
events: t.events.map(W),
|
|
570
526
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
571
527
|
historyComplete: t.historyComplete,
|
|
572
528
|
nextAfter: r,
|
|
@@ -574,8 +530,8 @@ function J(e) {
|
|
|
574
530
|
version: 1
|
|
575
531
|
};
|
|
576
532
|
}
|
|
577
|
-
function
|
|
578
|
-
let t = a(e), n =
|
|
533
|
+
function K(e) {
|
|
534
|
+
let t = a(e), n = z(t.status);
|
|
579
535
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" ? i() : {
|
|
580
536
|
cancelAccepted: t.cancelAccepted,
|
|
581
537
|
runId: o(t.runId),
|
|
@@ -583,7 +539,7 @@ function Y(e) {
|
|
|
583
539
|
version: 1
|
|
584
540
|
};
|
|
585
541
|
}
|
|
586
|
-
function
|
|
542
|
+
function q(e) {
|
|
587
543
|
let t = a(e), n = t.status;
|
|
588
544
|
if (t.version != 1) return i();
|
|
589
545
|
let r = {
|
|
@@ -624,22 +580,22 @@ function X(e) {
|
|
|
624
580
|
}
|
|
625
581
|
return i();
|
|
626
582
|
}
|
|
627
|
-
var
|
|
628
|
-
function
|
|
583
|
+
var J = encodeURIComponent;
|
|
584
|
+
function Y(e) {
|
|
629
585
|
return `${e}-${crypto.randomUUID()}`;
|
|
630
586
|
}
|
|
631
|
-
var
|
|
587
|
+
var X = class {
|
|
632
588
|
constructor(e) {
|
|
633
589
|
this.requestControl = e;
|
|
634
590
|
}
|
|
635
|
-
async
|
|
591
|
+
async listFlows(e = {}) {
|
|
636
592
|
let t = new URLSearchParams();
|
|
637
593
|
e.cursor != null && t.set("cursor", e.cursor), e.limit != null && t.set("limit", String(e.limit)), e.includeTotal != null && t.set("includeTotal", String(e.includeTotal));
|
|
638
594
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
639
|
-
return O(await this.request(`/v1/
|
|
595
|
+
return O(await this.request(`/v1/flows${n}`));
|
|
640
596
|
}
|
|
641
|
-
async
|
|
642
|
-
return D(await this.request("/v1/
|
|
597
|
+
async createFlow(e, t = `flow-${crypto.randomUUID()}`) {
|
|
598
|
+
return D(await this.request("/v1/flows", {
|
|
643
599
|
body: JSON.stringify({
|
|
644
600
|
name: e,
|
|
645
601
|
version: 1
|
|
@@ -648,11 +604,20 @@ var $ = class {
|
|
|
648
604
|
method: "POST"
|
|
649
605
|
}));
|
|
650
606
|
}
|
|
651
|
-
async
|
|
652
|
-
return D(await this.request(`/v1/
|
|
607
|
+
async getFlow(e) {
|
|
608
|
+
return D(await this.request(`/v1/flows/${J(e)}`));
|
|
609
|
+
}
|
|
610
|
+
async renameFlow(e, t) {
|
|
611
|
+
return D(await this.request(`/v1/flows/${J(e)}`, {
|
|
612
|
+
body: JSON.stringify({
|
|
613
|
+
name: t,
|
|
614
|
+
version: 1
|
|
615
|
+
}),
|
|
616
|
+
method: "PATCH"
|
|
617
|
+
}));
|
|
653
618
|
}
|
|
654
|
-
async
|
|
655
|
-
return D(await this.request(`/v1/
|
|
619
|
+
async deleteFlow(e) {
|
|
620
|
+
return D(await this.request(`/v1/flows/${J(e)}`, { method: "DELETE" }));
|
|
656
621
|
}
|
|
657
622
|
async listTriggerKeys(e) {
|
|
658
623
|
let t = a(await this.request("/v1/trigger-keys", { signal: e }));
|
|
@@ -663,102 +628,87 @@ var $ = class {
|
|
|
663
628
|
return t.version != 1 || !Array.isArray(t.definitions) ? i() : t.definitions.map(_);
|
|
664
629
|
}
|
|
665
630
|
async getTriggerKey(e, t) {
|
|
666
|
-
let n = a(await this.request(`/v1/trigger-keys/${
|
|
631
|
+
let n = a(await this.request(`/v1/trigger-keys/${J(e)}`, { signal: t }));
|
|
667
632
|
return n.version == 1 ? _(n.definition) : i();
|
|
668
633
|
}
|
|
669
|
-
async listFlowTriggerBindings(e
|
|
670
|
-
let
|
|
671
|
-
return
|
|
634
|
+
async listFlowTriggerBindings(e) {
|
|
635
|
+
let t = a(await this.request(`/v1/flows/${J(e)}/triggers`));
|
|
636
|
+
return t.version != 1 || o(t.flowId) != e || !Array.isArray(t.bindings) ? i() : t.bindings.map(S);
|
|
672
637
|
}
|
|
673
|
-
async getFlowTriggerBinding(e, t
|
|
674
|
-
return C(await this.request(`/v1/
|
|
638
|
+
async getFlowTriggerBinding(e, t) {
|
|
639
|
+
return C(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}`));
|
|
675
640
|
}
|
|
676
|
-
async listFlowTriggerActivities(e, t, n
|
|
677
|
-
let
|
|
678
|
-
|
|
679
|
-
let
|
|
680
|
-
return T(await this.request(`/v1/
|
|
641
|
+
async listFlowTriggerActivities(e, t, n = {}) {
|
|
642
|
+
let r = new URLSearchParams();
|
|
643
|
+
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
644
|
+
let i = r.size == 0 ? "" : `?${r}`;
|
|
645
|
+
return T(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/activities${i}`));
|
|
681
646
|
}
|
|
682
|
-
async pauseFlowTrigger(e, t
|
|
683
|
-
return S(await this.request(`/v1/
|
|
647
|
+
async pauseFlowTrigger(e, t) {
|
|
648
|
+
return S(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/pause`, {
|
|
684
649
|
body: JSON.stringify({ version: 1 }),
|
|
685
650
|
method: "POST"
|
|
686
651
|
}));
|
|
687
652
|
}
|
|
688
|
-
async resumeFlowTrigger(e, t
|
|
689
|
-
return S(await this.request(`/v1/
|
|
653
|
+
async resumeFlowTrigger(e, t) {
|
|
654
|
+
return S(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/resume`, {
|
|
690
655
|
body: JSON.stringify({ version: 1 }),
|
|
691
656
|
method: "POST"
|
|
692
657
|
}));
|
|
693
658
|
}
|
|
694
|
-
async testFlowPollTrigger(e, t
|
|
695
|
-
return E(await this.request(`/v1/
|
|
659
|
+
async testFlowPollTrigger(e, t) {
|
|
660
|
+
return E(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/test`, {
|
|
696
661
|
body: JSON.stringify({ version: 1 }),
|
|
697
662
|
method: "POST"
|
|
698
663
|
}));
|
|
699
664
|
}
|
|
700
665
|
async getDraft(e) {
|
|
701
|
-
return A(await this.request(`/v1/
|
|
666
|
+
return A(await this.request(`/v1/flows/${J(e)}/draft`));
|
|
702
667
|
}
|
|
703
668
|
async syncDraft(e, t) {
|
|
704
|
-
let n = t == null ? "" : `?fromRevisionId=${
|
|
705
|
-
return
|
|
669
|
+
let n = t == null ? "" : `?fromRevisionId=${J(t)}`;
|
|
670
|
+
return M(await this.request(`/v1/flows/${J(e)}/draft/sync${n}`));
|
|
706
671
|
}
|
|
707
672
|
async getRevision(e, t) {
|
|
708
|
-
return A(await this.request(`/v1/
|
|
673
|
+
return A(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}`));
|
|
709
674
|
}
|
|
710
|
-
async
|
|
711
|
-
|
|
675
|
+
async listConnectorProviders(e) {
|
|
676
|
+
let t = a(await this.request("/v1/connector/providers", { signal: e }));
|
|
677
|
+
return s(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? i() : t.providers.map(h);
|
|
712
678
|
}
|
|
713
|
-
async
|
|
714
|
-
|
|
715
|
-
return s(n, [
|
|
716
|
-
"projectId",
|
|
717
|
-
"providers",
|
|
718
|
-
"version"
|
|
719
|
-
]), n.version != 1 || o(n.projectId) != e || !Array.isArray(n.providers) ? i() : n.providers.map(h);
|
|
679
|
+
async listConnectorActions(e, t) {
|
|
680
|
+
return await this.connectorActions(e == null ? {} : { service: e }, t);
|
|
720
681
|
}
|
|
721
|
-
async
|
|
722
|
-
return await this.connectorActions(
|
|
682
|
+
async searchConnectorActions(e, t) {
|
|
683
|
+
return await this.connectorActions({ q: e.trim() }, t);
|
|
723
684
|
}
|
|
724
|
-
async
|
|
725
|
-
|
|
685
|
+
async getConnectorAction(e, t) {
|
|
686
|
+
let n = a(await this.request(`/v1/connector/actions/${J(e)}`, { signal: t }));
|
|
687
|
+
return s(n, ["action", "version"]), n.version == 1 ? m(n.action) : i();
|
|
726
688
|
}
|
|
727
|
-
async
|
|
728
|
-
let
|
|
729
|
-
return s(
|
|
730
|
-
"action",
|
|
731
|
-
"projectId",
|
|
732
|
-
"version"
|
|
733
|
-
]), r.version != 1 || o(r.projectId) != e ? i() : m(r.action);
|
|
734
|
-
}
|
|
735
|
-
async listConnectorConnections(e, t, n) {
|
|
736
|
-
let r = a(await this.request(`/v1/projects/${Z(e)}/connector/connections/${Z(t)}`, { signal: n }));
|
|
737
|
-
return s(r, [
|
|
689
|
+
async listConnectorConnections(e, t) {
|
|
690
|
+
let n = a(await this.request(`/v1/connector/connections/${J(e)}`, { signal: t }));
|
|
691
|
+
return s(n, [
|
|
738
692
|
"connections",
|
|
739
|
-
"projectId",
|
|
740
693
|
"serviceId",
|
|
741
694
|
"version"
|
|
742
|
-
]),
|
|
695
|
+
]), n.version != 1 || o(n.serviceId) != e || !Array.isArray(n.connections) ? i() : n.connections.map(u);
|
|
743
696
|
}
|
|
744
|
-
async createConnectorConnectionPage(e
|
|
745
|
-
let
|
|
746
|
-
body: JSON.stringify({
|
|
747
|
-
returnUrl: n,
|
|
748
|
-
version: 1
|
|
749
|
-
}),
|
|
697
|
+
async createConnectorConnectionPage(e) {
|
|
698
|
+
let t = a(await this.request(`/v1/connector/connections/${J(e)}/page`, {
|
|
699
|
+
body: JSON.stringify({ version: 1 }),
|
|
750
700
|
method: "POST"
|
|
751
701
|
}));
|
|
752
|
-
if (s(
|
|
702
|
+
if (s(t, ["url", "version"]), t.version != 1) return i();
|
|
753
703
|
try {
|
|
754
|
-
let e = new URL(o(
|
|
704
|
+
let e = new URL(o(t.url));
|
|
755
705
|
return e.protocol != "http:" && e.protocol != "https:" ? i() : e.href;
|
|
756
706
|
} catch {
|
|
757
707
|
return i();
|
|
758
708
|
}
|
|
759
709
|
}
|
|
760
710
|
async changeDraft(e, t, n) {
|
|
761
|
-
return
|
|
711
|
+
return j(await this.request(`/v1/flows/${J(e)}/draft/changes`, {
|
|
762
712
|
body: JSON.stringify({
|
|
763
713
|
expectedRevisionId: t,
|
|
764
714
|
operations: n,
|
|
@@ -767,8 +717,8 @@ var $ = class {
|
|
|
767
717
|
method: "POST"
|
|
768
718
|
}));
|
|
769
719
|
}
|
|
770
|
-
async checkFlow(e, t
|
|
771
|
-
return
|
|
720
|
+
async checkFlow(e, t) {
|
|
721
|
+
return F(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}/check`, {
|
|
772
722
|
body: JSON.stringify({
|
|
773
723
|
engineContract: "open-flow-engine/v1",
|
|
774
724
|
version: 1
|
|
@@ -776,90 +726,87 @@ var $ = class {
|
|
|
776
726
|
method: "POST"
|
|
777
727
|
}));
|
|
778
728
|
}
|
|
779
|
-
async getLive(e
|
|
780
|
-
return
|
|
729
|
+
async getLive(e) {
|
|
730
|
+
return I(await this.request(`/v1/flows/${J(e)}/live`));
|
|
781
731
|
}
|
|
782
|
-
async listPublications(e, t
|
|
783
|
-
let
|
|
784
|
-
|
|
785
|
-
let
|
|
786
|
-
return
|
|
732
|
+
async listPublications(e, t = {}) {
|
|
733
|
+
let n = new URLSearchParams();
|
|
734
|
+
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.includeTotal != null && n.set("includeTotal", String(t.includeTotal));
|
|
735
|
+
let r = n.size == 0 ? "" : `?${n}`;
|
|
736
|
+
return L(await this.request(`/v1/flows/${J(e)}/publications${r}`));
|
|
787
737
|
}
|
|
788
|
-
async createDraftRun(e, t, n
|
|
789
|
-
let
|
|
738
|
+
async createDraftRun(e, t, n = {}) {
|
|
739
|
+
let r = V(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}/runs`, {
|
|
790
740
|
body: JSON.stringify({
|
|
791
741
|
engineContract: "open-flow-engine/v1",
|
|
792
|
-
inputs:
|
|
742
|
+
inputs: n.inputs ?? {},
|
|
793
743
|
version: 1
|
|
794
744
|
}),
|
|
795
|
-
headers: { "idempotency-key":
|
|
745
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Y("run") },
|
|
796
746
|
method: "POST"
|
|
797
747
|
}));
|
|
798
|
-
return
|
|
748
|
+
return r.source == "draft" ? r : i();
|
|
799
749
|
}
|
|
800
|
-
async createLiveRun(e, t
|
|
801
|
-
let
|
|
750
|
+
async createLiveRun(e, t = {}) {
|
|
751
|
+
let n = V(await this.request("/v1/runs", {
|
|
802
752
|
body: JSON.stringify({
|
|
803
|
-
inputs:
|
|
753
|
+
inputs: t.inputs ?? {},
|
|
754
|
+
publicationId: e,
|
|
804
755
|
version: 1
|
|
805
756
|
}),
|
|
806
|
-
headers: { "idempotency-key":
|
|
757
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Y("run") },
|
|
807
758
|
method: "POST"
|
|
808
759
|
}));
|
|
809
|
-
return
|
|
760
|
+
return n.source == "live" ? n : i();
|
|
810
761
|
}
|
|
811
|
-
async publishFlow(e, t, n, r
|
|
812
|
-
return
|
|
762
|
+
async publishFlow(e, t, n, r = {}) {
|
|
763
|
+
return N(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}/publications`, {
|
|
813
764
|
body: JSON.stringify({
|
|
814
765
|
engineContract: "open-flow-engine/v1",
|
|
815
|
-
expectedLivePublicationId:
|
|
766
|
+
expectedLivePublicationId: n,
|
|
816
767
|
version: 1
|
|
817
768
|
}),
|
|
818
|
-
headers: { "idempotency-key":
|
|
769
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Y("publication") },
|
|
819
770
|
method: "POST"
|
|
820
771
|
}));
|
|
821
772
|
}
|
|
822
|
-
async rollbackFlow(e, t, n, r
|
|
823
|
-
return
|
|
773
|
+
async rollbackFlow(e, t, n, r = {}) {
|
|
774
|
+
return N(await this.request(`/v1/flows/${J(e)}/publications/${J(t)}/rollback`, {
|
|
824
775
|
body: JSON.stringify({
|
|
825
|
-
expectedLivePublicationId:
|
|
776
|
+
expectedLivePublicationId: n,
|
|
826
777
|
version: 1
|
|
827
778
|
}),
|
|
828
|
-
headers: { "idempotency-key":
|
|
779
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Y("publication") },
|
|
829
780
|
method: "POST"
|
|
830
781
|
}));
|
|
831
782
|
}
|
|
832
|
-
async getRun(e
|
|
833
|
-
return
|
|
783
|
+
async getRun(e) {
|
|
784
|
+
return V(await this.request(`/v1/runs/${J(e)}`));
|
|
834
785
|
}
|
|
835
786
|
async listRuns(e, t = {}) {
|
|
836
787
|
let n = new URLSearchParams();
|
|
837
|
-
t.cursor != null && n.set("cursor", t.cursor), t.
|
|
788
|
+
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status);
|
|
838
789
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
839
|
-
return
|
|
790
|
+
return H(await this.request(`/v1/flows/${J(e)}/runs${r}`));
|
|
840
791
|
}
|
|
841
|
-
async getRunEvents(e, t
|
|
842
|
-
let
|
|
843
|
-
|
|
844
|
-
let
|
|
845
|
-
return
|
|
792
|
+
async getRunEvents(e, t = {}) {
|
|
793
|
+
let n = new URLSearchParams();
|
|
794
|
+
t.after != null && n.set("after", String(t.after)), t.limit != null && n.set("limit", String(t.limit));
|
|
795
|
+
let r = n.size == 0 ? "" : `?${n}`;
|
|
796
|
+
return G(await this.request(`/v1/runs/${J(e)}/events${r}`));
|
|
846
797
|
}
|
|
847
|
-
async getRunResult(e
|
|
848
|
-
return
|
|
798
|
+
async getRunResult(e) {
|
|
799
|
+
return q(await this.request(`/v1/runs/${J(e)}/result`));
|
|
849
800
|
}
|
|
850
|
-
async cancelRun(e
|
|
851
|
-
return
|
|
801
|
+
async cancelRun(e) {
|
|
802
|
+
return K(await this.request(`/v1/runs/${J(e)}/cancel`, {
|
|
852
803
|
body: JSON.stringify({ version: 1 }),
|
|
853
804
|
method: "POST"
|
|
854
805
|
}));
|
|
855
806
|
}
|
|
856
|
-
async connectorActions(e, t
|
|
857
|
-
let
|
|
858
|
-
return s(
|
|
859
|
-
"actions",
|
|
860
|
-
"projectId",
|
|
861
|
-
"version"
|
|
862
|
-
]), l.version != 1 || o(l.projectId) != e || !Array.isArray(l.actions) ? i() : l.actions.map(m);
|
|
807
|
+
async connectorActions(e, t) {
|
|
808
|
+
let n = Object.entries(e).map(([e, t]) => `${J(e)}=${J(t)}`).join("&"), r = n == "" ? "" : `?${n}`, o = a(await this.request(`/v1/connector/actions${r}`, { signal: t }));
|
|
809
|
+
return s(o, ["actions", "version"]), o.version != 1 || !Array.isArray(o.actions) ? i() : o.actions.map(m);
|
|
863
810
|
}
|
|
864
811
|
async request(e, t = {}) {
|
|
865
812
|
let n = new Headers(t.headers);
|
|
@@ -881,4 +828,4 @@ var $ = class {
|
|
|
881
828
|
}
|
|
882
829
|
};
|
|
883
830
|
//#endregion
|
|
884
|
-
export { r as ApiError,
|
|
831
|
+
export { r as ApiError, X as ControlClient, e as controlErrorCode, t as controlErrorMetadata };
|