@powerhousedao/workflow 6.2.3-dev.88 → 6.2.3-dev.89
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/{BlockSelector-BKAJwJ4Y.js → BlockSelector-DFzzAWXh.js} +65 -7
- package/dist/browser/BlockSelector-DFzzAWXh.js.map +1 -0
- package/dist/browser/{connection-form-DltdMa8F.js → connection-form-B6zpGmAm.js} +3 -3
- package/dist/browser/{connection-form-DltdMa8F.js.map → connection-form-B6zpGmAm.js.map} +1 -1
- package/dist/browser/{data-tree-DAw8e0j8.js → data-tree-DKS0EQys.js} +2 -2
- package/dist/browser/{data-tree-DAw8e0j8.js.map → data-tree-DKS0EQys.js.map} +1 -1
- package/dist/browser/{editor-Dl6lzxkM.js → editor-Yt-_V04R.js} +207 -58
- package/dist/browser/editor-Yt-_V04R.js.map +1 -0
- package/dist/browser/{editor-CZLe6CAF.js → editor-bHCkW_XB.js} +4 -4
- package/dist/browser/{editor-CZLe6CAF.js.map → editor-bHCkW_XB.js.map} +1 -1
- package/dist/browser/{editor--J61vLSC.js → editor-gCkAwv09.js} +64 -132
- package/dist/browser/editor-gCkAwv09.js.map +1 -0
- package/dist/browser/editors/connection-editor/module.js +1 -1
- package/dist/browser/editors/runtime/index.js +1 -1
- package/dist/browser/editors/workflow-editor/module.js +1 -1
- package/dist/browser/editors/workflow-studio/module.js +1 -1
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{runtime-queries-D81Ghpok.js → runtime-queries-C5bqAgQy.js} +84 -13
- package/dist/browser/runtime-queries-C5bqAgQy.js.map +1 -0
- package/dist/browser/{trigger-text-BSVi5oGZ.js → trigger-text-BfIu-QcC.js} +176 -11
- package/dist/browser/trigger-text-BfIu-QcC.js.map +1 -0
- package/dist/node/{BlockSelector-DnTRF-C7.mjs → BlockSelector-Cia1Rpwz.mjs} +64 -6
- package/dist/node/BlockSelector-Cia1Rpwz.mjs.map +1 -0
- package/dist/node/{connection-form-DwSHfIRw.mjs → connection-form-CJFKPwfg.mjs} +3 -3
- package/dist/node/{connection-form-DwSHfIRw.mjs.map → connection-form-CJFKPwfg.mjs.map} +1 -1
- package/dist/node/{data-tree-uSJU9Ost.mjs → data-tree-D9jdFsaX.mjs} +2 -2
- package/dist/node/{data-tree-uSJU9Ost.mjs.map → data-tree-D9jdFsaX.mjs.map} +1 -1
- package/dist/node/{editor-B4ZwM3pR.mjs → editor-CwOjO82y.mjs} +63 -131
- package/dist/node/editor-CwOjO82y.mjs.map +1 -0
- package/dist/node/{editor-_4XHbqGl.mjs → editor-NMRVprgI.mjs} +206 -57
- package/dist/node/editor-NMRVprgI.mjs.map +1 -0
- package/dist/node/{editor-cXi5dIsd.mjs → editor-_c6UDRAN.mjs} +4 -4
- package/dist/node/{editor-cXi5dIsd.mjs.map → editor-_c6UDRAN.mjs.map} +1 -1
- package/dist/node/editors/connection-editor/module.mjs +1 -1
- package/dist/node/editors/runtime/index.mjs +1 -1
- package/dist/node/editors/workflow-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-studio/module.mjs +1 -1
- package/dist/node/index.mjs +2 -1
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/pieces/ai/descriptor.json +70 -1
- package/dist/node/pieces/ai/index.mjs +125 -125
- package/dist/node/pieces/ai/package.json +1 -1
- package/dist/node/pieces/reactor/descriptor.json +35 -1
- package/dist/node/pieces/reactor/index.mjs +39 -39
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/{runtime-queries-VXJsWno5.mjs → runtime-queries-Ck5OoWdy.mjs} +137 -12
- package/dist/node/runtime-queries-Ck5OoWdy.mjs.map +1 -0
- package/dist/node/{trigger-text-BBP7QVLj.mjs → trigger-text-T2D0a2Br.mjs} +175 -10
- package/dist/node/trigger-text-T2D0a2Br.mjs.map +1 -0
- package/dist/powerhouse.manifest.json +2 -2
- package/dist/style.css +1 -1
- package/dist/types/ai/workflow-tools.d.ts.map +1 -1
- package/dist/types/editors/shared/icons.d.ts +4 -0
- package/dist/types/editors/shared/icons.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-client.d.ts +5 -1
- package/dist/types/editors/workflow-editor/runtime-client.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts +4 -0
- package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/block-meta.d.ts +3 -0
- package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/flow-control.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/flow-control.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/prop-layout.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/prop-layout.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/prop-layout.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/prop-layout.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/use-validity.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/validation.d.ts +4 -1
- package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +4 -1
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/Waitpoints.d.ts +9 -1
- package/dist/types/editors/workflow-studio/components/Waitpoints.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowGraph.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/graph-layout.d.ts +1 -0
- package/dist/types/editors/workflow-studio/components/graph-layout.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/tips.d.ts.map +1 -1
- package/dist/types/pieces/ai/lib/actions/decide-on-documents.d.ts.map +1 -1
- package/dist/types/pieces/ai/lib/actions/extract.d.ts.map +1 -1
- package/dist/types/pieces/ai/lib/actions/propose-actions.d.ts.map +1 -1
- package/dist/types/pieces/ai/lib/actions/summarize.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-find.d.ts.map +1 -1
- package/dist/types/test/ui/flow-control.spec.d.ts +2 -0
- package/dist/types/test/ui/flow-control.spec.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/browser/BlockSelector-BKAJwJ4Y.js.map +0 -1
- package/dist/browser/editor--J61vLSC.js.map +0 -1
- package/dist/browser/editor-Dl6lzxkM.js.map +0 -1
- package/dist/browser/runtime-queries-D81Ghpok.js.map +0 -1
- package/dist/browser/trigger-text-BSVi5oGZ.js.map +0 -1
- package/dist/node/BlockSelector-DnTRF-C7.mjs.map +0 -1
- package/dist/node/editor-B4ZwM3pR.mjs.map +0 -1
- package/dist/node/editor-_4XHbqGl.mjs.map +0 -1
- package/dist/node/runtime-queries-VXJsWno5.mjs.map +0 -1
- package/dist/node/trigger-text-BBP7QVLj.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/piece-reactor",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.89",
|
|
4
4
|
"description": "Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state, schemas and indexes, and fire on document events.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -103,13 +103,64 @@ const BRANCH_PORTS = [
|
|
|
103
103
|
ERROR_PORT
|
|
104
104
|
];
|
|
105
105
|
const STOP_PORTS = [ERROR_PORT];
|
|
106
|
+
const OTHERWISE_PORT = "otherwise";
|
|
107
|
+
const LOOP_PORTS = [
|
|
108
|
+
NEXT_PORT,
|
|
109
|
+
"each",
|
|
110
|
+
ERROR_PORT
|
|
111
|
+
];
|
|
112
|
+
function isCoreAction(block, name) {
|
|
113
|
+
return block.kind === "action" && block.pieceName === "@powerhousedao/piece-core" && block.name === name;
|
|
114
|
+
}
|
|
115
|
+
function routerBranchPort(index) {
|
|
116
|
+
return `branch_${index}`;
|
|
117
|
+
}
|
|
118
|
+
function routerBranches(config) {
|
|
119
|
+
const branches = config !== null && typeof config === "object" ? config.branches : void 0;
|
|
120
|
+
if (!Array.isArray(branches)) return [];
|
|
121
|
+
return branches.map((branch) => branch !== null && typeof branch === "object" ? branch : {});
|
|
122
|
+
}
|
|
123
|
+
function routerBranchName(branch, index) {
|
|
124
|
+
return (typeof branch.name === "string" ? branch.name.trim() : "") || `Branch ${index}`;
|
|
125
|
+
}
|
|
126
|
+
const BRANCH_PORT = /^branch_[1-9]\d*$/;
|
|
127
|
+
function routerPorts(config, wired = []) {
|
|
128
|
+
const branches = config !== null && typeof config === "object" ? config.branches : void 0;
|
|
129
|
+
const dynamic = branches !== void 0 && branches !== null && !Array.isArray(branches);
|
|
130
|
+
return [
|
|
131
|
+
...routerBranches(config).map((_, i) => routerBranchPort(i + 1)),
|
|
132
|
+
...dynamic ? [...new Set(wired)].filter((port) => BRANCH_PORT.test(port)) : [],
|
|
133
|
+
OTHERWISE_PORT,
|
|
134
|
+
ERROR_PORT
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
function stepPortLabel(block, config, port) {
|
|
138
|
+
if (isCoreAction(block, "router")) {
|
|
139
|
+
if (port === "otherwise") return "Otherwise";
|
|
140
|
+
const match = /^branch_(\d+)$/.exec(port);
|
|
141
|
+
const branches = routerBranches(config);
|
|
142
|
+
const index = match ? Number(match[1]) : 0;
|
|
143
|
+
if (index >= 1 && index <= branches.length) return routerBranchName(branches[index - 1], index);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (isCoreAction(block, "loop")) {
|
|
147
|
+
if (port === "each") return "For each item";
|
|
148
|
+
if (port === "next") return "After loop";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
106
151
|
function knownPorts(block) {
|
|
107
152
|
if (block.kind === "trigger") return TRIGGER_PORTS;
|
|
108
153
|
if (block.pieceName !== "@powerhousedao/piece-core") return PIECE_ACTION_PORTS;
|
|
109
154
|
if (block.name === "branch") return BRANCH_PORTS;
|
|
110
155
|
if (block.name === "stop") return STOP_PORTS;
|
|
156
|
+
if (block.name === "loop") return LOOP_PORTS;
|
|
157
|
+
if (block.name === "router") return routerPorts(void 0);
|
|
111
158
|
return PIECE_ACTION_PORTS;
|
|
112
159
|
}
|
|
160
|
+
function stepPorts(block, config, portsOf = knownPorts, wired) {
|
|
161
|
+
if (isCoreAction(block, "router")) return routerPorts(config, wired);
|
|
162
|
+
return portsOf(block);
|
|
163
|
+
}
|
|
113
164
|
const DOCUMENT_REF_KEY = "$documentRef";
|
|
114
165
|
const MAX_DEPTH = 64;
|
|
115
166
|
function isPlainObject$1(value) {
|
|
@@ -310,6 +361,9 @@ function coerceManualPayload(inputs, payload) {
|
|
|
310
361
|
if (errors.length > 0) throw new ManualPayloadError(errors);
|
|
311
362
|
return next;
|
|
312
363
|
}
|
|
364
|
+
const SUBFLOWS_PIECE = "@activepieces/piece-subflows";
|
|
365
|
+
const CALLABLE_FLOW_TRIGGER$1 = "callableFlow";
|
|
366
|
+
const CALL_FLOW_ACTION = "callFlow";
|
|
313
367
|
//#endregion
|
|
314
368
|
//#region editors/workflow-editor/ui/blocks.ts
|
|
315
369
|
const CORE_PIECE = CORE_PIECE_NAME;
|
|
@@ -323,11 +377,23 @@ const MANUAL_TRIGGER = core("trigger", "manual");
|
|
|
323
377
|
const SCHEDULE_TRIGGER = core("trigger", "schedule");
|
|
324
378
|
const WEBHOOK_TRIGGER = core("trigger", "webhook");
|
|
325
379
|
const BRANCH_BLOCK = core("action", "branch");
|
|
380
|
+
const ROUTER_BLOCK = core("action", "router");
|
|
381
|
+
const LOOP_BLOCK = core("action", "loop");
|
|
326
382
|
const ASSERT_BLOCK = core("action", "assert");
|
|
327
383
|
const DELAY_BLOCK = core("action", "delay");
|
|
328
384
|
const APPROVAL_BLOCK = core("action", "approval");
|
|
329
385
|
const STOP_BLOCK = core("action", "stop");
|
|
330
386
|
const WAIT_FOR_WEBHOOK_BLOCK = core("action", "waitForWebhook");
|
|
387
|
+
const SUBFLOWS_VERSION = "0.7.0";
|
|
388
|
+
const subflows = (kind, name) => ({
|
|
389
|
+
pieceName: SUBFLOWS_PIECE,
|
|
390
|
+
pieceVersion: SUBFLOWS_VERSION,
|
|
391
|
+
kind,
|
|
392
|
+
name
|
|
393
|
+
});
|
|
394
|
+
const CALLABLE_FLOW_TRIGGER = subflows("trigger", CALLABLE_FLOW_TRIGGER$1);
|
|
395
|
+
const CALL_FLOW_BLOCK = subflows("action", CALL_FLOW_ACTION);
|
|
396
|
+
const RETURN_RESPONSE_BLOCK = subflows("action", "returnResponse");
|
|
331
397
|
function sameBlock(a, b) {
|
|
332
398
|
return Boolean(a && b && blockKey(a) === blockKey(b));
|
|
333
399
|
}
|
|
@@ -412,6 +478,16 @@ const TRIGGER_PRESETS = [
|
|
|
412
478
|
responseMode: "async"
|
|
413
479
|
}
|
|
414
480
|
},
|
|
481
|
+
{
|
|
482
|
+
label: "Callable workflow",
|
|
483
|
+
block: CALLABLE_FLOW_TRIGGER,
|
|
484
|
+
group: "core",
|
|
485
|
+
description: "Fires when another workflow in this drive calls it.",
|
|
486
|
+
defaultConfig: {
|
|
487
|
+
mode: "simple",
|
|
488
|
+
exampleData: { sampleData: {} }
|
|
489
|
+
}
|
|
490
|
+
},
|
|
415
491
|
{
|
|
416
492
|
label: "Document event",
|
|
417
493
|
block: reactor("trigger", "document-event"),
|
|
@@ -442,6 +518,20 @@ const STEP_PRESETS = [
|
|
|
442
518
|
description: "Routes true/false on a condition.",
|
|
443
519
|
defaultConfig: {}
|
|
444
520
|
},
|
|
521
|
+
{
|
|
522
|
+
label: "Router",
|
|
523
|
+
block: ROUTER_BLOCK,
|
|
524
|
+
group: "core",
|
|
525
|
+
description: "Takes the first of several branches whose condition holds.",
|
|
526
|
+
defaultConfig: { branches: [{ operator: "TEXT_EXACTLY_MATCHES" }] }
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
label: "Loop on items",
|
|
530
|
+
block: LOOP_BLOCK,
|
|
531
|
+
group: "core",
|
|
532
|
+
description: "Runs the steps inside it once for each item of a list.",
|
|
533
|
+
defaultConfig: { items: "" }
|
|
534
|
+
},
|
|
445
535
|
{
|
|
446
536
|
label: "Assert",
|
|
447
537
|
block: ASSERT_BLOCK,
|
|
@@ -492,6 +582,26 @@ const STEP_PRESETS = [
|
|
|
492
582
|
description: "Ends the run successfully, optionally answering the caller.",
|
|
493
583
|
defaultConfig: { responseType: "json" }
|
|
494
584
|
},
|
|
585
|
+
{
|
|
586
|
+
label: "Call workflow",
|
|
587
|
+
block: CALL_FLOW_BLOCK,
|
|
588
|
+
group: "core",
|
|
589
|
+
description: "Runs a callable workflow in this drive, optionally waiting for its response.",
|
|
590
|
+
defaultConfig: {
|
|
591
|
+
mode: "simple",
|
|
592
|
+
waitForResponse: false
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
label: "Return response",
|
|
597
|
+
block: RETURN_RESPONSE_BLOCK,
|
|
598
|
+
group: "core",
|
|
599
|
+
description: "Answers the workflow that called this one.",
|
|
600
|
+
defaultConfig: {
|
|
601
|
+
mode: "simple",
|
|
602
|
+
response: { response: {} }
|
|
603
|
+
}
|
|
604
|
+
},
|
|
495
605
|
{
|
|
496
606
|
label: "Create document",
|
|
497
607
|
block: reactor("action", "document-create"),
|
|
@@ -821,10 +931,19 @@ const WAITPOINT_FIELDS = `id runId workflowId stepId stepKey stepPath pieceName
|
|
|
821
931
|
approval { title body approveLabel rejectLabel reasonRequiredOn approvers }`;
|
|
822
932
|
const RUN_ROW_FIELDS = `id workflowId workflowName workflowVersion triggerKind
|
|
823
933
|
triggerPayload status error errorName startedAt endedAt rerunOf warningNotes`;
|
|
824
|
-
const STEP_ROW_FIELDS = "stepId stepKey pieceName blockName status port error errorName startedAt endedAt";
|
|
934
|
+
const STEP_ROW_FIELDS = "stepId stepKey path pieceName blockName status port error errorName startedAt endedAt";
|
|
935
|
+
function withIterations(run) {
|
|
936
|
+
const iterations = run.steps.filter((step) => step.path);
|
|
937
|
+
if (iterations.length === 0) return run;
|
|
938
|
+
return {
|
|
939
|
+
...run,
|
|
940
|
+
steps: run.steps.filter((step) => !step.path),
|
|
941
|
+
iterations
|
|
942
|
+
};
|
|
943
|
+
}
|
|
825
944
|
const RUN_FIELDS = `${RUN_ROW_FIELDS} steps { ${STEP_ROW_FIELDS} input output }`;
|
|
826
945
|
const RUN_LIST_FIELDS = `${RUN_ROW_FIELDS} steps { ${STEP_ROW_FIELDS} }`;
|
|
827
|
-
const RUN_DETAIL_FIELDS = `${RUN_FIELDS} waitpoints { ${WAITPOINT_FIELDS} }`;
|
|
946
|
+
const RUN_DETAIL_FIELDS = `${RUN_FIELDS} iterationsTotal waitpoints { ${WAITPOINT_FIELDS} }`;
|
|
828
947
|
function scopeVariables(scope, limit) {
|
|
829
948
|
return {
|
|
830
949
|
workflowId: scope.workflowId ?? null,
|
|
@@ -836,11 +955,11 @@ function scopeVariables(scope, limit) {
|
|
|
836
955
|
async function fetchRuns(t, scope = {}) {
|
|
837
956
|
return (await t.gql(`query Runs($workflowId: String, $driveId: String, $limit: Int, $excludeTriggerKinds: [String!]) {
|
|
838
957
|
workflowRuntime { runs(workflowId: $workflowId, driveId: $driveId, limit: $limit, excludeTriggerKinds: $excludeTriggerKinds) { ${RUN_FIELDS} } }
|
|
839
|
-
}`, scopeVariables(scope, 30))).workflowRuntime.runs;
|
|
958
|
+
}`, scopeVariables(scope, 30))).workflowRuntime.runs.map(withIterations);
|
|
840
959
|
}
|
|
841
960
|
async function fetchRunsPage(t, scope = {}, cursor = null) {
|
|
842
961
|
const { limit, ...rest } = scopeVariables(scope, 30);
|
|
843
|
-
|
|
962
|
+
const page = (await t.gql(`query RunsPage($workflowId: String, $driveId: String, $excludeTriggerKinds: [String!], $paging: WorkflowRunsPagingInput) {
|
|
844
963
|
workflowRuntime {
|
|
845
964
|
runsPage(workflowId: $workflowId, driveId: $driveId, excludeTriggerKinds: $excludeTriggerKinds, paging: $paging) {
|
|
846
965
|
items { ${RUN_LIST_FIELDS} } hasNextPage cursor
|
|
@@ -853,9 +972,14 @@ async function fetchRunsPage(t, scope = {}, cursor = null) {
|
|
|
853
972
|
cursor
|
|
854
973
|
}
|
|
855
974
|
})).workflowRuntime.runsPage;
|
|
975
|
+
return {
|
|
976
|
+
...page,
|
|
977
|
+
items: page.items.map(withIterations)
|
|
978
|
+
};
|
|
856
979
|
}
|
|
857
980
|
async function fetchRun(t, runId) {
|
|
858
|
-
|
|
981
|
+
const run = (await t.gql(`query Run($id: String!) { workflowRuntime { run(id: $id) { ${RUN_DETAIL_FIELDS} } } }`, { id: runId })).workflowRuntime.run;
|
|
982
|
+
return run ? withIterations(run) : null;
|
|
859
983
|
}
|
|
860
984
|
async function fetchWaitingRuns(t, scope = {}) {
|
|
861
985
|
return (await t.gql(`query WaitingRuns($driveId: String, $workflowId: String, $first: Int) {
|
|
@@ -868,7 +992,7 @@ async function fetchWaitingRuns(t, scope = {}) {
|
|
|
868
992
|
driveId: scope.driveId ?? null,
|
|
869
993
|
workflowId: scope.workflowId ?? null,
|
|
870
994
|
first: scope.first ?? null
|
|
871
|
-
})).workflowRuntime.waitingRuns;
|
|
995
|
+
})).workflowRuntime.waitingRuns.map(withIterations);
|
|
872
996
|
}
|
|
873
997
|
async function resolveWaitpoint(t, waitpointId, approved, reason) {
|
|
874
998
|
return (await t.gql(`mutation ResolveWaitpoint($waitpointId: String!, $approved: Boolean!, $reason: String) {
|
|
@@ -901,16 +1025,17 @@ async function cancelRun(t, runId) {
|
|
|
901
1025
|
workflowRuntime { cancelRun(runId: $runId) { runId status error } }
|
|
902
1026
|
}`, { runId })).workflowRuntime.cancelRun;
|
|
903
1027
|
}
|
|
904
|
-
async function loadBlockOptions(t, block, propName, input, connectionId, searchValue, reactorConnectionId) {
|
|
905
|
-
return (await t.gql(`query Options($block: BlockInput!, $propName: String!, $input: Unknown, $connectionId: String, $searchValue: String, $reactorConnectionId: String) {
|
|
906
|
-
workflowRuntime { blockOptions(block: $block, propName: $propName, input: $input, connectionId: $connectionId, searchValue: $searchValue, reactorConnectionId: $reactorConnectionId) }
|
|
1028
|
+
async function loadBlockOptions(t, block, propName, input, connectionId, searchValue, reactorConnectionId, workflowId) {
|
|
1029
|
+
return (await t.gql(`query Options($block: BlockInput!, $propName: String!, $input: Unknown, $connectionId: String, $searchValue: String, $reactorConnectionId: String, $workflowId: String) {
|
|
1030
|
+
workflowRuntime { blockOptions(block: $block, propName: $propName, input: $input, connectionId: $connectionId, searchValue: $searchValue, reactorConnectionId: $reactorConnectionId, workflowId: $workflowId) }
|
|
907
1031
|
}`, {
|
|
908
1032
|
block: blockInput(block),
|
|
909
1033
|
propName,
|
|
910
1034
|
input,
|
|
911
1035
|
connectionId: connectionId ?? null,
|
|
912
1036
|
searchValue: searchValue ?? null,
|
|
913
|
-
reactorConnectionId: reactorConnectionId ?? null
|
|
1037
|
+
reactorConnectionId: reactorConnectionId ?? null,
|
|
1038
|
+
workflowId: workflowId ?? null
|
|
914
1039
|
})).workflowRuntime.blockOptions;
|
|
915
1040
|
}
|
|
916
1041
|
const operations = {
|
|
@@ -2886,6 +3011,6 @@ const secretStatQuery = (client, ref) => queryOptions({
|
|
|
2886
3011
|
staleTime: 0
|
|
2887
3012
|
});
|
|
2888
3013
|
//#endregion
|
|
2889
|
-
export {
|
|
3014
|
+
export { CALL_FLOW_BLOCK as $, isValidTimeout as A, isDocumentRefMarker as At, timeoutManager as B, hasPreviousPage as C, NEXT_PORT as Ct, pendingThenable as D, documentRefsIn as Dt, notifyManager as E, coerceManualPayload as Et, resolveEnabled as F, scheduleConfigIssue as Ft, fetchRun as G, DEFAULT_RUNTIME_URL as H, resolveStaleTime as I, stepPortLabel as It, isSyncingError as J, fetchRuns as K, shallowEqualObjects as L, stepPorts as Lt, noop as M, manualDefault as Mt, replaceData as N, parseManualInputs as Nt, focusManager as O, expandDocumentRefs as Ot, replaceEqualDeep as P, parseScheduleConfig as Pt, CALLABLE_FLOW_TRIGGER as Q, shouldThrowError as R, hasNextPage as S, ManualPayloadError as St, fetchState as T, checkTriggerStrategy as Tt, RuntimeRequestError as U, Subscribable as V, createRuntimeClient as W, ASSERT_BLOCK as X, APPROVAL_BLOCK as Y, BRANCH_BLOCK as Z, queryKind as _, stepFields as _t, pieceActionsQuery as a, RETURN_RESPONSE_BLOCK as at, realRuns as b, CORE_PIECE_NAME as bt, runQuery as c, STEP_PRESETS as ct, secretStatQuery as d, WAIT_FOR_WEBHOOK_BLOCK as dt, CORE_PIECE as et, stepOutputTreeQuery as f, WEBHOOK_TRIGGER as ft, blockRefKey as g, stepBlock as gt, SHARED_STALE_MS as h, sameBlock as ht, outputTreeQuery as i, REACTOR_PIECE as it, keepPreviousData as j, knownPorts as jt, isServer as k, flowPorts as kt, runsOfPages as l, STOP_BLOCK as lt, RESOLVER_STALE_MS as m, pinBlock as mt, catalogQuery as n, LOOP_BLOCK as nt, pieceTriggersQuery as o, ROUTER_BLOCK as ot, waitingRunsQuery as p, isCoreBlock as pt, fetchRunsPage as q, createRuntimeQueryClient as r, MANUAL_TRIGGER as rt, runPagesQuery as s, SCHEDULE_TRIGGER as st, blockFormQuery as t, DELAY_BLOCK as tt, runsQuery as u, TRIGGER_PRESETS as ut, runtimeKeys as v, triggerBlock as vt, infiniteQueryBehavior as w, SUBFLOWS_PIECE as wt, QueryClient as x, DOCUMENT_REF_KEY as xt, TEST_TRIGGER_KIND as y, triggerFields as yt, timeUntilStale as z };
|
|
2890
3015
|
|
|
2891
|
-
//# sourceMappingURL=runtime-queries-
|
|
3016
|
+
//# sourceMappingURL=runtime-queries-Ck5OoWdy.mjs.map
|