@powerhousedao/workflow 6.2.3-dev.29 → 6.2.3-dev.31
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 +8 -8
- package/dist/browser/BlockSelector-BHJQOhie.js +3051 -0
- package/dist/browser/BlockSelector-BHJQOhie.js.map +1 -0
- package/dist/browser/{connection-form-D-NETdDQ.js → connection-form-CaduwBiu.js} +349 -50
- package/dist/browser/connection-form-CaduwBiu.js.map +1 -0
- package/dist/browser/{data-tree-DA4sc7B7.js → data-tree-8219PVfh.js} +2 -2
- package/dist/browser/{data-tree-DA4sc7B7.js.map → data-tree-8219PVfh.js.map} +1 -1
- package/dist/browser/document-models/index.js +2 -2
- package/dist/browser/document-models/workflow/index.js +3 -3
- package/dist/browser/{document-models-BohsduV4.js → document-models-C1ZgIZyV.js} +7 -2
- package/dist/browser/{document-models-BohsduV4.js.map → document-models-C1ZgIZyV.js.map} +1 -1
- package/dist/browser/{editor-B6N0PCuZ.js → editor-BHV1MZS8.js} +2437 -6283
- package/dist/browser/editor-BHV1MZS8.js.map +1 -0
- package/dist/{node/editor-StBssjcQ.mjs → browser/editor-C0C1eB0R.js} +385 -119
- package/dist/browser/editor-C0C1eB0R.js.map +1 -0
- package/dist/browser/{editor-BkdwuOC-.js → editor-CFcXlZY2.js} +14 -24
- package/dist/browser/editor-CFcXlZY2.js.map +1 -0
- package/dist/browser/editors/connection-editor/module.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 +97 -43
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{module-Bkms70LV.js → module-DU2vb3FH.js} +574 -94
- package/dist/browser/module-DU2vb3FH.js.map +1 -0
- package/dist/browser/{piece-auth-Z4mZEOtL.js → piece-auth-BS5CtQOG.js} +45 -12
- package/dist/browser/piece-auth-BS5CtQOG.js.map +1 -0
- package/dist/browser/reactor/index.js +2 -2
- package/dist/browser/runtime-queries-Ds2kk-Ow.js +2535 -0
- package/dist/browser/runtime-queries-Ds2kk-Ow.js.map +1 -0
- package/dist/browser/trigger-text-BkcklsMX.js +5569 -0
- package/dist/browser/trigger-text-BkcklsMX.js.map +1 -0
- package/dist/browser/{upgrade-manifests-BLrv3cf2.js → upgrade-manifests-BpakVE9l.js} +2 -2
- package/dist/browser/{upgrade-manifests-BLrv3cf2.js.map → upgrade-manifests-BpakVE9l.js.map} +1 -1
- package/dist/browser/{workflow-CGtVlhr8.js → workflow-BxShRhVy.js} +3 -2
- package/dist/browser/workflow-BxShRhVy.js.map +1 -0
- package/dist/node/BlockSelector-lOcIiaqt.mjs +3055 -0
- package/dist/node/BlockSelector-lOcIiaqt.mjs.map +1 -0
- package/dist/node/{connection-form-C9vbfSnA.mjs → connection-form-DWt29kft.mjs} +349 -50
- package/dist/node/connection-form-DWt29kft.mjs.map +1 -0
- package/dist/node/{data-tree-CbqpF3lC.mjs → data-tree-Cdx85Y19.mjs} +2 -2
- package/dist/node/{data-tree-CbqpF3lC.mjs.map → data-tree-Cdx85Y19.mjs.map} +1 -1
- package/dist/node/document-models/index.mjs +2 -2
- package/dist/node/document-models/workflow/index.mjs +3 -3
- package/dist/{browser/editor-CZ5NvCyv.js → node/editor-CR823u-y.mjs} +385 -119
- package/dist/node/editor-CR823u-y.mjs.map +1 -0
- package/dist/node/{editor-DP36YDk5.mjs → editor-CwX-G2Jv.mjs} +2437 -7479
- package/dist/node/editor-CwX-G2Jv.mjs.map +1 -0
- package/dist/node/{editor-By9BHI8e.mjs → editor-D_t8OtZn.mjs} +14 -24
- package/dist/node/editor-D_t8OtZn.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.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 +102 -43
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-DuxxhgKs.mjs → module-Dhe5E-VA.mjs} +574 -94
- package/dist/node/module-Dhe5E-VA.mjs.map +1 -0
- package/dist/node/{piece-auth-Z4mZEOtL.mjs → piece-auth-BS5CtQOG.mjs} +45 -12
- package/dist/node/piece-auth-BS5CtQOG.mjs.map +1 -0
- package/dist/node/pieces/index.mjs +0 -1
- package/dist/node/pieces/index.mjs.map +1 -1
- package/dist/node/pieces/reactor/descriptor.json +85 -3
- package/dist/node/pieces/reactor/index.mjs +14843 -163
- package/dist/node/pieces/reactor/index.mjs.map +1 -1
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/runtime-queries-D5EGaCrH.mjs +2544 -0
- package/dist/node/runtime-queries-D5EGaCrH.mjs.map +1 -0
- package/dist/node/trigger-text-DJIAQBWg.mjs +6765 -0
- package/dist/node/trigger-text-DJIAQBWg.mjs.map +1 -0
- package/dist/node/{upgrade-manifests-C1sl_M-H.mjs → upgrade-manifests-CmNd742Y.mjs} +2 -2
- package/dist/node/{upgrade-manifests-C1sl_M-H.mjs.map → upgrade-manifests-CmNd742Y.mjs.map} +1 -1
- package/dist/node/{workflow-C-uuQPnf.mjs → workflow-CGzYGZnr.mjs} +3 -2
- package/dist/node/workflow-CGzYGZnr.mjs.map +1 -0
- package/dist/powerhouse.manifest.json +6 -1
- package/dist/style.css +151 -19
- package/dist/types/ai/tools.d.ts +3 -1
- package/dist/types/ai/tools.d.ts.map +1 -1
- package/dist/types/ai/workflow-tools.d.ts.map +1 -1
- package/dist/types/document-models/document-models.d.ts +3 -0
- package/dist/types/document-models/document-models.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/actions.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/actions.d.ts +3 -1
- package/dist/types/document-models/workflow/v1/gen/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/creators.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/gen/creators.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/document-model.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/index.d.ts +1 -0
- package/dist/types/document-models/workflow/v1/gen/index.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/publishing/actions.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/creators.d.ts +5 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/error.d.ts +14 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/operations.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/publishing/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/reducer.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts +6 -2
- package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts +3 -2
- package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts +13 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts +2 -1
- package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts +102 -12
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts +21 -1
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts +26 -1
- package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts +13 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/utils.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts +13 -1
- package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts +13 -1
- package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/module.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/helpers.d.ts +15 -0
- package/dist/types/document-models/workflow/v1/src/helpers.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/edges.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/publishing.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/publishing.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/runtime.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/steps.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/variables.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/workflow.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/tests/block-validation-and-enable.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/block-validation-and-enable.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/config-and-variables.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/config-and-variables.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/draft-and-publish.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/draft-and-publish.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/updated-at.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/updated-at.test.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/UsedBy.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-form.d.ts +2 -1
- package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-usage.d.ts +3 -2
- package/dist/types/editors/connection-editor/connection-usage.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/editor.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/piece-auth.d.ts +7 -1
- package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/status.d.ts +2 -1
- package/dist/types/editors/connection-editor/status.d.ts.map +1 -1
- package/dist/types/editors/shared/controls.d.ts +17 -1
- package/dist/types/editors/shared/controls.d.ts.map +1 -1
- package/dist/types/editors/shared/editor-chrome.d.ts +2 -0
- package/dist/types/editors/shared/editor-chrome.d.ts.map +1 -1
- package/dist/types/editors/shared/icons.d.ts +2 -0
- package/dist/types/editors/shared/icons.d.ts.map +1 -1
- package/dist/types/editors/shared/undo-plan.d.ts +20 -0
- package/dist/types/editors/shared/undo-plan.d.ts.map +1 -0
- package/dist/types/editors/shared/undo-plan.test.d.ts +2 -0
- package/dist/types/editors/shared/undo-plan.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/editor.d.ts +0 -1
- package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/run-kinds.d.ts +5 -0
- package/dist/types/editors/workflow-editor/run-kinds.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-api.d.ts +12 -139
- package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-client.d.ts +260 -0
- package/dist/types/editors/workflow-editor/runtime-client.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-client.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/runtime-client.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-context.d.ts +45 -0
- package/dist/types/editors/workflow-editor/runtime-context.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-persist.d.ts +23 -0
- package/dist/types/editors/workflow-editor/runtime-persist.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-persist.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/runtime-persist.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-queries.d.ts +128 -0
- package/dist/types/editors/workflow-editor/runtime-queries.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts +3 -3
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts +4 -3
- package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts +2 -3
- package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts +6 -5
- package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +7 -1
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts +34 -0
- package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +2 -3
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepTest.d.ts +11 -0
- package/dist/types/editors/workflow-editor/ui/StepTest.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts +0 -1
- package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts +1 -3
- package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts +1 -3
- package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/add-follow-up.d.ts +31 -0
- package/dist/types/editors/workflow-editor/ui/add-follow-up.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/add-follow-up.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/add-follow-up.test.d.ts.map +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 +2 -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 +7 -9
- 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 +10 -5
- package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts +43 -2
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/blocks.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/blocks.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts +4 -2
- package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/connection-create.d.ts +3 -3
- package/dist/types/editors/workflow-editor/ui/connection-create.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/design-time.d.ts +92 -0
- package/dist/types/editors/workflow-editor/ui/design-time.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/design-time.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/design-time.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts +10 -2
- package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/forms.d.ts +35 -6
- package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/model.d.ts +58 -13
- package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts +11 -6
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts +5 -0
- package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/prop-controls.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/prop-controls.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/prop-defaults.d.ts +4 -0
- package/dist/types/editors/workflow-editor/ui/prop-defaults.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/prop-defaults.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/prop-defaults.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/query-keys.d.ts +54 -0
- package/dist/types/editors/workflow-editor/ui/query-keys.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts +3 -8
- package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/secret-ref.d.ts +18 -0
- package/dist/types/editors/workflow-editor/ui/secret-ref.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/step-test.d.ts +14 -0
- package/dist/types/editors/workflow-editor/ui/step-test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/step-test.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/step-test.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/test-state.d.ts +7 -0
- package/dist/types/editors/workflow-editor/ui/test-state.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts +2 -1
- 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 +28 -0
- package/dist/types/editors/workflow-editor/ui/use-validity.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/validation.d.ts +33 -1
- package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/variable-types.d.ts +14 -0
- package/dist/types/editors/workflow-editor/ui/variable-types.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/variable-types.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/variable-types.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/version-badge.d.ts +33 -0
- package/dist/types/editors/workflow-editor/ui/version-badge.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/version-badge.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/version-badge.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/use-runtime-url.d.ts +0 -1
- package/dist/types/editors/workflow-editor/use-runtime-url.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +1 -1
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/RunsView.d.ts +4 -1
- package/dist/types/editors/workflow-studio/components/RunsView.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/Sidebar.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts +2 -1
- package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowMenu.d.ts +13 -0
- package/dist/types/editors/workflow-studio/components/WorkflowMenu.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts +0 -1
- package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/chain.d.ts +5 -3
- package/dist/types/editors/workflow-studio/components/chain.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/run-format.d.ts +11 -2
- package/dist/types/editors/workflow-studio/components/run-format.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/step-outline.d.ts +3 -1
- package/dist/types/editors/workflow-studio/components/step-outline.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/ui.d.ts +2 -0
- package/dist/types/editors/workflow-studio/components/ui.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/useRuns.d.ts +4 -1
- package/dist/types/editors/workflow-studio/components/useRuns.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/editor.d.ts.map +1 -1
- package/dist/types/pieces/index.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/action-list-prop.test.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/actions/action-list-prop.test.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +14 -1
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +14 -1
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/input-props.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/input-schema.d.ts +11 -2
- package/dist/types/pieces/reactor/lib/input-schema.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/parse.d.ts +22 -4
- package/dist/types/pieces/reactor/lib/parse.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/reactor.d.ts +15 -1
- package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
- package/dist/types/scripts/ui-stack.d.ts +53 -11
- package/dist/types/scripts/ui-stack.d.ts.map +1 -1
- package/dist/types/test/ui/block-picker.spec.d.ts +2 -0
- package/dist/types/test/ui/block-picker.spec.d.ts.map +1 -0
- package/dist/types/test/ui/branch.spec.d.ts +2 -0
- package/dist/types/test/ui/branch.spec.d.ts.map +1 -0
- package/dist/types/test/ui/canvas-logos.spec.d.ts +2 -0
- package/dist/types/test/ui/canvas-logos.spec.d.ts.map +1 -0
- package/dist/types/test/ui/fixtures.d.ts +1 -0
- package/dist/types/test/ui/fixtures.d.ts.map +1 -1
- package/dist/types/test/ui/global-setup.d.ts.map +1 -1
- package/dist/types/test/ui/harness/prop-controls.d.ts.map +1 -1
- package/dist/types/test/ui/piece-version.spec.d.ts +2 -0
- package/dist/types/test/ui/piece-version.spec.d.ts.map +1 -0
- package/dist/types/test/ui/ports.spec.d.ts +2 -0
- package/dist/types/test/ui/ports.spec.d.ts.map +1 -0
- package/dist/types/test/ui/publish.spec.d.ts +2 -0
- package/dist/types/test/ui/publish.spec.d.ts.map +1 -0
- package/dist/types/test/ui/step-test.spec.d.ts +2 -0
- package/dist/types/test/ui/step-test.spec.d.ts.map +1 -0
- package/dist/types/test/ui/variables.spec.d.ts +2 -0
- package/dist/types/test/ui/variables.spec.d.ts.map +1 -0
- package/dist/types/test/ui/webhook.spec.d.ts +2 -0
- package/dist/types/test/ui/webhook.spec.d.ts.map +1 -0
- package/dist/types/test/ui/workflow-menu.spec.d.ts +2 -0
- package/dist/types/test/ui/workflow-menu.spec.d.ts.map +1 -0
- package/package.json +11 -10
- package/dist/browser/BlockSelector-D24DIiSX.js +0 -1388
- package/dist/browser/BlockSelector-D24DIiSX.js.map +0 -1
- package/dist/browser/connection-form-D-NETdDQ.js.map +0 -1
- package/dist/browser/editor-B6N0PCuZ.js.map +0 -1
- package/dist/browser/editor-BkdwuOC-.js.map +0 -1
- package/dist/browser/editor-CZ5NvCyv.js.map +0 -1
- package/dist/browser/module-Bkms70LV.js.map +0 -1
- package/dist/browser/piece-auth-Z4mZEOtL.js.map +0 -1
- package/dist/browser/runtime-api-DDMQc4PB.js +0 -558
- package/dist/browser/runtime-api-DDMQc4PB.js.map +0 -1
- package/dist/browser/trigger-text-CUv5Z2Uk.js +0 -551
- package/dist/browser/trigger-text-CUv5Z2Uk.js.map +0 -1
- package/dist/browser/workflow-CGtVlhr8.js.map +0 -1
- package/dist/node/BlockSelector-CTmmpYxu.mjs +0 -1388
- package/dist/node/BlockSelector-CTmmpYxu.mjs.map +0 -1
- package/dist/node/connection-form-C9vbfSnA.mjs.map +0 -1
- package/dist/node/editor-By9BHI8e.mjs.map +0 -1
- package/dist/node/editor-DP36YDk5.mjs.map +0 -1
- package/dist/node/editor-StBssjcQ.mjs.map +0 -1
- package/dist/node/module-DuxxhgKs.mjs.map +0 -1
- package/dist/node/piece-auth-Z4mZEOtL.mjs.map +0 -1
- package/dist/node/runtime-api-DDMQc4PB.mjs +0 -558
- package/dist/node/runtime-api-DDMQc4PB.mjs.map +0 -1
- package/dist/node/trigger-text-Bzq6VfOQ.mjs +0 -551
- package/dist/node/trigger-text-Bzq6VfOQ.mjs.map +0 -1
- package/dist/node/workflow-C-uuQPnf.mjs.map +0 -1
- package/dist/types/editors/workflow-editor/runtime-api.test.d.ts +0 -2
- package/dist/types/editors/workflow-editor/runtime-api.test.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts +0 -2
- package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts.map +0 -1
|
@@ -2,6 +2,47 @@ import { n as __exportAll } from "./rolldown-runtime-DC62tzP2.js";
|
|
|
2
2
|
import * as z$1 from "zod";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, baseActions, baseCreateDocument, baseLoadFromInputVersioned, baseSaveToFileHandle, createAction, createBaseState, createReducer, createState, defaultBaseState, isDocumentAction } from "document-model";
|
|
5
|
+
//#region ../pieces-framework/dist/block-type.js
|
|
6
|
+
const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
7
|
+
function isExactVersion(version) {
|
|
8
|
+
return SEMVER.test(version);
|
|
9
|
+
}
|
|
10
|
+
function blockKey(block) {
|
|
11
|
+
return `${block.pieceName} ${block.kind} ${block.name}`;
|
|
12
|
+
}
|
|
13
|
+
function parseSemver(version) {
|
|
14
|
+
const match = SEMVER.exec(version);
|
|
15
|
+
if (!match) throw new Error(`"${version}" is not an exact semver version`);
|
|
16
|
+
return {
|
|
17
|
+
major: Number(match[1]),
|
|
18
|
+
minor: Number(match[2]),
|
|
19
|
+
patch: Number(match[3]),
|
|
20
|
+
prerelease: match[4] ? match[4].split(".") : []
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const NUMERIC = /^\d+$/;
|
|
24
|
+
function compareIdentifiers(a, b) {
|
|
25
|
+
const aNumeric = NUMERIC.test(a);
|
|
26
|
+
const bNumeric = NUMERIC.test(b);
|
|
27
|
+
if (aNumeric && bNumeric) return Math.sign(Number(a) - Number(b));
|
|
28
|
+
if (aNumeric) return -1;
|
|
29
|
+
if (bNumeric) return 1;
|
|
30
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
31
|
+
}
|
|
32
|
+
function compareVersions(a, b) {
|
|
33
|
+
const x = parseSemver(a);
|
|
34
|
+
const y = parseSemver(b);
|
|
35
|
+
const core = Math.sign(x.major - y.major) || Math.sign(x.minor - y.minor) || Math.sign(x.patch - y.patch);
|
|
36
|
+
if (core !== 0) return core;
|
|
37
|
+
if (x.prerelease.length === 0 || y.prerelease.length === 0) return Math.sign(y.prerelease.length - x.prerelease.length);
|
|
38
|
+
const shared = Math.min(x.prerelease.length, y.prerelease.length);
|
|
39
|
+
for (let i = 0; i < shared; i++) {
|
|
40
|
+
const order = compareIdentifiers(x.prerelease[i], y.prerelease[i]);
|
|
41
|
+
if (order !== 0) return order;
|
|
42
|
+
}
|
|
43
|
+
return Math.sign(x.prerelease.length - y.prerelease.length);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
5
46
|
//#region document-models/workflow/v1/gen/schema/zod.ts
|
|
6
47
|
const isDefinedNonNullAny = (v) => v !== void 0 && v !== null;
|
|
7
48
|
const definedNonNullAnySchema = z$1.any().refine((v) => isDefinedNonNullAny(v));
|
|
@@ -16,6 +57,7 @@ const FailureModeSchema = z$1.enum([
|
|
|
16
57
|
"NOTIFY",
|
|
17
58
|
"PARK"
|
|
18
59
|
]);
|
|
60
|
+
const PropertyModeSchema = z$1.enum(["EXPRESSION", "MANUAL"]);
|
|
19
61
|
const RunStatusSchema = z$1.enum([
|
|
20
62
|
"CANCELLED",
|
|
21
63
|
"FAILED",
|
|
@@ -25,6 +67,13 @@ const RunStatusSchema = z$1.enum([
|
|
|
25
67
|
"SUCCEEDED",
|
|
26
68
|
"WAITING"
|
|
27
69
|
]);
|
|
70
|
+
const VariableTypeSchema = z$1.enum([
|
|
71
|
+
"BOOLEAN",
|
|
72
|
+
"JSON",
|
|
73
|
+
"NUMBER",
|
|
74
|
+
"SECRET",
|
|
75
|
+
"TEXT"
|
|
76
|
+
]);
|
|
28
77
|
const WorkflowStatusSchema = z$1.enum([
|
|
29
78
|
"ARCHIVED",
|
|
30
79
|
"DISABLED",
|
|
@@ -42,15 +91,19 @@ function AddEdgeInputSchema() {
|
|
|
42
91
|
}
|
|
43
92
|
function AddStepInputSchema() {
|
|
44
93
|
return z$1.object({
|
|
45
|
-
|
|
94
|
+
actionName: z$1.string(),
|
|
46
95
|
config: z$1.unknown(),
|
|
47
96
|
connectionId: z$1.string().nullish(),
|
|
48
97
|
id: z$1.string(),
|
|
49
98
|
idempotencyKeyExpression: z$1.string().nullish(),
|
|
50
99
|
key: z$1.string(),
|
|
51
100
|
name: z$1.string(),
|
|
101
|
+
pieceName: z$1.string(),
|
|
102
|
+
pieceVersion: z$1.string(),
|
|
52
103
|
position: z$1.lazy(() => AddStepPositionInputSchema().nullish()),
|
|
104
|
+
propertySettings: z$1.array(z$1.lazy(() => AddStepPropertySettingInputSchema())).nullish(),
|
|
53
105
|
retry: z$1.lazy(() => AddStepRetryPolicyInputSchema().nullish()),
|
|
106
|
+
skip: z$1.boolean().nullish(),
|
|
54
107
|
timeoutSeconds: z$1.number().nullish()
|
|
55
108
|
});
|
|
56
109
|
}
|
|
@@ -60,6 +113,13 @@ function AddStepPositionInputSchema() {
|
|
|
60
113
|
y: z$1.number()
|
|
61
114
|
});
|
|
62
115
|
}
|
|
116
|
+
function AddStepPropertySettingInputSchema() {
|
|
117
|
+
return z$1.object({
|
|
118
|
+
mode: PropertyModeSchema,
|
|
119
|
+
prop: z$1.string(),
|
|
120
|
+
schema: z$1.unknown().nullish()
|
|
121
|
+
});
|
|
122
|
+
}
|
|
63
123
|
function AddStepRetryPolicyInputSchema() {
|
|
64
124
|
return z$1.object({
|
|
65
125
|
backoff: BackoffKindSchema,
|
|
@@ -79,6 +139,29 @@ function PointSchema() {
|
|
|
79
139
|
y: z$1.number()
|
|
80
140
|
});
|
|
81
141
|
}
|
|
142
|
+
function PropertySettingSchema() {
|
|
143
|
+
return z$1.object({
|
|
144
|
+
__typename: z$1.literal("PropertySetting").optional(),
|
|
145
|
+
mode: PropertyModeSchema,
|
|
146
|
+
prop: z$1.string(),
|
|
147
|
+
schema: z$1.unknown().nullish()
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function PublishWorkflowInputSchema() {
|
|
151
|
+
return z$1.object({ publishedAt: z$1.iso.datetime() });
|
|
152
|
+
}
|
|
153
|
+
function PublishedWorkflowSchema() {
|
|
154
|
+
return z$1.object({
|
|
155
|
+
__typename: z$1.literal("PublishedWorkflow").optional(),
|
|
156
|
+
edges: z$1.array(z$1.lazy(() => WorkflowEdgeSchema())),
|
|
157
|
+
policy: z$1.lazy(() => WorkflowPolicySchema()),
|
|
158
|
+
publishedAt: z$1.iso.datetime(),
|
|
159
|
+
steps: z$1.array(z$1.lazy(() => WorkflowStepSchema())),
|
|
160
|
+
trigger: z$1.lazy(() => TriggerBindingSchema().nullish()),
|
|
161
|
+
variables: z$1.array(z$1.lazy(() => WorkflowVariableSchema())),
|
|
162
|
+
version: z$1.number()
|
|
163
|
+
});
|
|
164
|
+
}
|
|
82
165
|
function RemoveEdgeInputSchema() {
|
|
83
166
|
return z$1.object({ id: z$1.string() });
|
|
84
167
|
}
|
|
@@ -98,12 +181,22 @@ function RetryPolicySchema() {
|
|
|
98
181
|
retryOn: z$1.array(z$1.string())
|
|
99
182
|
});
|
|
100
183
|
}
|
|
184
|
+
function RevertToPublishedInputSchema() {
|
|
185
|
+
return z$1.object({ _: z$1.boolean().nullish() });
|
|
186
|
+
}
|
|
101
187
|
function SetLastRunInputSchema() {
|
|
102
188
|
return z$1.object({
|
|
103
189
|
lastRunAt: z$1.iso.datetime(),
|
|
104
190
|
lastRunStatus: RunStatusSchema
|
|
105
191
|
});
|
|
106
192
|
}
|
|
193
|
+
function SetLastTestInputSchema() {
|
|
194
|
+
return z$1.object({
|
|
195
|
+
id: z$1.string(),
|
|
196
|
+
runId: z$1.string(),
|
|
197
|
+
testedAt: z$1.iso.datetime()
|
|
198
|
+
});
|
|
199
|
+
}
|
|
107
200
|
function SetPolicyInputSchema() {
|
|
108
201
|
return z$1.object({
|
|
109
202
|
concurrency: ConcurrencyModeSchema.nullish(),
|
|
@@ -128,16 +221,33 @@ function SetPolicyRetryPolicyInputSchema() {
|
|
|
128
221
|
function SetStepConfigInputSchema() {
|
|
129
222
|
return z$1.object({
|
|
130
223
|
config: z$1.unknown(),
|
|
131
|
-
id: z$1.string()
|
|
224
|
+
id: z$1.string(),
|
|
225
|
+
propertySettings: z$1.array(z$1.lazy(() => SetStepConfigPropertySettingInputSchema())).nullish()
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function SetStepConfigPropertySettingInputSchema() {
|
|
229
|
+
return z$1.object({
|
|
230
|
+
mode: PropertyModeSchema,
|
|
231
|
+
prop: z$1.string(),
|
|
232
|
+
schema: z$1.unknown().nullish()
|
|
132
233
|
});
|
|
133
234
|
}
|
|
134
235
|
function SetTriggerInputSchema() {
|
|
135
236
|
return z$1.object({
|
|
136
|
-
blockType: z$1.string(),
|
|
137
237
|
config: z$1.unknown(),
|
|
138
238
|
connectionId: z$1.string().nullish(),
|
|
139
|
-
|
|
140
|
-
|
|
239
|
+
id: z$1.string(),
|
|
240
|
+
pieceName: z$1.string(),
|
|
241
|
+
pieceVersion: z$1.string(),
|
|
242
|
+
propertySettings: z$1.array(z$1.lazy(() => SetTriggerPropertySettingInputSchema())).nullish(),
|
|
243
|
+
triggerName: z$1.string()
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function SetTriggerPropertySettingInputSchema() {
|
|
247
|
+
return z$1.object({
|
|
248
|
+
mode: PropertyModeSchema,
|
|
249
|
+
prop: z$1.string(),
|
|
250
|
+
schema: z$1.unknown().nullish()
|
|
141
251
|
});
|
|
142
252
|
}
|
|
143
253
|
function SetVariableInputSchema() {
|
|
@@ -145,6 +255,7 @@ function SetVariableInputSchema() {
|
|
|
145
255
|
description: z$1.string().nullish(),
|
|
146
256
|
id: z$1.string(),
|
|
147
257
|
key: z$1.string(),
|
|
258
|
+
type: VariableTypeSchema.nullish(),
|
|
148
259
|
value: z$1.unknown().nullish()
|
|
149
260
|
});
|
|
150
261
|
}
|
|
@@ -157,27 +268,41 @@ function SetWorkflowNameInputSchema() {
|
|
|
157
268
|
function SetWorkflowStatusInputSchema() {
|
|
158
269
|
return z$1.object({ status: WorkflowStatusSchema });
|
|
159
270
|
}
|
|
271
|
+
function StepTestRecordSchema() {
|
|
272
|
+
return z$1.object({
|
|
273
|
+
__typename: z$1.literal("StepTestRecord").optional(),
|
|
274
|
+
runId: z$1.string(),
|
|
275
|
+
testedAt: z$1.iso.datetime()
|
|
276
|
+
});
|
|
277
|
+
}
|
|
160
278
|
function TriggerBindingSchema() {
|
|
161
279
|
return z$1.object({
|
|
162
280
|
__typename: z$1.literal("TriggerBinding").optional(),
|
|
163
|
-
blockType: z$1.string(),
|
|
164
281
|
config: z$1.unknown(),
|
|
165
282
|
connectionId: z$1.string().nullish(),
|
|
166
|
-
|
|
167
|
-
|
|
283
|
+
id: z$1.string(),
|
|
284
|
+
lastTest: z$1.lazy(() => StepTestRecordSchema().nullish()),
|
|
285
|
+
pieceName: z$1.string(),
|
|
286
|
+
pieceVersion: z$1.string(),
|
|
287
|
+
propertySettings: z$1.array(z$1.lazy(() => PropertySettingSchema())).nullish(),
|
|
288
|
+
triggerName: z$1.string(),
|
|
289
|
+
updatedAt: z$1.iso.datetime().nullish()
|
|
168
290
|
});
|
|
169
291
|
}
|
|
170
292
|
function UpdateStepInputSchema() {
|
|
171
293
|
return z$1.object({
|
|
172
|
-
|
|
294
|
+
actionName: z$1.string().nullish(),
|
|
173
295
|
config: z$1.unknown().nullish(),
|
|
174
296
|
connectionId: z$1.string().nullish(),
|
|
175
297
|
id: z$1.string(),
|
|
176
298
|
idempotencyKeyExpression: z$1.string().nullish(),
|
|
177
299
|
key: z$1.string().nullish(),
|
|
178
300
|
name: z$1.string().nullish(),
|
|
301
|
+
pieceName: z$1.string().nullish(),
|
|
302
|
+
pieceVersion: z$1.string().nullish(),
|
|
179
303
|
position: z$1.lazy(() => UpdateStepPositionInputSchema().nullish()),
|
|
180
304
|
retry: z$1.lazy(() => UpdateStepRetryPolicyInputSchema().nullish()),
|
|
305
|
+
skip: z$1.boolean().nullish(),
|
|
181
306
|
timeoutSeconds: z$1.number().nullish()
|
|
182
307
|
});
|
|
183
308
|
}
|
|
@@ -228,6 +353,7 @@ function WorkflowStateSchema() {
|
|
|
228
353
|
lastRunStatus: RunStatusSchema.nullish(),
|
|
229
354
|
name: z$1.string(),
|
|
230
355
|
policy: z$1.lazy(() => WorkflowPolicySchema()),
|
|
356
|
+
published: z$1.lazy(() => PublishedWorkflowSchema().nullish()),
|
|
231
357
|
status: WorkflowStatusSchema,
|
|
232
358
|
steps: z$1.array(z$1.lazy(() => WorkflowStepSchema())),
|
|
233
359
|
trigger: z$1.lazy(() => TriggerBindingSchema().nullish()),
|
|
@@ -238,16 +364,22 @@ function WorkflowStateSchema() {
|
|
|
238
364
|
function WorkflowStepSchema() {
|
|
239
365
|
return z$1.object({
|
|
240
366
|
__typename: z$1.literal("WorkflowStep").optional(),
|
|
241
|
-
|
|
367
|
+
actionName: z$1.string(),
|
|
242
368
|
config: z$1.unknown(),
|
|
243
369
|
connectionId: z$1.string().nullish(),
|
|
244
370
|
id: z$1.string(),
|
|
245
371
|
idempotencyKeyExpression: z$1.string().nullish(),
|
|
246
372
|
key: z$1.string(),
|
|
373
|
+
lastTest: z$1.lazy(() => StepTestRecordSchema().nullish()),
|
|
247
374
|
name: z$1.string(),
|
|
375
|
+
pieceName: z$1.string(),
|
|
376
|
+
pieceVersion: z$1.string(),
|
|
248
377
|
position: z$1.lazy(() => PointSchema().nullish()),
|
|
378
|
+
propertySettings: z$1.array(z$1.lazy(() => PropertySettingSchema())).nullish(),
|
|
249
379
|
retry: z$1.lazy(() => RetryPolicySchema().nullish()),
|
|
250
|
-
|
|
380
|
+
skip: z$1.boolean().nullish(),
|
|
381
|
+
timeoutSeconds: z$1.number().nullish(),
|
|
382
|
+
updatedAt: z$1.iso.datetime().nullish()
|
|
251
383
|
});
|
|
252
384
|
}
|
|
253
385
|
function WorkflowVariableSchema() {
|
|
@@ -256,6 +388,7 @@ function WorkflowVariableSchema() {
|
|
|
256
388
|
description: z$1.string().nullish(),
|
|
257
389
|
id: z$1.string(),
|
|
258
390
|
key: z$1.string(),
|
|
391
|
+
type: VariableTypeSchema.nullish(),
|
|
259
392
|
value: z$1.unknown().nullish()
|
|
260
393
|
});
|
|
261
394
|
}
|
|
@@ -265,7 +398,7 @@ function WorkflowVariableSchema() {
|
|
|
265
398
|
* WARNING: DO NOT EDIT
|
|
266
399
|
* This file is auto-generated and updated by codegen
|
|
267
400
|
*/
|
|
268
|
-
var creators_exports$
|
|
401
|
+
var creators_exports$7 = /* @__PURE__ */ __exportAll({
|
|
269
402
|
addEdge: () => addEdge,
|
|
270
403
|
removeEdge: () => removeEdge
|
|
271
404
|
});
|
|
@@ -277,16 +410,32 @@ const removeEdge = (input) => createAction("REMOVE_EDGE", { ...input }, void 0,
|
|
|
277
410
|
* WARNING: DO NOT EDIT
|
|
278
411
|
* This file is auto-generated and updated by codegen
|
|
279
412
|
*/
|
|
280
|
-
var creators_exports$
|
|
413
|
+
var creators_exports$6 = /* @__PURE__ */ __exportAll({ setPolicy: () => setPolicy });
|
|
281
414
|
const setPolicy = (input) => createAction("SET_POLICY", { ...input }, void 0, SetPolicyInputSchema, "global");
|
|
282
415
|
//#endregion
|
|
416
|
+
//#region document-models/workflow/v1/gen/publishing/creators.ts
|
|
417
|
+
/**
|
|
418
|
+
* WARNING: DO NOT EDIT
|
|
419
|
+
* This file is auto-generated and updated by codegen
|
|
420
|
+
*/
|
|
421
|
+
var creators_exports$5 = /* @__PURE__ */ __exportAll({
|
|
422
|
+
publishWorkflow: () => publishWorkflow,
|
|
423
|
+
revertToPublished: () => revertToPublished
|
|
424
|
+
});
|
|
425
|
+
const publishWorkflow = (input) => createAction("PUBLISH_WORKFLOW", { ...input }, void 0, PublishWorkflowInputSchema, "global");
|
|
426
|
+
const revertToPublished = (input) => createAction("REVERT_TO_PUBLISHED", { ...input }, void 0, RevertToPublishedInputSchema, "global");
|
|
427
|
+
//#endregion
|
|
283
428
|
//#region document-models/workflow/v1/gen/runtime/creators.ts
|
|
284
429
|
/**
|
|
285
430
|
* WARNING: DO NOT EDIT
|
|
286
431
|
* This file is auto-generated and updated by codegen
|
|
287
432
|
*/
|
|
288
|
-
var creators_exports$4 = /* @__PURE__ */ __exportAll({
|
|
433
|
+
var creators_exports$4 = /* @__PURE__ */ __exportAll({
|
|
434
|
+
setLastRun: () => setLastRun,
|
|
435
|
+
setLastTest: () => setLastTest
|
|
436
|
+
});
|
|
289
437
|
const setLastRun = (input) => createAction("SET_LAST_RUN", { ...input }, void 0, SetLastRunInputSchema, "global");
|
|
438
|
+
const setLastTest = (input) => createAction("SET_LAST_TEST", { ...input }, void 0, SetLastTestInputSchema, "global");
|
|
290
439
|
//#endregion
|
|
291
440
|
//#region document-models/workflow/v1/gen/steps/creators.ts
|
|
292
441
|
/**
|
|
@@ -353,10 +502,11 @@ const actions = {
|
|
|
353
502
|
...creators_exports,
|
|
354
503
|
...creators_exports$2,
|
|
355
504
|
...creators_exports$3,
|
|
356
|
-
...creators_exports$
|
|
505
|
+
...creators_exports$7,
|
|
357
506
|
...creators_exports$1,
|
|
358
|
-
...creators_exports$
|
|
359
|
-
...creators_exports$4
|
|
507
|
+
...creators_exports$6,
|
|
508
|
+
...creators_exports$4,
|
|
509
|
+
...creators_exports$5
|
|
360
510
|
};
|
|
361
511
|
//#endregion
|
|
362
512
|
//#region document-models/workflow/v1/gen/document-model.ts
|
|
@@ -377,9 +527,9 @@ const documentModel = {
|
|
|
377
527
|
initialValue: ""
|
|
378
528
|
},
|
|
379
529
|
global: {
|
|
380
|
-
schema: "enum WorkflowStatus {\n DRAFT\n ENABLED\n DISABLED\n ARCHIVED\n}\n\nenum RunStatus {\n PENDING\n RUNNING\n WAITING\n SUCCEEDED\n FAILED\n CANCELLED\n PARKED\n}\n\nenum ConcurrencyMode {\n SINGLETON\n QUEUE\n PARALLEL\n}\n\nenum FailureMode {\n PARK\n NOTIFY\n IGNORE\n}\n\nenum BackoffKind {\n FIXED\n EXPONENTIAL\n}\n\ntype RetryPolicy {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n \"Error classes that are retryable. Everything else fails terminally on attempt 1.\"\n retryOn: [String!]!\n}\n\n\"Layout only. The runtime ignores it.\"\ntype Point {\n x: Float!\n y: Float!\n}\n\ntype TriggerBinding {\n id: OID!\n \"
|
|
530
|
+
schema: "enum WorkflowStatus {\n DRAFT\n ENABLED\n DISABLED\n ARCHIVED\n}\n\nenum RunStatus {\n PENDING\n RUNNING\n WAITING\n SUCCEEDED\n FAILED\n CANCELLED\n PARKED\n}\n\nenum ConcurrencyMode {\n SINGLETON\n QUEUE\n PARALLEL\n}\n\nenum FailureMode {\n PARK\n NOTIFY\n IGNORE\n}\n\nenum BackoffKind {\n FIXED\n EXPONENTIAL\n}\n\ntype RetryPolicy {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n \"Error classes that are retryable. Everything else fails terminally on attempt 1.\"\n retryOn: [String!]!\n}\n\nenum PropertyMode {\n \"The field's own control.\"\n MANUAL\n \"The author switched the field to a free {{…}} expression.\"\n EXPRESSION\n}\n\ntype PropertySetting {\n prop: String!\n mode: PropertyMode!\n \"Resolved DynamicProperties children, options stripped.\"\n schema: Unknown\n}\n\n\"Reference to the latest test run in the run store.\"\ntype StepTestRecord {\n runId: String!\n testedAt: DateTime!\n}\n\n\"Layout only. The runtime ignores it.\"\ntype Point {\n x: Float!\n y: Float!\n}\n\ntype TriggerBinding {\n id: OID!\n \"Package name of the trigger's piece, e.g. '@powerhousedao/piece-core' or '@acme/piece-imap'.\"\n pieceName: String!\n \"Exact semver of the piece, e.g. '1.2.0'.\"\n pieceVersion: String!\n \"Trigger name within the piece, e.g. 'schedule' or 'new_message'.\"\n triggerName: String!\n \"Connection document id, when the trigger's connector requires one.\"\n connectionId: PHID\n \"Validated against the trigger's configSchema.\"\n config: Unknown!\n propertySettings: [PropertySetting!]\n lastTest: StepTestRecord\n \"Timestamp of the last real edit; a lastTest before it is stale.\"\n updatedAt: DateTime\n}\n\ntype WorkflowStep {\n id: OID!\n \"Author-visible label; unique within the workflow; used in expressions.\"\n key: String!\n name: String!\n \"Package name of the step's piece, e.g. '@powerhousedao/piece-core' or '@activepieces/piece-http'.\"\n pieceName: String!\n \"Exact semver of the piece, e.g. '0.11.19'.\"\n pieceVersion: String!\n \"Action name within the piece, e.g. 'branch' or 'send_request'.\"\n actionName: String!\n connectionId: PHID\n config: Unknown!\n \"Per-step override of the workflow default retry policy.\"\n retry: RetryPolicy\n timeoutSeconds: Int\n \"Expression yielding a stable key; two executions with the same key are one side effect.\"\n idempotencyKeyExpression: String\n position: Point\n propertySettings: [PropertySetting!]\n lastTest: StepTestRecord\n \"Skipped steps are passed over at run time.\"\n skip: Boolean\n \"Timestamp of the last real edit; a lastTest before it is stale.\"\n updatedAt: DateTime\n}\n\ntype WorkflowEdge {\n id: OID!\n \"Source step id, or the trigger id for the entry edge.\"\n from: OID!\n to: OID!\n \"Output port of the source, one it declares: 'next' and 'error' for a piece action, 'next' for the trigger, 'true', 'false' and 'error' for a branch.\"\n port: String!\n \"Optional guard expression; the edge is taken only when it evaluates truthy.\"\n condition: String\n}\n\nenum VariableType {\n TEXT\n NUMBER\n BOOLEAN\n JSON\n \"value is a secret-provider handle (the format of a connection SecretRef.ref), never the plaintext.\"\n SECRET\n}\n\ntype WorkflowVariable {\n id: OID!\n \"Name used in expressions.\"\n key: String!\n \"The value a run reads as variables.<key>.\"\n value: Unknown\n description: String\n \"Null means untyped; consumers infer the kind of value it holds.\"\n type: VariableType\n}\n\ntype WorkflowPolicy {\n \"SINGLETON drops a firing while a run is active; QUEUE serialises; PARALLEL runs concurrently.\"\n concurrency: ConcurrencyMode!\n maxParallelRuns: Int\n runTimeoutSeconds: Int!\n \"Bounds how long a run may stay suspended on a waitpoint.\"\n maxSuspensionDays: Int!\n defaultRetry: RetryPolicy!\n \"What happens to a run whose steps have all failed terminally.\"\n onFailure: FailureMode!\n retainRunsDays: Int!\n journalAsDocument: Boolean!\n}\n\n\"Snapshot of the draft taken by PUBLISH_WORKFLOW.\"\ntype PublishedWorkflow {\n \"Draft version the snapshot was taken at.\"\n version: Int!\n publishedAt: DateTime!\n trigger: TriggerBinding\n steps: [WorkflowStep!]!\n edges: [WorkflowEdge!]!\n variables: [WorkflowVariable!]!\n policy: WorkflowPolicy!\n}\n\ntype WorkflowState {\n name: String!\n description: String\n \"Only ENABLED workflows get trigger instances.\"\n status: WorkflowStatus!\n \"Bumped on every draft edit; REVERT_TO_PUBLISHED resets it to published.version. A run records the version it executed.\"\n version: Int!\n trigger: TriggerBinding\n steps: [WorkflowStep!]!\n edges: [WorkflowEdge!]!\n variables: [WorkflowVariable!]!\n policy: WorkflowPolicy!\n \"Last published snapshot; version !== published.version means unpublished changes.\"\n published: PublishedWorkflow\n \"Denormalised for inspectors; written by the runtime.\"\n lastRunAt: DateTime\n lastRunStatus: RunStatus\n}",
|
|
381
531
|
examples: [],
|
|
382
|
-
initialValue: "{\n \"name\": \"\",\n \"description\": null,\n \"status\": \"DRAFT\",\n \"version\": 0,\n \"trigger\": null,\n \"steps\": [],\n \"edges\": [],\n \"variables\": [],\n \"policy\": {\n \"concurrency\": \"QUEUE\",\n \"maxParallelRuns\": null,\n \"runTimeoutSeconds\": 3600,\n \"maxSuspensionDays\": 30,\n \"defaultRetry\": {\n \"maxAttempts\": 1,\n \"backoff\": \"FIXED\",\n \"initialDelaySeconds\": 5,\n \"maxDelaySeconds\": 300,\n \"retryOn\": []\n },\n \"onFailure\": \"PARK\",\n \"retainRunsDays\": 30,\n \"journalAsDocument\": false\n },\n \"lastRunAt\": null,\n \"lastRunStatus\": null\n}"
|
|
532
|
+
initialValue: "{\n \"name\": \"\",\n \"description\": null,\n \"status\": \"DRAFT\",\n \"version\": 0,\n \"trigger\": null,\n \"steps\": [],\n \"edges\": [],\n \"variables\": [],\n \"policy\": {\n \"concurrency\": \"QUEUE\",\n \"maxParallelRuns\": null,\n \"runTimeoutSeconds\": 3600,\n \"maxSuspensionDays\": 30,\n \"defaultRetry\": {\n \"maxAttempts\": 1,\n \"backoff\": \"FIXED\",\n \"initialDelaySeconds\": 5,\n \"maxDelaySeconds\": 300,\n \"retryOn\": []\n },\n \"onFailure\": \"PARK\",\n \"retainRunsDays\": 30,\n \"journalAsDocument\": false\n },\n \"published\": null,\n \"lastRunAt\": null,\n \"lastRunStatus\": null\n}"
|
|
383
533
|
}
|
|
384
534
|
},
|
|
385
535
|
modules: [
|
|
@@ -417,7 +567,13 @@ const documentModel = {
|
|
|
417
567
|
schema: "input SetWorkflowStatusInput {\n status: WorkflowStatus!\n}",
|
|
418
568
|
template: "Sets the lifecycle status. The trigger supervisor watches this to create or tear down trigger instances.",
|
|
419
569
|
reducer: "state.status = action.input.status;",
|
|
420
|
-
errors: [
|
|
570
|
+
errors: [{
|
|
571
|
+
id: "ceb06c52-61b3-4c92-826f-9d2f87fb64d6",
|
|
572
|
+
name: "WorkflowNotPublishedError",
|
|
573
|
+
code: "WORKFLOW_NOT_PUBLISHED",
|
|
574
|
+
description: "ENABLED needs a published snapshot; publish the workflow first.",
|
|
575
|
+
template: ""
|
|
576
|
+
}],
|
|
421
577
|
examples: [],
|
|
422
578
|
scope: "global"
|
|
423
579
|
}
|
|
@@ -430,11 +586,23 @@ const documentModel = {
|
|
|
430
586
|
operations: [{
|
|
431
587
|
id: "f1f2ac35-7d6f-4b2c-b1a4-f220f290fdad",
|
|
432
588
|
name: "SET_TRIGGER",
|
|
433
|
-
description: "Sets or replaces the trigger binding.",
|
|
434
|
-
schema: "input SetTriggerInput {\n id: OID!\n
|
|
435
|
-
template: "Sets or replaces the trigger binding.",
|
|
436
|
-
reducer: "state.trigger = {\n id: action.input.id,\n
|
|
437
|
-
errors: [
|
|
589
|
+
description: "Sets or replaces the trigger binding. Omitted propertySettings and lastTest carry over when the id, piece, version and trigger name are unchanged.",
|
|
590
|
+
schema: "input SetTriggerPropertySettingInput {\n prop: String!\n mode: PropertyMode!\n schema: Unknown\n}\n\ninput SetTriggerInput {\n id: OID!\n pieceName: String!\n pieceVersion: String!\n triggerName: String!\n connectionId: PHID\n config: Unknown!\n propertySettings: [SetTriggerPropertySettingInput!]\n}",
|
|
591
|
+
template: "Sets or replaces the trigger binding. Omitted propertySettings and lastTest carry over when the id, piece, version and trigger name are unchanged.",
|
|
592
|
+
reducer: "state.trigger = {\n id: action.input.id,\n pieceName: action.input.pieceName,\n pieceVersion: action.input.pieceVersion,\n triggerName: action.input.triggerName,\n connectionId: action.input.connectionId || null,\n config: action.input.config,\n filter: action.input.filter ?? null,\n};\nstate.version += 1;",
|
|
593
|
+
errors: [{
|
|
594
|
+
id: "2191e673-e5b7-4e27-921d-3534f95fc095",
|
|
595
|
+
name: "InvalidTriggerBlockError",
|
|
596
|
+
code: "INVALID_TRIGGER_BLOCK",
|
|
597
|
+
description: "The trigger names no piece or trigger, or its piece version is not an exact semver.",
|
|
598
|
+
template: ""
|
|
599
|
+
}, {
|
|
600
|
+
id: "cf3fced2-61c0-41a1-a0de-664ee00b2e25",
|
|
601
|
+
name: "TriggerConfigNotObjectError",
|
|
602
|
+
code: "TRIGGER_CONFIG_NOT_OBJECT",
|
|
603
|
+
description: "The trigger's config is not a JSON object.",
|
|
604
|
+
template: ""
|
|
605
|
+
}],
|
|
438
606
|
examples: [],
|
|
439
607
|
scope: "global"
|
|
440
608
|
}, {
|
|
@@ -464,22 +632,39 @@ const documentModel = {
|
|
|
464
632
|
id: "d71c412f-9c48-4c1d-9d5b-f7c3cd18cecc",
|
|
465
633
|
name: "ADD_STEP",
|
|
466
634
|
description: "Adds a step to the workflow graph.",
|
|
467
|
-
schema: "input AddStepRetryPolicyInput {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n retryOn: [String!]!\n}\n\ninput AddStepPositionInput {\n x: Float!\n y: Float!\n}\n\ninput AddStepInput {\n id: OID!\n key: String!\n name: String!\n
|
|
635
|
+
schema: "input AddStepRetryPolicyInput {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n retryOn: [String!]!\n}\n\ninput AddStepPositionInput {\n x: Float!\n y: Float!\n}\n\ninput AddStepPropertySettingInput {\n prop: String!\n mode: PropertyMode!\n schema: Unknown\n}\n\ninput AddStepInput {\n id: OID!\n key: String!\n name: String!\n pieceName: String!\n pieceVersion: String!\n actionName: String!\n connectionId: PHID\n config: Unknown!\n retry: AddStepRetryPolicyInput\n timeoutSeconds: Int\n idempotencyKeyExpression: String\n position: AddStepPositionInput\n skip: Boolean\n propertySettings: [AddStepPropertySettingInput!]\n}",
|
|
468
636
|
template: "Adds a step to the workflow graph.",
|
|
469
|
-
reducer: "if (state.steps.some((step) => step.id === action.input.id)) {\n throw new DuplicateStepIdError(\"A step with this id already exists\");\n}\nif (state.steps.some((step) => step.key === action.input.key)) {\n throw new DuplicateStepKeyError(\"A step with this key already exists\");\n}\nstate.steps.push({\n id: action.input.id,\n key: action.input.key,\n name: action.input.name,\n
|
|
470
|
-
errors: [
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
637
|
+
reducer: "if (state.steps.some((step) => step.id === action.input.id)) {\n throw new DuplicateStepIdError(\"A step with this id already exists\");\n}\nif (state.steps.some((step) => step.key === action.input.key)) {\n throw new DuplicateStepKeyError(\"A step with this key already exists\");\n}\nstate.steps.push({\n id: action.input.id,\n key: action.input.key,\n name: action.input.name,\n pieceName: action.input.pieceName,\n pieceVersion: action.input.pieceVersion,\n actionName: action.input.actionName,\n connectionId: action.input.connectionId || null,\n config: action.input.config,\n retry: action.input.retry ?? null,\n timeoutSeconds: action.input.timeoutSeconds ?? null,\n idempotencyKeyExpression: action.input.idempotencyKeyExpression || null,\n position: action.input.position ?? null,\n});\nstate.version += 1;",
|
|
638
|
+
errors: [
|
|
639
|
+
{
|
|
640
|
+
id: "9f42bbac-54a9-42bc-b6e6-86f158d1a474",
|
|
641
|
+
name: "DuplicateStepIdError",
|
|
642
|
+
code: "DUPLICATE_STEP_ID",
|
|
643
|
+
description: "A step with the given id already exists.",
|
|
644
|
+
template: ""
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
id: "e9ef62ad-2b63-43f7-ac25-b0ab81f833c5",
|
|
648
|
+
name: "DuplicateStepKeyError",
|
|
649
|
+
code: "DUPLICATE_STEP_KEY",
|
|
650
|
+
description: "A step with the given key already exists.",
|
|
651
|
+
template: ""
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
id: "62bbe509-cb42-47b4-92a9-9f407cee5128",
|
|
655
|
+
name: "InvalidStepBlockError",
|
|
656
|
+
code: "INVALID_STEP_BLOCK",
|
|
657
|
+
description: "The step names no piece or action, or its piece version is not an exact semver.",
|
|
658
|
+
template: ""
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
id: "a802cfa8-43e7-4d4d-a1eb-13f6406dde63",
|
|
662
|
+
name: "StepConfigNotObjectError",
|
|
663
|
+
code: "STEP_CONFIG_NOT_OBJECT",
|
|
664
|
+
description: "The new step's config is not a JSON object.",
|
|
665
|
+
template: ""
|
|
666
|
+
}
|
|
667
|
+
],
|
|
483
668
|
examples: [],
|
|
484
669
|
scope: "global"
|
|
485
670
|
},
|
|
@@ -487,22 +672,39 @@ const documentModel = {
|
|
|
487
672
|
id: "12b4dad9-4a89-4a94-b2ff-fadbf492f555",
|
|
488
673
|
name: "UPDATE_STEP",
|
|
489
674
|
description: "Updates the provided fields of an existing step.",
|
|
490
|
-
schema: "input UpdateStepRetryPolicyInput {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n retryOn: [String!]!\n}\n\ninput UpdateStepPositionInput {\n x: Float!\n y: Float!\n}\n\ninput UpdateStepInput {\n id: OID!\n key: String\n name: String\n
|
|
675
|
+
schema: "input UpdateStepRetryPolicyInput {\n maxAttempts: Int!\n backoff: BackoffKind!\n initialDelaySeconds: Int!\n maxDelaySeconds: Int!\n retryOn: [String!]!\n}\n\ninput UpdateStepPositionInput {\n x: Float!\n y: Float!\n}\n\ninput UpdateStepInput {\n id: OID!\n key: String\n name: String\n pieceName: String\n pieceVersion: String\n actionName: String\n connectionId: PHID\n config: Unknown\n retry: UpdateStepRetryPolicyInput\n timeoutSeconds: Int\n idempotencyKeyExpression: String\n position: UpdateStepPositionInput\n skip: Boolean\n}",
|
|
491
676
|
template: "Updates the provided fields of an existing step.",
|
|
492
|
-
reducer: "const step = state.steps.find((step) => step.id === action.input.id);\nif (!step) {\n throw new StepNotFoundError(\"Step not found\");\n}\nif (action.input.key) {\n const conflict = state.steps.some(\n (other) => other.key === action.input.key && other.id !== action.input.id,\n );\n if (conflict) {\n throw new StepKeyConflictError(\"Another step already uses this key\");\n }\n step.key = action.input.key;\n}\nif (action.input.name) step.name = action.input.name;\nif (action.input.
|
|
493
|
-
errors: [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
677
|
+
reducer: "const step = state.steps.find((step) => step.id === action.input.id);\nif (!step) {\n throw new StepNotFoundError(\"Step not found\");\n}\nif (action.input.key) {\n const conflict = state.steps.some(\n (other) => other.key === action.input.key && other.id !== action.input.id,\n );\n if (conflict) {\n throw new StepKeyConflictError(\"Another step already uses this key\");\n }\n step.key = action.input.key;\n}\nif (action.input.name) step.name = action.input.name;\nif (action.input.pieceName) step.pieceName = action.input.pieceName;\nif (action.input.pieceVersion) step.pieceVersion = action.input.pieceVersion;\nif (action.input.actionName) step.actionName = action.input.actionName;\nif (action.input.connectionId) step.connectionId = action.input.connectionId;\nif (action.input.config !== undefined && action.input.config !== null) {\n step.config = action.input.config;\n}\n// For the optional runtime fields null clears; undefined leaves as is.\nif (action.input.retry !== undefined) {\n step.retry = action.input.retry ?? null;\n}\nif (action.input.timeoutSeconds !== undefined) {\n step.timeoutSeconds = action.input.timeoutSeconds ?? null;\n}\nif (action.input.idempotencyKeyExpression !== undefined) {\n step.idempotencyKeyExpression = action.input.idempotencyKeyExpression || null;\n}\nif (action.input.position) step.position = action.input.position;\nstate.version += 1;",
|
|
678
|
+
errors: [
|
|
679
|
+
{
|
|
680
|
+
id: "2f3f0a0b-555a-4350-86b4-5e7e86de8b8a",
|
|
681
|
+
name: "StepNotFoundError",
|
|
682
|
+
code: "STEP_NOT_FOUND",
|
|
683
|
+
description: "No step exists with the given id.",
|
|
684
|
+
template: ""
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
id: "74f45aaf-68ae-49a9-bd3c-d1e5a50b0ea3",
|
|
688
|
+
name: "StepKeyConflictError",
|
|
689
|
+
code: "STEP_KEY_CONFLICT",
|
|
690
|
+
description: "Another step already uses the given key.",
|
|
691
|
+
template: ""
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
id: "3db35060-c54a-445d-9202-3613bf90c8f4",
|
|
695
|
+
name: "InvalidUpdateBlockError",
|
|
696
|
+
code: "INVALID_UPDATE_BLOCK",
|
|
697
|
+
description: "The update leaves the step with no piece or action, or with a piece version that is not an exact semver.",
|
|
698
|
+
template: ""
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
id: "3841fa5a-d989-43d0-90fa-dfb224f3c463",
|
|
702
|
+
name: "UpdateConfigNotObjectError",
|
|
703
|
+
code: "UPDATE_CONFIG_NOT_OBJECT",
|
|
704
|
+
description: "The step's new config is not a JSON object.",
|
|
705
|
+
template: ""
|
|
706
|
+
}
|
|
707
|
+
],
|
|
506
708
|
examples: [],
|
|
507
709
|
scope: "global"
|
|
508
710
|
},
|
|
@@ -526,9 +728,9 @@ const documentModel = {
|
|
|
526
728
|
{
|
|
527
729
|
id: "c83eb80e-8086-40e5-b8ed-fe3f72b664a6",
|
|
528
730
|
name: "SET_STEP_CONFIG",
|
|
529
|
-
description: "Replaces a step's block configuration.",
|
|
530
|
-
schema: "input SetStepConfigInput {\n id: OID!\n config: Unknown!\n}",
|
|
531
|
-
template: "Replaces a step's block configuration.",
|
|
731
|
+
description: "Replaces a step's block configuration, and optionally its property settings.",
|
|
732
|
+
schema: "input SetStepConfigPropertySettingInput {\n prop: String!\n mode: PropertyMode!\n schema: Unknown\n}\n\ninput SetStepConfigInput {\n id: OID!\n config: Unknown!\n propertySettings: [SetStepConfigPropertySettingInput!]\n}",
|
|
733
|
+
template: "Replaces a step's block configuration, and optionally its property settings.",
|
|
532
734
|
reducer: "const step = state.steps.find((step) => step.id === action.input.id);\nif (!step) {\n throw new ConfigStepNotFoundError(\"Step not found\");\n}\nstep.config = action.input.config;\nstate.version += 1;",
|
|
533
735
|
errors: [{
|
|
534
736
|
id: "8ba30ce9-510e-4765-9955-23b4d76595ab",
|
|
@@ -536,6 +738,12 @@ const documentModel = {
|
|
|
536
738
|
code: "CONFIG_STEP_NOT_FOUND",
|
|
537
739
|
description: "No step exists with the given id.",
|
|
538
740
|
template: ""
|
|
741
|
+
}, {
|
|
742
|
+
id: "f6d05410-a1a8-4cab-8d7c-ea14506aa479",
|
|
743
|
+
name: "SetConfigNotObjectError",
|
|
744
|
+
code: "SET_CONFIG_NOT_OBJECT",
|
|
745
|
+
description: "The step's config is not a JSON object.",
|
|
746
|
+
template: ""
|
|
539
747
|
}],
|
|
540
748
|
examples: [],
|
|
541
749
|
scope: "global"
|
|
@@ -610,11 +818,23 @@ const documentModel = {
|
|
|
610
818
|
operations: [{
|
|
611
819
|
id: "50745ece-569a-4d49-b649-8ec2de3dd2d9",
|
|
612
820
|
name: "SET_VARIABLE",
|
|
613
|
-
description: "Creates
|
|
614
|
-
schema: "input SetVariableInput {\n id: OID!\n key: String!\n value: Unknown\n description: String\n}",
|
|
821
|
+
description: "Creates the variable with this id, or updates it (its key included). Keys are unique.",
|
|
822
|
+
schema: "input SetVariableInput {\n id: OID!\n key: String!\n value: Unknown\n description: String\n \"Undefined leaves an existing variable's type unchanged; null clears it.\"\n type: VariableType\n}",
|
|
615
823
|
template: "Creates or updates a variable, keyed by its key.",
|
|
616
824
|
reducer: "const existing = state.variables.find(\n (variable) => variable.key === action.input.key,\n);\nif (existing) {\n existing.value = action.input.value ?? null;\n if (action.input.description) existing.description = action.input.description;\n} else {\n state.variables.push({\n id: action.input.id,\n key: action.input.key,\n value: action.input.value ?? null,\n description: action.input.description || null,\n });\n}\nstate.version += 1;",
|
|
617
|
-
errors: [
|
|
825
|
+
errors: [{
|
|
826
|
+
id: "50fa86ce-2616-47d3-9e9a-225c63efc08c",
|
|
827
|
+
name: "SecretVariableValueError",
|
|
828
|
+
code: "SECRET_VARIABLE_VALUE",
|
|
829
|
+
description: "A SECRET variable's value must be a secret reference string or null.",
|
|
830
|
+
template: ""
|
|
831
|
+
}, {
|
|
832
|
+
id: "868842e4-3df4-4e62-9b98-adf70cd1acbb",
|
|
833
|
+
name: "DuplicateVariableKeyError",
|
|
834
|
+
code: "DUPLICATE_VARIABLE_KEY",
|
|
835
|
+
description: "Another variable already uses the given key.",
|
|
836
|
+
template: ""
|
|
837
|
+
}],
|
|
618
838
|
examples: [],
|
|
619
839
|
scope: "global"
|
|
620
840
|
}, {
|
|
@@ -665,6 +885,54 @@ const documentModel = {
|
|
|
665
885
|
errors: [],
|
|
666
886
|
examples: [],
|
|
667
887
|
scope: "global"
|
|
888
|
+
}, {
|
|
889
|
+
id: "a370b78b-53b6-4344-9a92-a600d8eda77e",
|
|
890
|
+
name: "SET_LAST_TEST",
|
|
891
|
+
description: "Records the latest test run of a step or the trigger. Does not bump version.",
|
|
892
|
+
schema: "input SetLastTestInput {\n \"Step id or trigger id.\"\n id: OID!\n runId: String!\n testedAt: DateTime!\n}",
|
|
893
|
+
template: "Records the latest test run of a step or the trigger. Does not bump version.",
|
|
894
|
+
reducer: "",
|
|
895
|
+
errors: [{
|
|
896
|
+
id: "53f18e15-1623-4cd0-8be4-44d4286d5eab",
|
|
897
|
+
name: "LastTestTargetNotFoundError",
|
|
898
|
+
code: "LAST_TEST_TARGET_NOT_FOUND",
|
|
899
|
+
description: "No step or trigger exists with the given id.",
|
|
900
|
+
template: ""
|
|
901
|
+
}],
|
|
902
|
+
examples: [],
|
|
903
|
+
scope: "global"
|
|
904
|
+
}]
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
id: "d08ad3f2-8985-4b36-baae-4b870407bba8",
|
|
908
|
+
name: "publishing",
|
|
909
|
+
description: "Draft versus published snapshot of the workflow.",
|
|
910
|
+
operations: [{
|
|
911
|
+
id: "a0cc29cc-259a-4bc8-814d-0847883700eb",
|
|
912
|
+
name: "PUBLISH_WORKFLOW",
|
|
913
|
+
description: "Snapshots the draft trigger, steps, edges, variables and policy into published at the current version.",
|
|
914
|
+
schema: "input PublishWorkflowInput {\n publishedAt: DateTime!\n}",
|
|
915
|
+
template: "Snapshots the draft trigger, steps, edges, variables and policy into published at the current version.",
|
|
916
|
+
reducer: "",
|
|
917
|
+
errors: [],
|
|
918
|
+
examples: [],
|
|
919
|
+
scope: "global"
|
|
920
|
+
}, {
|
|
921
|
+
id: "b4642462-2652-4a6e-a6ba-8e299d830d92",
|
|
922
|
+
name: "REVERT_TO_PUBLISHED",
|
|
923
|
+
description: "Replaces the draft with the published snapshot and resets version to published.version.",
|
|
924
|
+
schema: "input RevertToPublishedInput {\n _: Boolean\n}",
|
|
925
|
+
template: "Replaces the draft with the published snapshot and resets version to published.version.",
|
|
926
|
+
reducer: "",
|
|
927
|
+
errors: [{
|
|
928
|
+
id: "f0056b3a-549d-4063-b8e5-2978279168e7",
|
|
929
|
+
name: "NothingPublishedError",
|
|
930
|
+
code: "NOTHING_PUBLISHED",
|
|
931
|
+
description: "The workflow has never been published.",
|
|
932
|
+
template: ""
|
|
933
|
+
}],
|
|
934
|
+
examples: [],
|
|
935
|
+
scope: "global"
|
|
668
936
|
}]
|
|
669
937
|
}
|
|
670
938
|
],
|
|
@@ -755,11 +1023,86 @@ const workflowPolicyOperations = { setPolicyOperation(state, action) {
|
|
|
755
1023
|
state.version += 1;
|
|
756
1024
|
} };
|
|
757
1025
|
//#endregion
|
|
1026
|
+
//#region document-models/workflow/v1/gen/publishing/error.ts
|
|
1027
|
+
var NothingPublishedError = class extends Error {
|
|
1028
|
+
errorCode = "NothingPublishedError";
|
|
1029
|
+
constructor(message = "NothingPublishedError") {
|
|
1030
|
+
super(message);
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
//#endregion
|
|
1034
|
+
//#region document-models/workflow/v1/src/helpers.ts
|
|
1035
|
+
function invalidBlock(kind, block) {
|
|
1036
|
+
if (!block.pieceName) return `The ${kind} names no piece`;
|
|
1037
|
+
if (!block.name) return `The ${kind} names no ${kind} of ${block.pieceName}`;
|
|
1038
|
+
if (!block.pieceVersion || !isExactVersion(block.pieceVersion)) return `"${block.pieceVersion ?? ""}" is not an exact semver version of ${block.pieceName}`;
|
|
1039
|
+
}
|
|
1040
|
+
function findStepOrTrigger(state, id) {
|
|
1041
|
+
if (state.trigger?.id === id) return state.trigger;
|
|
1042
|
+
return state.steps.find((step) => step.id === id);
|
|
1043
|
+
}
|
|
1044
|
+
function toPropertySettings(input) {
|
|
1045
|
+
return input.map((setting) => ({
|
|
1046
|
+
prop: setting.prop,
|
|
1047
|
+
mode: setting.mode,
|
|
1048
|
+
schema: setting.schema ?? null
|
|
1049
|
+
}));
|
|
1050
|
+
}
|
|
1051
|
+
function cloneJson(value) {
|
|
1052
|
+
return JSON.parse(JSON.stringify(value));
|
|
1053
|
+
}
|
|
1054
|
+
function isConfigObject(config) {
|
|
1055
|
+
return config !== null && typeof config === "object" && !Array.isArray(config);
|
|
1056
|
+
}
|
|
1057
|
+
//#endregion
|
|
1058
|
+
//#region document-models/workflow/v1/src/reducers/publishing.ts
|
|
1059
|
+
const workflowPublishingOperations = {
|
|
1060
|
+
publishWorkflowOperation(state, action) {
|
|
1061
|
+
state.published = cloneJson({
|
|
1062
|
+
version: state.version,
|
|
1063
|
+
publishedAt: action.input.publishedAt,
|
|
1064
|
+
trigger: state.trigger,
|
|
1065
|
+
steps: state.steps,
|
|
1066
|
+
edges: state.edges,
|
|
1067
|
+
variables: state.variables,
|
|
1068
|
+
policy: state.policy
|
|
1069
|
+
});
|
|
1070
|
+
},
|
|
1071
|
+
revertToPublishedOperation(state, _action) {
|
|
1072
|
+
if (!state.published) throw new NothingPublishedError("Workflow has never been published");
|
|
1073
|
+
const snapshot = cloneJson(state.published);
|
|
1074
|
+
state.trigger = snapshot.trigger;
|
|
1075
|
+
state.steps = snapshot.steps;
|
|
1076
|
+
state.edges = snapshot.edges;
|
|
1077
|
+
state.variables = snapshot.variables;
|
|
1078
|
+
state.policy = snapshot.policy;
|
|
1079
|
+
state.version = snapshot.version;
|
|
1080
|
+
}
|
|
1081
|
+
};
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region document-models/workflow/v1/gen/runtime/error.ts
|
|
1084
|
+
var LastTestTargetNotFoundError = class extends Error {
|
|
1085
|
+
errorCode = "LastTestTargetNotFoundError";
|
|
1086
|
+
constructor(message = "LastTestTargetNotFoundError") {
|
|
1087
|
+
super(message);
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
//#endregion
|
|
758
1091
|
//#region document-models/workflow/v1/src/reducers/runtime.ts
|
|
759
|
-
const workflowRuntimeOperations = {
|
|
760
|
-
state
|
|
761
|
-
|
|
762
|
-
|
|
1092
|
+
const workflowRuntimeOperations = {
|
|
1093
|
+
setLastRunOperation(state, action) {
|
|
1094
|
+
state.lastRunAt = action.input.lastRunAt;
|
|
1095
|
+
state.lastRunStatus = action.input.lastRunStatus;
|
|
1096
|
+
},
|
|
1097
|
+
setLastTestOperation(state, action) {
|
|
1098
|
+
const target = findStepOrTrigger(state, action.input.id);
|
|
1099
|
+
if (!target) throw new LastTestTargetNotFoundError("Step or trigger not found");
|
|
1100
|
+
target.lastTest = {
|
|
1101
|
+
runId: action.input.runId,
|
|
1102
|
+
testedAt: action.input.testedAt
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
763
1106
|
//#endregion
|
|
764
1107
|
//#region document-models/workflow/v1/gen/steps/error.ts
|
|
765
1108
|
var DuplicateStepIdError = class extends Error {
|
|
@@ -774,6 +1117,18 @@ var DuplicateStepKeyError = class extends Error {
|
|
|
774
1117
|
super(message);
|
|
775
1118
|
}
|
|
776
1119
|
};
|
|
1120
|
+
var InvalidStepBlockError = class extends Error {
|
|
1121
|
+
errorCode = "InvalidStepBlockError";
|
|
1122
|
+
constructor(message = "InvalidStepBlockError") {
|
|
1123
|
+
super(message);
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
var StepConfigNotObjectError = class extends Error {
|
|
1127
|
+
errorCode = "StepConfigNotObjectError";
|
|
1128
|
+
constructor(message = "StepConfigNotObjectError") {
|
|
1129
|
+
super(message);
|
|
1130
|
+
}
|
|
1131
|
+
};
|
|
777
1132
|
var StepNotFoundError = class extends Error {
|
|
778
1133
|
errorCode = "StepNotFoundError";
|
|
779
1134
|
constructor(message = "StepNotFoundError") {
|
|
@@ -786,6 +1141,18 @@ var StepKeyConflictError = class extends Error {
|
|
|
786
1141
|
super(message);
|
|
787
1142
|
}
|
|
788
1143
|
};
|
|
1144
|
+
var InvalidUpdateBlockError = class extends Error {
|
|
1145
|
+
errorCode = "InvalidUpdateBlockError";
|
|
1146
|
+
constructor(message = "InvalidUpdateBlockError") {
|
|
1147
|
+
super(message);
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1150
|
+
var UpdateConfigNotObjectError = class extends Error {
|
|
1151
|
+
errorCode = "UpdateConfigNotObjectError";
|
|
1152
|
+
constructor(message = "UpdateConfigNotObjectError") {
|
|
1153
|
+
super(message);
|
|
1154
|
+
}
|
|
1155
|
+
};
|
|
789
1156
|
var RemoveStepNotFoundError = class extends Error {
|
|
790
1157
|
errorCode = "RemoveStepNotFoundError";
|
|
791
1158
|
constructor(message = "RemoveStepNotFoundError") {
|
|
@@ -798,41 +1165,75 @@ var ConfigStepNotFoundError = class extends Error {
|
|
|
798
1165
|
super(message);
|
|
799
1166
|
}
|
|
800
1167
|
};
|
|
1168
|
+
var SetConfigNotObjectError = class extends Error {
|
|
1169
|
+
errorCode = "SetConfigNotObjectError";
|
|
1170
|
+
constructor(message = "SetConfigNotObjectError") {
|
|
1171
|
+
super(message);
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
801
1174
|
//#endregion
|
|
802
1175
|
//#region document-models/workflow/v1/src/reducers/steps.ts
|
|
803
1176
|
const workflowStepsOperations = {
|
|
804
1177
|
addStepOperation(state, action) {
|
|
805
1178
|
if (state.steps.some((step) => step.id === action.input.id)) throw new DuplicateStepIdError("A step with this id already exists");
|
|
806
1179
|
if (state.steps.some((step) => step.key === action.input.key)) throw new DuplicateStepKeyError("A step with this key already exists");
|
|
1180
|
+
const invalid = invalidBlock("action", {
|
|
1181
|
+
pieceName: action.input.pieceName,
|
|
1182
|
+
pieceVersion: action.input.pieceVersion,
|
|
1183
|
+
name: action.input.actionName
|
|
1184
|
+
});
|
|
1185
|
+
if (invalid) throw new InvalidStepBlockError(invalid);
|
|
1186
|
+
if (!isConfigObject(action.input.config)) throw new StepConfigNotObjectError("A step config must be an object");
|
|
807
1187
|
state.steps.push({
|
|
808
1188
|
id: action.input.id,
|
|
809
1189
|
key: action.input.key,
|
|
810
1190
|
name: action.input.name,
|
|
811
|
-
|
|
1191
|
+
pieceName: action.input.pieceName,
|
|
1192
|
+
pieceVersion: action.input.pieceVersion,
|
|
1193
|
+
actionName: action.input.actionName,
|
|
812
1194
|
connectionId: action.input.connectionId || null,
|
|
813
1195
|
config: action.input.config,
|
|
814
1196
|
retry: action.input.retry ?? null,
|
|
815
1197
|
timeoutSeconds: action.input.timeoutSeconds ?? null,
|
|
816
1198
|
idempotencyKeyExpression: action.input.idempotencyKeyExpression || null,
|
|
817
|
-
position: action.input.position ?? null
|
|
1199
|
+
position: action.input.position ?? null,
|
|
1200
|
+
propertySettings: action.input.propertySettings ? toPropertySettings(action.input.propertySettings) : null,
|
|
1201
|
+
lastTest: null,
|
|
1202
|
+
skip: action.input.skip ?? null,
|
|
1203
|
+
updatedAt: action.timestampUtcMs
|
|
818
1204
|
});
|
|
819
1205
|
state.version += 1;
|
|
820
1206
|
},
|
|
821
1207
|
updateStepOperation(state, action) {
|
|
822
1208
|
const step = state.steps.find((step) => step.id === action.input.id);
|
|
823
1209
|
if (!step) throw new StepNotFoundError("Step not found");
|
|
1210
|
+
const pieceName = action.input.pieceName ?? step.pieceName;
|
|
1211
|
+
const pieceVersion = action.input.pieceVersion ?? step.pieceVersion;
|
|
1212
|
+
const actionName = action.input.actionName ?? step.actionName;
|
|
1213
|
+
const invalid = invalidBlock("action", {
|
|
1214
|
+
pieceName,
|
|
1215
|
+
pieceVersion,
|
|
1216
|
+
name: actionName
|
|
1217
|
+
});
|
|
1218
|
+
if (invalid) throw new InvalidUpdateBlockError(invalid);
|
|
1219
|
+
const { config } = action.input;
|
|
1220
|
+
if (config !== void 0 && config !== null && !isConfigObject(config)) throw new UpdateConfigNotObjectError("A step config must be an object");
|
|
824
1221
|
if (action.input.key) {
|
|
825
1222
|
if (state.steps.some((other) => other.key === action.input.key && other.id !== action.input.id)) throw new StepKeyConflictError("Another step already uses this key");
|
|
826
1223
|
step.key = action.input.key;
|
|
827
1224
|
}
|
|
828
1225
|
if (action.input.name) step.name = action.input.name;
|
|
829
|
-
|
|
1226
|
+
step.pieceName = pieceName;
|
|
1227
|
+
step.pieceVersion = pieceVersion;
|
|
1228
|
+
step.actionName = actionName;
|
|
830
1229
|
if (action.input.connectionId !== void 0) step.connectionId = action.input.connectionId || null;
|
|
831
1230
|
if (action.input.config !== void 0 && action.input.config !== null) step.config = action.input.config;
|
|
832
1231
|
if (action.input.retry !== void 0) step.retry = action.input.retry ?? null;
|
|
833
1232
|
if (action.input.timeoutSeconds !== void 0) step.timeoutSeconds = action.input.timeoutSeconds ?? null;
|
|
834
1233
|
if (action.input.idempotencyKeyExpression !== void 0) step.idempotencyKeyExpression = action.input.idempotencyKeyExpression || null;
|
|
835
1234
|
if (action.input.position !== void 0) step.position = action.input.position ?? null;
|
|
1235
|
+
if (action.input.skip !== void 0) step.skip = action.input.skip ?? null;
|
|
1236
|
+
step.updatedAt = action.timestampUtcMs;
|
|
836
1237
|
state.version += 1;
|
|
837
1238
|
},
|
|
838
1239
|
removeStepOperation(state, action) {
|
|
@@ -845,12 +1246,27 @@ const workflowStepsOperations = {
|
|
|
845
1246
|
setStepConfigOperation(state, action) {
|
|
846
1247
|
const step = state.steps.find((step) => step.id === action.input.id);
|
|
847
1248
|
if (!step) throw new ConfigStepNotFoundError("Step not found");
|
|
1249
|
+
if (!isConfigObject(action.input.config)) throw new SetConfigNotObjectError("A step config must be an object");
|
|
1250
|
+
if (JSON.stringify(step.config) !== JSON.stringify(action.input.config)) step.updatedAt = action.timestampUtcMs;
|
|
848
1251
|
step.config = action.input.config;
|
|
1252
|
+
if (action.input.propertySettings !== void 0) step.propertySettings = action.input.propertySettings ? toPropertySettings(action.input.propertySettings) : null;
|
|
849
1253
|
state.version += 1;
|
|
850
1254
|
}
|
|
851
1255
|
};
|
|
852
1256
|
//#endregion
|
|
853
1257
|
//#region document-models/workflow/v1/gen/trigger/error.ts
|
|
1258
|
+
var InvalidTriggerBlockError = class extends Error {
|
|
1259
|
+
errorCode = "InvalidTriggerBlockError";
|
|
1260
|
+
constructor(message = "InvalidTriggerBlockError") {
|
|
1261
|
+
super(message);
|
|
1262
|
+
}
|
|
1263
|
+
};
|
|
1264
|
+
var TriggerConfigNotObjectError = class extends Error {
|
|
1265
|
+
errorCode = "TriggerConfigNotObjectError";
|
|
1266
|
+
constructor(message = "TriggerConfigNotObjectError") {
|
|
1267
|
+
super(message);
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
854
1270
|
var TriggerNotSetError = class extends Error {
|
|
855
1271
|
errorCode = "TriggerNotSetError";
|
|
856
1272
|
constructor(message = "TriggerNotSetError") {
|
|
@@ -861,12 +1277,26 @@ var TriggerNotSetError = class extends Error {
|
|
|
861
1277
|
//#region document-models/workflow/v1/src/reducers/trigger.ts
|
|
862
1278
|
const workflowTriggerOperations = {
|
|
863
1279
|
setTriggerOperation(state, action) {
|
|
1280
|
+
const { input } = action;
|
|
1281
|
+
const invalid = invalidBlock("trigger", {
|
|
1282
|
+
pieceName: input.pieceName,
|
|
1283
|
+
pieceVersion: input.pieceVersion,
|
|
1284
|
+
name: input.triggerName
|
|
1285
|
+
});
|
|
1286
|
+
if (invalid) throw new InvalidTriggerBlockError(invalid);
|
|
1287
|
+
if (!isConfigObject(input.config)) throw new TriggerConfigNotObjectError("The trigger config must be an object");
|
|
1288
|
+
const current = state.trigger;
|
|
1289
|
+
const previous = current && current.id === input.id && current.pieceName === input.pieceName && current.pieceVersion === input.pieceVersion && current.triggerName === input.triggerName ? current : null;
|
|
864
1290
|
state.trigger = {
|
|
865
|
-
id:
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
1291
|
+
id: input.id,
|
|
1292
|
+
pieceName: input.pieceName,
|
|
1293
|
+
pieceVersion: input.pieceVersion,
|
|
1294
|
+
triggerName: input.triggerName,
|
|
1295
|
+
connectionId: input.connectionId || null,
|
|
1296
|
+
config: input.config,
|
|
1297
|
+
propertySettings: input.propertySettings === void 0 ? previous?.propertySettings ?? null : input.propertySettings ? toPropertySettings(input.propertySettings) : null,
|
|
1298
|
+
lastTest: previous?.lastTest ?? null,
|
|
1299
|
+
updatedAt: action.timestampUtcMs
|
|
870
1300
|
};
|
|
871
1301
|
state.version += 1;
|
|
872
1302
|
},
|
|
@@ -880,6 +1310,18 @@ const workflowTriggerOperations = {
|
|
|
880
1310
|
};
|
|
881
1311
|
//#endregion
|
|
882
1312
|
//#region document-models/workflow/v1/gen/variables/error.ts
|
|
1313
|
+
var SecretVariableValueError = class extends Error {
|
|
1314
|
+
errorCode = "SecretVariableValueError";
|
|
1315
|
+
constructor(message = "SecretVariableValueError") {
|
|
1316
|
+
super(message);
|
|
1317
|
+
}
|
|
1318
|
+
};
|
|
1319
|
+
var DuplicateVariableKeyError = class extends Error {
|
|
1320
|
+
errorCode = "DuplicateVariableKeyError";
|
|
1321
|
+
constructor(message = "DuplicateVariableKeyError") {
|
|
1322
|
+
super(message);
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
883
1325
|
var VariableNotFoundError = class extends Error {
|
|
884
1326
|
errorCode = "VariableNotFoundError";
|
|
885
1327
|
constructor(message = "VariableNotFoundError") {
|
|
@@ -890,15 +1332,22 @@ var VariableNotFoundError = class extends Error {
|
|
|
890
1332
|
//#region document-models/workflow/v1/src/reducers/variables.ts
|
|
891
1333
|
const workflowVariablesOperations = {
|
|
892
1334
|
setVariableOperation(state, action) {
|
|
893
|
-
const existing = state.variables.find((variable) => variable.
|
|
1335
|
+
const existing = state.variables.find((variable) => variable.id === action.input.id);
|
|
1336
|
+
if (state.variables.some((variable) => variable.key === action.input.key && variable.id !== action.input.id)) throw new DuplicateVariableKeyError(`Another variable already uses the key "${action.input.key}"`);
|
|
1337
|
+
const value = action.input.value ?? null;
|
|
1338
|
+
const type = action.input.type === void 0 ? existing?.type ?? null : action.input.type;
|
|
1339
|
+
if (type === "SECRET" && value !== null && typeof value !== "string") throw new SecretVariableValueError("A SECRET variable's value must be a secret reference string");
|
|
894
1340
|
if (existing) {
|
|
895
|
-
existing.
|
|
1341
|
+
existing.key = action.input.key;
|
|
1342
|
+
existing.value = value;
|
|
1343
|
+
existing.type = type;
|
|
896
1344
|
if (action.input.description !== void 0) existing.description = action.input.description || null;
|
|
897
1345
|
} else state.variables.push({
|
|
898
1346
|
id: action.input.id,
|
|
899
1347
|
key: action.input.key,
|
|
900
|
-
value
|
|
901
|
-
description: action.input.description || null
|
|
1348
|
+
value,
|
|
1349
|
+
description: action.input.description || null,
|
|
1350
|
+
type
|
|
902
1351
|
});
|
|
903
1352
|
state.version += 1;
|
|
904
1353
|
},
|
|
@@ -910,6 +1359,14 @@ const workflowVariablesOperations = {
|
|
|
910
1359
|
}
|
|
911
1360
|
};
|
|
912
1361
|
//#endregion
|
|
1362
|
+
//#region document-models/workflow/v1/gen/workflow/error.ts
|
|
1363
|
+
var WorkflowNotPublishedError = class extends Error {
|
|
1364
|
+
errorCode = "WorkflowNotPublishedError";
|
|
1365
|
+
constructor(message = "WorkflowNotPublishedError") {
|
|
1366
|
+
super(message);
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
//#endregion
|
|
913
1370
|
//#region document-models/workflow/v1/src/reducers/workflow.ts
|
|
914
1371
|
const workflowWorkflowOperations = {
|
|
915
1372
|
setWorkflowNameOperation(state, action) {
|
|
@@ -919,74 +1376,96 @@ const workflowWorkflowOperations = {
|
|
|
919
1376
|
state.description = action.input.description || null;
|
|
920
1377
|
},
|
|
921
1378
|
setWorkflowStatusOperation(state, action) {
|
|
1379
|
+
if (action.input.status === "ENABLED" && !state.published) throw new WorkflowNotPublishedError("Publish the workflow before enabling it");
|
|
922
1380
|
state.status = action.input.status;
|
|
923
1381
|
}
|
|
924
1382
|
};
|
|
925
1383
|
//#endregion
|
|
926
1384
|
//#region document-models/workflow/v1/gen/reducer.ts
|
|
1385
|
+
const schemaMemo = /* @__PURE__ */ new Map();
|
|
1386
|
+
function memoizedSchema(makeSchema) {
|
|
1387
|
+
let schema = schemaMemo.get(makeSchema);
|
|
1388
|
+
if (schema === void 0) {
|
|
1389
|
+
schema = makeSchema();
|
|
1390
|
+
schemaMemo.set(makeSchema, schema);
|
|
1391
|
+
}
|
|
1392
|
+
return schema;
|
|
1393
|
+
}
|
|
927
1394
|
const stateReducer = (state, action, dispatch) => {
|
|
928
1395
|
if (isDocumentAction(action)) return state;
|
|
929
1396
|
switch (action.type) {
|
|
930
1397
|
case "SET_WORKFLOW_NAME":
|
|
931
|
-
SetWorkflowNameInputSchema
|
|
1398
|
+
memoizedSchema(SetWorkflowNameInputSchema).parse(action.input);
|
|
932
1399
|
workflowWorkflowOperations.setWorkflowNameOperation(state[action.scope], action, dispatch);
|
|
933
1400
|
break;
|
|
934
1401
|
case "SET_WORKFLOW_DESCRIPTION":
|
|
935
|
-
SetWorkflowDescriptionInputSchema
|
|
1402
|
+
memoizedSchema(SetWorkflowDescriptionInputSchema).parse(action.input);
|
|
936
1403
|
workflowWorkflowOperations.setWorkflowDescriptionOperation(state[action.scope], action, dispatch);
|
|
937
1404
|
break;
|
|
938
1405
|
case "SET_WORKFLOW_STATUS":
|
|
939
|
-
SetWorkflowStatusInputSchema
|
|
1406
|
+
memoizedSchema(SetWorkflowStatusInputSchema).parse(action.input);
|
|
940
1407
|
workflowWorkflowOperations.setWorkflowStatusOperation(state[action.scope], action, dispatch);
|
|
941
1408
|
break;
|
|
942
1409
|
case "SET_TRIGGER":
|
|
943
|
-
SetTriggerInputSchema
|
|
1410
|
+
memoizedSchema(SetTriggerInputSchema).parse(action.input);
|
|
944
1411
|
workflowTriggerOperations.setTriggerOperation(state[action.scope], action, dispatch);
|
|
945
1412
|
break;
|
|
946
1413
|
case "CLEAR_TRIGGER":
|
|
947
|
-
ClearTriggerInputSchema
|
|
1414
|
+
memoizedSchema(ClearTriggerInputSchema).parse(action.input);
|
|
948
1415
|
workflowTriggerOperations.clearTriggerOperation(state[action.scope], action, dispatch);
|
|
949
1416
|
break;
|
|
950
1417
|
case "ADD_STEP":
|
|
951
|
-
AddStepInputSchema
|
|
1418
|
+
memoizedSchema(AddStepInputSchema).parse(action.input);
|
|
952
1419
|
workflowStepsOperations.addStepOperation(state[action.scope], action, dispatch);
|
|
953
1420
|
break;
|
|
954
1421
|
case "UPDATE_STEP":
|
|
955
|
-
UpdateStepInputSchema
|
|
1422
|
+
memoizedSchema(UpdateStepInputSchema).parse(action.input);
|
|
956
1423
|
workflowStepsOperations.updateStepOperation(state[action.scope], action, dispatch);
|
|
957
1424
|
break;
|
|
958
1425
|
case "REMOVE_STEP":
|
|
959
|
-
RemoveStepInputSchema
|
|
1426
|
+
memoizedSchema(RemoveStepInputSchema).parse(action.input);
|
|
960
1427
|
workflowStepsOperations.removeStepOperation(state[action.scope], action, dispatch);
|
|
961
1428
|
break;
|
|
962
1429
|
case "SET_STEP_CONFIG":
|
|
963
|
-
SetStepConfigInputSchema
|
|
1430
|
+
memoizedSchema(SetStepConfigInputSchema).parse(action.input);
|
|
964
1431
|
workflowStepsOperations.setStepConfigOperation(state[action.scope], action, dispatch);
|
|
965
1432
|
break;
|
|
966
1433
|
case "ADD_EDGE":
|
|
967
|
-
AddEdgeInputSchema
|
|
1434
|
+
memoizedSchema(AddEdgeInputSchema).parse(action.input);
|
|
968
1435
|
workflowEdgesOperations.addEdgeOperation(state[action.scope], action, dispatch);
|
|
969
1436
|
break;
|
|
970
1437
|
case "REMOVE_EDGE":
|
|
971
|
-
RemoveEdgeInputSchema
|
|
1438
|
+
memoizedSchema(RemoveEdgeInputSchema).parse(action.input);
|
|
972
1439
|
workflowEdgesOperations.removeEdgeOperation(state[action.scope], action, dispatch);
|
|
973
1440
|
break;
|
|
974
1441
|
case "SET_VARIABLE":
|
|
975
|
-
SetVariableInputSchema
|
|
1442
|
+
memoizedSchema(SetVariableInputSchema).parse(action.input);
|
|
976
1443
|
workflowVariablesOperations.setVariableOperation(state[action.scope], action, dispatch);
|
|
977
1444
|
break;
|
|
978
1445
|
case "REMOVE_VARIABLE":
|
|
979
|
-
RemoveVariableInputSchema
|
|
1446
|
+
memoizedSchema(RemoveVariableInputSchema).parse(action.input);
|
|
980
1447
|
workflowVariablesOperations.removeVariableOperation(state[action.scope], action, dispatch);
|
|
981
1448
|
break;
|
|
982
1449
|
case "SET_POLICY":
|
|
983
|
-
SetPolicyInputSchema
|
|
1450
|
+
memoizedSchema(SetPolicyInputSchema).parse(action.input);
|
|
984
1451
|
workflowPolicyOperations.setPolicyOperation(state[action.scope], action, dispatch);
|
|
985
1452
|
break;
|
|
986
1453
|
case "SET_LAST_RUN":
|
|
987
|
-
SetLastRunInputSchema
|
|
1454
|
+
memoizedSchema(SetLastRunInputSchema).parse(action.input);
|
|
988
1455
|
workflowRuntimeOperations.setLastRunOperation(state[action.scope], action, dispatch);
|
|
989
1456
|
break;
|
|
1457
|
+
case "SET_LAST_TEST":
|
|
1458
|
+
memoizedSchema(SetLastTestInputSchema).parse(action.input);
|
|
1459
|
+
workflowRuntimeOperations.setLastTestOperation(state[action.scope], action, dispatch);
|
|
1460
|
+
break;
|
|
1461
|
+
case "PUBLISH_WORKFLOW":
|
|
1462
|
+
memoizedSchema(PublishWorkflowInputSchema).parse(action.input);
|
|
1463
|
+
workflowPublishingOperations.publishWorkflowOperation(state[action.scope], action, dispatch);
|
|
1464
|
+
break;
|
|
1465
|
+
case "REVERT_TO_PUBLISHED":
|
|
1466
|
+
memoizedSchema(RevertToPublishedInputSchema).parse(action.input);
|
|
1467
|
+
workflowPublishingOperations.revertToPublishedOperation(state[action.scope], action, dispatch);
|
|
1468
|
+
break;
|
|
990
1469
|
default: return state;
|
|
991
1470
|
}
|
|
992
1471
|
};
|
|
@@ -1068,6 +1547,7 @@ const initialGlobalState = {
|
|
|
1068
1547
|
retainRunsDays: 30,
|
|
1069
1548
|
journalAsDocument: false
|
|
1070
1549
|
},
|
|
1550
|
+
published: null,
|
|
1071
1551
|
lastRunAt: null,
|
|
1072
1552
|
lastRunStatus: null
|
|
1073
1553
|
};
|
|
@@ -1136,6 +1616,6 @@ const Workflow = {
|
|
|
1136
1616
|
documentModel: createState(defaultBaseState(), documentModel)
|
|
1137
1617
|
};
|
|
1138
1618
|
//#endregion
|
|
1139
|
-
export {
|
|
1619
|
+
export { ConcurrencyModeSchema as $, addStep as A, WorkflowEdgeSchema as At, revertToPublished as B, setWorkflowStatus as C, SetWorkflowStatusInputSchema as Ct, clearTrigger as D, UpdateStepPositionInputSchema as Dt, setVariable as E, UpdateStepInputSchema as Et, creators_exports$4 as F, WorkflowVariableSchema as Ft, removeEdge as G, setPolicy as H, setLastRun as I, definedNonNullAnySchema as It, AddStepPositionInputSchema as J, AddEdgeInputSchema as K, setLastTest as L, isDefinedNonNullAny as Lt, removeStep as M, WorkflowStateSchema as Mt, setStepConfig as N, WorkflowStatusSchema as Nt, creators_exports$2 as O, UpdateStepRetryPolicyInputSchema as Ot, updateStep as P, WorkflowStepSchema as Pt, ClearTriggerInputSchema as Q, creators_exports$5 as R, blockKey as Rt, setWorkflowName as S, SetWorkflowNameInputSchema as St, removeVariable as T, TriggerBindingSchema as Tt, addEdge as U, creators_exports$6 as V, creators_exports$7 as W, AddStepRetryPolicyInputSchema as X, AddStepPropertySettingInputSchema as Y, BackoffKindSchema as Z, reducer as _, SetStepConfigPropertySettingInputSchema as _t, utils$1 as a, PublishedWorkflowSchema as at, creators_exports as b, SetVariableInputSchema as bt, WorkflowPHStateSchema as c, RemoveVariableInputSchema as ct, isWorkflowDocument as d, RunStatusSchema as dt, FailureModeSchema as et, isWorkflowState as f, SetLastRunInputSchema as ft, supportedVersions as g, SetStepConfigInputSchema as gt, latestVersion as h, SetPolicyRetryPolicyInputSchema as ht, initialLocalState as i, PublishWorkflowInputSchema as it, creators_exports$3 as j, WorkflowPolicySchema as jt, setTrigger as k, VariableTypeSchema as kt, assertIsWorkflowDocument as l, RetryPolicySchema as lt, workflowUpgradeManifest as m, SetPolicyInputSchema as mt, utils as n, PropertyModeSchema as nt, WorkflowDocumentHeaderSchema as o, RemoveEdgeInputSchema as ot, workflowDocumentType as p, SetLastTestInputSchema as pt, AddStepInputSchema as q, initialGlobalState as r, PropertySettingSchema as rt, WorkflowDocumentSchema as s, RemoveStepInputSchema as st, Workflow as t, PointSchema as tt, assertIsWorkflowState as u, RevertToPublishedInputSchema as ut, documentModel as v, SetTriggerInputSchema as vt, creators_exports$1 as w, StepTestRecordSchema as wt, setWorkflowDescription as x, SetWorkflowDescriptionInputSchema as xt, actions as y, SetTriggerPropertySettingInputSchema as yt, publishWorkflow as z, compareVersions as zt };
|
|
1140
1620
|
|
|
1141
|
-
//# sourceMappingURL=module-
|
|
1621
|
+
//# sourceMappingURL=module-DU2vb3FH.js.map
|