@oomol-lab/open-flow 0.1.0-alpha.4 → 0.1.0-alpha.6

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.
Files changed (62) hide show
  1. package/dist/browser/{addNodeOptions-CGyTkP99.js → addNodeOptions-C4wix0_u.js} +1008 -1428
  2. package/dist/browser/carbon-DMCVsjHo.js +53 -0
  3. package/dist/browser/{createLucideIcon-MmUpJrIU.js → createLucideIcon-ggJB9CTC.js} +86 -117
  4. package/dist/browser/{createResourceDialog-CIVfStiE.js → createResourceDialog-CESUCxOM.js} +12 -12
  5. package/dist/browser/{dist-BbyiRq3c.js → dist-B0Q2Mn0n.js} +117 -107
  6. package/dist/browser/{dist-B9OV3YTx.js → dist-Bc9TvHYl.js} +7 -7
  7. package/dist/browser/{dist-0lWKriL5.js → dist-C46JByB-.js} +1 -1
  8. package/dist/browser/{dist-CvcmLAMW.js → dist-CUkceEvN.js} +4 -4
  9. package/dist/browser/{dist-zyY--HOV.js → dist-CVtP-E2c.js} +2 -2
  10. package/dist/browser/{dist-CLZJNoWB.js → dist-D5mdziGP.js} +4 -4
  11. package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
  12. package/dist/browser/{dist-DL0SDskM.js → dist-DQVavPcf.js} +9 -8
  13. package/dist/browser/{dist-aWSZx4q1.js → dist-DWzdGVm9.js} +2 -2
  14. package/dist/browser/{dist-Djd02JSy.js → dist-DXgEYMFx.js} +4 -4
  15. package/dist/browser/{dist-o4dBuwiG.js → dist-DhsGR_K3.js} +4 -4
  16. package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
  17. package/dist/browser/{dist-CIq6ue3I.js → dist-n9WmBm5w.js} +1115 -1103
  18. package/dist/browser/{esm-DXw7EADW.js → esm-CoE5_2w7.js} +5 -5
  19. package/dist/browser/{field-runIpvMd.js → field-CIrv7Rez.js} +6 -6
  20. package/dist/browser/{project-authoring-edge.d.ts → flow-authoring-edge.d.ts} +1 -1
  21. package/dist/browser/{project-authoring-module.d.ts → flow-authoring-module.d.ts} +1 -1
  22. package/dist/browser/{project-authoring-node.d.ts → flow-authoring-node.d.ts} +6 -12
  23. package/dist/browser/flow-authoring.d.ts +3 -0
  24. package/dist/browser/{project-authoring.js → flow-authoring.js} +44 -69
  25. package/dist/browser/{project-change.d.ts → flow-change.d.ts} +11 -26
  26. package/dist/browser/{project-change.js → flow-change.js} +8 -39
  27. package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  28. package/dist/browser/{flowRunInputEditorStore-B49C0ZmK.js → flowRunInputEditorStore-DXOyyY7o.js} +850 -675
  29. package/dist/browser/{flowWorkspace-CGsEHe2F.js → flowWorkspace-Bo0bz1Uz.js} +7040 -6875
  30. package/dist/browser/{lib-S4ccuMeT.js → lib-GrGxYjsJ.js} +3 -5
  31. package/dist/browser/licenses.md +11 -11
  32. package/dist/browser/{markdownContent-BvYiwIwR.js → markdownContent-ColGUxHy.js} +4046 -4018
  33. package/dist/browser/workbench-contract.d.ts +4 -4
  34. package/dist/browser/workbench.css +1 -1
  35. package/dist/browser/workbench.d.ts +1 -1
  36. package/dist/browser/workbench.js +898 -1053
  37. package/dist/common/connector-action.js +1 -1
  38. package/dist/common/control-api-conformance.js +137 -361
  39. package/dist/common/control-api-errors.d.ts +16 -24
  40. package/dist/common/control-api.d.ts +38 -67
  41. package/dist/common/control-api.js +135 -188
  42. package/dist/common/cron-trigger.d.ts +1 -1
  43. package/dist/common/cron-trigger.js +1 -1
  44. package/dist/common/{project-encoding.d.ts → flow-encoding.d.ts} +3 -3
  45. package/dist/common/{project-encoding.js → flow-encoding.js} +3 -6
  46. package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  47. package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +9 -12
  48. package/dist/common/{project-semantics.js → flow-semantics.js} +103 -115
  49. package/dist/common/integration-trigger.d.ts +1 -1
  50. package/dist/common/integration-trigger.js +1 -1
  51. package/dist/common/poll-trigger.d.ts +1 -1
  52. package/dist/common/run-lifecycle.js +1 -1
  53. package/dist/common/runtime-contract.d.ts +1 -1
  54. package/dist/common/runtime-contract.js +1 -1
  55. package/dist/common/scheduler.d.ts +3 -2
  56. package/dist/common/scheduler.js +4 -4
  57. package/dist/common/webhook-trigger.d.ts +1 -1
  58. package/dist/common/webhook-trigger.js +2 -2
  59. package/package.json +13 -13
  60. package/dist/browser/carbon-nMY84Amv.js +0 -53
  61. package/dist/browser/project-authoring-flow.d.ts +0 -4
  62. package/dist/browser/project-authoring.d.ts +0 -4
@@ -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",
@@ -40,15 +38,13 @@ var e = {
40
38
  [e.engineUnsupported]: { status: 409 },
41
39
  [e.flowInvalid]: { status: 400 },
42
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 },
43
45
  [e.liveConflict]: { status: 412 },
44
46
  [e.liveNotFound]: { status: 404 },
45
47
  [e.pageInvalidCursor]: { status: 400 },
46
- [e.projectBusy]: { status: 409 },
47
- [e.projectConflict]: { status: 409 },
48
- [e.projectInvalid]: { status: 400 },
49
- [e.projectNotFound]: { status: 404 },
50
- [e.projectPresentationConflict]: { status: 412 },
51
- [e.projectRevisionConflict]: { status: 412 },
52
48
  [e.publicationConflict]: { status: 409 },
53
49
  [e.publicationNotFound]: { status: 404 },
54
50
  [e.routeNotFound]: { status: 404 },
@@ -261,7 +257,6 @@ function S(e) {
261
257
  kind: r,
262
258
  ...t.lastErrorCode == null ? {} : { lastErrorCode: o(t.lastErrorCode) },
263
259
  operatorState: s,
264
- projectId: o(t.projectId),
265
260
  runtimeVersion: l,
266
261
  triggerNodeId: o(t.triggerNodeId),
267
262
  updatedAt: o(t.updatedAt),
@@ -312,8 +307,8 @@ function D(e) {
312
307
  return t.version != 1 || n != "active" && n != "retiring" ? i() : {
313
308
  createdAt: o(t.createdAt),
314
309
  draftRevisionId: o(t.draftRevisionId),
310
+ flowId: o(t.flowId),
315
311
  name: o(t.name),
316
- projectId: o(t.projectId),
317
312
  status: n,
318
313
  updatedAt: o(t.updatedAt),
319
314
  version: 1
@@ -321,11 +316,11 @@ function D(e) {
321
316
  }
322
317
  function O(e) {
323
318
  let t = a(e);
324
- if (t.version != 1 || !Array.isArray(t.projects)) return i();
319
+ if (t.version != 1 || !Array.isArray(t.flows)) return i();
325
320
  let n = t.nextCursor, r = t.total;
326
321
  return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? i() : {
327
322
  ...n == null ? {} : { nextCursor: n },
328
- projects: t.projects.map(D),
323
+ flows: t.flows.map(D),
329
324
  ...r == null ? {} : { total: r },
330
325
  version: 1
331
326
  };
@@ -336,9 +331,9 @@ function k(e) {
336
331
  actorId: o(t.actorId),
337
332
  createdAt: o(t.createdAt),
338
333
  digest: o(t.digest),
334
+ flowId: o(t.flowId),
339
335
  modelVersion: c(t.modelVersion),
340
336
  parentRevisionId: n,
341
- projectId: o(t.projectId),
342
337
  revisionId: o(t.revisionId),
343
338
  version: 1
344
339
  };
@@ -351,34 +346,19 @@ function A(e) {
351
346
  }) : i();
352
347
  }
353
348
  function j(e) {
354
- return Array.isArray(e) ? e.map((e) => {
355
- let t = a(e);
356
- return {
357
- closureDigest: o(t.closureDigest),
358
- flowId: o(t.flowId),
359
- name: o(t.name)
360
- };
361
- }) : i();
362
- }
363
- function M(e) {
364
349
  let t = a(e);
365
350
  return t.version == 1 ? {
366
- draftFlows: j(t.draftFlows),
367
351
  revision: k(t.revision),
368
352
  version: 1
369
353
  } : i();
370
354
  }
371
- function N(e) {
355
+ function M(e) {
372
356
  let t = a(e);
373
- if (t.version != 1) return i();
374
- let n = j(t.draftFlows);
375
- return t.kind == "snapshot" ? {
357
+ return t.version == 1 ? t.kind == "snapshot" ? {
376
358
  draft: A(t.draft),
377
- draftFlows: n,
378
359
  kind: "snapshot",
379
360
  version: 1
380
361
  } : t.kind != "changes" || !Array.isArray(t.revisions) ? i() : {
381
- draftFlows: n,
382
362
  kind: "changes",
383
363
  revisions: t.revisions.map((e) => {
384
364
  let t = a(e);
@@ -390,9 +370,9 @@ function N(e) {
390
370
  };
391
371
  }),
392
372
  version: 1
393
- };
373
+ } : i();
394
374
  }
395
- function P(e) {
375
+ function N(e) {
396
376
  let t = a(e), n = t.operation, r = t.sourcePublicationId;
397
377
  return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? i() : {
398
378
  actorId: o(t.actorId),
@@ -402,7 +382,6 @@ function P(e) {
402
382
  flowId: o(t.flowId),
403
383
  modelVersion: c(t.modelVersion),
404
384
  operation: n,
405
- projectId: o(t.projectId),
406
385
  publicationId: o(t.publicationId),
407
386
  revisionDigest: o(t.revisionDigest),
408
387
  revisionId: o(t.revisionId),
@@ -410,29 +389,7 @@ function P(e) {
410
389
  version: 1
411
390
  };
412
391
  }
413
- function F(e) {
414
- let t = a(e), n = t.draft == null ? null : a(t.draft), r = t.live == null ? null : a(t.live), s = r?.status;
415
- return typeof t.hasUnpublishedChanges != "boolean" || r != null && s != "runnable" && s != "suspended" ? i() : {
416
- draft: n == null ? null : {
417
- closureDigest: o(n.closureDigest),
418
- name: o(n.name),
419
- revisionDigest: o(n.revisionDigest),
420
- revisionId: o(n.revisionId)
421
- },
422
- flowId: o(t.flowId),
423
- hasUnpublishedChanges: t.hasUnpublishedChanges,
424
- live: r == null ? null : {
425
- publication: P(r.publication),
426
- revision: c(r.revision),
427
- status: s
428
- }
429
- };
430
- }
431
- function I(e) {
432
- let t = a(e);
433
- return t.version != 1 || !Array.isArray(t.flows) ? i() : (o(t.projectId), t.flows.map(F));
434
- }
435
- function L(e) {
392
+ function P(e) {
436
393
  let t = a(e);
437
394
  return {
438
395
  code: o(t.code),
@@ -442,63 +399,60 @@ function L(e) {
442
399
  path: typeof t.path == "string" ? t.path : i()
443
400
  };
444
401
  }
445
- function R(e) {
402
+ function F(e) {
446
403
  let t = a(e);
447
404
  return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? i() : {
448
405
  closureDigest: o(t.closureDigest),
449
- diagnostics: t.diagnostics.map(L),
406
+ diagnostics: t.diagnostics.map(P),
450
407
  engineContract: o(t.engineContract),
451
408
  flowId: o(t.flowId),
452
409
  modelVersion: c(t.modelVersion),
453
- projectId: o(t.projectId),
454
410
  revisionDigest: o(t.revisionDigest),
455
411
  revisionId: o(t.revisionId),
456
412
  valid: t.valid,
457
413
  version: 1
458
414
  };
459
415
  }
460
- function z(e) {
416
+ function I(e) {
461
417
  let t = a(e), n = t.status, r = t.publication;
462
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() : {
463
419
  flowId: o(t.flowId),
464
420
  hasUnpublishedChanges: t.hasUnpublishedChanges,
465
- projectId: o(t.projectId),
466
- publication: r === null ? null : P(r),
421
+ publication: r === null ? null : N(r),
467
422
  revision: c(t.revision),
468
423
  status: n,
469
424
  version: 1
470
425
  };
471
426
  }
472
- function B(e) {
427
+ function L(e) {
473
428
  let t = a(e), n = t.nextCursor, r = t.total;
474
429
  return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? i() : {
475
430
  ...n == null ? {} : { nextCursor: n },
476
- publications: t.publications.map(P),
431
+ publications: t.publications.map(N),
477
432
  ...r == null ? {} : { total: r },
478
433
  version: 1
479
434
  };
480
435
  }
481
- var V = new Set(n);
482
- function H(e) {
483
- return typeof e == "string" && V.has(e) ? e : i();
436
+ var R = new Set(n);
437
+ function z(e) {
438
+ return typeof e == "string" && R.has(e) ? e : i();
484
439
  }
485
- function U(e) {
440
+ function B(e) {
486
441
  let t = a(e), n = t.source, r = t.startedAt, s = t.finishedAt;
487
442
  return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || s != null && typeof s != "string" ? i() : {
488
443
  createdAt: o(t.createdAt),
489
444
  ...s == null ? {} : { finishedAt: s },
490
445
  flowId: o(t.flowId),
491
- projectId: o(t.projectId),
492
446
  revisionId: o(t.revisionId),
493
447
  runId: o(t.runId),
494
448
  source: n,
495
449
  ...r == null ? {} : { startedAt: r },
496
- status: H(t.status),
450
+ status: z(t.status),
497
451
  version: 1
498
452
  };
499
453
  }
500
- function W(e) {
501
- let t = a(e), n = U(t), r = t.eventsExpiresAt;
454
+ function V(e) {
455
+ let t = a(e), n = B(t), r = t.eventsExpiresAt;
502
456
  if (r != null && typeof r != "string") return i();
503
457
  let s = {
504
458
  ...n,
@@ -528,16 +482,16 @@ function W(e) {
528
482
  };
529
483
  }
530
484
  }
531
- function G(e) {
485
+ function H(e) {
532
486
  let t = a(e), n = t.nextCursor;
533
487
  return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? i() : {
488
+ flowId: o(t.flowId),
534
489
  ...n == null ? {} : { nextCursor: n },
535
- projectId: o(t.projectId),
536
- runs: t.runs.map(U),
490
+ runs: t.runs.map(B),
537
491
  version: 1
538
492
  };
539
493
  }
540
- var K = /* @__PURE__ */ new Set([
494
+ var U = /* @__PURE__ */ new Set([
541
495
  "node.artifact",
542
496
  "node.completed",
543
497
  "node.failed",
@@ -554,9 +508,9 @@ var K = /* @__PURE__ */ new Set([
554
508
  "run.queued",
555
509
  "run.started"
556
510
  ]);
557
- function q(e) {
511
+ function W(e) {
558
512
  let t = a(e), n = t.kind, r = c(t.sequence), s = t.sourceSequence;
559
- return typeof n != "string" || !K.has(n) || r < 0 || s != null && (!Number.isSafeInteger(s) || s < 0) ? i() : {
513
+ return typeof n != "string" || !U.has(n) || r < 0 || s != null && (!Number.isSafeInteger(s) || s < 0) ? i() : {
560
514
  createdAt: o(t.createdAt),
561
515
  kind: n,
562
516
  payload: a(t.payload),
@@ -564,11 +518,11 @@ function q(e) {
564
518
  ...s == null ? {} : { sourceSequence: s }
565
519
  };
566
520
  }
567
- function J(e) {
521
+ function G(e) {
568
522
  let t = a(e), n = t.eventsExpiresAt, r = c(t.nextAfter);
569
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() : {
570
524
  done: t.done,
571
- events: t.events.map(q),
525
+ events: t.events.map(W),
572
526
  ...n == null ? {} : { eventsExpiresAt: n },
573
527
  historyComplete: t.historyComplete,
574
528
  nextAfter: r,
@@ -576,8 +530,8 @@ function J(e) {
576
530
  version: 1
577
531
  };
578
532
  }
579
- function Y(e) {
580
- let t = a(e), n = H(t.status);
533
+ function K(e) {
534
+ let t = a(e), n = z(t.status);
581
535
  return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" ? i() : {
582
536
  cancelAccepted: t.cancelAccepted,
583
537
  runId: o(t.runId),
@@ -585,7 +539,7 @@ function Y(e) {
585
539
  version: 1
586
540
  };
587
541
  }
588
- function X(e) {
542
+ function q(e) {
589
543
  let t = a(e), n = t.status;
590
544
  if (t.version != 1) return i();
591
545
  let r = {
@@ -626,22 +580,22 @@ function X(e) {
626
580
  }
627
581
  return i();
628
582
  }
629
- var Z = encodeURIComponent;
630
- function Q(e) {
583
+ var J = encodeURIComponent;
584
+ function Y(e) {
631
585
  return `${e}-${crypto.randomUUID()}`;
632
586
  }
633
- var $ = class {
587
+ var X = class {
634
588
  constructor(e) {
635
589
  this.requestControl = e;
636
590
  }
637
- async listProjects(e = {}) {
591
+ async listFlows(e = {}) {
638
592
  let t = new URLSearchParams();
639
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));
640
594
  let n = t.size == 0 ? "" : `?${t}`;
641
- return O(await this.request(`/v1/projects${n}`));
595
+ return O(await this.request(`/v1/flows${n}`));
642
596
  }
643
- async createProject(e, t = `project-${crypto.randomUUID()}`) {
644
- return D(await this.request("/v1/projects", {
597
+ async createFlow(e, t = `flow-${crypto.randomUUID()}`) {
598
+ return D(await this.request("/v1/flows", {
645
599
  body: JSON.stringify({
646
600
  name: e,
647
601
  version: 1
@@ -650,11 +604,20 @@ var $ = class {
650
604
  method: "POST"
651
605
  }));
652
606
  }
653
- async getProject(e) {
654
- return D(await this.request(`/v1/projects/${Z(e)}`));
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
+ }));
655
618
  }
656
- async deleteProject(e) {
657
- return D(await this.request(`/v1/projects/${Z(e)}`, { method: "DELETE" }));
619
+ async deleteFlow(e) {
620
+ return D(await this.request(`/v1/flows/${J(e)}`, { method: "DELETE" }));
658
621
  }
659
622
  async listTriggerKeys(e) {
660
623
  let t = a(await this.request("/v1/trigger-keys", { signal: e }));
@@ -665,99 +628,87 @@ var $ = class {
665
628
  return t.version != 1 || !Array.isArray(t.definitions) ? i() : t.definitions.map(_);
666
629
  }
667
630
  async getTriggerKey(e, t) {
668
- let n = a(await this.request(`/v1/trigger-keys/${Z(e)}`, { signal: t }));
631
+ let n = a(await this.request(`/v1/trigger-keys/${J(e)}`, { signal: t }));
669
632
  return n.version == 1 ? _(n.definition) : i();
670
633
  }
671
- async listFlowTriggerBindings(e, t) {
672
- let n = a(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers`));
673
- return n.version != 1 || o(n.projectId) != e || o(n.flowId) != t || !Array.isArray(n.bindings) ? i() : n.bindings.map(S);
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);
674
637
  }
675
- async getFlowTriggerBinding(e, t, n) {
676
- return C(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers/${Z(n)}`));
638
+ async getFlowTriggerBinding(e, t) {
639
+ return C(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}`));
677
640
  }
678
- async listFlowTriggerActivities(e, t, n, r = {}) {
679
- let i = new URLSearchParams();
680
- r.cursor != null && i.set("cursor", r.cursor), r.limit != null && i.set("limit", String(r.limit));
681
- let a = i.size == 0 ? "" : `?${i}`;
682
- return T(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers/${Z(n)}/activities${a}`));
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}`));
683
646
  }
684
- async pauseFlowTrigger(e, t, n) {
685
- return S(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers/${Z(n)}/pause`, {
647
+ async pauseFlowTrigger(e, t) {
648
+ return S(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/pause`, {
686
649
  body: JSON.stringify({ version: 1 }),
687
650
  method: "POST"
688
651
  }));
689
652
  }
690
- async resumeFlowTrigger(e, t, n) {
691
- return S(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers/${Z(n)}/resume`, {
653
+ async resumeFlowTrigger(e, t) {
654
+ return S(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/resume`, {
692
655
  body: JSON.stringify({ version: 1 }),
693
656
  method: "POST"
694
657
  }));
695
658
  }
696
- async testFlowPollTrigger(e, t, n) {
697
- return E(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/triggers/${Z(n)}/test`, {
659
+ async testFlowPollTrigger(e, t) {
660
+ return E(await this.request(`/v1/flows/${J(e)}/triggers/${J(t)}/test`, {
698
661
  body: JSON.stringify({ version: 1 }),
699
662
  method: "POST"
700
663
  }));
701
664
  }
702
665
  async getDraft(e) {
703
- return A(await this.request(`/v1/projects/${Z(e)}/draft`));
666
+ return A(await this.request(`/v1/flows/${J(e)}/draft`));
704
667
  }
705
668
  async syncDraft(e, t) {
706
- let n = t == null ? "" : `?fromRevisionId=${Z(t)}`;
707
- return N(await this.request(`/v1/projects/${Z(e)}/draft/sync${n}`));
669
+ let n = t == null ? "" : `?fromRevisionId=${J(t)}`;
670
+ return M(await this.request(`/v1/flows/${J(e)}/draft/sync${n}`));
708
671
  }
709
672
  async getRevision(e, t) {
710
- return A(await this.request(`/v1/projects/${Z(e)}/revisions/${Z(t)}`));
673
+ return A(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}`));
711
674
  }
712
- async listFlows(e) {
713
- return I(await this.request(`/v1/projects/${Z(e)}/flows`));
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);
714
678
  }
715
- async listConnectorProviders(e, t) {
716
- let n = a(await this.request(`/v1/projects/${Z(e)}/connector/providers`, { signal: t }));
717
- return s(n, [
718
- "projectId",
719
- "providers",
720
- "version"
721
- ]), 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);
722
681
  }
723
- async listConnectorActions(e, t, n) {
724
- return await this.connectorActions(e, t == null ? {} : { service: t }, n);
682
+ async searchConnectorActions(e, t) {
683
+ return await this.connectorActions({ q: e.trim() }, t);
725
684
  }
726
- async searchConnectorActions(e, t, n) {
727
- return await this.connectorActions(e, { q: t.trim() }, n);
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();
728
688
  }
729
- async getConnectorAction(e, t, n) {
730
- let r = a(await this.request(`/v1/projects/${Z(e)}/connector/actions/${Z(t)}`, { signal: n }));
731
- return s(r, [
732
- "action",
733
- "projectId",
734
- "version"
735
- ]), r.version != 1 || o(r.projectId) != e ? i() : m(r.action);
736
- }
737
- async listConnectorConnections(e, t, n) {
738
- let r = a(await this.request(`/v1/projects/${Z(e)}/connector/connections/${Z(t)}`, { signal: n }));
739
- 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, [
740
692
  "connections",
741
- "projectId",
742
693
  "serviceId",
743
694
  "version"
744
- ]), r.version != 1 || o(r.projectId) != e || o(r.serviceId) != t || !Array.isArray(r.connections) ? i() : r.connections.map(u);
695
+ ]), n.version != 1 || o(n.serviceId) != e || !Array.isArray(n.connections) ? i() : n.connections.map(u);
745
696
  }
746
- async createConnectorConnectionPage(e, t) {
747
- let n = a(await this.request(`/v1/projects/${Z(e)}/connector/connections/${Z(t)}/page`, {
697
+ async createConnectorConnectionPage(e) {
698
+ let t = a(await this.request(`/v1/connector/connections/${J(e)}/page`, {
748
699
  body: JSON.stringify({ version: 1 }),
749
700
  method: "POST"
750
701
  }));
751
- if (s(n, ["url", "version"]), n.version != 1) return i();
702
+ if (s(t, ["url", "version"]), t.version != 1) return i();
752
703
  try {
753
- let e = new URL(o(n.url));
704
+ let e = new URL(o(t.url));
754
705
  return e.protocol != "http:" && e.protocol != "https:" ? i() : e.href;
755
706
  } catch {
756
707
  return i();
757
708
  }
758
709
  }
759
710
  async changeDraft(e, t, n) {
760
- return M(await this.request(`/v1/projects/${Z(e)}/draft/changes`, {
711
+ return j(await this.request(`/v1/flows/${J(e)}/draft/changes`, {
761
712
  body: JSON.stringify({
762
713
  expectedRevisionId: t,
763
714
  operations: n,
@@ -766,8 +717,8 @@ var $ = class {
766
717
  method: "POST"
767
718
  }));
768
719
  }
769
- async checkFlow(e, t, n) {
770
- return R(await this.request(`/v1/projects/${Z(e)}/revisions/${Z(t)}/flows/${Z(n)}/check`, {
720
+ async checkFlow(e, t) {
721
+ return F(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}/check`, {
771
722
  body: JSON.stringify({
772
723
  engineContract: "open-flow-engine/v1",
773
724
  version: 1
@@ -775,91 +726,87 @@ var $ = class {
775
726
  method: "POST"
776
727
  }));
777
728
  }
778
- async getLive(e, t) {
779
- return z(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/live`));
729
+ async getLive(e) {
730
+ return I(await this.request(`/v1/flows/${J(e)}/live`));
780
731
  }
781
- async listPublications(e, t, n = {}) {
782
- let r = new URLSearchParams();
783
- n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit)), n.includeTotal != null && r.set("includeTotal", String(n.includeTotal));
784
- let i = r.size == 0 ? "" : `?${r}`;
785
- return B(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/publications${i}`));
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}`));
786
737
  }
787
- async createDraftRun(e, t, n, r = {}) {
788
- let a = W(await this.request(`/v1/projects/${Z(e)}/revisions/${Z(t)}/flows/${Z(n)}/runs`, {
738
+ async createDraftRun(e, t, n = {}) {
739
+ let r = V(await this.request(`/v1/flows/${J(e)}/revisions/${J(t)}/runs`, {
789
740
  body: JSON.stringify({
790
741
  engineContract: "open-flow-engine/v1",
791
- inputs: r.inputs ?? {},
742
+ inputs: n.inputs ?? {},
792
743
  version: 1
793
744
  }),
794
- headers: { "idempotency-key": r.idempotencyKey ?? Q("run") },
745
+ headers: { "idempotency-key": n.idempotencyKey ?? Y("run") },
795
746
  method: "POST"
796
747
  }));
797
- return a.source == "draft" ? a : i();
748
+ return r.source == "draft" ? r : i();
798
749
  }
799
750
  async createLiveRun(e, t = {}) {
800
- let n = W(await this.request("/v1/runs", {
751
+ let n = V(await this.request("/v1/runs", {
801
752
  body: JSON.stringify({
802
753
  inputs: t.inputs ?? {},
803
754
  publicationId: e,
804
755
  version: 1
805
756
  }),
806
- headers: { "idempotency-key": t.idempotencyKey ?? Q("run") },
757
+ headers: { "idempotency-key": t.idempotencyKey ?? Y("run") },
807
758
  method: "POST"
808
759
  }));
809
760
  return n.source == "live" ? n : i();
810
761
  }
811
- async publishFlow(e, t, n, r, i = {}) {
812
- return P(await this.request(`/v1/projects/${Z(e)}/revisions/${Z(t)}/flows/${Z(n)}/publications`, {
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: r,
766
+ expectedLivePublicationId: n,
816
767
  version: 1
817
768
  }),
818
- headers: { "idempotency-key": i.idempotencyKey ?? Q("publication") },
769
+ headers: { "idempotency-key": r.idempotencyKey ?? Y("publication") },
819
770
  method: "POST"
820
771
  }));
821
772
  }
822
- async rollbackFlow(e, t, n, r, i = {}) {
823
- return P(await this.request(`/v1/projects/${Z(e)}/flows/${Z(t)}/publications/${Z(n)}/rollback`, {
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: r,
776
+ expectedLivePublicationId: n,
826
777
  version: 1
827
778
  }),
828
- headers: { "idempotency-key": i.idempotencyKey ?? Q("publication") },
779
+ headers: { "idempotency-key": r.idempotencyKey ?? Y("publication") },
829
780
  method: "POST"
830
781
  }));
831
782
  }
832
783
  async getRun(e) {
833
- return W(await this.request(`/v1/runs/${Z(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.flowId != null && n.set("flowId", t.flowId), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status);
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 G(await this.request(`/v1/projects/${Z(e)}/runs${r}`));
790
+ return H(await this.request(`/v1/flows/${J(e)}/runs${r}`));
840
791
  }
841
792
  async getRunEvents(e, t = {}) {
842
793
  let n = new URLSearchParams();
843
794
  t.after != null && n.set("after", String(t.after)), t.limit != null && n.set("limit", String(t.limit));
844
795
  let r = n.size == 0 ? "" : `?${n}`;
845
- return J(await this.request(`/v1/runs/${Z(e)}/events${r}`));
796
+ return G(await this.request(`/v1/runs/${J(e)}/events${r}`));
846
797
  }
847
798
  async getRunResult(e) {
848
- return X(await this.request(`/v1/runs/${Z(e)}/result`));
799
+ return q(await this.request(`/v1/runs/${J(e)}/result`));
849
800
  }
850
801
  async cancelRun(e) {
851
- return Y(await this.request(`/v1/runs/${Z(e)}/cancel`, {
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, n) {
857
- let r = Object.entries(t).map(([e, t]) => `${Z(e)}=${Z(t)}`).join("&"), c = r == "" ? "" : `?${r}`, l = a(await this.request(`/v1/projects/${Z(e)}/connector/actions${c}`, { signal: n }));
858
- return s(l, [
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, $ as ControlClient, e as controlErrorCode, t as controlErrorMetadata };
831
+ export { r as ApiError, X as ControlClient, e as controlErrorCode, t as controlErrorMetadata };
@@ -1,4 +1,4 @@
1
- import type { JsonValue, TriggerSchedule } from '../browser/project-change.js';
1
+ import type { JsonValue, TriggerSchedule } from '../browser/flow-change.js';
2
2
  export declare function validateTriggerSchedule(rules: readonly TriggerSchedule[]): void;
3
3
  export declare function nextTriggerScheduledAt(rules: readonly TriggerSchedule[], afterMs: number): number;
4
4
  export declare function scheduledTriggerOccurrenceId(bindingId: string, runtimeVersion: number, scheduledAt: string): Promise<string>;
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/croner/dist/croner.js
1
+ //#region ../../node_modules/.bun/croner@10.0.1/node_modules/croner/dist/croner.js
2
2
  function e(e) {
3
3
  return Date.UTC(e.y, e.m - 1, e.d, e.h, e.i, e.s);
4
4
  }