@venturialstd/workflow 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/README.md +238 -0
- package/dist/constants/workflow.constant.d.ts +23 -0
- package/dist/constants/workflow.constant.d.ts.map +1 -0
- package/dist/constants/workflow.constant.js +30 -0
- package/dist/constants/workflow.constant.js.map +1 -0
- package/dist/dtos/create-workflow-edge.dto.d.ts +10 -0
- package/dist/dtos/create-workflow-edge.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-edge.dto.js +58 -0
- package/dist/dtos/create-workflow-edge.dto.js.map +1 -0
- package/dist/dtos/create-workflow-execution.dto.d.ts +11 -0
- package/dist/dtos/create-workflow-execution.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-execution.dto.js +58 -0
- package/dist/dtos/create-workflow-execution.dto.js.map +1 -0
- package/dist/dtos/create-workflow-module-credential.dto.d.ts +15 -0
- package/dist/dtos/create-workflow-module-credential.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-module-credential.dto.js +75 -0
- package/dist/dtos/create-workflow-module-credential.dto.js.map +1 -0
- package/dist/dtos/create-workflow-module.dto.d.ts +10 -0
- package/dist/dtos/create-workflow-module.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-module.dto.js +55 -0
- package/dist/dtos/create-workflow-module.dto.js.map +1 -0
- package/dist/dtos/create-workflow-node.dto.d.ts +15 -0
- package/dist/dtos/create-workflow-node.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-node.dto.js +62 -0
- package/dist/dtos/create-workflow-node.dto.js.map +1 -0
- package/dist/dtos/create-workflow-session.dto.d.ts +13 -0
- package/dist/dtos/create-workflow-session.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-session.dto.js +51 -0
- package/dist/dtos/create-workflow-session.dto.js.map +1 -0
- package/dist/dtos/create-workflow.dto.d.ts +12 -0
- package/dist/dtos/create-workflow.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow.dto.js +65 -0
- package/dist/dtos/create-workflow.dto.js.map +1 -0
- package/dist/dtos/index.d.ts +8 -0
- package/dist/dtos/index.d.ts.map +1 -0
- package/dist/dtos/index.js +24 -0
- package/dist/dtos/index.js.map +1 -0
- package/dist/entities/workflow-edge.entity.d.ts +15 -0
- package/dist/entities/workflow-edge.entity.d.ts.map +1 -0
- package/dist/entities/workflow-edge.entity.js +99 -0
- package/dist/entities/workflow-edge.entity.js.map +1 -0
- package/dist/entities/workflow-execution.entity.d.ts +20 -0
- package/dist/entities/workflow-execution.entity.d.ts.map +1 -0
- package/dist/entities/workflow-execution.entity.js +123 -0
- package/dist/entities/workflow-execution.entity.js.map +1 -0
- package/dist/entities/workflow-module-credential.entity.d.ts +13 -0
- package/dist/entities/workflow-module-credential.entity.d.ts.map +1 -0
- package/dist/entities/workflow-module-credential.entity.js +89 -0
- package/dist/entities/workflow-module-credential.entity.js.map +1 -0
- package/dist/entities/workflow-module.entity.d.ts +17 -0
- package/dist/entities/workflow-module.entity.d.ts.map +1 -0
- package/dist/entities/workflow-module.entity.js +113 -0
- package/dist/entities/workflow-module.entity.js.map +1 -0
- package/dist/entities/workflow-node.entity.d.ts +20 -0
- package/dist/entities/workflow-node.entity.d.ts.map +1 -0
- package/dist/entities/workflow-node.entity.js +105 -0
- package/dist/entities/workflow-node.entity.js.map +1 -0
- package/dist/entities/workflow-session.entity.d.ts +20 -0
- package/dist/entities/workflow-session.entity.d.ts.map +1 -0
- package/dist/entities/workflow-session.entity.js +100 -0
- package/dist/entities/workflow-session.entity.js.map +1 -0
- package/dist/entities/workflow.entity.d.ts +23 -0
- package/dist/entities/workflow.entity.d.ts.map +1 -0
- package/dist/entities/workflow.entity.js +130 -0
- package/dist/entities/workflow.entity.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/ai/actions/analyze-sentiment.action.d.ts +3 -0
- package/dist/modules/ai/actions/analyze-sentiment.action.d.ts.map +1 -0
- package/dist/modules/ai/actions/analyze-sentiment.action.js +59 -0
- package/dist/modules/ai/actions/analyze-sentiment.action.js.map +1 -0
- package/dist/modules/ai/actions/generate-text.action.d.ts +3 -0
- package/dist/modules/ai/actions/generate-text.action.d.ts.map +1 -0
- package/dist/modules/ai/actions/generate-text.action.js +89 -0
- package/dist/modules/ai/actions/generate-text.action.js.map +1 -0
- package/dist/modules/ai/actions/index.d.ts +4 -0
- package/dist/modules/ai/actions/index.d.ts.map +1 -0
- package/dist/modules/ai/actions/index.js +20 -0
- package/dist/modules/ai/actions/index.js.map +1 -0
- package/dist/modules/ai/actions/summarize.action.d.ts +3 -0
- package/dist/modules/ai/actions/summarize.action.d.ts.map +1 -0
- package/dist/modules/ai/actions/summarize.action.js +60 -0
- package/dist/modules/ai/actions/summarize.action.js.map +1 -0
- package/dist/modules/ai/ai.module.d.ts +3 -0
- package/dist/modules/ai/ai.module.d.ts.map +1 -0
- package/dist/modules/ai/ai.module.js +19 -0
- package/dist/modules/ai/ai.module.js.map +1 -0
- package/dist/modules/ai/auth/ai-auth.service.d.ts +5 -0
- package/dist/modules/ai/auth/ai-auth.service.d.ts.map +1 -0
- package/dist/modules/ai/auth/ai-auth.service.js +41 -0
- package/dist/modules/ai/auth/ai-auth.service.js.map +1 -0
- package/dist/modules/ai/auth/index.d.ts +2 -0
- package/dist/modules/ai/auth/index.d.ts.map +1 -0
- package/dist/modules/ai/auth/index.js +18 -0
- package/dist/modules/ai/auth/index.js.map +1 -0
- package/dist/modules/ai/credentials.d.ts +3 -0
- package/dist/modules/ai/credentials.d.ts.map +1 -0
- package/dist/modules/ai/credentials.js +32 -0
- package/dist/modules/ai/credentials.js.map +1 -0
- package/dist/modules/ai/services/analyze-sentiment.service.d.ts +5 -0
- package/dist/modules/ai/services/analyze-sentiment.service.d.ts.map +1 -0
- package/dist/modules/ai/services/analyze-sentiment.service.js +27 -0
- package/dist/modules/ai/services/analyze-sentiment.service.js.map +1 -0
- package/dist/modules/ai/services/generate-text.service.d.ts +5 -0
- package/dist/modules/ai/services/generate-text.service.d.ts.map +1 -0
- package/dist/modules/ai/services/generate-text.service.js +29 -0
- package/dist/modules/ai/services/generate-text.service.js.map +1 -0
- package/dist/modules/ai/services/index.d.ts +4 -0
- package/dist/modules/ai/services/index.d.ts.map +1 -0
- package/dist/modules/ai/services/index.js +20 -0
- package/dist/modules/ai/services/index.js.map +1 -0
- package/dist/modules/ai/services/summarize.service.d.ts +5 -0
- package/dist/modules/ai/services/summarize.service.d.ts.map +1 -0
- package/dist/modules/ai/services/summarize.service.js +28 -0
- package/dist/modules/ai/services/summarize.service.js.map +1 -0
- package/dist/modules/ai/triggers/index.d.ts +3 -0
- package/dist/modules/ai/triggers/index.d.ts.map +1 -0
- package/dist/modules/ai/triggers/index.js +5 -0
- package/dist/modules/ai/triggers/index.js.map +1 -0
- package/dist/modules/chatbot/actions/ask-question.action.d.ts +3 -0
- package/dist/modules/chatbot/actions/ask-question.action.d.ts.map +1 -0
- package/dist/modules/chatbot/actions/ask-question.action.js +42 -0
- package/dist/modules/chatbot/actions/ask-question.action.js.map +1 -0
- package/dist/modules/chatbot/actions/index.d.ts +4 -0
- package/dist/modules/chatbot/actions/index.d.ts.map +1 -0
- package/dist/modules/chatbot/actions/index.js +20 -0
- package/dist/modules/chatbot/actions/index.js.map +1 -0
- package/dist/modules/chatbot/actions/send-buttons.action.d.ts +3 -0
- package/dist/modules/chatbot/actions/send-buttons.action.d.ts.map +1 -0
- package/dist/modules/chatbot/actions/send-buttons.action.js +67 -0
- package/dist/modules/chatbot/actions/send-buttons.action.js.map +1 -0
- package/dist/modules/chatbot/actions/send-message.action.d.ts +3 -0
- package/dist/modules/chatbot/actions/send-message.action.d.ts.map +1 -0
- package/dist/modules/chatbot/actions/send-message.action.js +52 -0
- package/dist/modules/chatbot/actions/send-message.action.js.map +1 -0
- package/dist/modules/chatbot/chatbot.module.d.ts +3 -0
- package/dist/modules/chatbot/chatbot.module.d.ts.map +1 -0
- package/dist/modules/chatbot/chatbot.module.js +17 -0
- package/dist/modules/chatbot/chatbot.module.js.map +1 -0
- package/dist/modules/chatbot/credentials.d.ts +3 -0
- package/dist/modules/chatbot/credentials.d.ts.map +1 -0
- package/dist/modules/chatbot/credentials.js +5 -0
- package/dist/modules/chatbot/credentials.js.map +1 -0
- package/dist/modules/chatbot/services/ask-question.service.d.ts +5 -0
- package/dist/modules/chatbot/services/ask-question.service.d.ts.map +1 -0
- package/dist/modules/chatbot/services/ask-question.service.js +25 -0
- package/dist/modules/chatbot/services/ask-question.service.js.map +1 -0
- package/dist/modules/chatbot/services/index.d.ts +5 -0
- package/dist/modules/chatbot/services/index.d.ts.map +1 -0
- package/dist/modules/chatbot/services/index.js +21 -0
- package/dist/modules/chatbot/services/index.js.map +1 -0
- package/dist/modules/chatbot/services/send-buttons.service.d.ts +5 -0
- package/dist/modules/chatbot/services/send-buttons.service.d.ts.map +1 -0
- package/dist/modules/chatbot/services/send-buttons.service.js +25 -0
- package/dist/modules/chatbot/services/send-buttons.service.js.map +1 -0
- package/dist/modules/chatbot/services/send-message.service.d.ts +5 -0
- package/dist/modules/chatbot/services/send-message.service.d.ts.map +1 -0
- package/dist/modules/chatbot/services/send-message.service.js +27 -0
- package/dist/modules/chatbot/services/send-message.service.js.map +1 -0
- package/dist/modules/chatbot/services/user-responded.service.d.ts +5 -0
- package/dist/modules/chatbot/services/user-responded.service.d.ts.map +1 -0
- package/dist/modules/chatbot/services/user-responded.service.js +25 -0
- package/dist/modules/chatbot/services/user-responded.service.js.map +1 -0
- package/dist/modules/chatbot/triggers/index.d.ts +2 -0
- package/dist/modules/chatbot/triggers/index.d.ts.map +1 -0
- package/dist/modules/chatbot/triggers/index.js +18 -0
- package/dist/modules/chatbot/triggers/index.js.map +1 -0
- package/dist/modules/chatbot/triggers/user-responded.trigger.d.ts +3 -0
- package/dist/modules/chatbot/triggers/user-responded.trigger.d.ts.map +1 -0
- package/dist/modules/chatbot/triggers/user-responded.trigger.js +45 -0
- package/dist/modules/chatbot/triggers/user-responded.trigger.js.map +1 -0
- package/dist/modules/conditional/actions/evaluate-condition.action.d.ts +3 -0
- package/dist/modules/conditional/actions/evaluate-condition.action.d.ts.map +1 -0
- package/dist/modules/conditional/actions/evaluate-condition.action.js +75 -0
- package/dist/modules/conditional/actions/evaluate-condition.action.js.map +1 -0
- package/dist/modules/conditional/actions/index.d.ts +2 -0
- package/dist/modules/conditional/actions/index.d.ts.map +1 -0
- package/dist/modules/conditional/actions/index.js +18 -0
- package/dist/modules/conditional/actions/index.js.map +1 -0
- package/dist/modules/conditional/conditional.module.d.ts +3 -0
- package/dist/modules/conditional/conditional.module.d.ts.map +1 -0
- package/dist/modules/conditional/conditional.module.js +17 -0
- package/dist/modules/conditional/conditional.module.js.map +1 -0
- package/dist/modules/conditional/credentials.d.ts +3 -0
- package/dist/modules/conditional/credentials.d.ts.map +1 -0
- package/dist/modules/conditional/credentials.js +5 -0
- package/dist/modules/conditional/credentials.js.map +1 -0
- package/dist/modules/conditional/services/condition-met.service.d.ts +5 -0
- package/dist/modules/conditional/services/condition-met.service.d.ts.map +1 -0
- package/dist/modules/conditional/services/condition-met.service.js +24 -0
- package/dist/modules/conditional/services/condition-met.service.js.map +1 -0
- package/dist/modules/conditional/services/condition-not-met.service.d.ts +5 -0
- package/dist/modules/conditional/services/condition-not-met.service.d.ts.map +1 -0
- package/dist/modules/conditional/services/condition-not-met.service.js +24 -0
- package/dist/modules/conditional/services/condition-not-met.service.js.map +1 -0
- package/dist/modules/conditional/services/evaluate-condition.service.d.ts +5 -0
- package/dist/modules/conditional/services/evaluate-condition.service.d.ts.map +1 -0
- package/dist/modules/conditional/services/evaluate-condition.service.js +56 -0
- package/dist/modules/conditional/services/evaluate-condition.service.js.map +1 -0
- package/dist/modules/conditional/services/index.d.ts +4 -0
- package/dist/modules/conditional/services/index.d.ts.map +1 -0
- package/dist/modules/conditional/services/index.js +20 -0
- package/dist/modules/conditional/services/index.js.map +1 -0
- package/dist/modules/conditional/triggers/condition-met.trigger.d.ts +3 -0
- package/dist/modules/conditional/triggers/condition-met.trigger.d.ts.map +1 -0
- package/dist/modules/conditional/triggers/condition-met.trigger.js +39 -0
- package/dist/modules/conditional/triggers/condition-met.trigger.js.map +1 -0
- package/dist/modules/conditional/triggers/condition-not-met.trigger.d.ts +3 -0
- package/dist/modules/conditional/triggers/condition-not-met.trigger.d.ts.map +1 -0
- package/dist/modules/conditional/triggers/condition-not-met.trigger.js +39 -0
- package/dist/modules/conditional/triggers/condition-not-met.trigger.js.map +1 -0
- package/dist/modules/conditional/triggers/index.d.ts +3 -0
- package/dist/modules/conditional/triggers/index.d.ts.map +1 -0
- package/dist/modules/conditional/triggers/index.js +19 -0
- package/dist/modules/conditional/triggers/index.js.map +1 -0
- package/dist/modules/index.d.ts +6 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +110 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/twilio/actions/index.d.ts +2 -0
- package/dist/modules/twilio/actions/index.d.ts.map +1 -0
- package/dist/modules/twilio/actions/index.js +18 -0
- package/dist/modules/twilio/actions/index.js.map +1 -0
- package/dist/modules/twilio/actions/send-sms.action.d.ts +3 -0
- package/dist/modules/twilio/actions/send-sms.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/send-sms.action.js +59 -0
- package/dist/modules/twilio/actions/send-sms.action.js.map +1 -0
- package/dist/modules/twilio/auth/index.d.ts +2 -0
- package/dist/modules/twilio/auth/index.d.ts.map +1 -0
- package/dist/modules/twilio/auth/index.js +18 -0
- package/dist/modules/twilio/auth/index.js.map +1 -0
- package/dist/modules/twilio/auth/twilio-auth.service.d.ts +5 -0
- package/dist/modules/twilio/auth/twilio-auth.service.d.ts.map +1 -0
- package/dist/modules/twilio/auth/twilio-auth.service.js +62 -0
- package/dist/modules/twilio/auth/twilio-auth.service.js.map +1 -0
- package/dist/modules/twilio/credentials.d.ts +3 -0
- package/dist/modules/twilio/credentials.d.ts.map +1 -0
- package/dist/modules/twilio/credentials.js +48 -0
- package/dist/modules/twilio/credentials.js.map +1 -0
- package/dist/modules/twilio/services/index.d.ts +3 -0
- package/dist/modules/twilio/services/index.d.ts.map +1 -0
- package/dist/modules/twilio/services/index.js +19 -0
- package/dist/modules/twilio/services/index.js.map +1 -0
- package/dist/modules/twilio/services/message-received.service.d.ts +5 -0
- package/dist/modules/twilio/services/message-received.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/message-received.service.js +28 -0
- package/dist/modules/twilio/services/message-received.service.js.map +1 -0
- package/dist/modules/twilio/services/send-sms.service.d.ts +5 -0
- package/dist/modules/twilio/services/send-sms.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/send-sms.service.js +29 -0
- package/dist/modules/twilio/services/send-sms.service.js.map +1 -0
- package/dist/modules/twilio/triggers/index.d.ts +2 -0
- package/dist/modules/twilio/triggers/index.d.ts.map +1 -0
- package/dist/modules/twilio/triggers/index.js +18 -0
- package/dist/modules/twilio/triggers/index.js.map +1 -0
- package/dist/modules/twilio/triggers/message-received.trigger.d.ts +3 -0
- package/dist/modules/twilio/triggers/message-received.trigger.d.ts.map +1 -0
- package/dist/modules/twilio/triggers/message-received.trigger.js +69 -0
- package/dist/modules/twilio/triggers/message-received.trigger.js.map +1 -0
- package/dist/modules/twilio/twilio.module.d.ts +3 -0
- package/dist/modules/twilio/twilio.module.d.ts.map +1 -0
- package/dist/modules/twilio/twilio.module.js +19 -0
- package/dist/modules/twilio/twilio.module.js.map +1 -0
- package/dist/modules/types.d.ts +103 -0
- package/dist/modules/types.d.ts.map +1 -0
- package/dist/modules/types.js +50 -0
- package/dist/modules/types.js.map +1 -0
- package/dist/services/workflow-edge.service.d.ts +12 -0
- package/dist/services/workflow-edge.service.d.ts.map +1 -0
- package/dist/services/workflow-edge.service.js +52 -0
- package/dist/services/workflow-edge.service.js.map +1 -0
- package/dist/services/workflow-execution.service.d.ts +15 -0
- package/dist/services/workflow-execution.service.d.ts.map +1 -0
- package/dist/services/workflow-execution.service.js +96 -0
- package/dist/services/workflow-execution.service.js.map +1 -0
- package/dist/services/workflow-module-credential.service.d.ts +14 -0
- package/dist/services/workflow-module-credential.service.d.ts.map +1 -0
- package/dist/services/workflow-module-credential.service.js +85 -0
- package/dist/services/workflow-module-credential.service.js.map +1 -0
- package/dist/services/workflow-module.service.d.ts +15 -0
- package/dist/services/workflow-module.service.d.ts.map +1 -0
- package/dist/services/workflow-module.service.js +96 -0
- package/dist/services/workflow-module.service.js.map +1 -0
- package/dist/services/workflow-node.service.d.ts +15 -0
- package/dist/services/workflow-node.service.d.ts.map +1 -0
- package/dist/services/workflow-node.service.js +62 -0
- package/dist/services/workflow-node.service.js.map +1 -0
- package/dist/services/workflow-session.service.d.ts +15 -0
- package/dist/services/workflow-session.service.d.ts.map +1 -0
- package/dist/services/workflow-session.service.js +91 -0
- package/dist/services/workflow-session.service.js.map +1 -0
- package/dist/services/workflow.service.d.ts +13 -0
- package/dist/services/workflow.service.d.ts.map +1 -0
- package/dist/services/workflow.service.js +73 -0
- package/dist/services/workflow.service.js.map +1 -0
- package/dist/workflow.module.d.ts +3 -0
- package/dist/workflow.module.d.ts.map +1 -0
- package/dist/workflow.module.js +98 -0
- package/dist/workflow.module.js.map +1 -0
- package/package.json +93 -0
package/README.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Workflow Module
|
|
2
|
+
|
|
3
|
+
A comprehensive workflow management module for Venturial that handles workflow creation, execution, and session management.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Workflow Management**: Create, update, and manage workflows with nodes and edges
|
|
8
|
+
- **Node Types**: Support for multiple node types (Chatbot, AI, Conditional, Twilio)
|
|
9
|
+
- **Execution Tracking**: Track workflow executions with status and data
|
|
10
|
+
- **Session Management**: Persistent sessions for multi-step workflows
|
|
11
|
+
- **Execution Modes**: Support for single-run and persistent session workflows
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @venturialstd/workflow
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Entities
|
|
20
|
+
|
|
21
|
+
### Workflow
|
|
22
|
+
Main workflow entity containing:
|
|
23
|
+
- `name`: Workflow name
|
|
24
|
+
- `active`: Whether the workflow is active
|
|
25
|
+
- `executionMode`: `single` or `persistent`
|
|
26
|
+
- `status`: `active`, `inactive`, or `draft`
|
|
27
|
+
- Relationships to nodes, edges, executions, and sessions
|
|
28
|
+
|
|
29
|
+
### WorkflowNode
|
|
30
|
+
Represents a node in the workflow:
|
|
31
|
+
- `nodeId`: ReactFlow node identifier
|
|
32
|
+
- `type`: Node type (chatbot, ai, conditional, twilio)
|
|
33
|
+
- `actionType`: Specific trigger or action identifier
|
|
34
|
+
- `properties`: Node-specific properties (JSONB)
|
|
35
|
+
- `position`: Node position on canvas (x, y)
|
|
36
|
+
|
|
37
|
+
### WorkflowEdge
|
|
38
|
+
Represents connections between nodes:
|
|
39
|
+
- `edgeId`: ReactFlow edge identifier
|
|
40
|
+
- `source`: Source node ID
|
|
41
|
+
- `target`: Target node ID
|
|
42
|
+
- `sourceHandle` / `targetHandle`: Handle identifiers
|
|
43
|
+
|
|
44
|
+
### WorkflowExecution
|
|
45
|
+
Tracks individual workflow runs:
|
|
46
|
+
- `status`: `pending`, `running`, `completed`, `failed`, `cancelled`
|
|
47
|
+
- `sessionId`: Optional session ID for persistent workflows
|
|
48
|
+
- `currentNodeId`: Current node being executed
|
|
49
|
+
- `inputData` / `outputData` / `errorData`: Execution data
|
|
50
|
+
|
|
51
|
+
### WorkflowSession
|
|
52
|
+
Manages persistent workflow sessions:
|
|
53
|
+
- `userId`: Optional user identifier
|
|
54
|
+
- `externalId`: External identifier (phone, email, etc.)
|
|
55
|
+
- `currentNodeId`: Current node in session
|
|
56
|
+
- `context`: Session context/variables (JSONB)
|
|
57
|
+
- `history`: Array of node execution history
|
|
58
|
+
|
|
59
|
+
### WorkflowModuleCredential
|
|
60
|
+
Stores credentials for workflow modules:
|
|
61
|
+
- `moduleId`: Module identifier (e.g., 'twilio', 'ai')
|
|
62
|
+
- `name`: User-defined name for this credential set
|
|
63
|
+
- `credentials`: Encrypted credential values (JSONB)
|
|
64
|
+
- `organizationId`: Optional organization scope
|
|
65
|
+
- `userId`: Optional user scope
|
|
66
|
+
- `isActive`: Whether the credential is active
|
|
67
|
+
|
|
68
|
+
## Services
|
|
69
|
+
|
|
70
|
+
All services extend `TypeOrmCrudService` and provide CRUD operations via `@dataui/crud`.
|
|
71
|
+
|
|
72
|
+
### WorkflowService
|
|
73
|
+
- `getWorkflowsByOrganization(organizationId)`
|
|
74
|
+
- `getActiveWorkflows(organizationId?)`
|
|
75
|
+
- `activateWorkflow(workflowId)`
|
|
76
|
+
- `deactivateWorkflow(workflowId)`
|
|
77
|
+
- `getWorkflowWithNodesAndEdges(workflowId)`
|
|
78
|
+
|
|
79
|
+
### WorkflowNodeService
|
|
80
|
+
- `getNodesByWorkflowId(workflowId)`
|
|
81
|
+
- `getNodeByNodeId(workflowId, nodeId)`
|
|
82
|
+
- `updateNodeProperties(id, properties)`
|
|
83
|
+
- `updateNodePosition(id, position)`
|
|
84
|
+
|
|
85
|
+
### WorkflowEdgeService
|
|
86
|
+
- `getEdgesByWorkflowId(workflowId)`
|
|
87
|
+
- `getEdgeByEdgeId(workflowId, edgeId)`
|
|
88
|
+
- `getEdgesBySourceNode(workflowId, sourceNodeId)`
|
|
89
|
+
- `getEdgesByTargetNode(workflowId, targetNodeId)`
|
|
90
|
+
|
|
91
|
+
### WorkflowExecutionService
|
|
92
|
+
- `getExecutionsByWorkflowId(workflowId)`
|
|
93
|
+
- `getExecutionsBySessionId(sessionId)`
|
|
94
|
+
- `getActiveExecutions(workflowId?)`
|
|
95
|
+
- `startExecution(executionId)`
|
|
96
|
+
- `completeExecution(executionId, outputData?)`
|
|
97
|
+
- `failExecution(executionId, errorMessage, errorData?)`
|
|
98
|
+
- `updateCurrentNode(executionId, currentNodeId)`
|
|
99
|
+
|
|
100
|
+
### WorkflowSessionService
|
|
101
|
+
- `getSessionsByWorkflowId(workflowId)`
|
|
102
|
+
- `getActiveSessions(workflowId?)`
|
|
103
|
+
- `getSessionByExternalId(workflowId, externalId)`
|
|
104
|
+
- `getSessionByUserId(workflowId, userId)`
|
|
105
|
+
- `updateSessionContext(sessionId, context)`
|
|
106
|
+
- `addToSessionHistory(sessionId, nodeId, data?)`
|
|
107
|
+
- `deactivateSession(sessionId)`
|
|
108
|
+
|
|
109
|
+
### WorkflowModuleCredentialService
|
|
110
|
+
- `getCredentialsByModule(moduleId, organizationId?, userId?)`
|
|
111
|
+
- `getCredentialByName(moduleId, name, organizationId?, userId?)`
|
|
112
|
+
- `getActiveCredentials(moduleId, organizationId?)`
|
|
113
|
+
- `updateCredential(id, credentials)`
|
|
114
|
+
- `activateCredential(id)`
|
|
115
|
+
- `deactivateCredential(id)`
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
### Import the Module
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { WorkflowModule } from '@venturialstd/workflow';
|
|
123
|
+
|
|
124
|
+
@Module({
|
|
125
|
+
imports: [WorkflowModule],
|
|
126
|
+
})
|
|
127
|
+
export class AppModule {}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Use Services
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
import { WorkflowService } from '@venturialstd/workflow';
|
|
134
|
+
|
|
135
|
+
@Injectable()
|
|
136
|
+
export class MyService {
|
|
137
|
+
constructor(private workflowService: WorkflowService) {}
|
|
138
|
+
|
|
139
|
+
async createWorkflow(data: CreateWorkflowDto) {
|
|
140
|
+
return this.workflowService.create(data);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Constants
|
|
146
|
+
|
|
147
|
+
### Execution Modes
|
|
148
|
+
- `EXECUTION_MODE.SINGLE`: One-time execution
|
|
149
|
+
- `EXECUTION_MODE.PERSISTENT`: Maintains session state
|
|
150
|
+
|
|
151
|
+
### Node Types
|
|
152
|
+
- `NODE_TYPE.CHATBOT`
|
|
153
|
+
- `NODE_TYPE.AI`
|
|
154
|
+
- `NODE_TYPE.CONDITIONAL`
|
|
155
|
+
- `NODE_TYPE.TWILIO`
|
|
156
|
+
|
|
157
|
+
### Node Categories
|
|
158
|
+
- `NODE_CATEGORY.TRIGGER`
|
|
159
|
+
- `NODE_CATEGORY.ACTION`
|
|
160
|
+
|
|
161
|
+
### Workflow Status
|
|
162
|
+
- `WORKFLOW_STATUS.ACTIVE`
|
|
163
|
+
- `WORKFLOW_STATUS.INACTIVE`
|
|
164
|
+
- `WORKFLOW_STATUS.DRAFT`
|
|
165
|
+
|
|
166
|
+
### Execution Status
|
|
167
|
+
- `EXECUTION_STATUS.PENDING`
|
|
168
|
+
- `EXECUTION_STATUS.RUNNING`
|
|
169
|
+
- `EXECUTION_STATUS.COMPLETED`
|
|
170
|
+
- `EXECUTION_STATUS.FAILED`
|
|
171
|
+
- `EXECUTION_STATUS.CANCELLED`
|
|
172
|
+
|
|
173
|
+
## DTOs
|
|
174
|
+
|
|
175
|
+
All DTOs follow the `Create*Dto` pattern:
|
|
176
|
+
- `CreateWorkflowDto`
|
|
177
|
+
- `CreateWorkflowNodeDto`
|
|
178
|
+
- `CreateWorkflowEdgeDto`
|
|
179
|
+
- `CreateWorkflowExecutionDto`
|
|
180
|
+
- `CreateWorkflowSessionDto`
|
|
181
|
+
- `CreateWorkflowModuleCredentialDto`
|
|
182
|
+
- `UpdateWorkflowModuleCredentialDto`
|
|
183
|
+
|
|
184
|
+
## Database Schema
|
|
185
|
+
|
|
186
|
+
The module uses PostgreSQL with JSONB columns for flexible data storage:
|
|
187
|
+
- Node properties stored as JSONB
|
|
188
|
+
- Edge data stored as JSONB
|
|
189
|
+
- Execution input/output/error data as JSONB
|
|
190
|
+
- Session context and history as JSONB
|
|
191
|
+
- Module credentials stored as JSONB (should be encrypted at application level)
|
|
192
|
+
|
|
193
|
+
## Module Credentials
|
|
194
|
+
|
|
195
|
+
Each module can define required credential fields. Users can create multiple credential sets per module:
|
|
196
|
+
|
|
197
|
+
### Defining Credential Fields in Modules
|
|
198
|
+
|
|
199
|
+
Modules can define `credentialFields` in their module definition:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
credentialFields: [
|
|
203
|
+
{
|
|
204
|
+
id: 'apiKey',
|
|
205
|
+
name: 'API Key',
|
|
206
|
+
description: 'API key for the service',
|
|
207
|
+
type: FIELD_TYPE.STRING,
|
|
208
|
+
validation: { required: true },
|
|
209
|
+
sensitive: true, // Will be encrypted/masked
|
|
210
|
+
required: true,
|
|
211
|
+
},
|
|
212
|
+
]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Managing Credentials
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
// Create credentials for a module
|
|
219
|
+
const credential = await credentialService.create({
|
|
220
|
+
moduleId: 'twilio',
|
|
221
|
+
name: 'Production Twilio',
|
|
222
|
+
credentials: {
|
|
223
|
+
accountSid: 'AC...',
|
|
224
|
+
authToken: '...',
|
|
225
|
+
},
|
|
226
|
+
organizationId: 'org-123',
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Get all credentials for a module
|
|
230
|
+
const credentials = await credentialService.getCredentialsByModule(
|
|
231
|
+
'twilio',
|
|
232
|
+
'org-123'
|
|
233
|
+
);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
Part of the Venturial Core NPM package.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum EXECUTION_MODE {
|
|
2
|
+
SINGLE = "single",
|
|
3
|
+
PERSISTENT = "persistent"
|
|
4
|
+
}
|
|
5
|
+
export declare enum NODE_TYPE {
|
|
6
|
+
CHATBOT = "chatbot",
|
|
7
|
+
AI = "ai",
|
|
8
|
+
CONDITIONAL = "conditional",
|
|
9
|
+
TWILIO = "twilio"
|
|
10
|
+
}
|
|
11
|
+
export declare enum WORKFLOW_STATUS {
|
|
12
|
+
ACTIVE = "active",
|
|
13
|
+
INACTIVE = "inactive",
|
|
14
|
+
DRAFT = "draft"
|
|
15
|
+
}
|
|
16
|
+
export declare enum EXECUTION_STATUS {
|
|
17
|
+
PENDING = "pending",
|
|
18
|
+
RUNNING = "running",
|
|
19
|
+
COMPLETED = "completed",
|
|
20
|
+
FAILED = "failed",
|
|
21
|
+
CANCELLED = "cancelled"
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=workflow.constant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.constant.d.ts","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,EAAE,OAAO;IACT,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXECUTION_STATUS = exports.WORKFLOW_STATUS = exports.NODE_TYPE = exports.EXECUTION_MODE = void 0;
|
|
4
|
+
var EXECUTION_MODE;
|
|
5
|
+
(function (EXECUTION_MODE) {
|
|
6
|
+
EXECUTION_MODE["SINGLE"] = "single";
|
|
7
|
+
EXECUTION_MODE["PERSISTENT"] = "persistent";
|
|
8
|
+
})(EXECUTION_MODE || (exports.EXECUTION_MODE = EXECUTION_MODE = {}));
|
|
9
|
+
var NODE_TYPE;
|
|
10
|
+
(function (NODE_TYPE) {
|
|
11
|
+
NODE_TYPE["CHATBOT"] = "chatbot";
|
|
12
|
+
NODE_TYPE["AI"] = "ai";
|
|
13
|
+
NODE_TYPE["CONDITIONAL"] = "conditional";
|
|
14
|
+
NODE_TYPE["TWILIO"] = "twilio";
|
|
15
|
+
})(NODE_TYPE || (exports.NODE_TYPE = NODE_TYPE = {}));
|
|
16
|
+
var WORKFLOW_STATUS;
|
|
17
|
+
(function (WORKFLOW_STATUS) {
|
|
18
|
+
WORKFLOW_STATUS["ACTIVE"] = "active";
|
|
19
|
+
WORKFLOW_STATUS["INACTIVE"] = "inactive";
|
|
20
|
+
WORKFLOW_STATUS["DRAFT"] = "draft";
|
|
21
|
+
})(WORKFLOW_STATUS || (exports.WORKFLOW_STATUS = WORKFLOW_STATUS = {}));
|
|
22
|
+
var EXECUTION_STATUS;
|
|
23
|
+
(function (EXECUTION_STATUS) {
|
|
24
|
+
EXECUTION_STATUS["PENDING"] = "pending";
|
|
25
|
+
EXECUTION_STATUS["RUNNING"] = "running";
|
|
26
|
+
EXECUTION_STATUS["COMPLETED"] = "completed";
|
|
27
|
+
EXECUTION_STATUS["FAILED"] = "failed";
|
|
28
|
+
EXECUTION_STATUS["CANCELLED"] = "cancelled";
|
|
29
|
+
})(EXECUTION_STATUS || (exports.EXECUTION_STATUS = EXECUTION_STATUS = {}));
|
|
30
|
+
//# sourceMappingURL=workflow.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.constant.js","sourceRoot":"","sources":["../../src/constants/workflow.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,sBAAS,CAAA;IACT,wCAA2B,CAAA;IAC3B,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;AACjB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class CreateWorkflowEdgeDto {
|
|
2
|
+
workflowId: string;
|
|
3
|
+
edgeId: string;
|
|
4
|
+
source: string;
|
|
5
|
+
target: string;
|
|
6
|
+
sourceHandle?: string;
|
|
7
|
+
targetHandle?: string;
|
|
8
|
+
data?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=create-workflow-edge.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-edge.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-workflow-edge.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAGhC,UAAU,EAAE,MAAM,CAAC;IAInB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,CAAC;IAIf,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateWorkflowEdgeDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CreateWorkflowEdgeDto {
|
|
15
|
+
workflowId;
|
|
16
|
+
edgeId;
|
|
17
|
+
source;
|
|
18
|
+
target;
|
|
19
|
+
sourceHandle;
|
|
20
|
+
targetHandle;
|
|
21
|
+
data;
|
|
22
|
+
}
|
|
23
|
+
exports.CreateWorkflowEdgeDto = CreateWorkflowEdgeDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreateWorkflowEdgeDto.prototype, "workflowId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateWorkflowEdgeDto.prototype, "edgeId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateWorkflowEdgeDto.prototype, "source", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CreateWorkflowEdgeDto.prototype, "target", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], CreateWorkflowEdgeDto.prototype, "sourceHandle", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateWorkflowEdgeDto.prototype, "targetHandle", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], CreateWorkflowEdgeDto.prototype, "data", void 0);
|
|
58
|
+
//# sourceMappingURL=create-workflow-edge.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-edge.dto.js","sourceRoot":"","sources":["../../src/dtos/create-workflow-edge.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,MAAa,qBAAqB;IAGhC,UAAU,CAAS;IAInB,MAAM,CAAS;IAIf,MAAM,CAAS;IAIf,MAAM,CAAS;IAIf,YAAY,CAAU;IAItB,YAAY,CAAU;IAGtB,IAAI,CAA2B;CAChC;AA3BD,sDA2BC;AAxBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;mDACkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EXECUTION_STATUS } from '../constants/workflow.constant';
|
|
2
|
+
export declare class CreateWorkflowExecutionDto {
|
|
3
|
+
workflowId: string;
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
status?: EXECUTION_STATUS;
|
|
6
|
+
triggeredBy?: string;
|
|
7
|
+
currentNodeId?: string;
|
|
8
|
+
inputData?: Record<string, unknown>;
|
|
9
|
+
outputData?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=create-workflow-execution.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-execution.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-workflow-execution.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,qBAAa,0BAA0B;IAGrC,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAI1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateWorkflowExecutionDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const workflow_constant_1 = require("../constants/workflow.constant");
|
|
15
|
+
class CreateWorkflowExecutionDto {
|
|
16
|
+
workflowId;
|
|
17
|
+
sessionId;
|
|
18
|
+
status;
|
|
19
|
+
triggeredBy;
|
|
20
|
+
currentNodeId;
|
|
21
|
+
inputData;
|
|
22
|
+
outputData;
|
|
23
|
+
}
|
|
24
|
+
exports.CreateWorkflowExecutionDto = CreateWorkflowExecutionDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateWorkflowExecutionDto.prototype, "workflowId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateWorkflowExecutionDto.prototype, "sessionId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsEnum)(workflow_constant_1.EXECUTION_STATUS),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CreateWorkflowExecutionDto.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CreateWorkflowExecutionDto.prototype, "triggeredBy", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], CreateWorkflowExecutionDto.prototype, "currentNodeId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], CreateWorkflowExecutionDto.prototype, "inputData", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], CreateWorkflowExecutionDto.prototype, "outputData", void 0);
|
|
58
|
+
//# sourceMappingURL=create-workflow-execution.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-execution.dto.js","sourceRoot":"","sources":["../../src/dtos/create-workflow-execution.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAE3E,sEAAkE;AAElE,MAAa,0BAA0B;IAGrC,UAAU,CAAS;IAInB,SAAS,CAAU;IAInB,MAAM,CAAoB;IAI1B,WAAW,CAAU;IAIrB,aAAa,CAAU;IAGvB,SAAS,CAA2B;IAGpC,UAAU,CAA2B;CACtC;AA1BD,gEA0BC;AAvBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACM;AAInB;IAFC,IAAA,wBAAM,EAAC,oCAAgB,CAAC;IACxB,IAAA,4BAAU,GAAE;;0DACa;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACU;AAGvB;IADC,IAAA,4BAAU,GAAE;;6DACuB;AAGpC;IADC,IAAA,4BAAU,GAAE;;8DACwB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class CreateWorkflowModuleCredentialDto {
|
|
2
|
+
moduleId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
credentials: Record<string, unknown>;
|
|
5
|
+
organizationId?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare class UpdateWorkflowModuleCredentialDto {
|
|
10
|
+
name?: string;
|
|
11
|
+
credentials?: Record<string, unknown>;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=create-workflow-module-credential.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-module-credential.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-workflow-module-credential.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,iCAAiC;IAG5C,QAAQ,EAAE,MAAM,CAAC;IAIjB,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAIrC,cAAc,CAAC,EAAE,MAAM,CAAC;IAIxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,qBAAa,iCAAiC;IAG5C,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateWorkflowModuleCredentialDto = exports.CreateWorkflowModuleCredentialDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CreateWorkflowModuleCredentialDto {
|
|
15
|
+
moduleId;
|
|
16
|
+
name;
|
|
17
|
+
credentials;
|
|
18
|
+
organizationId;
|
|
19
|
+
userId;
|
|
20
|
+
metadata;
|
|
21
|
+
}
|
|
22
|
+
exports.CreateWorkflowModuleCredentialDto = CreateWorkflowModuleCredentialDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateWorkflowModuleCredentialDto.prototype, "moduleId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateWorkflowModuleCredentialDto.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], CreateWorkflowModuleCredentialDto.prototype, "credentials", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateWorkflowModuleCredentialDto.prototype, "organizationId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateWorkflowModuleCredentialDto.prototype, "userId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], CreateWorkflowModuleCredentialDto.prototype, "metadata", void 0);
|
|
51
|
+
class UpdateWorkflowModuleCredentialDto {
|
|
52
|
+
name;
|
|
53
|
+
credentials;
|
|
54
|
+
isActive;
|
|
55
|
+
metadata;
|
|
56
|
+
}
|
|
57
|
+
exports.UpdateWorkflowModuleCredentialDto = UpdateWorkflowModuleCredentialDto;
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], UpdateWorkflowModuleCredentialDto.prototype, "name", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], UpdateWorkflowModuleCredentialDto.prototype, "credentials", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", Boolean)
|
|
70
|
+
], UpdateWorkflowModuleCredentialDto.prototype, "isActive", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], UpdateWorkflowModuleCredentialDto.prototype, "metadata", void 0);
|
|
75
|
+
//# sourceMappingURL=create-workflow-module-credential.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-module-credential.dto.js","sourceRoot":"","sources":["../../src/dtos/create-workflow-module-credential.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,MAAa,iCAAiC;IAG5C,QAAQ,CAAS;IAIjB,IAAI,CAAS;IAGb,WAAW,CAA0B;IAIrC,cAAc,CAAU;IAIxB,MAAM,CAAU;IAGhB,QAAQ,CAA2B;CACpC;AAtBD,8EAsBC;AAnBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mEACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACA;AAGb;IADC,IAAA,4BAAU,GAAE;;sEACwB;AAIrC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACG;AAGhB;IADC,IAAA,4BAAU,GAAE;;mEACsB;AAGrC,MAAa,iCAAiC;IAG5C,IAAI,CAAU;IAGd,WAAW,CAA2B;IAGtC,QAAQ,CAAW;IAGnB,QAAQ,CAA2B;CACpC;AAbD,8EAaC;AAVC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACC;AAGd;IADC,IAAA,4BAAU,GAAE;;sEACyB;AAGtC;IADC,IAAA,4BAAU,GAAE;;mEACM;AAGnB;IADC,IAAA,4BAAU,GAAE;;mEACsB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class CreateWorkflowModuleDto {
|
|
2
|
+
moduleId: string;
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
configuration?: Record<string, unknown>;
|
|
7
|
+
settings?: Record<string, unknown>;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=create-workflow-module.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-module.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-workflow-module.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,uBAAuB;IAElC,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGxC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateWorkflowModuleDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CreateWorkflowModuleDto {
|
|
15
|
+
moduleId;
|
|
16
|
+
isActive;
|
|
17
|
+
name;
|
|
18
|
+
description;
|
|
19
|
+
configuration;
|
|
20
|
+
settings;
|
|
21
|
+
metadata;
|
|
22
|
+
}
|
|
23
|
+
exports.CreateWorkflowModuleDto = CreateWorkflowModuleDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateWorkflowModuleDto.prototype, "moduleId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsBoolean)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", Boolean)
|
|
32
|
+
], CreateWorkflowModuleDto.prototype, "isActive", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CreateWorkflowModuleDto.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CreateWorkflowModuleDto.prototype, "description", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], CreateWorkflowModuleDto.prototype, "configuration", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], CreateWorkflowModuleDto.prototype, "settings", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], CreateWorkflowModuleDto.prototype, "metadata", void 0);
|
|
55
|
+
//# sourceMappingURL=create-workflow-module.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-module.dto.js","sourceRoot":"","sources":["../../src/dtos/create-workflow-module.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkE;AAElE,MAAa,uBAAuB;IAElC,QAAQ,CAAS;IAIjB,QAAQ,CAAW;IAInB,IAAI,CAAU;IAId,WAAW,CAAU;IAGrB,aAAa,CAA2B;IAGxC,QAAQ,CAA2B;IAGnC,QAAQ,CAA2B;CACpC;AAxBD,0DAwBC;AAtBC;IADC,IAAA,0BAAQ,GAAE;;yDACM;AAIjB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;yDACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACQ;AAGrB;IADC,IAAA,4BAAU,GAAE;;8DAC2B;AAGxC;IADC,IAAA,4BAAU,GAAE;;yDACsB;AAGnC;IADC,IAAA,4BAAU,GAAE;;yDACsB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NODE_TYPE } from '../constants/workflow.constant';
|
|
2
|
+
export declare class CreateWorkflowNodeDto {
|
|
3
|
+
workflowId: string;
|
|
4
|
+
nodeId: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: NODE_TYPE;
|
|
7
|
+
actionType?: string;
|
|
8
|
+
properties: Record<string, unknown>;
|
|
9
|
+
position: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
data?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=create-workflow-node.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workflow-node.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-workflow-node.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,qBAAa,qBAAqB;IAGhC,UAAU,EAAE,MAAM,CAAC;IAInB,MAAM,EAAE,MAAM,CAAC;IAIf,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,SAAS,CAAC;IAIhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGpC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAGnC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC"}
|