@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-responded.trigger.d.ts","sourceRoot":"","sources":["../../../../src/modules/chatbot/triggers/user-responded.trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAG/E,eAAO,MAAM,oBAAoB,EAAE,qBAsClC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userRespondedTrigger = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const user_responded_service_1 = require("../services/user-responded.service");
|
|
6
|
+
exports.userRespondedTrigger = {
|
|
7
|
+
id: 'user-responded',
|
|
8
|
+
name: 'User Responded',
|
|
9
|
+
description: 'Triggered when user sends a message',
|
|
10
|
+
category: types_1.NODE_CATEGORY.TRIGGER,
|
|
11
|
+
icon: '👤',
|
|
12
|
+
serviceClass: user_responded_service_1.UserRespondedService,
|
|
13
|
+
inputs: [
|
|
14
|
+
{
|
|
15
|
+
id: 'userId',
|
|
16
|
+
name: 'User ID',
|
|
17
|
+
description: 'Identifier of the user who responded',
|
|
18
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
19
|
+
validation: {
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
outputs: [
|
|
25
|
+
{
|
|
26
|
+
id: 'message',
|
|
27
|
+
name: 'Message',
|
|
28
|
+
description: 'The message content from the user',
|
|
29
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'timestamp',
|
|
33
|
+
name: 'Timestamp',
|
|
34
|
+
description: 'When the message was received',
|
|
35
|
+
type: types_1.FIELD_TYPE.DATE,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'userId',
|
|
39
|
+
name: 'User ID',
|
|
40
|
+
description: 'Identifier of the user',
|
|
41
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=user-responded.trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-responded.trigger.js","sourceRoot":"","sources":["../../../../src/modules/chatbot/triggers/user-responded.trigger.ts"],"names":[],"mappings":";;;AAAA,uCAA+E;AAC/E,+EAA0E;AAE7D,QAAA,oBAAoB,GAA0B;IACzD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,qBAAa,CAAC,OAAO;IAC/B,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,6CAAoB;IAClC,MAAM,EAAE;QACN;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE,kBAAU,CAAC,IAAI;SACtB;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-condition.action.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/actions/evaluate-condition.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAG/E,eAAO,MAAM,uBAAuB,EAAE,qBAoErC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evaluateConditionAction = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const evaluate_condition_service_1 = require("../services/evaluate-condition.service");
|
|
6
|
+
exports.evaluateConditionAction = {
|
|
7
|
+
id: 'evaluate-condition',
|
|
8
|
+
name: 'Evaluate Condition',
|
|
9
|
+
description: 'Check a condition and branch accordingly',
|
|
10
|
+
category: types_1.NODE_CATEGORY.ACTION,
|
|
11
|
+
icon: '⚖️',
|
|
12
|
+
serviceClass: evaluate_condition_service_1.EvaluateConditionService,
|
|
13
|
+
inputs: [
|
|
14
|
+
{
|
|
15
|
+
id: 'propertyToLookup',
|
|
16
|
+
name: 'Property to Lookup',
|
|
17
|
+
description: 'The property path to evaluate (e.g., user.status)',
|
|
18
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
19
|
+
validation: {
|
|
20
|
+
required: true,
|
|
21
|
+
minLength: 1,
|
|
22
|
+
},
|
|
23
|
+
placeholder: 'e.g., user.status',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'condition',
|
|
27
|
+
name: 'Condition',
|
|
28
|
+
description: 'The condition operator',
|
|
29
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
30
|
+
validation: {
|
|
31
|
+
required: true,
|
|
32
|
+
enum: ['equals', 'not_equals', 'contains', 'greater_than', 'less_than'],
|
|
33
|
+
},
|
|
34
|
+
defaultValue: 'equals',
|
|
35
|
+
options: [
|
|
36
|
+
{ label: 'Equals', value: 'equals' },
|
|
37
|
+
{ label: 'Not Equals', value: 'not_equals' },
|
|
38
|
+
{ label: 'Contains', value: 'contains' },
|
|
39
|
+
{ label: 'Greater Than', value: 'greater_than' },
|
|
40
|
+
{ label: 'Less Than', value: 'less_than' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'value',
|
|
45
|
+
name: 'Value',
|
|
46
|
+
description: 'The value to compare against',
|
|
47
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
48
|
+
validation: {
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
placeholder: 'Enter comparison value...',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
outputs: [
|
|
55
|
+
{
|
|
56
|
+
id: 'result',
|
|
57
|
+
name: 'Result',
|
|
58
|
+
description: 'Whether the condition was met (true/false)',
|
|
59
|
+
type: types_1.FIELD_TYPE.BOOLEAN,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'propertyValue',
|
|
63
|
+
name: 'Property Value',
|
|
64
|
+
description: 'The actual value of the property',
|
|
65
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'routeId',
|
|
69
|
+
name: 'Route ID',
|
|
70
|
+
description: 'The ID of the route taken',
|
|
71
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=evaluate-condition.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-condition.action.js","sourceRoot":"","sources":["../../../../src/modules/conditional/actions/evaluate-condition.action.ts"],"names":[],"mappings":";;;AAAA,uCAA+E;AAC/E,uFAAkF;AAErE,QAAA,uBAAuB,GAA0B;IAC5D,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,qBAAa,CAAC,MAAM;IAC9B,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,qDAAwB;IACtC,MAAM,EAAE;QACN;YACE,EAAE,EAAE,kBAAkB;YACtB,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,CAAC;aACb;YACD,WAAW,EAAE,mBAAmB;SACjC;QACD;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,CAAC;aACxE;YACD,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;gBACpC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;gBAC5C,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBACxC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;gBAChD,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;aAC3C;SACF;QACD;YACE,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;aACf;YACD,WAAW,EAAE,2BAA2B;SACzC;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,IAAI,EAAE,kBAAU,CAAC,OAAO;SACzB;QACD;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./evaluate-condition.action"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/conditional/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional.module.d.ts","sourceRoot":"","sources":["../../../src/modules/conditional/conditional.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD,eAAO,MAAM,iBAAiB,EAAE,wBAS/B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.conditionalModule = void 0;
|
|
4
|
+
const actions_1 = require("./actions");
|
|
5
|
+
const credentials_1 = require("./credentials");
|
|
6
|
+
const triggers_1 = require("./triggers");
|
|
7
|
+
exports.conditionalModule = {
|
|
8
|
+
id: 'conditional',
|
|
9
|
+
name: 'Conditional',
|
|
10
|
+
description: 'Branch workflow based on conditions',
|
|
11
|
+
icon: '🔀',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
credentialFields: credentials_1.conditionalCredentials,
|
|
14
|
+
actions: [actions_1.evaluateConditionAction],
|
|
15
|
+
triggers: [triggers_1.conditionMetTrigger, triggers_1.conditionNotMetTrigger],
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=conditional.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditional.module.js","sourceRoot":"","sources":["../../../src/modules/conditional/conditional.module.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AACpD,+CAAuD;AACvD,yCAAyE;AAE5D,QAAA,iBAAiB,GAA6B;IACzD,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,oCAAsB;IACxC,OAAO,EAAE,CAAC,iCAAuB,CAAC;IAClC,QAAQ,EAAE,CAAC,8BAAmB,EAAE,iCAAsB,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/modules/conditional/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,sBAAsB,EAAE,yBAAyB,EAE7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/modules/conditional/credentials.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAgC,EAElE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
2
|
+
export declare class ConditionMetService implements IWorkflowActionService {
|
|
3
|
+
perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=condition-met.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-met.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/services/condition-met.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,mBAAoB,YAAW,sBAAsB;IAC1D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CASpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ConditionMetService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let ConditionMetService = class ConditionMetService {
|
|
12
|
+
async perform(inputs, _context) {
|
|
13
|
+
const _propertyToLookup = inputs.propertyToLookup;
|
|
14
|
+
return {
|
|
15
|
+
propertyValue: '',
|
|
16
|
+
routeId: '',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.ConditionMetService = ConditionMetService;
|
|
21
|
+
exports.ConditionMetService = ConditionMetService = __decorate([
|
|
22
|
+
(0, common_1.Injectable)()
|
|
23
|
+
], ConditionMetService);
|
|
24
|
+
//# sourceMappingURL=condition-met.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-met.service.js","sourceRoot":"","sources":["../../../../src/modules/conditional/services/condition-met.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAKrC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,QAA+B;QAG/B,MAAM,iBAAiB,GAAG,MAAM,CAAC,gBAA0B,CAAC;QAE5D,OAAO;YACL,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,EAAE;SACZ,CAAC;IACJ,CAAC;CACF,CAAA;AAbY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;GACA,mBAAmB,CAa/B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
2
|
+
export declare class ConditionNotMetService implements IWorkflowActionService {
|
|
3
|
+
perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=condition-not-met.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-not-met.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/services/condition-not-met.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,sBAAuB,YAAW,sBAAsB;IAC7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CASpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ConditionNotMetService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let ConditionNotMetService = class ConditionNotMetService {
|
|
12
|
+
async perform(inputs, _context) {
|
|
13
|
+
const _propertyToLookup = inputs.propertyToLookup;
|
|
14
|
+
return {
|
|
15
|
+
propertyValue: '',
|
|
16
|
+
defaultRoute: true,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.ConditionNotMetService = ConditionNotMetService;
|
|
21
|
+
exports.ConditionNotMetService = ConditionNotMetService = __decorate([
|
|
22
|
+
(0, common_1.Injectable)()
|
|
23
|
+
], ConditionNotMetService);
|
|
24
|
+
//# sourceMappingURL=condition-not-met.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-not-met.service.js","sourceRoot":"","sources":["../../../../src/modules/conditional/services/condition-not-met.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAKrC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,QAA+B;QAG/B,MAAM,iBAAiB,GAAG,MAAM,CAAC,gBAA0B,CAAC;QAE5D,OAAO;YACL,aAAa,EAAE,EAAE;YACjB,YAAY,EAAE,IAAI;SACnB,CAAC;IACJ,CAAC;CACF,CAAA;AAbY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;GACA,sBAAsB,CAalC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
2
|
+
export declare class EvaluateConditionService implements IWorkflowActionService {
|
|
3
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=evaluate-condition.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-condition.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/services/evaluate-condition.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAc5E,qBACa,wBAAyB,YAAW,sBAAsB;IAC/D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAwCpC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EvaluateConditionService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
function getNestedProperty(obj, path) {
|
|
12
|
+
return path.split('.').reduce((current, prop) => {
|
|
13
|
+
if (current && typeof current === 'object' && prop in current) {
|
|
14
|
+
return current[prop];
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}, obj);
|
|
18
|
+
}
|
|
19
|
+
let EvaluateConditionService = class EvaluateConditionService {
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const propertyToLookup = inputs.propertyToLookup;
|
|
22
|
+
const condition = inputs.condition;
|
|
23
|
+
const value = inputs.value;
|
|
24
|
+
const propertyValue = getNestedProperty(context.context || {}, propertyToLookup);
|
|
25
|
+
let result = false;
|
|
26
|
+
let routeId = '';
|
|
27
|
+
switch (condition) {
|
|
28
|
+
case 'equals':
|
|
29
|
+
result = String(propertyValue) === String(value);
|
|
30
|
+
break;
|
|
31
|
+
case 'not_equals':
|
|
32
|
+
result = String(propertyValue) !== String(value);
|
|
33
|
+
break;
|
|
34
|
+
case 'contains':
|
|
35
|
+
result = String(propertyValue).includes(String(value));
|
|
36
|
+
break;
|
|
37
|
+
case 'greater_than':
|
|
38
|
+
result = Number(propertyValue) > Number(value);
|
|
39
|
+
break;
|
|
40
|
+
case 'less_than':
|
|
41
|
+
result = Number(propertyValue) < Number(value);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
routeId = result ? 'route_1' : 'default';
|
|
45
|
+
return {
|
|
46
|
+
result,
|
|
47
|
+
propertyValue: String(propertyValue),
|
|
48
|
+
routeId,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.EvaluateConditionService = EvaluateConditionService;
|
|
53
|
+
exports.EvaluateConditionService = EvaluateConditionService = __decorate([
|
|
54
|
+
(0, common_1.Injectable)()
|
|
55
|
+
], EvaluateConditionService);
|
|
56
|
+
//# sourceMappingURL=evaluate-condition.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-condition.service.js","sourceRoot":"","sources":["../../../../src/modules/conditional/services/evaluate-condition.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAO5C,SAAS,iBAAiB,CAAC,GAA4B,EAAE,IAAY;IACnE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAgB,EAAE,IAAY,EAAE,EAAE;QAC/D,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,IAAI,IAAI,OAAO,EAAE,CAAC;YAC9D,OAAQ,OAAmC,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,GAAG,CAAC,CAAC;AACV,CAAC;AAGM,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAG9B,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAA0B,CAAC;QAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,SAAmB,CAAC;QAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAe,CAAC;QAGrC,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,gBAAgB,CAAC,CAAC;QACjF,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,OAAO,GAAG,EAAE,CAAC;QAGjB,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,QAAQ;gBACX,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC;gBACjD,MAAM;YACR,KAAK,YAAY;gBACf,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC;gBACjD,MAAM;YACR,KAAK,UAAU;gBACb,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,MAAM;YACR,KAAK,cAAc;gBACjB,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC/C,MAAM;YACR,KAAK,WAAW;gBACd,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC/C,MAAM;QACV,CAAC;QAID,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAEzC,OAAO;YACL,MAAM;YACN,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;YACpC,OAAO;SACR,CAAC;IACJ,CAAC;CACF,CAAA;AA5CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CA4CpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./condition-met.service"), exports);
|
|
18
|
+
__exportStar(require("./condition-not-met.service"), exports);
|
|
19
|
+
__exportStar(require("./evaluate-condition.service"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/conditional/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,8DAA4C;AAC5C,+DAA6C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-met.trigger.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/condition-met.trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAG/E,eAAO,MAAM,mBAAmB,EAAE,qBAgCjC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.conditionMetTrigger = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const condition_met_service_1 = require("../services/condition-met.service");
|
|
6
|
+
exports.conditionMetTrigger = {
|
|
7
|
+
id: 'condition-met',
|
|
8
|
+
name: 'Condition Met',
|
|
9
|
+
description: 'Triggered when a condition is true',
|
|
10
|
+
category: types_1.NODE_CATEGORY.TRIGGER,
|
|
11
|
+
icon: '✅',
|
|
12
|
+
serviceClass: condition_met_service_1.ConditionMetService,
|
|
13
|
+
inputs: [
|
|
14
|
+
{
|
|
15
|
+
id: 'propertyToLookup',
|
|
16
|
+
name: 'Property to Lookup',
|
|
17
|
+
description: 'The property that was evaluated',
|
|
18
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
19
|
+
validation: {
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
outputs: [
|
|
25
|
+
{
|
|
26
|
+
id: 'propertyValue',
|
|
27
|
+
name: 'Property Value',
|
|
28
|
+
description: 'The value that met the condition',
|
|
29
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'routeId',
|
|
33
|
+
name: 'Route ID',
|
|
34
|
+
description: 'The route ID that was triggered',
|
|
35
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=condition-met.trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-met.trigger.js","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/condition-met.trigger.ts"],"names":[],"mappings":";;;AAAA,uCAA+E;AAC/E,6EAAwE;AAE3D,QAAA,mBAAmB,GAA0B;IACxD,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,oCAAoC;IACjD,QAAQ,EAAE,qBAAa,CAAC,OAAO;IAC/B,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,2CAAmB;IACjC,MAAM,EAAE;QACN;YACE,EAAE,EAAE,kBAAkB;YACtB,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-not-met.trigger.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/condition-not-met.trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAG/E,eAAO,MAAM,sBAAsB,EAAE,qBAgCpC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.conditionNotMetTrigger = void 0;
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const condition_not_met_service_1 = require("../services/condition-not-met.service");
|
|
6
|
+
exports.conditionNotMetTrigger = {
|
|
7
|
+
id: 'condition-not-met',
|
|
8
|
+
name: 'Condition Not Met',
|
|
9
|
+
description: 'Triggered when a condition is false',
|
|
10
|
+
category: types_1.NODE_CATEGORY.TRIGGER,
|
|
11
|
+
icon: '❌',
|
|
12
|
+
serviceClass: condition_not_met_service_1.ConditionNotMetService,
|
|
13
|
+
inputs: [
|
|
14
|
+
{
|
|
15
|
+
id: 'propertyToLookup',
|
|
16
|
+
name: 'Property to Lookup',
|
|
17
|
+
description: 'The property that was evaluated',
|
|
18
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
19
|
+
validation: {
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
outputs: [
|
|
25
|
+
{
|
|
26
|
+
id: 'propertyValue',
|
|
27
|
+
name: 'Property Value',
|
|
28
|
+
description: 'The value that did not meet the condition',
|
|
29
|
+
type: types_1.FIELD_TYPE.STRING,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'defaultRoute',
|
|
33
|
+
name: 'Default Route',
|
|
34
|
+
description: 'Whether default route was taken',
|
|
35
|
+
type: types_1.FIELD_TYPE.BOOLEAN,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=condition-not-met.trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-not-met.trigger.js","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/condition-not-met.trigger.ts"],"names":[],"mappings":";;;AAAA,uCAA+E;AAC/E,qFAA+E;AAElE,QAAA,sBAAsB,GAA0B;IAC3D,EAAE,EAAE,mBAAmB;IACvB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,qBAAa,CAAC,OAAO;IAC/B,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,kDAAsB;IACpC,MAAM,EAAE;QACN;YACE,EAAE,EAAE,kBAAkB;YACtB,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,kBAAU,CAAC,OAAO;SACzB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./condition-met.trigger"), exports);
|
|
18
|
+
__exportStar(require("./condition-not-met.trigger"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/conditional/triggers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,8DAA4C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { aiModule } from './ai/ai.module';
|
|
3
|
+
export { chatbotModule } from './chatbot/chatbot.module';
|
|
4
|
+
export { conditionalModule } from './conditional/conditional.module';
|
|
5
|
+
export { twilioModule } from './twilio/twilio.module';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAyFA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|