@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/browser/createResourceDialog-BkZns-oZ.js +504 -0
- package/dist/browser/diagnostics-giPSzyMo.js +9346 -0
- package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
- package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
- package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
- package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
- package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
- package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
- package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
- package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
- package/dist/browser/dist-CeSZ2xSM.js +444 -0
- package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
- package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
- package/dist/browser/{esm-YIGXG-Js.js → esm-B_PbUobB.js} +13 -13
- package/dist/browser/flow-authoring-node.d.ts +4 -2
- package/dist/browser/flow-authoring.d.ts +2 -1
- package/dist/browser/flow-authoring.js +400 -100
- package/dist/browser/flow-change.d.ts +9 -4
- package/dist/browser/flow-change.js +49 -46
- package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
- package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DAMLVMcF.js} +18416 -16444
- package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
- package/dist/browser/languages-DgJehE1g.js +62 -0
- package/dist/browser/lib-C5Ipyfps.js +7856 -0
- package/dist/browser/licenses.md +119 -1
- package/dist/browser/main-DmjVyuWr.js +76 -0
- package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
- package/dist/browser/theme.css +63 -0
- package/dist/browser/theme.css.d.ts +1 -0
- package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
- package/dist/browser/workbench-contract.d.ts +2 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +46 -1
- package/dist/browser/workbench.js +1132 -1474
- package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
- package/dist/common/connector-action.d.ts +6 -0
- package/dist/common/connector-action.js +37 -29
- package/dist/common/control-api-conformance.js +80 -29
- package/dist/common/control-api-errors.d.ts +24 -0
- package/dist/common/control-api.d.ts +54 -7
- package/dist/common/control-api.js +226 -95
- package/dist/common/flow-encoding.d.ts +2 -2
- package/dist/common/flow-encoding.js +4 -1
- package/dist/common/flow-semantics.d.ts +3 -0
- package/dist/common/flow-semantics.js +939 -851
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/licenses.md +1 -25
- package/dist/common/localization.d.ts +21 -0
- package/dist/common/localization.js +62 -0
- package/dist/common/provider-triggers.js +4 -1
- package/dist/common/scheduler.d.ts +5 -5
- package/dist/common/scheduler.js +250 -236
- package/package.json +10 -1
- package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
- package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
- package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
- package/dist/browser/field-CKGQHCIi.js +0 -312
|
@@ -4,6 +4,7 @@ var e = {
|
|
|
4
4
|
authorizationDenied: "authorization.denied",
|
|
5
5
|
bindingUnresolved: "binding.unresolved",
|
|
6
6
|
connectorActionNotFound: "connector.action-not-found",
|
|
7
|
+
connectorUnconfigured: "connector.unconfigured",
|
|
7
8
|
connectorUnavailable: "connector.unavailable",
|
|
8
9
|
engineUnavailable: "engine.unavailable",
|
|
9
10
|
engineUnsupported: "engine.unsupported",
|
|
@@ -18,6 +19,8 @@ var e = {
|
|
|
18
19
|
pageInvalidCursor: "page.invalid-cursor",
|
|
19
20
|
publicationConflict: "publication.conflict",
|
|
20
21
|
publicationNotFound: "publication.not-found",
|
|
22
|
+
publicationUnsupported: "publication.unsupported",
|
|
23
|
+
publishOperationNotFound: "publication.operation-not-found",
|
|
21
24
|
routeNotFound: "route.not-found",
|
|
22
25
|
runConflict: "run.conflict",
|
|
23
26
|
runEventsExpired: "run.events-expired",
|
|
@@ -27,12 +30,16 @@ var e = {
|
|
|
27
30
|
runOverloaded: "run.overloaded",
|
|
28
31
|
triggerKeyInvalid: "trigger-key.invalid",
|
|
29
32
|
triggerKeyNotFound: "trigger-key.not-found",
|
|
30
|
-
triggerNotFound: "trigger.not-found"
|
|
33
|
+
triggerNotFound: "trigger.not-found",
|
|
34
|
+
variableInvalid: "variable.invalid",
|
|
35
|
+
variableLimitReached: "variable.limit-reached",
|
|
36
|
+
variableNotFound: "variable.not-found"
|
|
31
37
|
}, t = {
|
|
32
38
|
[e.authenticationRequired]: { status: 401 },
|
|
33
39
|
[e.authorizationDenied]: { status: 403 },
|
|
34
40
|
[e.bindingUnresolved]: { status: 409 },
|
|
35
41
|
[e.connectorActionNotFound]: { status: 404 },
|
|
42
|
+
[e.connectorUnconfigured]: { status: 503 },
|
|
36
43
|
[e.connectorUnavailable]: { status: 503 },
|
|
37
44
|
[e.engineUnavailable]: { status: 503 },
|
|
38
45
|
[e.engineUnsupported]: { status: 409 },
|
|
@@ -47,6 +54,8 @@ var e = {
|
|
|
47
54
|
[e.pageInvalidCursor]: { status: 400 },
|
|
48
55
|
[e.publicationConflict]: { status: 409 },
|
|
49
56
|
[e.publicationNotFound]: { status: 404 },
|
|
57
|
+
[e.publicationUnsupported]: { status: 409 },
|
|
58
|
+
[e.publishOperationNotFound]: { status: 404 },
|
|
50
59
|
[e.routeNotFound]: { status: 404 },
|
|
51
60
|
[e.runConflict]: { status: 409 },
|
|
52
61
|
[e.runEventsExpired]: { status: 410 },
|
|
@@ -56,7 +65,10 @@ var e = {
|
|
|
56
65
|
[e.runOverloaded]: { status: 429 },
|
|
57
66
|
[e.triggerKeyInvalid]: { status: 409 },
|
|
58
67
|
[e.triggerKeyNotFound]: { status: 404 },
|
|
59
|
-
[e.triggerNotFound]: { status: 404 }
|
|
68
|
+
[e.triggerNotFound]: { status: 404 },
|
|
69
|
+
[e.variableInvalid]: { status: 400 },
|
|
70
|
+
[e.variableLimitReached]: { status: 409 },
|
|
71
|
+
[e.variableNotFound]: { status: 404 }
|
|
60
72
|
}, n = [
|
|
61
73
|
"canceled",
|
|
62
74
|
"completed",
|
|
@@ -134,6 +146,7 @@ function m(e) {
|
|
|
134
146
|
let t = a(e), n = t.icon, r = t.defaultConnection != null;
|
|
135
147
|
if (s(t, [
|
|
136
148
|
"actionId",
|
|
149
|
+
"authenticated",
|
|
137
150
|
...r ? ["defaultConnection"] : [],
|
|
138
151
|
"description",
|
|
139
152
|
...n == null ? [] : ["icon"],
|
|
@@ -145,6 +158,7 @@ function m(e) {
|
|
|
145
158
|
]), n != null && typeof n != "string") return i();
|
|
146
159
|
let c = {
|
|
147
160
|
actionId: o(t.actionId),
|
|
161
|
+
authenticated: typeof t.authenticated == "boolean" ? t.authenticated : i(),
|
|
148
162
|
...r ? { defaultConnection: u(t.defaultConnection) } : {},
|
|
149
163
|
description: typeof t.description == "string" ? t.description : i(),
|
|
150
164
|
...n == null ? {} : { icon: n },
|
|
@@ -326,6 +340,27 @@ function O(e) {
|
|
|
326
340
|
};
|
|
327
341
|
}
|
|
328
342
|
function k(e) {
|
|
343
|
+
let t = a(e);
|
|
344
|
+
if (s(t, [
|
|
345
|
+
"name",
|
|
346
|
+
"updatedAt",
|
|
347
|
+
"value",
|
|
348
|
+
"version"
|
|
349
|
+
]), t.version != 1 || typeof t.value != "string") return i();
|
|
350
|
+
let n = o(t.updatedAt);
|
|
351
|
+
try {
|
|
352
|
+
if (new Date(n).toISOString() != n) return i();
|
|
353
|
+
} catch {
|
|
354
|
+
return i();
|
|
355
|
+
}
|
|
356
|
+
return {
|
|
357
|
+
name: o(t.name),
|
|
358
|
+
updatedAt: n,
|
|
359
|
+
value: t.value,
|
|
360
|
+
version: 1
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function A(e) {
|
|
329
364
|
let t = a(e), n = t.parentRevisionId;
|
|
330
365
|
return t.version != 1 || n !== null && typeof n != "string" ? i() : {
|
|
331
366
|
actorId: o(t.actorId),
|
|
@@ -338,24 +373,24 @@ function k(e) {
|
|
|
338
373
|
version: 1
|
|
339
374
|
};
|
|
340
375
|
}
|
|
341
|
-
function
|
|
376
|
+
function j(e) {
|
|
342
377
|
let t = a(e), n = a(t.content);
|
|
343
378
|
return n.modelVersion == 1 ? (a(n.document), a(n.modules), {
|
|
344
|
-
...
|
|
379
|
+
...A(t),
|
|
345
380
|
content: t.content
|
|
346
381
|
}) : i();
|
|
347
382
|
}
|
|
348
|
-
function
|
|
383
|
+
function M(e) {
|
|
349
384
|
let t = a(e);
|
|
350
385
|
return t.version == 1 ? {
|
|
351
|
-
revision:
|
|
386
|
+
revision: A(t.revision),
|
|
352
387
|
version: 1
|
|
353
388
|
} : i();
|
|
354
389
|
}
|
|
355
|
-
function
|
|
390
|
+
function N(e) {
|
|
356
391
|
let t = a(e);
|
|
357
392
|
return t.version == 1 ? t.kind == "snapshot" ? {
|
|
358
|
-
draft:
|
|
393
|
+
draft: j(t.draft),
|
|
359
394
|
kind: "snapshot",
|
|
360
395
|
version: 1
|
|
361
396
|
} : t.kind != "changes" || !Array.isArray(t.revisions) ? i() : {
|
|
@@ -366,13 +401,13 @@ function M(e) {
|
|
|
366
401
|
for (let e of t.operations) if (typeof a(e).kind != "string") return i();
|
|
367
402
|
return {
|
|
368
403
|
operations: t.operations,
|
|
369
|
-
revision:
|
|
404
|
+
revision: A(t.revision)
|
|
370
405
|
};
|
|
371
406
|
}),
|
|
372
407
|
version: 1
|
|
373
408
|
} : i();
|
|
374
409
|
}
|
|
375
|
-
function
|
|
410
|
+
function P(e) {
|
|
376
411
|
let t = a(e), n = t.operation, r = t.sourcePublicationId;
|
|
377
412
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? i() : {
|
|
378
413
|
actorId: o(t.actorId),
|
|
@@ -389,21 +424,88 @@ function N(e) {
|
|
|
389
424
|
version: 1
|
|
390
425
|
};
|
|
391
426
|
}
|
|
392
|
-
function
|
|
393
|
-
let t = a(e)
|
|
427
|
+
function F(e) {
|
|
428
|
+
let t = a(e), n = t.status, r = {
|
|
429
|
+
createdAt: o(t.createdAt),
|
|
430
|
+
flowId: o(t.flowId),
|
|
431
|
+
operationId: o(t.operationId),
|
|
432
|
+
revisionId: o(t.revisionId),
|
|
433
|
+
updatedAt: o(t.updatedAt),
|
|
434
|
+
version: 1
|
|
435
|
+
};
|
|
436
|
+
if (t.version != 1) return i();
|
|
437
|
+
switch (n) {
|
|
438
|
+
case "pending": return s(t, [
|
|
439
|
+
"createdAt",
|
|
440
|
+
"flowId",
|
|
441
|
+
"operationId",
|
|
442
|
+
"revisionId",
|
|
443
|
+
"status",
|
|
444
|
+
"updatedAt",
|
|
445
|
+
"version"
|
|
446
|
+
]), {
|
|
447
|
+
...r,
|
|
448
|
+
status: n
|
|
449
|
+
};
|
|
450
|
+
case "succeeded": return s(t, [
|
|
451
|
+
"createdAt",
|
|
452
|
+
"flowId",
|
|
453
|
+
"operationId",
|
|
454
|
+
"publicationId",
|
|
455
|
+
"revisionId",
|
|
456
|
+
"status",
|
|
457
|
+
"updatedAt",
|
|
458
|
+
"version"
|
|
459
|
+
]), {
|
|
460
|
+
...r,
|
|
461
|
+
publicationId: o(t.publicationId),
|
|
462
|
+
status: n
|
|
463
|
+
};
|
|
464
|
+
case "failed": {
|
|
465
|
+
s(t, [
|
|
466
|
+
"createdAt",
|
|
467
|
+
"flowId",
|
|
468
|
+
"issue",
|
|
469
|
+
"operationId",
|
|
470
|
+
"revisionId",
|
|
471
|
+
"status",
|
|
472
|
+
"updatedAt",
|
|
473
|
+
"version"
|
|
474
|
+
]);
|
|
475
|
+
let e = a(t.issue), i = e.nodeId;
|
|
476
|
+
return s(e, [
|
|
477
|
+
"code",
|
|
478
|
+
"message",
|
|
479
|
+
...i == null ? [] : ["nodeId"]
|
|
480
|
+
]), {
|
|
481
|
+
...r,
|
|
482
|
+
issue: {
|
|
483
|
+
code: o(e.code),
|
|
484
|
+
message: o(e.message),
|
|
485
|
+
...i == null ? {} : { nodeId: o(i) }
|
|
486
|
+
},
|
|
487
|
+
status: n
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
default: return i();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
function I(e) {
|
|
494
|
+
let t = a(e), n = t.values == null ? void 0 : a(t.values);
|
|
394
495
|
return {
|
|
395
496
|
code: o(t.code),
|
|
396
497
|
column: c(t.column),
|
|
397
498
|
line: c(t.line),
|
|
398
499
|
message: o(t.message),
|
|
399
|
-
path: typeof t.path == "string" ? t.path : i()
|
|
500
|
+
path: typeof t.path == "string" ? t.path : i(),
|
|
501
|
+
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : i()])) }
|
|
400
502
|
};
|
|
401
503
|
}
|
|
402
|
-
function
|
|
504
|
+
function L(e) {
|
|
403
505
|
let t = a(e);
|
|
404
506
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? i() : {
|
|
405
507
|
closureDigest: o(t.closureDigest),
|
|
406
|
-
diagnostics: t.diagnostics.map(
|
|
508
|
+
diagnostics: t.diagnostics.map(I),
|
|
407
509
|
engineContract: o(t.engineContract),
|
|
408
510
|
flowId: o(t.flowId),
|
|
409
511
|
modelVersion: c(t.modelVersion),
|
|
@@ -413,31 +515,31 @@ function F(e) {
|
|
|
413
515
|
version: 1
|
|
414
516
|
};
|
|
415
517
|
}
|
|
416
|
-
function
|
|
518
|
+
function R(e) {
|
|
417
519
|
let t = a(e), n = t.status, r = t.publication;
|
|
418
520
|
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() : {
|
|
419
521
|
flowId: o(t.flowId),
|
|
420
522
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
421
|
-
publication: r === null ? null :
|
|
523
|
+
publication: r === null ? null : P(r),
|
|
422
524
|
revision: c(t.revision),
|
|
423
525
|
status: n,
|
|
424
526
|
version: 1
|
|
425
527
|
};
|
|
426
528
|
}
|
|
427
|
-
function
|
|
529
|
+
function z(e) {
|
|
428
530
|
let t = a(e), n = t.nextCursor, r = t.total;
|
|
429
531
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? i() : {
|
|
430
532
|
...n == null ? {} : { nextCursor: n },
|
|
431
|
-
publications: t.publications.map(
|
|
533
|
+
publications: t.publications.map(P),
|
|
432
534
|
...r == null ? {} : { total: r },
|
|
433
535
|
version: 1
|
|
434
536
|
};
|
|
435
537
|
}
|
|
436
|
-
var
|
|
437
|
-
function
|
|
438
|
-
return typeof e == "string" &&
|
|
538
|
+
var B = new Set(n);
|
|
539
|
+
function V(e) {
|
|
540
|
+
return typeof e == "string" && B.has(e) ? e : i();
|
|
439
541
|
}
|
|
440
|
-
function
|
|
542
|
+
function H(e) {
|
|
441
543
|
let t = a(e), n = t.source, r = t.startedAt, s = t.finishedAt;
|
|
442
544
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || s != null && typeof s != "string" ? i() : {
|
|
443
545
|
createdAt: o(t.createdAt),
|
|
@@ -447,12 +549,12 @@ function B(e) {
|
|
|
447
549
|
runId: o(t.runId),
|
|
448
550
|
source: n,
|
|
449
551
|
...r == null ? {} : { startedAt: r },
|
|
450
|
-
status:
|
|
552
|
+
status: V(t.status),
|
|
451
553
|
version: 1
|
|
452
554
|
};
|
|
453
555
|
}
|
|
454
|
-
function
|
|
455
|
-
let t = a(e), n =
|
|
556
|
+
function U(e) {
|
|
557
|
+
let t = a(e), n = H(t), r = t.eventsExpiresAt;
|
|
456
558
|
if (r != null && typeof r != "string") return i();
|
|
457
559
|
let s = {
|
|
458
560
|
...n,
|
|
@@ -482,16 +584,16 @@ function V(e) {
|
|
|
482
584
|
};
|
|
483
585
|
}
|
|
484
586
|
}
|
|
485
|
-
function
|
|
587
|
+
function W(e) {
|
|
486
588
|
let t = a(e), n = t.nextCursor;
|
|
487
589
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? i() : {
|
|
488
590
|
flowId: o(t.flowId),
|
|
489
591
|
...n == null ? {} : { nextCursor: n },
|
|
490
|
-
runs: t.runs.map(
|
|
592
|
+
runs: t.runs.map(H),
|
|
491
593
|
version: 1
|
|
492
594
|
};
|
|
493
595
|
}
|
|
494
|
-
var
|
|
596
|
+
var G = /* @__PURE__ */ new Set([
|
|
495
597
|
"node.artifact",
|
|
496
598
|
"node.completed",
|
|
497
599
|
"node.failed",
|
|
@@ -508,9 +610,9 @@ var U = /* @__PURE__ */ new Set([
|
|
|
508
610
|
"run.queued",
|
|
509
611
|
"run.started"
|
|
510
612
|
]);
|
|
511
|
-
function
|
|
613
|
+
function K(e) {
|
|
512
614
|
let t = a(e), n = t.kind, r = c(t.sequence), s = t.sourceSequence;
|
|
513
|
-
return typeof n != "string" || !
|
|
615
|
+
return typeof n != "string" || !G.has(n) || r < 0 || s != null && (!Number.isSafeInteger(s) || s < 0) ? i() : {
|
|
514
616
|
createdAt: o(t.createdAt),
|
|
515
617
|
kind: n,
|
|
516
618
|
payload: a(t.payload),
|
|
@@ -518,11 +620,11 @@ function W(e) {
|
|
|
518
620
|
...s == null ? {} : { sourceSequence: s }
|
|
519
621
|
};
|
|
520
622
|
}
|
|
521
|
-
function
|
|
623
|
+
function q(e) {
|
|
522
624
|
let t = a(e), n = t.eventsExpiresAt, r = c(t.nextAfter);
|
|
523
625
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? i() : {
|
|
524
626
|
done: t.done,
|
|
525
|
-
events: t.events.map(
|
|
627
|
+
events: t.events.map(K),
|
|
526
628
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
527
629
|
historyComplete: t.historyComplete,
|
|
528
630
|
nextAfter: r,
|
|
@@ -530,8 +632,8 @@ function G(e) {
|
|
|
530
632
|
version: 1
|
|
531
633
|
};
|
|
532
634
|
}
|
|
533
|
-
function
|
|
534
|
-
let t = a(e), n =
|
|
635
|
+
function J(e) {
|
|
636
|
+
let t = a(e), n = V(t.status);
|
|
535
637
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" ? i() : {
|
|
536
638
|
cancelAccepted: t.cancelAccepted,
|
|
537
639
|
runId: o(t.runId),
|
|
@@ -539,7 +641,7 @@ function K(e) {
|
|
|
539
641
|
version: 1
|
|
540
642
|
};
|
|
541
643
|
}
|
|
542
|
-
function
|
|
644
|
+
function Y(e) {
|
|
543
645
|
let t = a(e), n = t.status;
|
|
544
646
|
if (t.version != 1) return i();
|
|
545
647
|
let r = {
|
|
@@ -580,11 +682,11 @@ function q(e) {
|
|
|
580
682
|
}
|
|
581
683
|
return i();
|
|
582
684
|
}
|
|
583
|
-
var
|
|
584
|
-
function
|
|
685
|
+
var X = encodeURIComponent;
|
|
686
|
+
function Z(e) {
|
|
585
687
|
return `${e}-${crypto.randomUUID()}`;
|
|
586
688
|
}
|
|
587
|
-
var
|
|
689
|
+
var Q = class {
|
|
588
690
|
constructor(e) {
|
|
589
691
|
this.requestControl = e;
|
|
590
692
|
}
|
|
@@ -594,6 +696,26 @@ var X = class {
|
|
|
594
696
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
595
697
|
return O(await this.request(`/v1/flows${n}`));
|
|
596
698
|
}
|
|
699
|
+
async listVariables() {
|
|
700
|
+
let e = a(await this.request("/v1/variables"));
|
|
701
|
+
return s(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? i() : {
|
|
702
|
+
variables: e.variables.map(k),
|
|
703
|
+
version: 1
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
async getVariable(e) {
|
|
707
|
+
return k(await this.request(`/v1/variables/${X(e)}`));
|
|
708
|
+
}
|
|
709
|
+
async putVariable(e, t) {
|
|
710
|
+
return k(await this.request(`/v1/variables/${X(e)}`, {
|
|
711
|
+
body: JSON.stringify({ value: t }),
|
|
712
|
+
method: "PUT"
|
|
713
|
+
}));
|
|
714
|
+
}
|
|
715
|
+
async deleteVariable(e) {
|
|
716
|
+
let t = a(await this.request(`/v1/variables/${X(e)}`, { method: "DELETE" }));
|
|
717
|
+
if (s(t, ["version"]), t.version != 1) return i();
|
|
718
|
+
}
|
|
597
719
|
async createFlow(e, t = `flow-${crypto.randomUUID()}`) {
|
|
598
720
|
return D(await this.request("/v1/flows", {
|
|
599
721
|
body: JSON.stringify({
|
|
@@ -605,10 +727,10 @@ var X = class {
|
|
|
605
727
|
}));
|
|
606
728
|
}
|
|
607
729
|
async getFlow(e) {
|
|
608
|
-
return D(await this.request(`/v1/flows/${
|
|
730
|
+
return D(await this.request(`/v1/flows/${X(e)}`));
|
|
609
731
|
}
|
|
610
732
|
async renameFlow(e, t) {
|
|
611
|
-
return D(await this.request(`/v1/flows/${
|
|
733
|
+
return D(await this.request(`/v1/flows/${X(e)}`, {
|
|
612
734
|
body: JSON.stringify({
|
|
613
735
|
name: t,
|
|
614
736
|
version: 1
|
|
@@ -617,7 +739,7 @@ var X = class {
|
|
|
617
739
|
}));
|
|
618
740
|
}
|
|
619
741
|
async deleteFlow(e) {
|
|
620
|
-
return D(await this.request(`/v1/flows/${
|
|
742
|
+
return D(await this.request(`/v1/flows/${X(e)}`, { method: "DELETE" }));
|
|
621
743
|
}
|
|
622
744
|
async listTriggerKeys(e) {
|
|
623
745
|
let t = a(await this.request("/v1/trigger-keys", { signal: e }));
|
|
@@ -628,87 +750,93 @@ var X = class {
|
|
|
628
750
|
return t.version != 1 || !Array.isArray(t.definitions) ? i() : t.definitions.map(_);
|
|
629
751
|
}
|
|
630
752
|
async getTriggerKey(e, t) {
|
|
631
|
-
let n = a(await this.request(`/v1/trigger-keys/${
|
|
753
|
+
let n = a(await this.request(`/v1/trigger-keys/${X(e)}`, { signal: t }));
|
|
632
754
|
return n.version == 1 ? _(n.definition) : i();
|
|
633
755
|
}
|
|
634
756
|
async listFlowTriggerBindings(e) {
|
|
635
|
-
let t = a(await this.request(`/v1/flows/${
|
|
757
|
+
let t = a(await this.request(`/v1/flows/${X(e)}/triggers`));
|
|
636
758
|
return t.version != 1 || o(t.flowId) != e || !Array.isArray(t.bindings) ? i() : t.bindings.map(S);
|
|
637
759
|
}
|
|
638
760
|
async getFlowTriggerBinding(e, t) {
|
|
639
|
-
return C(await this.request(`/v1/flows/${
|
|
761
|
+
return C(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}`));
|
|
640
762
|
}
|
|
641
763
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
642
764
|
let r = new URLSearchParams();
|
|
643
765
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
644
766
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
645
|
-
return T(await this.request(`/v1/flows/${
|
|
767
|
+
return T(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/activities${i}`));
|
|
646
768
|
}
|
|
647
769
|
async pauseFlowTrigger(e, t) {
|
|
648
|
-
return S(await this.request(`/v1/flows/${
|
|
770
|
+
return S(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/pause`, {
|
|
649
771
|
body: JSON.stringify({ version: 1 }),
|
|
650
772
|
method: "POST"
|
|
651
773
|
}));
|
|
652
774
|
}
|
|
653
775
|
async resumeFlowTrigger(e, t) {
|
|
654
|
-
return S(await this.request(`/v1/flows/${
|
|
776
|
+
return S(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/resume`, {
|
|
655
777
|
body: JSON.stringify({ version: 1 }),
|
|
656
778
|
method: "POST"
|
|
657
779
|
}));
|
|
658
780
|
}
|
|
659
781
|
async testFlowPollTrigger(e, t) {
|
|
660
|
-
return E(await this.request(`/v1/flows/${
|
|
782
|
+
return E(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/test`, {
|
|
661
783
|
body: JSON.stringify({ version: 1 }),
|
|
662
784
|
method: "POST"
|
|
663
785
|
}));
|
|
664
786
|
}
|
|
665
787
|
async getDraft(e) {
|
|
666
|
-
return
|
|
788
|
+
return j(await this.request(`/v1/flows/${X(e)}/draft`));
|
|
667
789
|
}
|
|
668
790
|
async syncDraft(e, t) {
|
|
669
|
-
let n = t == null ? "" : `?fromRevisionId=${
|
|
670
|
-
return
|
|
791
|
+
let n = t == null ? "" : `?fromRevisionId=${X(t)}`;
|
|
792
|
+
return N(await this.request(`/v1/flows/${X(e)}/draft/sync${n}`));
|
|
671
793
|
}
|
|
672
794
|
async getRevision(e, t) {
|
|
673
|
-
return
|
|
674
|
-
}
|
|
675
|
-
async listConnectorProviders(e) {
|
|
676
|
-
let
|
|
677
|
-
return s(
|
|
678
|
-
}
|
|
679
|
-
async listConnectorActions(e, t) {
|
|
680
|
-
return await this.connectorActions(
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
685
|
-
async
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
795
|
+
return j(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}`));
|
|
796
|
+
}
|
|
797
|
+
async listConnectorProviders(e, t) {
|
|
798
|
+
let n = a(await this.request(`/v1/connector/providers${t == null ? "" : `?flowId=${X(t)}`}`, { signal: e }));
|
|
799
|
+
return s(n, ["providers", "version"]), n.version != 1 || !Array.isArray(n.providers) ? i() : n.providers.map(h);
|
|
800
|
+
}
|
|
801
|
+
async listConnectorActions(e, t, n) {
|
|
802
|
+
return await this.connectorActions({
|
|
803
|
+
...n == null ? {} : { flowId: n },
|
|
804
|
+
...e == null ? {} : { service: e }
|
|
805
|
+
}, t);
|
|
806
|
+
}
|
|
807
|
+
async searchConnectorActions(e, t, n) {
|
|
808
|
+
return await this.connectorActions({
|
|
809
|
+
...n == null ? {} : { flowId: n },
|
|
810
|
+
q: e.trim()
|
|
811
|
+
}, t);
|
|
812
|
+
}
|
|
813
|
+
async getConnectorAction(e, t, n) {
|
|
814
|
+
let r = a(await this.request(`/v1/connector/actions/${X(e)}${n == null ? "" : `?flowId=${X(n)}`}`, { signal: t }));
|
|
815
|
+
return s(r, ["action", "version"]), r.version == 1 ? m(r.action) : i();
|
|
816
|
+
}
|
|
817
|
+
async listConnectorConnections(e, t, n) {
|
|
818
|
+
let r = a(await this.request(`/v1/connector/connections/${X(e)}${n == null ? "" : `?flowId=${X(n)}`}`, { signal: t }));
|
|
819
|
+
return s(r, [
|
|
692
820
|
"connections",
|
|
693
821
|
"serviceId",
|
|
694
822
|
"version"
|
|
695
|
-
]),
|
|
823
|
+
]), r.version != 1 || o(r.serviceId) != e || !Array.isArray(r.connections) ? i() : r.connections.map(u);
|
|
696
824
|
}
|
|
697
|
-
async createConnectorConnectionPage(e) {
|
|
698
|
-
let
|
|
825
|
+
async createConnectorConnectionPage(e, t) {
|
|
826
|
+
let n = a(await this.request(`/v1/connector/connections/${X(e)}/page${t == null ? "" : `?flowId=${X(t)}`}`, {
|
|
699
827
|
body: JSON.stringify({ version: 1 }),
|
|
700
828
|
method: "POST"
|
|
701
829
|
}));
|
|
702
|
-
if (s(
|
|
830
|
+
if (s(n, ["url", "version"]), n.version != 1) return i();
|
|
703
831
|
try {
|
|
704
|
-
let e = new URL(o(
|
|
832
|
+
let e = new URL(o(n.url));
|
|
705
833
|
return e.protocol != "http:" && e.protocol != "https:" ? i() : e.href;
|
|
706
834
|
} catch {
|
|
707
835
|
return i();
|
|
708
836
|
}
|
|
709
837
|
}
|
|
710
838
|
async changeDraft(e, t, n) {
|
|
711
|
-
return
|
|
839
|
+
return M(await this.request(`/v1/flows/${X(e)}/draft/changes`, {
|
|
712
840
|
body: JSON.stringify({
|
|
713
841
|
expectedRevisionId: t,
|
|
714
842
|
operations: n,
|
|
@@ -718,7 +846,7 @@ var X = class {
|
|
|
718
846
|
}));
|
|
719
847
|
}
|
|
720
848
|
async checkFlow(e, t) {
|
|
721
|
-
return
|
|
849
|
+
return L(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/check`, {
|
|
722
850
|
body: JSON.stringify({
|
|
723
851
|
engineContract: "open-flow-engine/v1",
|
|
724
852
|
version: 1
|
|
@@ -727,85 +855,88 @@ var X = class {
|
|
|
727
855
|
}));
|
|
728
856
|
}
|
|
729
857
|
async getLive(e) {
|
|
730
|
-
return
|
|
858
|
+
return R(await this.request(`/v1/flows/${X(e)}/live`));
|
|
731
859
|
}
|
|
732
860
|
async listPublications(e, t = {}) {
|
|
733
861
|
let n = new URLSearchParams();
|
|
734
862
|
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
863
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
736
|
-
return
|
|
864
|
+
return z(await this.request(`/v1/flows/${X(e)}/publications${r}`));
|
|
737
865
|
}
|
|
738
866
|
async createDraftRun(e, t, n = {}) {
|
|
739
|
-
let r =
|
|
867
|
+
let r = U(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/runs`, {
|
|
740
868
|
body: JSON.stringify({
|
|
741
869
|
engineContract: "open-flow-engine/v1",
|
|
742
870
|
inputs: n.inputs ?? {},
|
|
743
871
|
version: 1
|
|
744
872
|
}),
|
|
745
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
873
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Z("run") },
|
|
746
874
|
method: "POST"
|
|
747
875
|
}));
|
|
748
876
|
return r.source == "draft" ? r : i();
|
|
749
877
|
}
|
|
750
878
|
async createLiveRun(e, t = {}) {
|
|
751
|
-
let n =
|
|
879
|
+
let n = U(await this.request("/v1/runs", {
|
|
752
880
|
body: JSON.stringify({
|
|
753
881
|
inputs: t.inputs ?? {},
|
|
754
882
|
publicationId: e,
|
|
755
883
|
version: 1
|
|
756
884
|
}),
|
|
757
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
885
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Z("run") },
|
|
758
886
|
method: "POST"
|
|
759
887
|
}));
|
|
760
888
|
return n.source == "live" ? n : i();
|
|
761
889
|
}
|
|
762
890
|
async publishFlow(e, t, n, r = {}) {
|
|
763
|
-
return
|
|
891
|
+
return F(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/publications`, {
|
|
764
892
|
body: JSON.stringify({
|
|
765
893
|
engineContract: "open-flow-engine/v1",
|
|
766
894
|
expectedLivePublicationId: n,
|
|
767
895
|
version: 1
|
|
768
896
|
}),
|
|
769
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
897
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Z("publication") },
|
|
770
898
|
method: "POST"
|
|
771
899
|
}));
|
|
772
900
|
}
|
|
901
|
+
async getPublishOperation(e, t) {
|
|
902
|
+
return F(await this.request(`/v1/flows/${X(e)}/publish-operations/${X(t)}`));
|
|
903
|
+
}
|
|
773
904
|
async rollbackFlow(e, t, n, r = {}) {
|
|
774
|
-
return
|
|
905
|
+
return P(await this.request(`/v1/flows/${X(e)}/publications/${X(t)}/rollback`, {
|
|
775
906
|
body: JSON.stringify({
|
|
776
907
|
expectedLivePublicationId: n,
|
|
777
908
|
version: 1
|
|
778
909
|
}),
|
|
779
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
910
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Z("publication") },
|
|
780
911
|
method: "POST"
|
|
781
912
|
}));
|
|
782
913
|
}
|
|
783
914
|
async getRun(e) {
|
|
784
|
-
return
|
|
915
|
+
return U(await this.request(`/v1/runs/${X(e)}`));
|
|
785
916
|
}
|
|
786
917
|
async listRuns(e, t = {}) {
|
|
787
918
|
let n = new URLSearchParams();
|
|
788
919
|
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);
|
|
789
920
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
790
|
-
return
|
|
921
|
+
return W(await this.request(`/v1/flows/${X(e)}/runs${r}`));
|
|
791
922
|
}
|
|
792
923
|
async getRunEvents(e, t = {}) {
|
|
793
924
|
let n = new URLSearchParams();
|
|
794
925
|
t.after != null && n.set("after", String(t.after)), t.limit != null && n.set("limit", String(t.limit));
|
|
795
926
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
796
|
-
return
|
|
927
|
+
return q(await this.request(`/v1/runs/${X(e)}/events${r}`));
|
|
797
928
|
}
|
|
798
929
|
async getRunResult(e) {
|
|
799
|
-
return
|
|
930
|
+
return Y(await this.request(`/v1/runs/${X(e)}/result`));
|
|
800
931
|
}
|
|
801
932
|
async cancelRun(e) {
|
|
802
|
-
return
|
|
933
|
+
return J(await this.request(`/v1/runs/${X(e)}/cancel`, {
|
|
803
934
|
body: JSON.stringify({ version: 1 }),
|
|
804
935
|
method: "POST"
|
|
805
936
|
}));
|
|
806
937
|
}
|
|
807
938
|
async connectorActions(e, t) {
|
|
808
|
-
let n = Object.entries(e).map(([e, t]) => `${
|
|
939
|
+
let n = Object.entries(e).map(([e, t]) => `${X(e)}=${X(t)}`).join("&"), r = n == "" ? "" : `?${n}`, o = a(await this.request(`/v1/connector/actions${r}`, { signal: t }));
|
|
809
940
|
return s(o, ["actions", "version"]), o.version != 1 || !Array.isArray(o.actions) ? i() : o.actions.map(m);
|
|
810
941
|
}
|
|
811
942
|
async request(e, t = {}) {
|
|
@@ -828,4 +959,4 @@ var X = class {
|
|
|
828
959
|
}
|
|
829
960
|
};
|
|
830
961
|
//#endregion
|
|
831
|
-
export { r as ApiError,
|
|
962
|
+
export { r as ApiError, Q as ControlClient, e as controlErrorCode, t as controlErrorMetadata };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CodeModule, FlowDocument, Graph, InputPort, JsonValue, OutputMapping, Port, RevisionContent } from '@oomol-lab/open-flow/flow-change';
|
|
1
|
+
import type { CodeModule, FlowDocument, Graph, Group, InputPort, JsonValue, OutputMapping, Port, RevisionContent } from '@oomol-lab/open-flow/flow-change';
|
|
2
2
|
export declare const maxJsonDepth = 64;
|
|
3
3
|
export declare function canonicalJsonBytes(value: JsonValue): Uint8Array;
|
|
4
4
|
export declare function digestBytes(bytes: Uint8Array): Promise<string>;
|
|
5
|
-
export declare function canonicalPorts(value: readonly (InputPort | Port)[]): JsonValue;
|
|
5
|
+
export declare function canonicalPorts(value: readonly (InputPort | Port | Group)[]): JsonValue;
|
|
6
6
|
export declare function canonicalOutputs(value: readonly (OutputMapping & Port)[]): JsonValue;
|
|
7
7
|
export declare function canonicalGraph(value: Graph): JsonValue;
|
|
8
8
|
export declare function canonicalTask(task: FlowDocument['tasks'][string]): JsonValue;
|