@invect/ui 0.0.1
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/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/Invect-CWpIwZ5F.js +92738 -0
- package/dist/Invect.d.ts +25 -0
- package/dist/InvectShell.d.ts +14 -0
- package/dist/api/agent-tools.api.d.ts +1 -0
- package/dist/api/client.d.ts +207 -0
- package/dist/api/credentials.api.d.ts +47 -0
- package/dist/api/executions.api.d.ts +43 -0
- package/dist/api/flows.api.d.ts +100 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/node-data.api.d.ts +66 -0
- package/dist/api/query-keys.d.ts +22 -0
- package/dist/api/triggers.api.d.ts +44 -0
- package/dist/api/types.d.ts +147 -0
- package/dist/api/use-flow-run-stream.d.ts +12 -0
- package/dist/assets/invect-branding.d.ts +4 -0
- package/dist/assets/provider-icons/index.d.ts +8 -0
- package/dist/babel-C9OtljFZ.js +9721 -0
- package/dist/components/PageLayout.d.ts +17 -0
- package/dist/components/chat/ChatInput.d.ts +17 -0
- package/dist/components/chat/ChatMessageList.d.ts +14 -0
- package/dist/components/chat/ChatModelSelector.d.ts +11 -0
- package/dist/components/chat/ChatPanel.d.ts +19 -0
- package/dist/components/chat/ChatPromptOverlay.d.ts +13 -0
- package/dist/components/chat/ChatProviderSelector.d.ts +9 -0
- package/dist/components/chat/ChatSettingsPanel.d.ts +11 -0
- package/dist/components/chat/InlineCredentialSetup.d.ts +9 -0
- package/dist/components/chat/MarkdownRenderer.d.ts +7 -0
- package/dist/components/chat/chat-memory.d.ts +21 -0
- package/dist/components/chat/chat.store.d.ts +416 -0
- package/dist/components/chat/index.d.ts +5 -0
- package/dist/components/chat/use-chat.d.ts +28 -0
- package/dist/components/credentials/CreateCredentialModal.d.ts +13 -0
- package/dist/components/credentials/CredentialDetailDialog.d.ts +17 -0
- package/dist/components/credentials/EditCredentialModal.d.ts +11 -0
- package/dist/components/credentials/OAuth2ConnectButton.d.ts +38 -0
- package/dist/components/credentials/OAuth2ProviderSelector.d.ts +15 -0
- package/dist/components/credentials/credential-utils.d.ts +12 -0
- package/dist/components/credentials/index.d.ts +9 -0
- package/dist/components/dashboard/FailedRunsAlert.d.ts +3 -0
- package/dist/components/dashboard/FlowCard.d.ts +7 -0
- package/dist/components/dashboard/RecentActivityTable.d.ts +9 -0
- package/dist/components/dashboard/StatCard.d.ts +10 -0
- package/dist/components/dashboard/index.d.ts +5 -0
- package/dist/components/dashboard/status-helpers.d.ts +5 -0
- package/dist/components/flow-editor/ActionsSidebar.d.ts +2 -0
- package/dist/components/flow-editor/FlowEditor.d.ts +21 -0
- package/dist/components/flow-editor/FlowHeader.d.ts +9 -0
- package/dist/components/flow-editor/FlowLayout.d.ts +24 -0
- package/dist/components/flow-editor/ModeSwitcher.d.ts +7 -0
- package/dist/components/flow-editor/NodeSidebar.d.ts +24 -0
- package/dist/components/flow-editor/RunControls.d.ts +12 -0
- package/dist/components/flow-editor/ToolConfigPanel.d.ts +16 -0
- package/dist/components/flow-editor/ValidationPanel.d.ts +5 -0
- package/dist/components/flow-editor/flow-editor.store.d.ts +1 -0
- package/dist/components/flow-editor/index.d.ts +6 -0
- package/dist/components/flow-editor/inline-edit.d.ts +10 -0
- package/dist/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/CredentialCombobox.d.ts +21 -0
- package/dist/components/flow-editor/node-config-panel/CredentialsSection.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/DroppableInput.d.ts +20 -0
- package/dist/components/flow-editor/node-config-panel/DynamicSelectField.d.ts +22 -0
- package/dist/components/flow-editor/node-config-panel/JsonPreviewPanel.d.ts +25 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanel.d.ts +14 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanelHeader.d.ts +15 -0
- package/dist/components/flow-editor/node-config-panel/ParametersSection.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/SearchableSelectField.d.ts +17 -0
- package/dist/components/flow-editor/node-config-panel/SwitchCasesField.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/hooks/index.d.ts +2 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.d.ts +24 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-execution.d.ts +46 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-upstream-slots.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/panels/AgentToolsPanel.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/panels/ConfigurationPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/DataMapperPane.d.ts +40 -0
- package/dist/components/flow-editor/node-config-panel/panels/InputPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/OutputPanel.d.ts +7 -0
- package/dist/components/flow-editor/node-config-panel/panels/index.d.ts +4 -0
- package/dist/components/flow-editor/node-config-panel/types.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-panel-store.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-state.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/use-run-node.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/utils.d.ts +9 -0
- package/dist/components/flow-editor/serialize-to-sdk.d.ts +20 -0
- package/dist/components/flow-editor/toolbar-context.d.ts +2 -0
- package/dist/components/flow-editor/use-copy-paste.d.ts +7 -0
- package/dist/components/flow-editor/use-copy-paste.types.d.ts +38 -0
- package/dist/components/flow-editor/use-flow-editor.d.ts +44 -0
- package/dist/components/flow-runs-table/FlowRunsTable.d.ts +6 -0
- package/dist/components/flow-runs-table/index.d.ts +1 -0
- package/dist/components/flow-viewer/FlowRunsView.d.ts +7 -0
- package/dist/components/flow-viewer/FlowStatusView.d.ts +21 -0
- package/dist/components/flow-viewer/RunSelector.d.ts +13 -0
- package/dist/components/flow-viewer/RunsSidebar.d.ts +14 -0
- package/dist/components/flow-viewer/agent-tool-executions-list.d.ts +7 -0
- package/dist/components/flow-viewer/index.d.ts +1 -0
- package/dist/components/flow-viewer/logs-panel.d.ts +18 -0
- package/dist/components/flow-viewer/use-execution-log-data.d.ts +113 -0
- package/dist/components/graph/BatchFlowEdge.d.ts +33 -0
- package/dist/components/graph/LayoutSelector.d.ts +9 -0
- package/dist/components/graph/index.d.ts +47 -0
- package/dist/components/graph/styleUtils.d.ts +124 -0
- package/dist/components/nodes/AgentConfigPanel.d.ts +24 -0
- package/dist/components/nodes/AgentNode.d.ts +8 -0
- package/dist/components/nodes/AgentToolsBox.d.ts +41 -0
- package/dist/components/nodes/NodeAppendix.d.ts +19 -0
- package/dist/components/nodes/NodeStatusIndicator.d.ts +30 -0
- package/dist/components/nodes/NodeViewContext.d.ts +18 -0
- package/dist/components/nodes/ToolParamField.d.ts +28 -0
- package/dist/components/nodes/ToolSelectorModal.d.ts +80 -0
- package/dist/components/nodes/ToolSelectorParts.d.ts +30 -0
- package/dist/components/nodes/UniversalNode.d.ts +2 -0
- package/dist/components/nodes/createContextAwareNodes.d.ts +6 -0
- package/dist/components/nodes/index.d.ts +22 -0
- package/dist/components/nodes/nodeRegistry.d.ts +13 -0
- package/dist/components/nodes/withNodeContext.d.ts +7 -0
- package/dist/components/shared/InvectLoader.d.ts +8 -0
- package/dist/components/shared/InvectLogo.d.ts +9 -0
- package/dist/components/shared/ProviderIcon.d.ts +23 -0
- package/dist/components/side-menu/side-menu.d.ts +4 -0
- package/dist/components/sidebar/BaseSidebar.d.ts +17 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/triggers/CronPreview.d.ts +12 -0
- package/dist/components/triggers/index.d.ts +1 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/codemirror-js-editor.d.ts +25 -0
- package/dist/components/ui/codemirror-json-editor.d.ts +18 -0
- package/dist/components/ui/codemirror-nunjucks-editor.d.ts +13 -0
- package/dist/components/ui/codemirror-vscode-theme.d.ts +24 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/empty-state.d.ts +21 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tree-view.d.ts +107 -0
- package/dist/contexts/AgentToolCallbacksContext.d.ts +23 -0
- package/dist/contexts/ApiContext.d.ts +11 -0
- package/dist/contexts/FlowDataContext.d.ts +9 -0
- package/dist/contexts/NodeRegistryContext.d.ts +14 -0
- package/dist/contexts/PluginRegistryContext.d.ts +39 -0
- package/dist/contexts/ThemeProvider.d.ts +18 -0
- package/dist/contexts/ValidationContext.d.ts +22 -0
- package/dist/demo/DemoInvect.d.ts +11 -0
- package/dist/demo/FlowViewer.d.ts +31 -0
- package/dist/demo/demo-api-client.d.ts +33 -0
- package/dist/demo/index.d.ts +6 -0
- package/dist/demo/sample-data.d.ts +1538 -0
- package/dist/demo.d.ts +2 -0
- package/dist/demo.js +2774 -0
- package/dist/estree-ClbRfS-1.js +7076 -0
- package/dist/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-document-title.d.ts +1 -0
- package/dist/hooks/use-flow-data.d.ts +22 -0
- package/dist/hooks/use-invect-portal-class.d.ts +21 -0
- package/dist/hooks/useFlowEditorStore.d.ts +1 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +717 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/prettier.d.ts +13 -0
- package/dist/routes/all-flow-runs.d.ts +5 -0
- package/dist/routes/credentials.d.ts +5 -0
- package/dist/routes/flow-route-layout.d.ts +19 -0
- package/dist/routes/flow-runs.d.ts +5 -0
- package/dist/routes/flow.d.ts +5 -0
- package/dist/routes/home.d.ts +5 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/standalone-C3Df7W52.js +3463 -0
- package/dist/stores/executionViewStore.d.ts +64 -0
- package/dist/stores/flow-editor.store.d.ts +137 -0
- package/dist/stores/flowEditorStore.d.ts +1 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/uiStore.d.ts +45 -0
- package/dist/types/agent-tools.types.d.ts +53 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/node-definition.types.d.ts +85 -0
- package/dist/types/plugin.types.d.ts +100 -0
- package/dist/utils/credentialBranding.d.ts +8 -0
- package/dist/utils/credentialFiltering.d.ts +20 -0
- package/dist/utils/flowTransformations.d.ts +16 -0
- package/dist/utils/layoutUtils.d.ts +23 -0
- package/dist/utils/nodeReferenceUtils.d.ts +37 -0
- package/dist/vendor.d.ts +5 -0
- package/package.json +130 -0
- package/src/.DS_Store +0 -0
- package/src/Invect.tsx +229 -0
- package/src/InvectShell.tsx +55 -0
- package/src/api/agent-tools.api.ts +23 -0
- package/src/api/client.ts +899 -0
- package/src/api/credentials.api.ts +197 -0
- package/src/api/executions.api.ts +228 -0
- package/src/api/flows.api.ts +195 -0
- package/src/api/index.ts +17 -0
- package/src/api/node-data.api.ts +167 -0
- package/src/api/query-keys.ts +44 -0
- package/src/api/triggers.api.ts +120 -0
- package/src/api/types.ts +212 -0
- package/src/api/use-flow-run-stream.ts +206 -0
- package/src/app.css +560 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/src/assets/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/src/assets/invect-branding.ts +51 -0
- package/src/assets/provider-icons/anthropic.svg +1 -0
- package/src/assets/provider-icons/anthropic_light.svg +1 -0
- package/src/assets/provider-icons/github.svg +1 -0
- package/src/assets/provider-icons/github_light.svg +1 -0
- package/src/assets/provider-icons/gmail.svg +1 -0
- package/src/assets/provider-icons/google_calendar.svg +1 -0
- package/src/assets/provider-icons/google_docs.svg +1 -0
- package/src/assets/provider-icons/google_drive.svg +1 -0
- package/src/assets/provider-icons/google_sheets.svg +1 -0
- package/src/assets/provider-icons/index.ts +55 -0
- package/src/assets/provider-icons/linear.svg +1 -0
- package/src/assets/provider-icons/openai.svg +1 -0
- package/src/assets/provider-icons/postgres.svg +1 -0
- package/src/assets/provider-icons/slack.svg +1 -0
- package/src/assets/small-loader-dark.svg +22 -0
- package/src/assets/small-loader-light.svg +22 -0
- package/src/assets/small.svg +7 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/PageLayout.tsx +55 -0
- package/src/components/chat/ChatInput.tsx +115 -0
- package/src/components/chat/ChatMessageList.tsx +788 -0
- package/src/components/chat/ChatModelSelector.tsx +208 -0
- package/src/components/chat/ChatPanel.tsx +243 -0
- package/src/components/chat/ChatPromptOverlay.tsx +150 -0
- package/src/components/chat/ChatProviderSelector.tsx +135 -0
- package/src/components/chat/ChatSettingsPanel.tsx +277 -0
- package/src/components/chat/InlineCredentialSetup.tsx +343 -0
- package/src/components/chat/MarkdownRenderer.tsx +140 -0
- package/src/components/chat/chat-memory.ts +88 -0
- package/src/components/chat/chat.store.ts +479 -0
- package/src/components/chat/index.ts +5 -0
- package/src/components/chat/use-chat.ts +473 -0
- package/src/components/credentials/CreateCredentialModal.tsx +609 -0
- package/src/components/credentials/CredentialDetailDialog.tsx +882 -0
- package/src/components/credentials/EditCredentialModal.tsx +399 -0
- package/src/components/credentials/OAuth2ConnectButton.tsx +288 -0
- package/src/components/credentials/OAuth2ProviderSelector.tsx +360 -0
- package/src/components/credentials/credential-utils.ts +99 -0
- package/src/components/credentials/index.ts +10 -0
- package/src/components/dashboard/FailedRunsAlert.tsx +67 -0
- package/src/components/dashboard/FlowCard.tsx +64 -0
- package/src/components/dashboard/RecentActivityTable.tsx +92 -0
- package/src/components/dashboard/StatCard.tsx +32 -0
- package/src/components/dashboard/index.ts +5 -0
- package/src/components/dashboard/status-helpers.tsx +102 -0
- package/src/components/flow-editor/ActionsSidebar.tsx +503 -0
- package/src/components/flow-editor/FlowEditor.tsx +1002 -0
- package/src/components/flow-editor/FlowHeader.tsx +87 -0
- package/src/components/flow-editor/FlowLayout.tsx +117 -0
- package/src/components/flow-editor/ModeSwitcher.tsx +49 -0
- package/src/components/flow-editor/NodeSidebar.tsx +343 -0
- package/src/components/flow-editor/RunControls.tsx +109 -0
- package/src/components/flow-editor/ToolConfigPanel.tsx +434 -0
- package/src/components/flow-editor/ValidationPanel.tsx +167 -0
- package/src/components/flow-editor/flow-editor.store.ts +2 -0
- package/src/components/flow-editor/index.ts +6 -0
- package/src/components/flow-editor/inline-edit.tsx +111 -0
- package/src/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.tsx +334 -0
- package/src/components/flow-editor/node-config-panel/CredentialCombobox.tsx +217 -0
- package/src/components/flow-editor/node-config-panel/CredentialsSection.tsx +154 -0
- package/src/components/flow-editor/node-config-panel/DroppableInput.tsx +45 -0
- package/src/components/flow-editor/node-config-panel/DynamicSelectField.tsx +223 -0
- package/src/components/flow-editor/node-config-panel/JsonPreviewPanel.tsx +134 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanel.tsx +650 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanelHeader.tsx +91 -0
- package/src/components/flow-editor/node-config-panel/ParametersSection.tsx +144 -0
- package/src/components/flow-editor/node-config-panel/SearchableSelectField.tsx +126 -0
- package/src/components/flow-editor/node-config-panel/SwitchCasesField.tsx +212 -0
- package/src/components/flow-editor/node-config-panel/hooks/index.ts +2 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.ts +284 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-execution.ts +287 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-upstream-slots.ts +310 -0
- package/src/components/flow-editor/node-config-panel/panels/AgentToolsPanel.tsx +837 -0
- package/src/components/flow-editor/node-config-panel/panels/ConfigurationPanel.tsx +383 -0
- package/src/components/flow-editor/node-config-panel/panels/DataMapperPane.tsx +456 -0
- package/src/components/flow-editor/node-config-panel/panels/InputPanel.tsx +338 -0
- package/src/components/flow-editor/node-config-panel/panels/OutputPanel.tsx +109 -0
- package/src/components/flow-editor/node-config-panel/panels/index.ts +4 -0
- package/src/components/flow-editor/node-config-panel/types.ts +20 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-panel-store.ts +283 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-state.ts +172 -0
- package/src/components/flow-editor/node-config-panel/use-run-node.ts +147 -0
- package/src/components/flow-editor/node-config-panel/utils.ts +73 -0
- package/src/components/flow-editor/serialize-to-sdk.ts +204 -0
- package/src/components/flow-editor/toolbar-context.ts +9 -0
- package/src/components/flow-editor/use-copy-paste.ts +575 -0
- package/src/components/flow-editor/use-copy-paste.types.ts +35 -0
- package/src/components/flow-editor/use-flow-editor.ts +241 -0
- package/src/components/flow-runs-table/FlowRunsTable.tsx +631 -0
- package/src/components/flow-runs-table/index.ts +1 -0
- package/src/components/flow-viewer/FlowRunsView.tsx +268 -0
- package/src/components/flow-viewer/FlowStatusView.tsx +351 -0
- package/src/components/flow-viewer/RunSelector.tsx +422 -0
- package/src/components/flow-viewer/RunsSidebar.tsx +125 -0
- package/src/components/flow-viewer/agent-tool-executions-list.tsx +298 -0
- package/src/components/flow-viewer/index.ts +1 -0
- package/src/components/flow-viewer/logs-panel.tsx +567 -0
- package/src/components/flow-viewer/use-execution-log-data.ts +374 -0
- package/src/components/graph/BatchFlowEdge.tsx +229 -0
- package/src/components/graph/LayoutSelector.tsx +42 -0
- package/src/components/graph/index.ts +61 -0
- package/src/components/graph/styleUtils.ts +375 -0
- package/src/components/nodes/.DS_Store +0 -0
- package/src/components/nodes/AgentConfigPanel.tsx +1033 -0
- package/src/components/nodes/AgentNode.tsx +298 -0
- package/src/components/nodes/AgentToolsBox.tsx +193 -0
- package/src/components/nodes/NodeAppendix.tsx +98 -0
- package/src/components/nodes/NodeStatusIndicator.tsx +74 -0
- package/src/components/nodes/NodeViewContext.tsx +45 -0
- package/src/components/nodes/ToolParamField.tsx +282 -0
- package/src/components/nodes/ToolSelectorModal.tsx +648 -0
- package/src/components/nodes/ToolSelectorParts.tsx +505 -0
- package/src/components/nodes/UniversalNode.tsx +356 -0
- package/src/components/nodes/createContextAwareNodes.ts +19 -0
- package/src/components/nodes/index.ts +45 -0
- package/src/components/nodes/nodeRegistry.ts +50 -0
- package/src/components/nodes/withNodeContext.tsx +55 -0
- package/src/components/shared/InvectLoader.tsx +59 -0
- package/src/components/shared/InvectLogo.tsx +59 -0
- package/src/components/shared/ProviderIcon.tsx +115 -0
- package/src/components/side-menu/side-menu.tsx +267 -0
- package/src/components/sidebar/BaseSidebar.tsx +148 -0
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/triggers/CronPreview.tsx +243 -0
- package/src/components/triggers/index.ts +1 -0
- package/src/components/ui/alert-dialog.tsx +152 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +75 -0
- package/src/components/ui/codemirror-js-editor.tsx +432 -0
- package/src/components/ui/codemirror-json-editor.tsx +816 -0
- package/src/components/ui/codemirror-nunjucks-editor.tsx +451 -0
- package/src/components/ui/codemirror-vscode-theme.ts +243 -0
- package/src/components/ui/collapsible.tsx +12 -0
- package/src/components/ui/command.tsx +162 -0
- package/src/components/ui/dialog.tsx +140 -0
- package/src/components/ui/dropdown-menu.tsx +232 -0
- package/src/components/ui/empty-state.tsx +93 -0
- package/src/components/ui/input.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/popover.tsx +53 -0
- package/src/components/ui/resizable.tsx +61 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +179 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/slider.tsx +58 -0
- package/src/components/ui/switch.tsx +22 -0
- package/src/components/ui/table.tsx +90 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/tooltip.tsx +54 -0
- package/src/components/ui/tree-view.tsx +574 -0
- package/src/contexts/AgentToolCallbacksContext.tsx +31 -0
- package/src/contexts/ApiContext.tsx +51 -0
- package/src/contexts/FlowDataContext.tsx +21 -0
- package/src/contexts/NodeRegistryContext.tsx +54 -0
- package/src/contexts/PluginRegistryContext.tsx +182 -0
- package/src/contexts/ThemeProvider.tsx +106 -0
- package/src/contexts/ValidationContext.tsx +122 -0
- package/src/demo/DemoInvect.tsx +42 -0
- package/src/demo/FlowViewer.tsx +294 -0
- package/src/demo/demo-api-client.ts +246 -0
- package/src/demo/index.ts +28 -0
- package/src/demo/sample-data.ts +1980 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-document-title.ts +8 -0
- package/src/hooks/use-flow-data.ts +144 -0
- package/src/hooks/use-invect-portal-class.ts +27 -0
- package/src/hooks/useFlowEditorStore.ts +2 -0
- package/src/index.ts +70 -0
- package/src/lib/utils.ts +6 -0
- package/src/prettier.d.ts +13 -0
- package/src/routes/all-flow-runs.tsx +27 -0
- package/src/routes/credentials.tsx +362 -0
- package/src/routes/flow-route-layout.tsx +113 -0
- package/src/routes/flow-runs.tsx +22 -0
- package/src/routes/flow.tsx +22 -0
- package/src/routes/home.tsx +282 -0
- package/src/services/index.ts +6 -0
- package/src/stores/executionViewStore.ts +211 -0
- package/src/stores/flow-editor.store.ts +738 -0
- package/src/stores/flowEditorStore.ts +2 -0
- package/src/stores/index.ts +10 -0
- package/src/stores/uiStore.ts +189 -0
- package/src/types/agent-tools.types.ts +64 -0
- package/src/types/index.ts +5 -0
- package/src/types/node-definition.types.ts +104 -0
- package/src/types/plugin.types.ts +123 -0
- package/src/utils/credentialBranding.ts +116 -0
- package/src/utils/credentialFiltering.ts +68 -0
- package/src/utils/flowTransformations.ts +137 -0
- package/src/utils/layoutUtils.ts +127 -0
- package/src/utils/nodeReferenceUtils.ts +135 -0
- package/src/vendor.d.ts +7 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// Node data / testing React Query hooks
|
|
2
|
+
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { useApiClient } from '../contexts/ApiContext';
|
|
4
|
+
import { queryKeys, getErrorMessage } from './query-keys';
|
|
5
|
+
import { type SubmitSQLQueryRequest, type SubmitPromptRequest } from '@invect/core/types';
|
|
6
|
+
import { BatchProvider } from '@invect/core/types';
|
|
7
|
+
|
|
8
|
+
// Available Databases Query
|
|
9
|
+
export function useListQueryDatabases() {
|
|
10
|
+
const apiClient = useApiClient();
|
|
11
|
+
return useQuery({
|
|
12
|
+
queryKey: ['databases', 'available'],
|
|
13
|
+
queryFn: () => apiClient.getAvailableDatabases(),
|
|
14
|
+
staleTime: 5 * 60 * 1000, // 5 minutes - databases don't change often
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Database Query Mutation
|
|
19
|
+
export function useExecuteSqlQuery() {
|
|
20
|
+
const apiClient = useApiClient();
|
|
21
|
+
return useMutation({
|
|
22
|
+
mutationFn: (request: SubmitSQLQueryRequest) => apiClient.executeSqlQuery(request),
|
|
23
|
+
onError: (error) => {
|
|
24
|
+
console.error('Error executing query:', getErrorMessage(error));
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// JS Expression Testing (for data mapper)
|
|
30
|
+
export function useTestJsExpression() {
|
|
31
|
+
const apiClient = useApiClient();
|
|
32
|
+
|
|
33
|
+
return useMutation({
|
|
34
|
+
mutationFn: (request: { expression: string; context: Record<string, unknown> }) =>
|
|
35
|
+
apiClient.testJsExpression(request),
|
|
36
|
+
onError: (error) => {
|
|
37
|
+
console.error('Error testing JS expression:', getErrorMessage(error));
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Data Mapper Testing
|
|
43
|
+
export function useTestMapper() {
|
|
44
|
+
const apiClient = useApiClient();
|
|
45
|
+
|
|
46
|
+
return useMutation({
|
|
47
|
+
mutationFn: (request: {
|
|
48
|
+
expression: string;
|
|
49
|
+
incomingData: Record<string, unknown>;
|
|
50
|
+
mode?: 'auto' | 'iterate' | 'reshape';
|
|
51
|
+
}) => apiClient.testMapper(request),
|
|
52
|
+
onError: (error) => {
|
|
53
|
+
console.error('Error testing mapper:', getErrorMessage(error));
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function useResolveNodeDefinition() {
|
|
59
|
+
const apiClient = useApiClient();
|
|
60
|
+
|
|
61
|
+
return useMutation({
|
|
62
|
+
mutationFn: (request: {
|
|
63
|
+
nodeType: string;
|
|
64
|
+
params: Record<string, unknown>;
|
|
65
|
+
nodeId?: string | null;
|
|
66
|
+
flowId?: string | null;
|
|
67
|
+
changeField?: string;
|
|
68
|
+
changeValue?: unknown;
|
|
69
|
+
}) =>
|
|
70
|
+
apiClient.resolveNodeDefinition(request.nodeType, {
|
|
71
|
+
nodeId: request.nodeId,
|
|
72
|
+
flowId: request.flowId,
|
|
73
|
+
params: request.params,
|
|
74
|
+
changeField: request.changeField,
|
|
75
|
+
changeValue: request.changeValue,
|
|
76
|
+
}),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Hook for loading dynamic field options via the loadOptions system.
|
|
82
|
+
*/
|
|
83
|
+
export function useLoadFieldOptions(
|
|
84
|
+
actionId: string,
|
|
85
|
+
fieldName: string,
|
|
86
|
+
dependencyValues: Record<string, unknown>,
|
|
87
|
+
options?: { enabled?: boolean },
|
|
88
|
+
) {
|
|
89
|
+
const apiClient = useApiClient();
|
|
90
|
+
const depsKey = JSON.stringify(dependencyValues);
|
|
91
|
+
|
|
92
|
+
return useQuery({
|
|
93
|
+
queryKey: queryKeys.fieldOptions(actionId, fieldName, depsKey),
|
|
94
|
+
queryFn: () => apiClient.loadFieldOptions(actionId, fieldName, dependencyValues),
|
|
95
|
+
enabled: options?.enabled ?? true,
|
|
96
|
+
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
97
|
+
retry: 1,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Models Query
|
|
102
|
+
export function useListAvailableModels(options?: {
|
|
103
|
+
credentialId?: string;
|
|
104
|
+
provider?: string;
|
|
105
|
+
enabled?: boolean;
|
|
106
|
+
}) {
|
|
107
|
+
const apiClient = useApiClient();
|
|
108
|
+
return useQuery({
|
|
109
|
+
queryKey: [...queryKeys.models, options?.credentialId ?? options?.provider ?? 'all'],
|
|
110
|
+
queryFn: () =>
|
|
111
|
+
apiClient.getModels({ credentialId: options?.credentialId, provider: options?.provider }),
|
|
112
|
+
enabled: options?.enabled ?? true,
|
|
113
|
+
staleTime: 1000 * 60 * 30, // 30 minutes (models don't change often)
|
|
114
|
+
retry: (failureCount, error) => {
|
|
115
|
+
if (failureCount >= 2) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if (error instanceof Error && error.message.includes('4')) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Model Testing Mutation
|
|
127
|
+
export function useExecuteModelPrompt() {
|
|
128
|
+
const apiClient = useApiClient();
|
|
129
|
+
|
|
130
|
+
return useMutation({
|
|
131
|
+
mutationFn: (testData: {
|
|
132
|
+
prompt: string;
|
|
133
|
+
model: string;
|
|
134
|
+
maxTokens?: number;
|
|
135
|
+
temperature?: number;
|
|
136
|
+
outputSchema?: string;
|
|
137
|
+
}) =>
|
|
138
|
+
apiClient.testModelPrompt({
|
|
139
|
+
...testData,
|
|
140
|
+
provider: BatchProvider.OPENAI,
|
|
141
|
+
useBatchProcessing: false,
|
|
142
|
+
} as SubmitPromptRequest),
|
|
143
|
+
onError: (error) => {
|
|
144
|
+
console.error('Error testing model prompt:', getErrorMessage(error));
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Node Definitions Query
|
|
150
|
+
export function useAvailableNodes() {
|
|
151
|
+
const apiClient = useApiClient();
|
|
152
|
+
|
|
153
|
+
return useQuery({
|
|
154
|
+
queryKey: queryKeys.availableNodes,
|
|
155
|
+
queryFn: () => apiClient.getAvailableNodes(),
|
|
156
|
+
staleTime: 1000 * 60 * 60, // 1 hour - node definitions rarely change
|
|
157
|
+
retry: (failureCount, error) => {
|
|
158
|
+
if (failureCount >= 2) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
if (error instanceof Error && error.message.includes('4')) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
return true;
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CredentialFilters } from './types';
|
|
2
|
+
|
|
3
|
+
export const queryKeys = {
|
|
4
|
+
flows: ['flows'] as const,
|
|
5
|
+
flow: (id: string) => ['flows', id] as const,
|
|
6
|
+
flowVersions: (flowId: string) => ['flows', flowId, 'versions'] as const,
|
|
7
|
+
executions: (flowId: string) => ['executions', flowId] as const,
|
|
8
|
+
flowRun: (id: string) => ['executions', id] as const,
|
|
9
|
+
allExecutions: (
|
|
10
|
+
flowId?: string,
|
|
11
|
+
status?: string,
|
|
12
|
+
page?: number,
|
|
13
|
+
limit?: number,
|
|
14
|
+
sortBy?: string,
|
|
15
|
+
sortOrder?: 'asc' | 'desc',
|
|
16
|
+
) => ['executions', 'all', flowId, status, page, limit, sortBy, sortOrder] as const,
|
|
17
|
+
nodeExecutions: (flowRunId: string) => ['node-executions', flowRunId] as const,
|
|
18
|
+
models: ['models'] as const,
|
|
19
|
+
reactFlow: (flowId: string, version?: string, flowRunId?: string) =>
|
|
20
|
+
['flows', flowId, 'react-flow', version, flowRunId] as const,
|
|
21
|
+
credentials: (filters?: CredentialFilters) =>
|
|
22
|
+
['credentials', filters ? JSON.stringify(filters) : 'all'] as const,
|
|
23
|
+
credential: (id: string) => ['credentials', id] as const,
|
|
24
|
+
credentialUsage: (id: string) => ['credentials', id, 'usage'] as const,
|
|
25
|
+
agentTools: ['agent', 'tools'] as const,
|
|
26
|
+
fieldOptions: (actionId: string, fieldName: string, deps: string) =>
|
|
27
|
+
['field-options', actionId, fieldName, deps] as const,
|
|
28
|
+
availableNodes: ['available-nodes'] as const,
|
|
29
|
+
triggers: (flowId: string) => ['flows', flowId, 'triggers'] as const,
|
|
30
|
+
trigger: (triggerId: string) => ['triggers', triggerId] as const,
|
|
31
|
+
dashboardStats: ['dashboard', 'stats'] as const,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Enhanced error handling
|
|
35
|
+
export function getErrorMessage(error: unknown): string {
|
|
36
|
+
// Import ValidationError dynamically to avoid circular deps
|
|
37
|
+
if (error instanceof Error && error.name === 'ValidationError') {
|
|
38
|
+
return error.message;
|
|
39
|
+
}
|
|
40
|
+
if (error instanceof Error) {
|
|
41
|
+
return error.message;
|
|
42
|
+
}
|
|
43
|
+
return 'An unexpected error occurred';
|
|
44
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// Trigger-related React Query hooks
|
|
2
|
+
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { useApiClient } from '../contexts/ApiContext';
|
|
4
|
+
import { queryKeys, getErrorMessage } from './query-keys';
|
|
5
|
+
import type { CreateTriggerInput, UpdateTriggerInput } from './types';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Fetch all trigger registrations for a flow.
|
|
9
|
+
*/
|
|
10
|
+
export function useFlowTriggers(flowId: string) {
|
|
11
|
+
const apiClient = useApiClient();
|
|
12
|
+
|
|
13
|
+
return useQuery({
|
|
14
|
+
queryKey: queryKeys.triggers(flowId),
|
|
15
|
+
queryFn: () => apiClient.listTriggersForFlow(flowId),
|
|
16
|
+
enabled: !!flowId,
|
|
17
|
+
staleTime: 1000 * 30, // 30 seconds
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Fetch a single trigger by ID.
|
|
23
|
+
*/
|
|
24
|
+
export function useTrigger(triggerId: string) {
|
|
25
|
+
const apiClient = useApiClient();
|
|
26
|
+
|
|
27
|
+
return useQuery({
|
|
28
|
+
queryKey: queryKeys.trigger(triggerId),
|
|
29
|
+
queryFn: () => apiClient.getTrigger(triggerId),
|
|
30
|
+
enabled: !!triggerId,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Create a trigger registration.
|
|
36
|
+
*/
|
|
37
|
+
export function useCreateTrigger() {
|
|
38
|
+
const apiClient = useApiClient();
|
|
39
|
+
const queryClient = useQueryClient();
|
|
40
|
+
|
|
41
|
+
return useMutation({
|
|
42
|
+
mutationFn: ({ flowId, input }: { flowId: string; input: CreateTriggerInput }) =>
|
|
43
|
+
apiClient.createTrigger(flowId, input),
|
|
44
|
+
onSuccess: (_, { flowId }) => {
|
|
45
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.triggers(flowId) });
|
|
46
|
+
},
|
|
47
|
+
onError: (error) => {
|
|
48
|
+
console.error('Error creating trigger:', getErrorMessage(error));
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Update a trigger registration.
|
|
55
|
+
*/
|
|
56
|
+
export function useUpdateTrigger() {
|
|
57
|
+
const apiClient = useApiClient();
|
|
58
|
+
const queryClient = useQueryClient();
|
|
59
|
+
|
|
60
|
+
return useMutation({
|
|
61
|
+
mutationFn: ({
|
|
62
|
+
triggerId,
|
|
63
|
+
input,
|
|
64
|
+
}: {
|
|
65
|
+
triggerId: string;
|
|
66
|
+
flowId: string;
|
|
67
|
+
input: UpdateTriggerInput;
|
|
68
|
+
}) => apiClient.updateTrigger(triggerId, input),
|
|
69
|
+
onSuccess: (_, { triggerId, flowId }) => {
|
|
70
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.trigger(triggerId) });
|
|
71
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.triggers(flowId) });
|
|
72
|
+
},
|
|
73
|
+
onError: (error) => {
|
|
74
|
+
console.error('Error updating trigger:', getErrorMessage(error));
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Delete a trigger registration.
|
|
81
|
+
*/
|
|
82
|
+
export function useDeleteTrigger() {
|
|
83
|
+
const apiClient = useApiClient();
|
|
84
|
+
const queryClient = useQueryClient();
|
|
85
|
+
|
|
86
|
+
return useMutation({
|
|
87
|
+
mutationFn: ({ triggerId }: { triggerId: string; flowId: string }) =>
|
|
88
|
+
apiClient.deleteTrigger(triggerId),
|
|
89
|
+
onSuccess: (_, { flowId }) => {
|
|
90
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.triggers(flowId) });
|
|
91
|
+
},
|
|
92
|
+
onError: (error) => {
|
|
93
|
+
console.error('Error deleting trigger:', getErrorMessage(error));
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Sync trigger registrations from the flow definition.
|
|
100
|
+
*/
|
|
101
|
+
export function useSyncTriggers() {
|
|
102
|
+
const apiClient = useApiClient();
|
|
103
|
+
const queryClient = useQueryClient();
|
|
104
|
+
|
|
105
|
+
return useMutation({
|
|
106
|
+
mutationFn: ({
|
|
107
|
+
flowId,
|
|
108
|
+
definition,
|
|
109
|
+
}: {
|
|
110
|
+
flowId: string;
|
|
111
|
+
definition: { nodes: Array<{ id: string; type: string; params?: Record<string, unknown> }> };
|
|
112
|
+
}) => apiClient.syncTriggersForFlow(flowId, definition),
|
|
113
|
+
onSuccess: (_, { flowId }) => {
|
|
114
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.triggers(flowId) });
|
|
115
|
+
},
|
|
116
|
+
onError: (error) => {
|
|
117
|
+
console.error('Error syncing triggers:', getErrorMessage(error));
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
package/src/api/types.ts
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// API client types for communicating with the Invect backend
|
|
2
|
+
|
|
3
|
+
import type { FlowValidationResult } from '@invect/core/types';
|
|
4
|
+
import type { NodeDefinition } from '../types/node-definition.types';
|
|
5
|
+
|
|
6
|
+
// Re-export core types used throughout the API layer
|
|
7
|
+
export type {
|
|
8
|
+
Flow,
|
|
9
|
+
FlowVersion,
|
|
10
|
+
FlowRun,
|
|
11
|
+
NodeExecution,
|
|
12
|
+
FlowEdge,
|
|
13
|
+
CreateFlowRequest,
|
|
14
|
+
CreateFlowVersionRequest,
|
|
15
|
+
FlowValidationResult,
|
|
16
|
+
FlowValidationError,
|
|
17
|
+
PaginatedResponse,
|
|
18
|
+
SubmitPromptRequest,
|
|
19
|
+
SubmitSQLQueryRequest,
|
|
20
|
+
SQLQueryResult,
|
|
21
|
+
QueryOptions,
|
|
22
|
+
InvectDatabaseConfig,
|
|
23
|
+
InvectDefinition,
|
|
24
|
+
Model,
|
|
25
|
+
ReactFlowData,
|
|
26
|
+
AgentToolDefinition,
|
|
27
|
+
NodeConfigUpdateResponse,
|
|
28
|
+
DashboardStats,
|
|
29
|
+
FlowRunResult,
|
|
30
|
+
FlowInputs,
|
|
31
|
+
ExecuteFlowOptions,
|
|
32
|
+
UpdateFlowInput,
|
|
33
|
+
} from '@invect/core/types';
|
|
34
|
+
|
|
35
|
+
export type { NodeDefinition };
|
|
36
|
+
|
|
37
|
+
// Custom error class for validation errors
|
|
38
|
+
export class ValidationError extends Error {
|
|
39
|
+
public validationResult: FlowValidationResult;
|
|
40
|
+
|
|
41
|
+
constructor(message: string, validationResult: FlowValidationResult) {
|
|
42
|
+
super(message);
|
|
43
|
+
this.name = 'ValidationError';
|
|
44
|
+
this.validationResult = validationResult;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Options for React Flow data endpoint
|
|
49
|
+
export interface ReactFlowDataOptions {
|
|
50
|
+
/** Flow version to render, or 'latest' for most recent version */
|
|
51
|
+
version?: string | 'latest';
|
|
52
|
+
/** Flow run ID to include execution status */
|
|
53
|
+
flowRunId?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type CredentialAuthType =
|
|
57
|
+
| 'apiKey'
|
|
58
|
+
| 'bearer'
|
|
59
|
+
| 'basic'
|
|
60
|
+
| 'oauth2'
|
|
61
|
+
| 'custom'
|
|
62
|
+
| 'awsSigV4'
|
|
63
|
+
| 'jwt'
|
|
64
|
+
| 'connectionString';
|
|
65
|
+
|
|
66
|
+
export type CredentialType = 'http-api' | 'database' | 'llm';
|
|
67
|
+
|
|
68
|
+
export interface CredentialConfig {
|
|
69
|
+
apiKey?: string;
|
|
70
|
+
location?: 'header' | 'query';
|
|
71
|
+
paramName?: string;
|
|
72
|
+
token?: string;
|
|
73
|
+
username?: string;
|
|
74
|
+
password?: string;
|
|
75
|
+
accessToken?: string;
|
|
76
|
+
refreshToken?: string;
|
|
77
|
+
tokenType?: string;
|
|
78
|
+
scope?: string;
|
|
79
|
+
clientId?: string;
|
|
80
|
+
clientSecret?: string;
|
|
81
|
+
/** OAuth2 provider ID (e.g., "google", "github") */
|
|
82
|
+
oauth2Provider?: string;
|
|
83
|
+
/** Authorization URL (for custom OAuth2 providers) */
|
|
84
|
+
authorizationUrl?: string;
|
|
85
|
+
/** Token URL (for custom OAuth2 providers) */
|
|
86
|
+
tokenUrl?: string;
|
|
87
|
+
headers?: Record<string, string>;
|
|
88
|
+
accessKeyId?: string;
|
|
89
|
+
secretAccessKey?: string;
|
|
90
|
+
region?: string;
|
|
91
|
+
service?: string;
|
|
92
|
+
algorithm?: string;
|
|
93
|
+
secret?: string;
|
|
94
|
+
connectionString?: string;
|
|
95
|
+
expiresAt?: string;
|
|
96
|
+
apiUrl?: string;
|
|
97
|
+
baseUrl?: string;
|
|
98
|
+
endpoint?: string;
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// OAuth2 Provider Definition
|
|
103
|
+
export interface OAuth2ProviderDefinition {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
icon?: string;
|
|
108
|
+
authorizationUrl: string;
|
|
109
|
+
tokenUrl: string;
|
|
110
|
+
defaultScopes: string[];
|
|
111
|
+
additionalAuthParams?: Record<string, string>;
|
|
112
|
+
supportsRefresh: boolean;
|
|
113
|
+
docsUrl?: string;
|
|
114
|
+
category: 'google' | 'microsoft' | 'github' | 'slack' | 'other';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// OAuth2 Start Flow Result
|
|
118
|
+
export interface OAuth2StartResult {
|
|
119
|
+
authorizationUrl: string;
|
|
120
|
+
state: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface Credential {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
type: CredentialType;
|
|
127
|
+
authType: CredentialAuthType;
|
|
128
|
+
config?: CredentialConfig;
|
|
129
|
+
description?: string;
|
|
130
|
+
isActive: boolean;
|
|
131
|
+
userId: string;
|
|
132
|
+
workspaceId?: string;
|
|
133
|
+
isShared: boolean;
|
|
134
|
+
metadata?: Record<string, unknown>;
|
|
135
|
+
lastUsedAt?: string;
|
|
136
|
+
expiresAt?: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface CreateCredentialInput {
|
|
142
|
+
name: string;
|
|
143
|
+
type: CredentialType;
|
|
144
|
+
authType: CredentialAuthType;
|
|
145
|
+
config: CredentialConfig;
|
|
146
|
+
description?: string;
|
|
147
|
+
workspaceId?: string;
|
|
148
|
+
isShared?: boolean;
|
|
149
|
+
metadata?: Record<string, unknown>;
|
|
150
|
+
expiresAt?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface UpdateCredentialInput {
|
|
154
|
+
name?: string;
|
|
155
|
+
type?: CredentialType;
|
|
156
|
+
authType?: CredentialAuthType;
|
|
157
|
+
config?: CredentialConfig;
|
|
158
|
+
description?: string;
|
|
159
|
+
isActive?: boolean;
|
|
160
|
+
isShared?: boolean;
|
|
161
|
+
metadata?: Record<string, unknown>;
|
|
162
|
+
expiresAt?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface CredentialFilters {
|
|
166
|
+
type?: CredentialType;
|
|
167
|
+
authType?: CredentialAuthType;
|
|
168
|
+
isActive?: boolean;
|
|
169
|
+
includeShared?: boolean;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface CredentialUsage {
|
|
173
|
+
flowsCount: number;
|
|
174
|
+
nodesCount: number;
|
|
175
|
+
lastUsedAt: string | null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Trigger Types
|
|
179
|
+
export type TriggerType = 'manual' | 'webhook' | 'cron';
|
|
180
|
+
|
|
181
|
+
export interface FlowTriggerRegistration {
|
|
182
|
+
id: string;
|
|
183
|
+
flowId: string;
|
|
184
|
+
nodeId: string;
|
|
185
|
+
type: TriggerType;
|
|
186
|
+
isEnabled: boolean;
|
|
187
|
+
webhookPath?: string | null;
|
|
188
|
+
webhookSecret?: string | null;
|
|
189
|
+
cronExpression?: string | null;
|
|
190
|
+
cronTimezone?: string | null;
|
|
191
|
+
lastTriggeredAt?: string | null;
|
|
192
|
+
createdAt: string;
|
|
193
|
+
updatedAt: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface CreateTriggerInput {
|
|
197
|
+
nodeId: string;
|
|
198
|
+
type: TriggerType;
|
|
199
|
+
isEnabled?: boolean;
|
|
200
|
+
webhookPath?: string;
|
|
201
|
+
webhookSecret?: string;
|
|
202
|
+
cronExpression?: string;
|
|
203
|
+
cronTimezone?: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface UpdateTriggerInput {
|
|
207
|
+
isEnabled?: boolean;
|
|
208
|
+
webhookPath?: string;
|
|
209
|
+
webhookSecret?: string;
|
|
210
|
+
cronExpression?: string;
|
|
211
|
+
cronTimezone?: string;
|
|
212
|
+
}
|