next-workflow-builder 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/components/ai-elements/canvas.d.ts +9 -0
- package/dist/client/components/ai-elements/canvas.d.ts.map +1 -0
- package/dist/client/components/ai-elements/canvas.js +7 -0
- package/dist/client/components/ai-elements/canvas.js.map +1 -0
- package/dist/client/components/ai-elements/connection.d.ts +3 -0
- package/dist/client/components/ai-elements/connection.d.ts.map +1 -0
- package/dist/client/components/ai-elements/connection.js +4 -0
- package/dist/client/components/ai-elements/connection.js.map +1 -0
- package/dist/client/components/ai-elements/controls.d.ts +2 -0
- package/dist/client/components/ai-elements/controls.d.ts.map +1 -0
- package/dist/client/components/ai-elements/controls.js +26 -0
- package/dist/client/components/ai-elements/controls.js.map +1 -0
- package/dist/client/components/ai-elements/edge.d.ts +6 -0
- package/dist/client/components/ai-elements/edge.d.ts.map +1 -0
- package/dist/client/components/ai-elements/edge.js +86 -0
- package/dist/client/components/ai-elements/edge.js.map +1 -0
- package/dist/client/components/ai-elements/node.d.ts +23 -0
- package/dist/client/components/ai-elements/node.d.ts.map +1 -0
- package/dist/client/components/ai-elements/node.js +13 -0
- package/dist/client/components/ai-elements/node.js.map +1 -0
- package/dist/client/components/ai-elements/panel.d.ts +6 -0
- package/dist/client/components/ai-elements/panel.d.ts.map +1 -0
- package/dist/client/components/ai-elements/panel.js +5 -0
- package/dist/client/components/ai-elements/panel.js.map +1 -0
- package/dist/client/components/ai-elements/prompt.d.ts +7 -0
- package/dist/client/components/ai-elements/prompt.d.ts.map +1 -0
- package/dist/client/components/ai-elements/prompt.js +220 -0
- package/dist/client/components/ai-elements/prompt.js.map +1 -0
- package/dist/client/components/ai-elements/shimmer.d.ts +10 -0
- package/dist/client/components/ai-elements/shimmer.d.ts.map +1 -0
- package/dist/client/components/ai-elements/shimmer.js +19 -0
- package/dist/client/components/ai-elements/shimmer.js.map +1 -0
- package/dist/client/components/auth/dialog.d.ts +8 -0
- package/dist/client/components/auth/dialog.d.ts.map +1 -0
- package/dist/client/components/auth/dialog.js +181 -0
- package/dist/client/components/auth/dialog.js.map +1 -0
- package/dist/client/components/deploy-button.d.ts +2 -0
- package/dist/client/components/deploy-button.d.ts.map +1 -0
- package/dist/client/components/deploy-button.js +8 -0
- package/dist/client/components/deploy-button.js.map +1 -0
- package/dist/client/components/global-modals.d.ts +2 -0
- package/dist/client/components/global-modals.d.ts.map +1 -0
- package/dist/client/components/global-modals.js +8 -0
- package/dist/client/components/global-modals.js.map +1 -0
- package/dist/client/components/icons/github-icon.d.ts +4 -0
- package/dist/client/components/icons/github-icon.d.ts.map +1 -0
- package/dist/client/components/icons/github-icon.js +5 -0
- package/dist/client/components/icons/github-icon.js.map +1 -0
- package/dist/client/components/index.d.ts +7 -0
- package/dist/client/components/index.d.ts.map +1 -0
- package/dist/client/components/index.js +8 -0
- package/dist/client/components/index.js.map +1 -0
- package/dist/client/components/layout-provider.d.ts +4 -0
- package/dist/client/components/layout-provider.d.ts.map +1 -0
- package/dist/client/components/layout-provider.js +20 -0
- package/dist/client/components/layout-provider.js.map +1 -0
- package/dist/client/components/overlays/add-connection-overlay.d.ts +14 -0
- package/dist/client/components/overlays/add-connection-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/add-connection-overlay.js +218 -0
- package/dist/client/components/overlays/add-connection-overlay.js.map +1 -0
- package/dist/client/components/overlays/api-keys-overlay.d.ts +6 -0
- package/dist/client/components/overlays/api-keys-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/api-keys-overlay.js +124 -0
- package/dist/client/components/overlays/api-keys-overlay.js.map +1 -0
- package/dist/client/components/overlays/configuration-overlay.d.ts +5 -0
- package/dist/client/components/overlays/configuration-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/configuration-overlay.js +325 -0
- package/dist/client/components/overlays/configuration-overlay.js.map +1 -0
- package/dist/client/components/overlays/confirm-overlay.d.ts +15 -0
- package/dist/client/components/overlays/confirm-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/confirm-overlay.js +31 -0
- package/dist/client/components/overlays/confirm-overlay.js.map +1 -0
- package/dist/client/components/overlays/edit-connection-overlay.d.ts +16 -0
- package/dist/client/components/overlays/edit-connection-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/edit-connection-overlay.js +213 -0
- package/dist/client/components/overlays/edit-connection-overlay.js.map +1 -0
- package/dist/client/components/overlays/export-workflow-overlay.d.ts +8 -0
- package/dist/client/components/overlays/export-workflow-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/export-workflow-overlay.js +22 -0
- package/dist/client/components/overlays/export-workflow-overlay.js.map +1 -0
- package/dist/client/components/overlays/integrations-overlay.d.ts +6 -0
- package/dist/client/components/overlays/integrations-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/integrations-overlay.js +56 -0
- package/dist/client/components/overlays/integrations-overlay.js.map +1 -0
- package/dist/client/components/overlays/make-public-overlay.d.ts +7 -0
- package/dist/client/components/overlays/make-public-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/make-public-overlay.js +17 -0
- package/dist/client/components/overlays/make-public-overlay.js.map +1 -0
- package/dist/client/components/overlays/overlay-container.d.ts +2 -0
- package/dist/client/components/overlays/overlay-container.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-container.js +236 -0
- package/dist/client/components/overlays/overlay-container.js.map +1 -0
- package/dist/client/components/overlays/overlay-footer.d.ts +3 -0
- package/dist/client/components/overlays/overlay-footer.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-footer.js +25 -0
- package/dist/client/components/overlays/overlay-footer.js.map +1 -0
- package/dist/client/components/overlays/overlay-header.d.ts +8 -0
- package/dist/client/components/overlays/overlay-header.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-header.js +32 -0
- package/dist/client/components/overlays/overlay-header.js.map +1 -0
- package/dist/client/components/overlays/overlay-provider.d.ts +17 -0
- package/dist/client/components/overlays/overlay-provider.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-provider.js +120 -0
- package/dist/client/components/overlays/overlay-provider.js.map +1 -0
- package/dist/client/components/overlays/overlay-sync.d.ts +2 -0
- package/dist/client/components/overlays/overlay-sync.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay-sync.js +21 -0
- package/dist/client/components/overlays/overlay-sync.js.map +1 -0
- package/dist/client/components/overlays/overlay.d.ts +7 -0
- package/dist/client/components/overlays/overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/overlay.js +9 -0
- package/dist/client/components/overlays/overlay.js.map +1 -0
- package/dist/client/components/overlays/settings-overlay.d.ts +6 -0
- package/dist/client/components/overlays/settings-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/settings-overlay.js +64 -0
- package/dist/client/components/overlays/settings-overlay.js.map +1 -0
- package/dist/client/components/overlays/types.d.ts +64 -0
- package/dist/client/components/overlays/types.d.ts.map +1 -0
- package/dist/client/components/overlays/types.js +2 -0
- package/dist/client/components/overlays/types.js.map +1 -0
- package/dist/client/components/overlays/workflow-issues-overlay.d.ts +37 -0
- package/dist/client/components/overlays/workflow-issues-overlay.d.ts.map +1 -0
- package/dist/client/components/overlays/workflow-issues-overlay.js +67 -0
- package/dist/client/components/overlays/workflow-issues-overlay.js.map +1 -0
- package/dist/client/components/pages/home-page.d.ts +3 -0
- package/dist/client/components/pages/home-page.d.ts.map +1 -0
- package/dist/client/components/pages/home-page.js +100 -0
- package/dist/client/components/pages/home-page.js.map +1 -0
- package/dist/client/components/pages/workflow-page.d.ts +4 -0
- package/dist/client/components/pages/workflow-page.d.ts.map +1 -0
- package/dist/client/components/pages/workflow-page.js +23 -0
- package/dist/client/components/pages/workflow-page.js.map +1 -0
- package/dist/client/components/pages/workflows-redirect.d.ts +3 -0
- package/dist/client/components/pages/workflows-redirect.d.ts.map +1 -0
- package/dist/client/components/pages/workflows-redirect.js +30 -0
- package/dist/client/components/pages/workflows-redirect.js.map +1 -0
- package/dist/client/components/settings/account-settings.d.ts +9 -0
- package/dist/client/components/settings/account-settings.d.ts.map +1 -0
- package/dist/client/components/settings/account-settings.js +8 -0
- package/dist/client/components/settings/account-settings.js.map +1 -0
- package/dist/client/components/settings/integrations-manager.d.ts +7 -0
- package/dist/client/components/settings/integrations-manager.d.ts.map +1 -0
- package/dist/client/components/settings/integrations-manager.js +120 -0
- package/dist/client/components/settings/integrations-manager.js.map +1 -0
- package/dist/client/components/theme-provider.d.ts +5 -0
- package/dist/client/components/theme-provider.d.ts.map +1 -0
- package/dist/client/components/theme-provider.js +6 -0
- package/dist/client/components/theme-provider.js.map +1 -0
- package/dist/client/components/ui/alert-dialog.d.ts +15 -0
- package/dist/client/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/client/components/ui/alert-dialog.js +40 -0
- package/dist/client/components/ui/alert-dialog.js.map +1 -0
- package/dist/client/components/ui/alert.d.ts +10 -0
- package/dist/client/components/ui/alert.d.ts.map +1 -0
- package/dist/client/components/ui/alert.js +25 -0
- package/dist/client/components/ui/alert.js.map +1 -0
- package/dist/client/components/ui/animated-border.d.ts +6 -0
- package/dist/client/components/ui/animated-border.d.ts.map +1 -0
- package/dist/client/components/ui/animated-border.js +34 -0
- package/dist/client/components/ui/animated-border.js.map +1 -0
- package/dist/client/components/ui/avatar.d.ts +7 -0
- package/dist/client/components/ui/avatar.d.ts.map +1 -0
- package/dist/client/components/ui/avatar.js +15 -0
- package/dist/client/components/ui/avatar.js.map +1 -0
- package/dist/client/components/ui/button-group.d.ts +12 -0
- package/dist/client/components/ui/button-group.d.ts.map +1 -0
- package/dist/client/components/ui/button-group.js +28 -0
- package/dist/client/components/ui/button-group.js.map +1 -0
- package/dist/client/components/ui/button.d.ts +11 -0
- package/dist/client/components/ui/button.d.ts.map +1 -0
- package/dist/client/components/ui/button.js +34 -0
- package/dist/client/components/ui/button.js.map +1 -0
- package/dist/client/components/ui/card.d.ts +10 -0
- package/dist/client/components/ui/card.d.ts.map +1 -0
- package/dist/client/components/ui/card.js +25 -0
- package/dist/client/components/ui/card.js.map +1 -0
- package/dist/client/components/ui/checkbox.d.ts +5 -0
- package/dist/client/components/ui/checkbox.d.ts.map +1 -0
- package/dist/client/components/ui/checkbox.js +10 -0
- package/dist/client/components/ui/checkbox.js.map +1 -0
- package/dist/client/components/ui/code-editor.d.ts +3 -0
- package/dist/client/components/ui/code-editor.d.ts.map +1 -0
- package/dist/client/components/ui/code-editor.js +17 -0
- package/dist/client/components/ui/code-editor.js.map +1 -0
- package/dist/client/components/ui/collapsible.d.ts +6 -0
- package/dist/client/components/ui/collapsible.d.ts.map +1 -0
- package/dist/client/components/ui/collapsible.js +14 -0
- package/dist/client/components/ui/collapsible.js.map +1 -0
- package/dist/client/components/ui/context-menu.d.ts +26 -0
- package/dist/client/components/ui/context-menu.d.ts.map +1 -0
- package/dist/client/components/ui/context-menu.js +52 -0
- package/dist/client/components/ui/context-menu.js.map +1 -0
- package/dist/client/components/ui/dialog.d.ts +16 -0
- package/dist/client/components/ui/dialog.d.ts.map +1 -0
- package/dist/client/components/ui/dialog.js +37 -0
- package/dist/client/components/ui/dialog.js.map +1 -0
- package/dist/client/components/ui/drawer.d.ts +14 -0
- package/dist/client/components/ui/drawer.d.ts.map +1 -0
- package/dist/client/components/ui/drawer.js +36 -0
- package/dist/client/components/ui/drawer.js.map +1 -0
- package/dist/client/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/client/components/ui/dropdown-menu.js +52 -0
- package/dist/client/components/ui/dropdown-menu.js.map +1 -0
- package/dist/client/components/ui/input.d.ts +4 -0
- package/dist/client/components/ui/input.d.ts.map +1 -0
- package/dist/client/components/ui/input.js +7 -0
- package/dist/client/components/ui/input.js.map +1 -0
- package/dist/client/components/ui/integration-icon.d.ts +7 -0
- package/dist/client/components/ui/integration-icon.d.ts.map +1 -0
- package/dist/client/components/ui/integration-icon.js +25 -0
- package/dist/client/components/ui/integration-icon.js.map +1 -0
- package/dist/client/components/ui/integration-selector.d.ts +12 -0
- package/dist/client/components/ui/integration-selector.d.ts.map +1 -0
- package/dist/client/components/ui/integration-selector.js +198 -0
- package/dist/client/components/ui/integration-selector.js.map +1 -0
- package/dist/client/components/ui/label.d.ts +5 -0
- package/dist/client/components/ui/label.d.ts.map +1 -0
- package/dist/client/components/ui/label.js +9 -0
- package/dist/client/components/ui/label.js.map +1 -0
- package/dist/client/components/ui/resizable.d.ts +9 -0
- package/dist/client/components/ui/resizable.d.ts.map +1 -0
- package/dist/client/components/ui/resizable.js +16 -0
- package/dist/client/components/ui/resizable.js.map +1 -0
- package/dist/client/components/ui/select.d.ts +16 -0
- package/dist/client/components/ui/select.d.ts.map +1 -0
- package/dist/client/components/ui/select.js +39 -0
- package/dist/client/components/ui/select.js.map +1 -0
- package/dist/client/components/ui/separator.d.ts +5 -0
- package/dist/client/components/ui/separator.d.ts.map +1 -0
- package/dist/client/components/ui/separator.js +9 -0
- package/dist/client/components/ui/separator.js.map +1 -0
- package/dist/client/components/ui/sheet.d.ts +14 -0
- package/dist/client/components/ui/sheet.d.ts.map +1 -0
- package/dist/client/components/ui/sheet.js +41 -0
- package/dist/client/components/ui/sheet.js.map +1 -0
- package/dist/client/components/ui/sonner.d.ts +4 -0
- package/dist/client/components/ui/sonner.d.ts.map +1 -0
- package/dist/client/components/ui/sonner.js +22 -0
- package/dist/client/components/ui/sonner.js.map +1 -0
- package/dist/client/components/ui/spinner.d.ts +4 -0
- package/dist/client/components/ui/spinner.d.ts.map +1 -0
- package/dist/client/components/ui/spinner.js +9 -0
- package/dist/client/components/ui/spinner.js.map +1 -0
- package/dist/client/components/ui/tabs.d.ts +8 -0
- package/dist/client/components/ui/tabs.d.ts.map +1 -0
- package/dist/client/components/ui/tabs.js +18 -0
- package/dist/client/components/ui/tabs.js.map +1 -0
- package/dist/client/components/ui/template-autocomplete.d.ts +14 -0
- package/dist/client/components/ui/template-autocomplete.d.ts.map +1 -0
- package/dist/client/components/ui/template-autocomplete.js +239 -0
- package/dist/client/components/ui/template-autocomplete.js.map +1 -0
- package/dist/client/components/ui/template-badge-input.d.ts +10 -0
- package/dist/client/components/ui/template-badge-input.d.ts.map +1 -0
- package/dist/client/components/ui/template-badge-input.js +360 -0
- package/dist/client/components/ui/template-badge-input.js.map +1 -0
- package/dist/client/components/ui/template-badge-textarea.d.ts +11 -0
- package/dist/client/components/ui/template-badge-textarea.d.ts.map +1 -0
- package/dist/client/components/ui/template-badge-textarea.js +431 -0
- package/dist/client/components/ui/template-badge-textarea.js.map +1 -0
- package/dist/client/components/ui/timezone-select.d.ts +9 -0
- package/dist/client/components/ui/timezone-select.d.ts.map +1 -0
- package/dist/client/components/ui/timezone-select.js +87 -0
- package/dist/client/components/ui/timezone-select.js.map +1 -0
- package/dist/client/components/ui/tooltip.d.ts +8 -0
- package/dist/client/components/ui/tooltip.d.ts.map +1 -0
- package/dist/client/components/ui/tooltip.js +18 -0
- package/dist/client/components/ui/tooltip.js.map +1 -0
- package/dist/client/components/ui/workflow-icon.d.ts +4 -0
- package/dist/client/components/ui/workflow-icon.d.ts.map +1 -0
- package/dist/client/components/ui/workflow-icon.js +5 -0
- package/dist/client/components/ui/workflow-icon.js.map +1 -0
- package/dist/client/components/workflow/config/action-config-renderer.d.ts +10 -0
- package/dist/client/components/workflow/config/action-config-renderer.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-config-renderer.js +64 -0
- package/dist/client/components/workflow/config/action-config-renderer.js.map +1 -0
- package/dist/client/components/workflow/config/action-config.d.ts +9 -0
- package/dist/client/components/workflow/config/action-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-config.js +174 -0
- package/dist/client/components/workflow/config/action-config.js.map +1 -0
- package/dist/client/components/workflow/config/action-grid.d.ts +8 -0
- package/dist/client/components/workflow/config/action-grid.d.ts.map +1 -0
- package/dist/client/components/workflow/config/action-grid.js +162 -0
- package/dist/client/components/workflow/config/action-grid.js.map +1 -0
- package/dist/client/components/workflow/config/condition-config.d.ts +8 -0
- package/dist/client/components/workflow/config/condition-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/condition-config.js +7 -0
- package/dist/client/components/workflow/config/condition-config.js.map +1 -0
- package/dist/client/components/workflow/config/editor-config.d.ts +13 -0
- package/dist/client/components/workflow/config/editor-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/editor-config.js +34 -0
- package/dist/client/components/workflow/config/editor-config.js.map +1 -0
- package/dist/client/components/workflow/config/schema-builder.d.ts +17 -0
- package/dist/client/components/workflow/config/schema-builder.d.ts.map +1 -0
- package/dist/client/components/workflow/config/schema-builder.js +55 -0
- package/dist/client/components/workflow/config/schema-builder.js.map +1 -0
- package/dist/client/components/workflow/config/system-action.d.ts +9 -0
- package/dist/client/components/workflow/config/system-action.d.ts.map +1 -0
- package/dist/client/components/workflow/config/system-action.js +33 -0
- package/dist/client/components/workflow/config/system-action.js.map +1 -0
- package/dist/client/components/workflow/config/trigger-config.d.ts +9 -0
- package/dist/client/components/workflow/config/trigger-config.d.ts.map +1 -0
- package/dist/client/components/workflow/config/trigger-config.js +33 -0
- package/dist/client/components/workflow/config/trigger-config.js.map +1 -0
- package/dist/client/components/workflow/node-config-panel.d.ts +3 -0
- package/dist/client/components/workflow/node-config-panel.d.ts.map +1 -0
- package/dist/client/components/workflow/node-config-panel.js +353 -0
- package/dist/client/components/workflow/node-config-panel.js.map +1 -0
- package/dist/client/components/workflow/nodes/action-node.d.ts +10 -0
- package/dist/client/components/workflow/nodes/action-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/action-node.js +176 -0
- package/dist/client/components/workflow/nodes/action-node.js.map +1 -0
- package/dist/client/components/workflow/nodes/add-node.d.ts +9 -0
- package/dist/client/components/workflow/nodes/add-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/add-node.js +8 -0
- package/dist/client/components/workflow/nodes/add-node.js.map +1 -0
- package/dist/client/components/workflow/nodes/trigger-node.d.ts +8 -0
- package/dist/client/components/workflow/nodes/trigger-node.d.ts.map +1 -0
- package/dist/client/components/workflow/nodes/trigger-node.js +25 -0
- package/dist/client/components/workflow/nodes/trigger-node.js.map +1 -0
- package/dist/client/components/workflow/persistent-canvas.d.ts +2 -0
- package/dist/client/components/workflow/persistent-canvas.d.ts.map +1 -0
- package/dist/client/components/workflow/persistent-canvas.js +13 -0
- package/dist/client/components/workflow/persistent-canvas.js.map +1 -0
- package/dist/client/components/workflow/utils/code-generators.d.ts +12 -0
- package/dist/client/components/workflow/utils/code-generators.d.ts.map +1 -0
- package/dist/client/components/workflow/utils/code-generators.js +70 -0
- package/dist/client/components/workflow/utils/code-generators.js.map +1 -0
- package/dist/client/components/workflow/workflow-canvas.d.ts +3 -0
- package/dist/client/components/workflow/workflow-canvas.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-canvas.js +347 -0
- package/dist/client/components/workflow/workflow-canvas.js.map +1 -0
- package/dist/client/components/workflow/workflow-context-menu.d.ts +27 -0
- package/dist/client/components/workflow/workflow-context-menu.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-context-menu.js +156 -0
- package/dist/client/components/workflow/workflow-context-menu.js.map +1 -0
- package/dist/client/components/workflow/workflow-editor.d.ts +6 -0
- package/dist/client/components/workflow/workflow-editor.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-editor.js +443 -0
- package/dist/client/components/workflow/workflow-editor.js.map +1 -0
- package/dist/client/components/workflow/workflow-runs.d.ts +8 -0
- package/dist/client/components/workflow/workflow-runs.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-runs.js +336 -0
- package/dist/client/components/workflow/workflow-runs.js.map +1 -0
- package/dist/client/components/workflow/workflow-toolbar.d.ts +6 -0
- package/dist/client/components/workflow/workflow-toolbar.d.ts.map +1 -0
- package/dist/client/components/workflow/workflow-toolbar.js +707 -0
- package/dist/client/components/workflow/workflow-toolbar.js.map +1 -0
- package/dist/client/components/workflows/user-menu.d.ts +2 -0
- package/dist/client/components/workflows/user-menu.d.ts.map +1 -0
- package/dist/client/components/workflows/user-menu.js +65 -0
- package/dist/client/components/workflows/user-menu.js.map +1 -0
- package/dist/client/hooks/use-mobile.d.ts +2 -0
- package/dist/client/hooks/use-mobile.d.ts.map +1 -0
- package/dist/client/hooks/use-mobile.js +16 -0
- package/dist/client/hooks/use-mobile.js.map +1 -0
- package/dist/client/hooks/use-touch.d.ts +2 -0
- package/dist/client/hooks/use-touch.d.ts.map +1 -0
- package/dist/client/hooks/use-touch.js +12 -0
- package/dist/client/hooks/use-touch.js.map +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +12 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/package.json +1 -0
- package/dist/lib/api-client.d.ts +330 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +274 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/atoms/overlay.d.ts +15 -0
- package/dist/lib/atoms/overlay.d.ts.map +1 -0
- package/dist/lib/atoms/overlay.js +78 -0
- package/dist/lib/atoms/overlay.js.map +1 -0
- package/dist/lib/auth-client.d.ts +871 -0
- package/dist/lib/auth-client.d.ts.map +1 -0
- package/dist/lib/auth-client.js +10 -0
- package/dist/lib/auth-client.js.map +1 -0
- package/dist/lib/auth-providers.d.ts +12 -0
- package/dist/lib/auth-providers.d.ts.map +1 -0
- package/dist/lib/auth-providers.js +27 -0
- package/dist/lib/auth-providers.js.map +1 -0
- package/dist/lib/auth.d.ts +5 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +62 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/codegen-templates/condition.d.ts +3 -0
- package/dist/lib/codegen-templates/condition.d.ts.map +1 -0
- package/dist/lib/codegen-templates/condition.js +9 -0
- package/dist/lib/codegen-templates/condition.js.map +1 -0
- package/dist/lib/codegen-templates/database-query.d.ts +3 -0
- package/dist/lib/codegen-templates/database-query.d.ts.map +1 -0
- package/dist/lib/codegen-templates/database-query.js +24 -0
- package/dist/lib/codegen-templates/database-query.js.map +1 -0
- package/dist/lib/codegen-templates/http-request.d.ts +3 -0
- package/dist/lib/codegen-templates/http-request.d.ts.map +1 -0
- package/dist/lib/codegen-templates/http-request.js +44 -0
- package/dist/lib/codegen-templates/http-request.js.map +1 -0
- package/dist/lib/condition-validator.d.ts +10 -0
- package/dist/lib/condition-validator.d.ts.map +1 -0
- package/dist/lib/condition-validator.js +230 -0
- package/dist/lib/condition-validator.js.map +1 -0
- package/dist/lib/constants.d.ts +3 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +3 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/credential-fetcher.d.ts +4 -0
- package/dist/lib/credential-fetcher.d.ts.map +1 -0
- package/dist/lib/credential-fetcher.js +38 -0
- package/dist/lib/credential-fetcher.js.map +1 -0
- package/dist/lib/db/index.d.ts +4 -0
- package/dist/lib/db/index.d.ts.map +1 -0
- package/dist/lib/db/index.js +17 -0
- package/dist/lib/db/index.js.map +1 -0
- package/dist/lib/db/integrations.d.ts +36 -0
- package/dist/lib/db/integrations.d.ts.map +1 -0
- package/dist/lib/db/integrations.js +170 -0
- package/dist/lib/db/integrations.js.map +1 -0
- package/dist/lib/db/schema.d.ts +1474 -0
- package/dist/lib/db/schema.d.ts.map +1 -0
- package/dist/lib/db/schema.js +143 -0
- package/dist/lib/db/schema.js.map +1 -0
- package/dist/lib/integrations-store.d.ts +13 -0
- package/dist/lib/integrations-store.d.ts.map +1 -0
- package/dist/lib/integrations-store.js +10 -0
- package/dist/lib/integrations-store.js.map +1 -0
- package/dist/lib/managed-connection.d.ts +49 -0
- package/dist/lib/managed-connection.d.ts.map +1 -0
- package/dist/lib/managed-connection.js +21 -0
- package/dist/lib/managed-connection.js.map +1 -0
- package/dist/lib/monaco-theme.d.ts +29 -0
- package/dist/lib/monaco-theme.d.ts.map +1 -0
- package/dist/lib/monaco-theme.js +54 -0
- package/dist/lib/monaco-theme.js.map +1 -0
- package/dist/lib/plugin-registry.d.ts +10 -0
- package/dist/lib/plugin-registry.d.ts.map +1 -0
- package/dist/lib/plugin-registry.js +16 -0
- package/dist/lib/plugin-registry.js.map +1 -0
- package/dist/lib/steps/credentials.d.ts +14 -0
- package/dist/lib/steps/credentials.d.ts.map +1 -0
- package/dist/lib/steps/credentials.js +65 -0
- package/dist/lib/steps/credentials.js.map +1 -0
- package/dist/lib/steps/http-request.d.ts +22 -0
- package/dist/lib/steps/http-request.d.ts.map +1 -0
- package/dist/lib/steps/http-request.js +72 -0
- package/dist/lib/steps/http-request.js.map +1 -0
- package/dist/lib/steps/index.d.ts +10 -0
- package/dist/lib/steps/index.d.ts.map +1 -0
- package/dist/lib/steps/index.js +14 -0
- package/dist/lib/steps/index.js.map +1 -0
- package/dist/lib/steps/step-handler.d.ts +30 -0
- package/dist/lib/steps/step-handler.d.ts.map +1 -0
- package/dist/lib/steps/step-handler.js +105 -0
- package/dist/lib/steps/step-handler.js.map +1 -0
- package/dist/lib/steps/trigger.d.ts +21 -0
- package/dist/lib/steps/trigger.d.ts.map +1 -0
- package/dist/lib/steps/trigger.js +17 -0
- package/dist/lib/steps/trigger.js.map +1 -0
- package/dist/lib/types/integration.d.ts +3 -0
- package/dist/lib/types/integration.d.ts.map +1 -0
- package/dist/lib/types/integration.js +2 -0
- package/dist/lib/types/integration.js.map +1 -0
- package/dist/lib/utils/format-number.d.ts +2 -0
- package/dist/lib/utils/format-number.d.ts.map +1 -0
- package/dist/lib/utils/format-number.js +16 -0
- package/dist/lib/utils/format-number.js.map +1 -0
- package/dist/lib/utils/id.d.ts +2 -0
- package/dist/lib/utils/id.d.ts.map +1 -0
- package/dist/lib/utils/id.js +6 -0
- package/dist/lib/utils/id.js.map +1 -0
- package/dist/lib/utils/redact.d.ts +4 -0
- package/dist/lib/utils/redact.d.ts.map +1 -0
- package/dist/lib/utils/redact.js +143 -0
- package/dist/lib/utils/redact.js.map +1 -0
- package/dist/lib/utils/template.d.ts +18 -0
- package/dist/lib/utils/template.d.ts.map +1 -0
- package/dist/lib/utils/template.js +323 -0
- package/dist/lib/utils/template.js.map +1 -0
- package/dist/lib/utils/time.d.ts +2 -0
- package/dist/lib/utils/time.d.ts.map +1 -0
- package/dist/lib/utils/time.js +34 -0
- package/dist/lib/utils/time.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +99 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/workflow-codegen-sdk.d.ts +4 -0
- package/dist/lib/workflow-codegen-sdk.d.ts.map +1 -0
- package/dist/lib/workflow-codegen-sdk.js +482 -0
- package/dist/lib/workflow-codegen-sdk.js.map +1 -0
- package/dist/lib/workflow-codegen-shared.d.ts +26 -0
- package/dist/lib/workflow-codegen-shared.d.ts.map +1 -0
- package/dist/lib/workflow-codegen-shared.js +232 -0
- package/dist/lib/workflow-codegen-shared.js.map +1 -0
- package/dist/lib/workflow-codegen.d.ts +18 -0
- package/dist/lib/workflow-codegen.d.ts.map +1 -0
- package/dist/lib/workflow-codegen.js +786 -0
- package/dist/lib/workflow-codegen.js.map +1 -0
- package/dist/lib/workflow-executor.workflow.d.ts +33 -0
- package/dist/lib/workflow-executor.workflow.d.ts.map +1 -0
- package/dist/lib/workflow-executor.workflow.js +605 -0
- package/dist/lib/workflow-executor.workflow.js.map +1 -0
- package/dist/lib/workflow-logging.d.ts +29 -0
- package/dist/lib/workflow-logging.d.ts.map +1 -0
- package/dist/lib/workflow-logging.js +48 -0
- package/dist/lib/workflow-logging.js.map +1 -0
- package/dist/lib/workflow-store.d.ts +118 -0
- package/dist/lib/workflow-store.d.ts.map +1 -0
- package/dist/lib/workflow-store.js +351 -0
- package/dist/lib/workflow-store.js.map +1 -0
- package/dist/plugins/condition/components/condition-fields.d.ts +7 -0
- package/dist/plugins/condition/components/condition-fields.d.ts.map +1 -0
- package/dist/plugins/condition/components/condition-fields.js +8 -0
- package/dist/plugins/condition/components/condition-fields.js.map +1 -0
- package/dist/plugins/condition/index.d.ts +4 -0
- package/dist/plugins/condition/index.d.ts.map +1 -0
- package/dist/plugins/condition/index.js +23 -0
- package/dist/plugins/condition/index.js.map +1 -0
- package/dist/plugins/condition/steps/evaluate.d.ts +15 -0
- package/dist/plugins/condition/steps/evaluate.d.ts.map +1 -0
- package/dist/plugins/condition/steps/evaluate.js +10 -0
- package/dist/plugins/condition/steps/evaluate.js.map +1 -0
- package/dist/plugins/database/components/database-query-fields.d.ts +7 -0
- package/dist/plugins/database/components/database-query-fields.d.ts.map +1 -0
- package/dist/plugins/database/components/database-query-fields.js +18 -0
- package/dist/plugins/database/components/database-query-fields.js.map +1 -0
- package/dist/plugins/database/index.d.ts +4 -0
- package/dist/plugins/database/index.d.ts.map +1 -0
- package/dist/plugins/database/index.js +23 -0
- package/dist/plugins/database/index.js.map +1 -0
- package/dist/plugins/database/steps/query.d.ts +20 -0
- package/dist/plugins/database/steps/query.d.ts.map +1 -0
- package/dist/plugins/database/steps/query.js +92 -0
- package/dist/plugins/database/steps/query.js.map +1 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/legacy-mappings.d.ts +2 -0
- package/dist/plugins/legacy-mappings.d.ts.map +1 -0
- package/dist/plugins/legacy-mappings.js +2 -0
- package/dist/plugins/legacy-mappings.js.map +1 -0
- package/dist/plugins/loop/components/loop-fields.d.ts +7 -0
- package/dist/plugins/loop/components/loop-fields.d.ts.map +1 -0
- package/dist/plugins/loop/components/loop-fields.js +8 -0
- package/dist/plugins/loop/components/loop-fields.js.map +1 -0
- package/dist/plugins/loop/icon.d.ts +4 -0
- package/dist/plugins/loop/icon.d.ts.map +1 -0
- package/dist/plugins/loop/icon.js +5 -0
- package/dist/plugins/loop/icon.js.map +1 -0
- package/dist/plugins/loop/index.d.ts +4 -0
- package/dist/plugins/loop/index.d.ts.map +1 -0
- package/dist/plugins/loop/index.js +52 -0
- package/dist/plugins/loop/index.js.map +1 -0
- package/dist/plugins/loop/steps/iterate.d.ts +24 -0
- package/dist/plugins/loop/steps/iterate.d.ts.map +1 -0
- package/dist/plugins/loop/steps/iterate.js +31 -0
- package/dist/plugins/loop/steps/iterate.js.map +1 -0
- package/dist/plugins/registry.d.ts +136 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +241 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/switch/icon.d.ts +4 -0
- package/dist/plugins/switch/icon.d.ts.map +1 -0
- package/dist/plugins/switch/icon.js +5 -0
- package/dist/plugins/switch/icon.js.map +1 -0
- package/dist/plugins/switch/index.d.ts +4 -0
- package/dist/plugins/switch/index.d.ts.map +1 -0
- package/dist/plugins/switch/index.js +81 -0
- package/dist/plugins/switch/index.js.map +1 -0
- package/dist/plugins/switch/steps/evaluate.d.ts +27 -0
- package/dist/plugins/switch/steps/evaluate.d.ts.map +1 -0
- package/dist/plugins/switch/steps/evaluate.js +81 -0
- package/dist/plugins/switch/steps/evaluate.js.map +1 -0
- package/dist/scripts/create-plugin.d.ts +3 -0
- package/dist/scripts/create-plugin.d.ts.map +1 -0
- package/dist/scripts/create-plugin.js +205 -0
- package/dist/scripts/create-plugin.js.map +1 -0
- package/dist/scripts/discover-plugins.d.ts +3 -0
- package/dist/scripts/discover-plugins.d.ts.map +1 -0
- package/dist/scripts/discover-plugins.js +729 -0
- package/dist/scripts/discover-plugins.js.map +1 -0
- package/dist/scripts/migrate-prod.d.ts +2 -0
- package/dist/scripts/migrate-prod.d.ts.map +1 -0
- package/dist/scripts/migrate-prod.js +17 -0
- package/dist/scripts/migrate-prod.js.map +1 -0
- package/dist/scripts/nwb.d.ts +3 -0
- package/dist/scripts/nwb.d.ts.map +1 -0
- package/dist/scripts/nwb.js +33 -0
- package/dist/scripts/nwb.js.map +1 -0
- package/dist/server/api/handler-utils.d.ts +22 -0
- package/dist/server/api/handler-utils.d.ts.map +1 -0
- package/dist/server/api/handler-utils.js +42 -0
- package/dist/server/api/handler-utils.js.map +1 -0
- package/dist/server/api/handlers/ai/generate/route.d.ts +3 -0
- package/dist/server/api/handlers/ai/generate/route.d.ts.map +1 -0
- package/dist/server/api/handlers/ai/generate/route.js +260 -0
- package/dist/server/api/handlers/ai/generate/route.js.map +1 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts +3 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.js +25 -0
- package/dist/server/api/handlers/api-keys/[keyId]/route.js.map +1 -0
- package/dist/server/api/handlers/api-keys/route.d.ts +3 -0
- package/dist/server/api/handlers/api-keys/route.d.ts.map +1 -0
- package/dist/server/api/handlers/api-keys/route.js +84 -0
- package/dist/server/api/handlers/api-keys/route.js.map +1 -0
- package/dist/server/api/handlers/auth/route.d.ts +3 -0
- package/dist/server/api/handlers/auth/route.d.ts.map +1 -0
- package/dist/server/api/handlers/auth/route.js +14 -0
- package/dist/server/api/handlers/auth/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts +16 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.js +117 -0
- package/dist/server/api/handlers/integrations/[integrationId]/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts +7 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.js +96 -0
- package/dist/server/api/handlers/integrations/[integrationId]/test/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/route.d.ts +24 -0
- package/dist/server/api/handlers/integrations/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/route.js +80 -0
- package/dist/server/api/handlers/integrations/route.js.map +1 -0
- package/dist/server/api/handlers/integrations/test/route.d.ts +12 -0
- package/dist/server/api/handlers/integrations/test/route.d.ts.map +1 -0
- package/dist/server/api/handlers/integrations/test/route.js +76 -0
- package/dist/server/api/handlers/integrations/test/route.js.map +1 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts +7 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.js +197 -0
- package/dist/server/api/handlers/og/workflow/[workflowId]/route.js.map +1 -0
- package/dist/server/api/handlers/user/route.d.ts +3 -0
- package/dist/server/api/handlers/user/route.d.ts.map +1 -0
- package/dist/server/api/handlers/user/route.js +81 -0
- package/dist/server/api/handlers/user/route.js.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts +3 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js +65 -0
- package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts +3 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js +72 -0
- package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.js +24 -0
- package/dist/server/api/handlers/workflows/[workflowId]/code/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js +65 -0
- package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.js +24 -0
- package/dist/server/api/handlers/workflows/[workflowId]/download/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js +89 -0
- package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js +72 -0
- package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js +63 -0
- package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.js +132 -0
- package/dist/server/api/handlers/workflows/[workflowId]/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js +111 -0
- package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/create/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/create/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/create/route.js +67 -0
- package/dist/server/api/handlers/workflows/create/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/current/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/current/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/current/route.js +89 -0
- package/dist/server/api/handlers/workflows/current/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js +38 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js +35 -0
- package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js.map +1 -0
- package/dist/server/api/handlers/workflows/route.d.ts +3 -0
- package/dist/server/api/handlers/workflows/route.d.ts.map +1 -0
- package/dist/server/api/handlers/workflows/route.js +22 -0
- package/dist/server/api/handlers/workflows/route.js.map +1 -0
- package/dist/server/api/routes.d.ts +4 -0
- package/dist/server/api/routes.d.ts.map +1 -0
- package/dist/server/api/routes.js +51 -0
- package/dist/server/api/routes.js.map +1 -0
- package/dist/server/api/types.d.ts +41 -0
- package/dist/server/api/types.d.ts.map +1 -0
- package/dist/server/api/types.js +2 -0
- package/dist/server/api/types.js.map +1 -0
- package/dist/server/api/workflows.d.ts +8 -0
- package/dist/server/api/workflows.d.ts.map +1 -0
- package/dist/server/api/workflows.js +75 -0
- package/dist/server/api/workflows.js.map +1 -0
- package/dist/server/db/migrate.d.ts +2 -0
- package/dist/server/db/migrate.d.ts.map +1 -0
- package/dist/server/db/migrate.js +2 -0
- package/dist/server/db/migrate.js.map +1 -0
- package/dist/server/db/schema.d.ts +1465 -0
- package/dist/server/db/schema.d.ts.map +1 -0
- package/dist/server/db/schema.js +15 -0
- package/dist/server/db/schema.js.map +1 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +9 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +17 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/plugin.js +27 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/server/utils.d.ts +3 -0
- package/dist/server/utils.d.ts.map +1 -0
- package/dist/server/utils.js +7 -0
- package/dist/server/utils.js.map +1 -0
- package/dist/styles/globals.css +254 -0
- package/package.json +130 -0
- package/src/plugins/_template/credentials.ts.txt +10 -0
- package/src/plugins/_template/icon.tsx.txt +28 -0
- package/src/plugins/_template/index.ts.txt +122 -0
- package/src/plugins/_template/steps/action.ts.txt +103 -0
- package/src/plugins/_template/test.ts.txt +57 -0
- package/src/plugins/condition/components/condition-fields.tsx +32 -0
- package/src/plugins/condition/index.ts +27 -0
- package/src/plugins/condition/steps/evaluate.ts +32 -0
- package/src/plugins/database/components/database-query-fields.tsx +58 -0
- package/src/plugins/database/index.ts +27 -0
- package/src/plugins/database/steps/query.ts +141 -0
- package/src/plugins/index.ts +37 -0
- package/src/plugins/legacy-mappings.ts +11 -0
- package/src/plugins/loop/components/loop-fields.tsx +46 -0
- package/src/plugins/loop/icon.tsx +21 -0
- package/src/plugins/loop/index.ts +57 -0
- package/src/plugins/loop/steps/iterate.ts +74 -0
- package/src/plugins/loop/workflow-executor.patch +241 -0
- package/src/plugins/registry.ts +660 -0
- package/src/plugins/switch/icon.tsx +23 -0
- package/src/plugins/switch/index.ts +87 -0
- package/src/plugins/switch/steps/evaluate.ts +139 -0
- package/src/plugins/switch/workflow-executor.patch +130 -0
- package/src/scripts/create-plugin.ts +301 -0
- package/src/scripts/discover-plugins.ts +1122 -0
- package/src/scripts/migrate-prod.ts +16 -0
- package/src/scripts/nwb.ts +54 -0
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
import { findActionById, flattenConfigFields } from "../plugins/registry.js";
|
|
2
|
+
import { analyzeNodeUsage, buildAccessPath, getStepInfo, removeInvisibleChars, TEMPLATE_PATTERN, toFriendlyVarName, toTypeScriptLiteral, } from "./workflow-codegen-shared.js";
|
|
3
|
+
const CONST_ASSIGNMENT_PATTERN = /^(\s*)(const\s+\w+\s*=\s*)(.*)$/;
|
|
4
|
+
export function generateWorkflowCode(nodes, edges, options = {}) {
|
|
5
|
+
const { functionName = "executeWorkflow" } = options;
|
|
6
|
+
const usedNodeOutputs = analyzeNodeUsage(nodes);
|
|
7
|
+
const imports = new Set();
|
|
8
|
+
const nodeMap = new Map(nodes.map((n) => [n.id, n]));
|
|
9
|
+
const edgesBySource = new Map();
|
|
10
|
+
for (const edge of edges) {
|
|
11
|
+
const targets = edgesBySource.get(edge.source) || [];
|
|
12
|
+
targets.push(edge.target);
|
|
13
|
+
edgesBySource.set(edge.source, targets);
|
|
14
|
+
}
|
|
15
|
+
const nodesWithIncoming = new Set(edges.map((e) => e.target));
|
|
16
|
+
const triggerNodes = nodes.filter((node) => node.data.type === "trigger" && !nodesWithIncoming.has(node.id));
|
|
17
|
+
const inputIsUsed = triggerNodes.some((trigger) => usedNodeOutputs.has(trigger.id));
|
|
18
|
+
const codeLines = [];
|
|
19
|
+
const visited = new Set();
|
|
20
|
+
const functionSignature = inputIsUsed
|
|
21
|
+
? `export async function ${functionName}<TInput>(input: TInput) {`
|
|
22
|
+
: `export async function ${functionName}() {`;
|
|
23
|
+
codeLines.push(functionSignature);
|
|
24
|
+
codeLines.push(` "use workflow";`);
|
|
25
|
+
codeLines.push("");
|
|
26
|
+
const nodeIdToVarName = new Map();
|
|
27
|
+
const usedVarNames = new Set();
|
|
28
|
+
for (const node of nodes) {
|
|
29
|
+
let varName;
|
|
30
|
+
if (node.data.type === "action") {
|
|
31
|
+
const actionType = node.data.config?.actionType;
|
|
32
|
+
const label = node.data.label || "";
|
|
33
|
+
const baseVarName = toFriendlyVarName(label, actionType);
|
|
34
|
+
varName = baseVarName;
|
|
35
|
+
let counter = 1;
|
|
36
|
+
while (usedVarNames.has(varName)) {
|
|
37
|
+
varName = `${baseVarName}${counter}`;
|
|
38
|
+
counter += 1;
|
|
39
|
+
}
|
|
40
|
+
usedVarNames.add(varName);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
varName = "input";
|
|
44
|
+
}
|
|
45
|
+
nodeIdToVarName.set(node.id, varName);
|
|
46
|
+
}
|
|
47
|
+
function processAtFormat(trimmed, match) {
|
|
48
|
+
const withoutAt = trimmed.substring(1);
|
|
49
|
+
const colonIndex = withoutAt.indexOf(":");
|
|
50
|
+
if (colonIndex === -1) {
|
|
51
|
+
return match;
|
|
52
|
+
}
|
|
53
|
+
const nodeId = withoutAt.substring(0, colonIndex);
|
|
54
|
+
const rest = withoutAt.substring(colonIndex + 1);
|
|
55
|
+
const dotIndex = rest.indexOf(".");
|
|
56
|
+
const fieldPath = dotIndex !== -1 ? rest.substring(dotIndex + 1) : "";
|
|
57
|
+
const varName = nodeIdToVarName.get(nodeId);
|
|
58
|
+
if (!varName) {
|
|
59
|
+
return match;
|
|
60
|
+
}
|
|
61
|
+
if (!fieldPath) {
|
|
62
|
+
return `\${${varName}}`;
|
|
63
|
+
}
|
|
64
|
+
const accessPath = buildAccessPath(fieldPath);
|
|
65
|
+
return `\${${varName}${accessPath}}`;
|
|
66
|
+
}
|
|
67
|
+
function processDollarFormat(trimmed, match) {
|
|
68
|
+
const withoutDollar = trimmed.substring(1);
|
|
69
|
+
const parts = withoutDollar.split(".");
|
|
70
|
+
const nodeId = parts[0];
|
|
71
|
+
const fieldPath = parts.slice(1).join(".");
|
|
72
|
+
const varName = nodeIdToVarName.get(nodeId);
|
|
73
|
+
if (!varName) {
|
|
74
|
+
return match;
|
|
75
|
+
}
|
|
76
|
+
if (!fieldPath) {
|
|
77
|
+
return `\${${varName}}`;
|
|
78
|
+
}
|
|
79
|
+
const accessPath = buildAccessPath(fieldPath);
|
|
80
|
+
return `\${${varName}${accessPath}}`;
|
|
81
|
+
}
|
|
82
|
+
function processAtFormatForExpression(trimmed, match) {
|
|
83
|
+
const withoutAt = trimmed.substring(1);
|
|
84
|
+
const colonIndex = withoutAt.indexOf(":");
|
|
85
|
+
if (colonIndex === -1) {
|
|
86
|
+
return match;
|
|
87
|
+
}
|
|
88
|
+
const nodeId = withoutAt.substring(0, colonIndex);
|
|
89
|
+
const rest = withoutAt.substring(colonIndex + 1);
|
|
90
|
+
const dotIndex = rest.indexOf(".");
|
|
91
|
+
const fieldPath = dotIndex !== -1 ? rest.substring(dotIndex + 1) : "";
|
|
92
|
+
const varName = nodeIdToVarName.get(nodeId);
|
|
93
|
+
if (!varName) {
|
|
94
|
+
return match;
|
|
95
|
+
}
|
|
96
|
+
if (!fieldPath) {
|
|
97
|
+
return varName;
|
|
98
|
+
}
|
|
99
|
+
const accessPath = buildAccessPath(fieldPath);
|
|
100
|
+
return `${varName}${accessPath}`;
|
|
101
|
+
}
|
|
102
|
+
function processDollarFormatForExpression(trimmed, match) {
|
|
103
|
+
const withoutDollar = trimmed.substring(1);
|
|
104
|
+
const parts = withoutDollar.split(".");
|
|
105
|
+
const nodeId = parts[0];
|
|
106
|
+
const fieldPath = parts.slice(1).join(".");
|
|
107
|
+
const varName = nodeIdToVarName.get(nodeId);
|
|
108
|
+
if (!varName) {
|
|
109
|
+
return match;
|
|
110
|
+
}
|
|
111
|
+
if (!fieldPath) {
|
|
112
|
+
return varName;
|
|
113
|
+
}
|
|
114
|
+
const accessPath = buildAccessPath(fieldPath);
|
|
115
|
+
return `${varName}${accessPath}`;
|
|
116
|
+
}
|
|
117
|
+
function convertTemplateToJS(template) {
|
|
118
|
+
if (!template || typeof template !== "string") {
|
|
119
|
+
return template;
|
|
120
|
+
}
|
|
121
|
+
return template.replace(TEMPLATE_PATTERN, (match, expression) => {
|
|
122
|
+
const trimmed = expression.trim();
|
|
123
|
+
if (trimmed.startsWith("@")) {
|
|
124
|
+
return processAtFormat(trimmed, match);
|
|
125
|
+
}
|
|
126
|
+
if (trimmed.startsWith("$")) {
|
|
127
|
+
return processDollarFormat(trimmed, match);
|
|
128
|
+
}
|
|
129
|
+
return match;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function convertConditionToJS(condition) {
|
|
133
|
+
if (!condition || typeof condition !== "string") {
|
|
134
|
+
return condition;
|
|
135
|
+
}
|
|
136
|
+
const cleaned = removeInvisibleChars(condition);
|
|
137
|
+
const converted = cleaned.replace(TEMPLATE_PATTERN, (match, expression) => {
|
|
138
|
+
const trimmed = expression.trim();
|
|
139
|
+
if (trimmed.startsWith("@")) {
|
|
140
|
+
return processAtFormatForExpression(trimmed, match);
|
|
141
|
+
}
|
|
142
|
+
if (trimmed.startsWith("$")) {
|
|
143
|
+
return processDollarFormatForExpression(trimmed, match);
|
|
144
|
+
}
|
|
145
|
+
return match;
|
|
146
|
+
});
|
|
147
|
+
return removeInvisibleChars(converted);
|
|
148
|
+
}
|
|
149
|
+
function generateEmailActionCode(node, indent, varName) {
|
|
150
|
+
const stepInfo = getStepInfo("Send Email");
|
|
151
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
152
|
+
const config = node.data.config || {};
|
|
153
|
+
const emailTo = config.emailTo || "user@example.com";
|
|
154
|
+
const emailSubject = config.emailSubject || "Notification";
|
|
155
|
+
const emailBody = config.emailBody || "No content";
|
|
156
|
+
const convertedEmailTo = convertTemplateToJS(emailTo);
|
|
157
|
+
const convertedSubject = convertTemplateToJS(emailSubject);
|
|
158
|
+
const convertedBody = convertTemplateToJS(emailBody);
|
|
159
|
+
const hasTemplateRefs = (str) => str.includes("${");
|
|
160
|
+
const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
|
|
161
|
+
const emailToValue = hasTemplateRefs(convertedEmailTo)
|
|
162
|
+
? `\`${escapeForOuterTemplate(convertedEmailTo).replace(/`/g, "\\`")}\``
|
|
163
|
+
: `'${emailTo.replace(/'/g, "\\'")}'`;
|
|
164
|
+
const subjectValue = hasTemplateRefs(convertedSubject)
|
|
165
|
+
? `\`${escapeForOuterTemplate(convertedSubject).replace(/`/g, "\\`")}\``
|
|
166
|
+
: `'${emailSubject.replace(/'/g, "\\'")}'`;
|
|
167
|
+
const bodyValue = hasTemplateRefs(convertedBody)
|
|
168
|
+
? `\`${escapeForOuterTemplate(convertedBody).replace(/`/g, "\\`")}\``
|
|
169
|
+
: `'${emailBody.replace(/'/g, "\\'")}'`;
|
|
170
|
+
return [
|
|
171
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
172
|
+
`${indent} emailTo: ${emailToValue},`,
|
|
173
|
+
`${indent} emailSubject: ${subjectValue},`,
|
|
174
|
+
`${indent} emailBody: ${bodyValue},`,
|
|
175
|
+
`${indent}});`,
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
function generateTicketActionCode(node, indent, varName) {
|
|
179
|
+
const stepInfo = getStepInfo("Create Ticket");
|
|
180
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
181
|
+
const config = node.data.config || {};
|
|
182
|
+
const ticketTitle = config.ticketTitle || "New Ticket";
|
|
183
|
+
const ticketDescription = config.ticketDescription || "";
|
|
184
|
+
const convertedTitle = convertTemplateToJS(ticketTitle);
|
|
185
|
+
const convertedDescription = convertTemplateToJS(ticketDescription);
|
|
186
|
+
const hasTemplateRefs = (str) => str.includes("${");
|
|
187
|
+
const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
|
|
188
|
+
const titleValue = hasTemplateRefs(convertedTitle)
|
|
189
|
+
? `\`${escapeForOuterTemplate(convertedTitle).replace(/`/g, "\\`")}\``
|
|
190
|
+
: `'${ticketTitle.replace(/'/g, "\\'")}'`;
|
|
191
|
+
const descValue = hasTemplateRefs(convertedDescription)
|
|
192
|
+
? `\`${escapeForOuterTemplate(convertedDescription).replace(/`/g, "\\`")}\``
|
|
193
|
+
: `'${ticketDescription.replace(/'/g, "\\'")}'`;
|
|
194
|
+
return [
|
|
195
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
196
|
+
`${indent} ticketTitle: ${titleValue},`,
|
|
197
|
+
`${indent} ticketDescription: ${descValue},`,
|
|
198
|
+
`${indent}});`,
|
|
199
|
+
];
|
|
200
|
+
}
|
|
201
|
+
function generateDatabaseActionCode(node, indent, varName) {
|
|
202
|
+
const stepInfo = getStepInfo("Database Query");
|
|
203
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
204
|
+
const config = node.data.config || {};
|
|
205
|
+
const dbQuery = config.dbQuery || "";
|
|
206
|
+
const dataSource = config.dataSource || "";
|
|
207
|
+
const tableName = config.dbTable ||
|
|
208
|
+
config.tableName ||
|
|
209
|
+
"your_table";
|
|
210
|
+
const lines = [
|
|
211
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
212
|
+
];
|
|
213
|
+
if (dataSource) {
|
|
214
|
+
lines.push(`${indent} dataSource: { name: "${dataSource}" },`);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
lines.push(`${indent} dataSource: {},`);
|
|
218
|
+
}
|
|
219
|
+
if (dbQuery) {
|
|
220
|
+
const convertedQuery = convertTemplateToJS(dbQuery);
|
|
221
|
+
const hasTemplateRefs = convertedQuery.includes("${");
|
|
222
|
+
const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
|
|
223
|
+
const queryValue = hasTemplateRefs
|
|
224
|
+
? `\`${escapeForOuterTemplate(convertedQuery).replace(/`/g, "\\`")}\``
|
|
225
|
+
: `\`${dbQuery.replace(/`/g, "\\`")}\``;
|
|
226
|
+
lines.push(`${indent} query: ${queryValue},`);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
lines.push(`${indent} query: "${tableName}",`);
|
|
230
|
+
}
|
|
231
|
+
lines.push(`${indent}});`);
|
|
232
|
+
return lines;
|
|
233
|
+
}
|
|
234
|
+
function generateHTTPActionCode(node, indent, varName) {
|
|
235
|
+
const stepInfo = getStepInfo("HTTP Request");
|
|
236
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
237
|
+
const config = node.data.config || {};
|
|
238
|
+
const endpoint = config.endpoint || "https://api.example.com/endpoint";
|
|
239
|
+
const method = config.httpMethod || "POST";
|
|
240
|
+
return [
|
|
241
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
242
|
+
`${indent} url: '${endpoint}',`,
|
|
243
|
+
`${indent} method: '${method}',`,
|
|
244
|
+
`${indent} body: {},`,
|
|
245
|
+
`${indent}});`,
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
function processAiSchema(aiSchema) {
|
|
249
|
+
if (!aiSchema) {
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
try {
|
|
253
|
+
const parsedSchema = JSON.parse(aiSchema);
|
|
254
|
+
const schemaWithoutIds = Array.isArray(parsedSchema)
|
|
255
|
+
? parsedSchema.map((field) => {
|
|
256
|
+
const { id: _id, ...rest } = field;
|
|
257
|
+
return rest;
|
|
258
|
+
})
|
|
259
|
+
: parsedSchema;
|
|
260
|
+
return toTypeScriptLiteral(schemaWithoutIds);
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function generatePromptValue(aiPrompt) {
|
|
267
|
+
const convertedPrompt = convertTemplateToJS(aiPrompt);
|
|
268
|
+
const hasTemplateRefs = convertedPrompt.includes("${");
|
|
269
|
+
const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
|
|
270
|
+
if (hasTemplateRefs) {
|
|
271
|
+
return `\`${escapeForOuterTemplate(convertedPrompt).replace(/`/g, "\\`")}\``;
|
|
272
|
+
}
|
|
273
|
+
return `\`${aiPrompt.replace(/`/g, "\\`")}\``;
|
|
274
|
+
}
|
|
275
|
+
function generateAiTextActionCode(node, indent, varName) {
|
|
276
|
+
const stepInfo = getStepInfo("Generate Text");
|
|
277
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
278
|
+
const config = node.data.config || {};
|
|
279
|
+
const aiPrompt = config.aiPrompt || "Generate a summary";
|
|
280
|
+
const aiModel = config.aiModel || "meta/llama-4-scout";
|
|
281
|
+
const aiFormat = config.aiFormat || "text";
|
|
282
|
+
const aiSchema = config.aiSchema;
|
|
283
|
+
const promptValue = generatePromptValue(aiPrompt);
|
|
284
|
+
const lines = [
|
|
285
|
+
`${indent}// Generate text using AI`,
|
|
286
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
287
|
+
`${indent} model: "${aiModel}",`,
|
|
288
|
+
`${indent} prompt: ${promptValue},`,
|
|
289
|
+
];
|
|
290
|
+
if (aiFormat === "object") {
|
|
291
|
+
lines.push(`${indent} format: "object",`);
|
|
292
|
+
const schemaString = processAiSchema(aiSchema);
|
|
293
|
+
if (schemaString) {
|
|
294
|
+
lines.push(`${indent} schema: ${schemaString},`);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
lines.push(`${indent}});`);
|
|
298
|
+
return lines;
|
|
299
|
+
}
|
|
300
|
+
function generateAiImageActionCode(node, indent, varName) {
|
|
301
|
+
imports.add("import { experimental_generateImage as generateImage } from 'ai';");
|
|
302
|
+
const imagePrompt = node.data.config?.imagePrompt || "A beautiful landscape";
|
|
303
|
+
const imageModel = node.data.config?.imageModel || "google/imagen-4.0-generate";
|
|
304
|
+
return [
|
|
305
|
+
`${indent}// Generate image using AI`,
|
|
306
|
+
`${indent}const ${varName} = await generateImage({`,
|
|
307
|
+
`${indent} model: "${imageModel}",`,
|
|
308
|
+
`${indent} prompt: \`${imagePrompt}\`,`,
|
|
309
|
+
`${indent} size: "1024x1024",`,
|
|
310
|
+
`${indent}});`,
|
|
311
|
+
];
|
|
312
|
+
}
|
|
313
|
+
function formatTemplateValue(value) {
|
|
314
|
+
const converted = convertTemplateToJS(value);
|
|
315
|
+
const hasTemplateRefs = converted.includes("${");
|
|
316
|
+
const escaped = converted.replace(/\$\{/g, "$${").replace(/`/g, "\\`");
|
|
317
|
+
return hasTemplateRefs
|
|
318
|
+
? `\`${escaped}\``
|
|
319
|
+
: `\`${value.replace(/`/g, "\\`")}\``;
|
|
320
|
+
}
|
|
321
|
+
function generateFirecrawlActionCode(node, indent, varName) {
|
|
322
|
+
const actionType = node.data.config?.actionType;
|
|
323
|
+
const stepInfo = getStepInfo(actionType);
|
|
324
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
325
|
+
const config = node.data.config || {};
|
|
326
|
+
const url = config.url || "";
|
|
327
|
+
const query = config.query || "";
|
|
328
|
+
const limit = config.limit ? Number(config.limit) : undefined;
|
|
329
|
+
const lines = [
|
|
330
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
331
|
+
];
|
|
332
|
+
if (url) {
|
|
333
|
+
lines.push(`${indent} url: ${formatTemplateValue(url)},`);
|
|
334
|
+
}
|
|
335
|
+
if (query) {
|
|
336
|
+
lines.push(`${indent} query: ${formatTemplateValue(query)},`);
|
|
337
|
+
}
|
|
338
|
+
if (limit) {
|
|
339
|
+
lines.push(`${indent} limit: ${limit},`);
|
|
340
|
+
}
|
|
341
|
+
lines.push(`${indent}});`);
|
|
342
|
+
return lines;
|
|
343
|
+
}
|
|
344
|
+
function generateV0CreateChatActionCode(node, indent, varName) {
|
|
345
|
+
const stepInfo = getStepInfo("Create Chat");
|
|
346
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
347
|
+
const config = node.data.config || {};
|
|
348
|
+
const message = config.message || "";
|
|
349
|
+
const system = config.system || "";
|
|
350
|
+
const lines = [
|
|
351
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
352
|
+
`${indent} message: ${formatTemplateValue(message)},`,
|
|
353
|
+
];
|
|
354
|
+
if (system) {
|
|
355
|
+
lines.push(`${indent} system: ${formatTemplateValue(system)},`);
|
|
356
|
+
}
|
|
357
|
+
lines.push(`${indent}});`);
|
|
358
|
+
return lines;
|
|
359
|
+
}
|
|
360
|
+
function generateV0SendMessageActionCode(node, indent, varName) {
|
|
361
|
+
const stepInfo = getStepInfo("Send Message");
|
|
362
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
363
|
+
const config = node.data.config || {};
|
|
364
|
+
const chatId = config.chatId || "";
|
|
365
|
+
const message = config.message || "";
|
|
366
|
+
const lines = [
|
|
367
|
+
`${indent}const ${varName} = await ${stepInfo.functionName}({`,
|
|
368
|
+
`${indent} chatId: ${formatTemplateValue(chatId)},`,
|
|
369
|
+
`${indent} message: ${formatTemplateValue(message)},`,
|
|
370
|
+
`${indent}});`,
|
|
371
|
+
];
|
|
372
|
+
return lines;
|
|
373
|
+
}
|
|
374
|
+
function formatFieldValue(fieldType, value, indent, key) {
|
|
375
|
+
const fieldTypeFormatters = {
|
|
376
|
+
"template-input": () => `${indent} ${key}: ${formatTemplateValue(String(value))},`,
|
|
377
|
+
"template-textarea": () => `${indent} ${key}: ${formatTemplateValue(String(value))},`,
|
|
378
|
+
number: () => `${indent} ${key}: ${value},`,
|
|
379
|
+
select: () => `${indent} ${key}: "${value}",`,
|
|
380
|
+
"schema-builder": () => `${indent} ${key}: ${JSON.stringify(value)},`,
|
|
381
|
+
};
|
|
382
|
+
const formatter = fieldTypeFormatters[fieldType];
|
|
383
|
+
return formatter ? formatter() : `${indent} ${key}: "${value}",`;
|
|
384
|
+
}
|
|
385
|
+
function generatePluginActionCode(node, actionType, indent, varName) {
|
|
386
|
+
const action = findActionById(actionType);
|
|
387
|
+
if (!action) {
|
|
388
|
+
return null;
|
|
389
|
+
}
|
|
390
|
+
const stepInfo = getStepInfo(actionType);
|
|
391
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
392
|
+
const config = node.data.config || {};
|
|
393
|
+
const configFields = flattenConfigFields(action.configFields);
|
|
394
|
+
const paramLines = [];
|
|
395
|
+
for (const field of configFields) {
|
|
396
|
+
const value = config[field.key];
|
|
397
|
+
if (value === undefined || value === null || value === "") {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
paramLines.push(formatFieldValue(field.type, value, indent, field.key));
|
|
401
|
+
}
|
|
402
|
+
const lines = [];
|
|
403
|
+
if (paramLines.length > 0) {
|
|
404
|
+
lines.push(`${indent}const ${varName} = await ${stepInfo.functionName}({`);
|
|
405
|
+
lines.push(...paramLines);
|
|
406
|
+
lines.push(`${indent}});`);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
lines.push(`${indent}const ${varName} = await ${stepInfo.functionName}({});`);
|
|
410
|
+
}
|
|
411
|
+
return lines;
|
|
412
|
+
}
|
|
413
|
+
function generateActionNodeCode(node, nodeId, indent, varName) {
|
|
414
|
+
const actionType = node.data.config?.actionType;
|
|
415
|
+
const actionLabel = node.data.label || actionType || "Unknown Action";
|
|
416
|
+
const lines = [`${indent}// Action: ${actionLabel}`];
|
|
417
|
+
if (node.data.description) {
|
|
418
|
+
lines.push(`${indent}// ${node.data.description}`);
|
|
419
|
+
}
|
|
420
|
+
const outputIsUsed = usedNodeOutputs.has(nodeId);
|
|
421
|
+
function processAwaitLine(line) {
|
|
422
|
+
const match = CONST_ASSIGNMENT_PATTERN.exec(line);
|
|
423
|
+
if (match) {
|
|
424
|
+
const [, lineIndent, , rest] = match;
|
|
425
|
+
return `${lineIndent}${rest}`;
|
|
426
|
+
}
|
|
427
|
+
return line;
|
|
428
|
+
}
|
|
429
|
+
function processConstLine(line) {
|
|
430
|
+
const match = CONST_ASSIGNMENT_PATTERN.exec(line);
|
|
431
|
+
if (match) {
|
|
432
|
+
const [, lineIndent, , rest] = match;
|
|
433
|
+
return `${lineIndent}void ${rest}`;
|
|
434
|
+
}
|
|
435
|
+
return line;
|
|
436
|
+
}
|
|
437
|
+
function removeVariableAssignment(actionLines) {
|
|
438
|
+
const result = [];
|
|
439
|
+
for (const line of actionLines) {
|
|
440
|
+
if (line.includes("await")) {
|
|
441
|
+
result.push(processAwaitLine(line));
|
|
442
|
+
}
|
|
443
|
+
else if (line.trim().startsWith("const") && line.includes("{")) {
|
|
444
|
+
result.push(processConstLine(line));
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
result.push(line);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return result;
|
|
451
|
+
}
|
|
452
|
+
const wrapActionCall = (actionLines) => {
|
|
453
|
+
if (outputIsUsed) {
|
|
454
|
+
return actionLines;
|
|
455
|
+
}
|
|
456
|
+
return removeVariableAssignment(actionLines);
|
|
457
|
+
};
|
|
458
|
+
if (actionType === "Generate Text") {
|
|
459
|
+
lines.push(...wrapActionCall(generateAiTextActionCode(node, indent, varName)));
|
|
460
|
+
}
|
|
461
|
+
else if (actionType === "Generate Image") {
|
|
462
|
+
lines.push(...wrapActionCall(generateAiImageActionCode(node, indent, varName)));
|
|
463
|
+
}
|
|
464
|
+
else if (actionType === "Send Email") {
|
|
465
|
+
lines.push(...wrapActionCall(generateEmailActionCode(node, indent, varName)));
|
|
466
|
+
}
|
|
467
|
+
else if (actionType === "Create Ticket") {
|
|
468
|
+
lines.push(...wrapActionCall(generateTicketActionCode(node, indent, varName)));
|
|
469
|
+
}
|
|
470
|
+
else if (actionType === "Scrape" || actionType === "Search") {
|
|
471
|
+
lines.push(...wrapActionCall(generateFirecrawlActionCode(node, indent, varName)));
|
|
472
|
+
}
|
|
473
|
+
else if (actionType === "Create Chat") {
|
|
474
|
+
lines.push(...wrapActionCall(generateV0CreateChatActionCode(node, indent, varName)));
|
|
475
|
+
}
|
|
476
|
+
else if (actionType === "Send Message") {
|
|
477
|
+
lines.push(...wrapActionCall(generateV0SendMessageActionCode(node, indent, varName)));
|
|
478
|
+
}
|
|
479
|
+
else if (actionType === "Database Query") {
|
|
480
|
+
lines.push(...wrapActionCall(generateDatabaseActionCode(node, indent, varName)));
|
|
481
|
+
}
|
|
482
|
+
else if (actionType === "HTTP Request") {
|
|
483
|
+
lines.push(...wrapActionCall(generateHTTPActionCode(node, indent, varName)));
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
const pluginCode = generatePluginActionCode(node, actionType, indent, varName);
|
|
487
|
+
if (pluginCode) {
|
|
488
|
+
lines.push(...wrapActionCall(pluginCode));
|
|
489
|
+
}
|
|
490
|
+
else if (outputIsUsed) {
|
|
491
|
+
lines.push(`${indent}// TODO: Implement action type "${actionType}"`);
|
|
492
|
+
lines.push(`${indent}const ${varName} = { status: 'pending', actionType: "${actionType}" };`);
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
lines.push(`${indent}// TODO: Implement action type "${actionType}"`);
|
|
496
|
+
lines.push(`${indent}void ({ status: 'pending', actionType: "${actionType}" });`);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return lines;
|
|
500
|
+
}
|
|
501
|
+
function generateConditionNodeCode(node, nodeId, indent) {
|
|
502
|
+
const lines = [`${indent}// Condition: ${node.data.label}`];
|
|
503
|
+
if (node.data.description) {
|
|
504
|
+
lines.push(`${indent}// ${node.data.description}`);
|
|
505
|
+
}
|
|
506
|
+
const condition = node.data.config?.condition;
|
|
507
|
+
const nextNodes = edgesBySource.get(nodeId) || [];
|
|
508
|
+
if (nextNodes.length > 0) {
|
|
509
|
+
const trueNode = nextNodes[0];
|
|
510
|
+
const falseNode = nextNodes[1];
|
|
511
|
+
const convertedCondition = condition
|
|
512
|
+
? convertConditionToJS(condition)
|
|
513
|
+
: "true";
|
|
514
|
+
lines.push(`${indent}if (${convertedCondition}) {`);
|
|
515
|
+
if (trueNode) {
|
|
516
|
+
const trueNodeCode = generateNodeCode(trueNode, `${indent} `);
|
|
517
|
+
lines.push(...trueNodeCode);
|
|
518
|
+
}
|
|
519
|
+
if (falseNode) {
|
|
520
|
+
lines.push(`${indent}} else {`);
|
|
521
|
+
const falseNodeCode = generateNodeCode(falseNode, `${indent} `);
|
|
522
|
+
lines.push(...falseNodeCode);
|
|
523
|
+
}
|
|
524
|
+
lines.push(`${indent}}`);
|
|
525
|
+
}
|
|
526
|
+
return lines;
|
|
527
|
+
}
|
|
528
|
+
function processTriggerNode(nodeId, indent) {
|
|
529
|
+
const nextNodes = edgesBySource.get(nodeId) || [];
|
|
530
|
+
const lines = generateParallelNodeCode(nextNodes, indent);
|
|
531
|
+
return { lines, wasSkipped: true };
|
|
532
|
+
}
|
|
533
|
+
function processActionNode(node, nodeId, varName, indent) {
|
|
534
|
+
const lines = [];
|
|
535
|
+
const actionType = node.data.config?.actionType;
|
|
536
|
+
if (actionType === "Condition") {
|
|
537
|
+
lines.push(...generateConditionNodeCode(node, nodeId, indent));
|
|
538
|
+
return lines;
|
|
539
|
+
}
|
|
540
|
+
lines.push(...generateActionNodeCode(node, nodeId, indent, varName));
|
|
541
|
+
return lines;
|
|
542
|
+
}
|
|
543
|
+
function generateBranchCode(nodeId, indent, branchVisited) {
|
|
544
|
+
if (branchVisited.has(nodeId)) {
|
|
545
|
+
return [];
|
|
546
|
+
}
|
|
547
|
+
branchVisited.add(nodeId);
|
|
548
|
+
const node = nodeMap.get(nodeId);
|
|
549
|
+
if (!node) {
|
|
550
|
+
return [];
|
|
551
|
+
}
|
|
552
|
+
const lines = [];
|
|
553
|
+
if (node.data.type === "action") {
|
|
554
|
+
const actionType = node.data.config?.actionType;
|
|
555
|
+
if (actionType === "Condition") {
|
|
556
|
+
lines.push(...generateConditionBranchCode(node, nodeId, indent, branchVisited));
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
lines.push(...generateActionCallCode(node, indent));
|
|
560
|
+
const children = edgesBySource.get(nodeId) || [];
|
|
561
|
+
if (children.length > 0) {
|
|
562
|
+
lines.push("");
|
|
563
|
+
lines.push(...generateChildrenCode(children, indent, branchVisited));
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return lines;
|
|
568
|
+
}
|
|
569
|
+
function generateConditionBranchCode(node, nodeId, indent, branchVisited) {
|
|
570
|
+
const lines = [`${indent}// Condition: ${node.data.label}`];
|
|
571
|
+
const condition = node.data.config?.condition;
|
|
572
|
+
const nextNodes = edgesBySource.get(nodeId) || [];
|
|
573
|
+
if (nextNodes.length > 0) {
|
|
574
|
+
const convertedCondition = condition
|
|
575
|
+
? convertConditionToJS(condition)
|
|
576
|
+
: "true";
|
|
577
|
+
lines.push(`${indent}if (${convertedCondition}) {`);
|
|
578
|
+
if (nextNodes[0]) {
|
|
579
|
+
lines.push(...generateBranchCode(nextNodes[0], `${indent} `, branchVisited));
|
|
580
|
+
}
|
|
581
|
+
if (nextNodes[1]) {
|
|
582
|
+
lines.push(`${indent}} else {`);
|
|
583
|
+
lines.push(...generateBranchCode(nextNodes[1], `${indent} `, branchVisited));
|
|
584
|
+
}
|
|
585
|
+
lines.push(`${indent}}`);
|
|
586
|
+
}
|
|
587
|
+
return lines;
|
|
588
|
+
}
|
|
589
|
+
function generateActionCallCode(node, indent) {
|
|
590
|
+
const actionType = node.data.config?.actionType;
|
|
591
|
+
const actionLabel = node.data.label || actionType || "Unknown Action";
|
|
592
|
+
const stepInfo = getStepInfo(actionType);
|
|
593
|
+
const configParams = buildActionConfigParams(node, `${indent} `);
|
|
594
|
+
imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
|
|
595
|
+
const lines = [`${indent}// ${actionLabel}`];
|
|
596
|
+
if (configParams.length > 0) {
|
|
597
|
+
lines.push(`${indent}await ${stepInfo.functionName}({`);
|
|
598
|
+
lines.push(...configParams);
|
|
599
|
+
lines.push(`${indent}});`);
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
lines.push(`${indent}await ${stepInfo.functionName}({});`);
|
|
603
|
+
}
|
|
604
|
+
return lines;
|
|
605
|
+
}
|
|
606
|
+
function generateChildrenCode(childIds, indent, branchVisited) {
|
|
607
|
+
const unvisited = childIds.filter((id) => !branchVisited.has(id));
|
|
608
|
+
if (unvisited.length === 0) {
|
|
609
|
+
return [];
|
|
610
|
+
}
|
|
611
|
+
if (unvisited.length === 1) {
|
|
612
|
+
return generateBranchCode(unvisited[0], indent, branchVisited);
|
|
613
|
+
}
|
|
614
|
+
const lines = [`${indent}await Promise.all([`];
|
|
615
|
+
for (let i = 0; i < unvisited.length; i++) {
|
|
616
|
+
const childId = unvisited[i];
|
|
617
|
+
const isLast = i === unvisited.length - 1;
|
|
618
|
+
const comma = isLast ? "" : ",";
|
|
619
|
+
const childBranchVisited = new Set(branchVisited);
|
|
620
|
+
const branchCode = generateBranchCode(childId, `${indent} `, childBranchVisited);
|
|
621
|
+
if (branchCode.length > 0) {
|
|
622
|
+
lines.push(`${indent} (async () => {`);
|
|
623
|
+
lines.push(...branchCode);
|
|
624
|
+
lines.push(`${indent} })()${comma}`);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
lines.push(`${indent}]);`);
|
|
628
|
+
return lines;
|
|
629
|
+
}
|
|
630
|
+
function generateAsyncIIFEBranch(nodeId, indent, isLast) {
|
|
631
|
+
const branchVisited = new Set(visited);
|
|
632
|
+
branchVisited.delete(nodeId);
|
|
633
|
+
const branchCode = generateBranchCode(nodeId, `${indent} `, branchVisited);
|
|
634
|
+
const comma = isLast ? "" : ",";
|
|
635
|
+
if (branchCode.length === 0) {
|
|
636
|
+
return [];
|
|
637
|
+
}
|
|
638
|
+
return [
|
|
639
|
+
`${indent} (async () => {`,
|
|
640
|
+
...branchCode,
|
|
641
|
+
`${indent} })()${comma}`,
|
|
642
|
+
];
|
|
643
|
+
}
|
|
644
|
+
function generateParallelNodeCode(nodeIds, indent) {
|
|
645
|
+
if (nodeIds.length === 0) {
|
|
646
|
+
return [];
|
|
647
|
+
}
|
|
648
|
+
const unvisited = nodeIds.filter((id) => !visited.has(id) && nodeMap.get(id)?.data.type === "action");
|
|
649
|
+
if (unvisited.length === 0) {
|
|
650
|
+
return [];
|
|
651
|
+
}
|
|
652
|
+
if (unvisited.length === 1) {
|
|
653
|
+
const branchVisited = new Set(visited);
|
|
654
|
+
visited.add(unvisited[0]);
|
|
655
|
+
return generateBranchCode(unvisited[0], indent, branchVisited);
|
|
656
|
+
}
|
|
657
|
+
for (const id of unvisited) {
|
|
658
|
+
visited.add(id);
|
|
659
|
+
}
|
|
660
|
+
const lines = [`${indent}await Promise.all([`];
|
|
661
|
+
for (let i = 0; i < unvisited.length; i++) {
|
|
662
|
+
lines.push(...generateAsyncIIFEBranch(unvisited[i], indent, i === unvisited.length - 1));
|
|
663
|
+
}
|
|
664
|
+
lines.push(`${indent}]);`);
|
|
665
|
+
return lines;
|
|
666
|
+
}
|
|
667
|
+
function buildPluginConfigParams(config, actionType, indent) {
|
|
668
|
+
const action = findActionById(actionType);
|
|
669
|
+
if (!action) {
|
|
670
|
+
return [];
|
|
671
|
+
}
|
|
672
|
+
const params = [];
|
|
673
|
+
for (const field of flattenConfigFields(action.configFields)) {
|
|
674
|
+
const value = config[field.key];
|
|
675
|
+
if (value === undefined || value === null || value === "") {
|
|
676
|
+
continue;
|
|
677
|
+
}
|
|
678
|
+
params.push(formatFieldValue(field.type, value, indent, field.key));
|
|
679
|
+
}
|
|
680
|
+
return params;
|
|
681
|
+
}
|
|
682
|
+
const EXCLUDED_CONFIG_KEYS = new Set(["actionType", "integrationId"]);
|
|
683
|
+
function buildFallbackConfigParams(config, indent) {
|
|
684
|
+
const params = [];
|
|
685
|
+
for (const [key, value] of Object.entries(config)) {
|
|
686
|
+
if (EXCLUDED_CONFIG_KEYS.has(key) ||
|
|
687
|
+
value === undefined ||
|
|
688
|
+
value === null) {
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
if (typeof value === "string") {
|
|
692
|
+
params.push(`${indent}${key}: ${formatTemplateValue(value)},`);
|
|
693
|
+
}
|
|
694
|
+
else if (typeof value === "number" || typeof value === "boolean") {
|
|
695
|
+
params.push(`${indent}${key}: ${value},`);
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
params.push(`${indent}${key}: ${JSON.stringify(value)},`);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return params;
|
|
702
|
+
}
|
|
703
|
+
function buildActionConfigParams(node, indent) {
|
|
704
|
+
const actionType = node.data.config?.actionType;
|
|
705
|
+
const config = node.data.config || {};
|
|
706
|
+
const pluginParams = buildPluginConfigParams(config, actionType, indent);
|
|
707
|
+
if (pluginParams.length > 0) {
|
|
708
|
+
return pluginParams;
|
|
709
|
+
}
|
|
710
|
+
return buildFallbackConfigParams(config, indent);
|
|
711
|
+
}
|
|
712
|
+
function processNextNodes(nodeId, currentLines, indent) {
|
|
713
|
+
const nextNodes = edgesBySource.get(nodeId) || [];
|
|
714
|
+
const result = [...currentLines];
|
|
715
|
+
if (currentLines.length > 0 && nextNodes.length > 0) {
|
|
716
|
+
result.push("");
|
|
717
|
+
}
|
|
718
|
+
result.push(...generateParallelNodeCode(nextNodes, indent));
|
|
719
|
+
return result;
|
|
720
|
+
}
|
|
721
|
+
function generateNodeCode(nodeId, indent = " ") {
|
|
722
|
+
if (visited.has(nodeId)) {
|
|
723
|
+
return [`${indent}// Already processed: ${nodeId}`];
|
|
724
|
+
}
|
|
725
|
+
visited.add(nodeId);
|
|
726
|
+
const node = nodeMap.get(nodeId);
|
|
727
|
+
if (!node) {
|
|
728
|
+
return [];
|
|
729
|
+
}
|
|
730
|
+
const varName = nodeIdToVarName.get(nodeId) ||
|
|
731
|
+
`${node.data.type}_${nodeId.replace(/-/g, "_")}`;
|
|
732
|
+
let lines = [];
|
|
733
|
+
switch (node.data.type) {
|
|
734
|
+
case "trigger": {
|
|
735
|
+
const { lines: triggerLines, wasSkipped } = processTriggerNode(nodeId, indent);
|
|
736
|
+
if (wasSkipped) {
|
|
737
|
+
return triggerLines;
|
|
738
|
+
}
|
|
739
|
+
return processNextNodes(nodeId, triggerLines, indent);
|
|
740
|
+
}
|
|
741
|
+
case "action": {
|
|
742
|
+
const actionLines = processActionNode(node, nodeId, varName, indent);
|
|
743
|
+
const actionType = node.data.config?.actionType;
|
|
744
|
+
if (actionType === "Condition") {
|
|
745
|
+
return actionLines;
|
|
746
|
+
}
|
|
747
|
+
lines = actionLines;
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
default:
|
|
751
|
+
lines.push(`${indent}// Unknown node type: ${node.data.type}`);
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
return processNextNodes(nodeId, lines, indent);
|
|
755
|
+
}
|
|
756
|
+
if (triggerNodes.length === 0) {
|
|
757
|
+
codeLines.push(" // No trigger nodes found");
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
for (const trigger of triggerNodes) {
|
|
761
|
+
const triggerCode = generateNodeCode(trigger.id, " ");
|
|
762
|
+
codeLines.push(...triggerCode);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
codeLines.push("}");
|
|
766
|
+
const importStatements = Array.from(imports).join("\n");
|
|
767
|
+
const code = `${importStatements}\n\n${codeLines.join("\n")}\n`;
|
|
768
|
+
return {
|
|
769
|
+
code,
|
|
770
|
+
functionName,
|
|
771
|
+
imports: Array.from(imports),
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
export function generateWorkflowModule(workflowName, nodes, edges, options = {}) {
|
|
775
|
+
const { code } = generateWorkflowCode(nodes, edges, options);
|
|
776
|
+
return `/**
|
|
777
|
+
* Generated Workflow: ${workflowName}
|
|
778
|
+
*
|
|
779
|
+
* This file was automatically generated from a workflow definition.
|
|
780
|
+
* DO NOT EDIT MANUALLY - regenerate from the workflow editor instead.
|
|
781
|
+
*/
|
|
782
|
+
|
|
783
|
+
${code}
|
|
784
|
+
`;
|
|
785
|
+
}
|
|
786
|
+
//# sourceMappingURL=workflow-codegen.js.map
|