@venturialstd/workflow 0.1.1 → 0.1.3

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.
Files changed (258) hide show
  1. package/dist/constants/workflow.constant.d.ts +2 -1
  2. package/dist/constants/workflow.constant.d.ts.map +1 -1
  3. package/dist/constants/workflow.constant.js +1 -0
  4. package/dist/constants/workflow.constant.js.map +1 -1
  5. package/dist/dtos/create-workflow-webhook.dto.d.ts +9 -0
  6. package/dist/dtos/create-workflow-webhook.dto.d.ts.map +1 -0
  7. package/dist/dtos/create-workflow-webhook.dto.js +48 -0
  8. package/dist/dtos/create-workflow-webhook.dto.js.map +1 -0
  9. package/dist/dtos/index.d.ts +1 -0
  10. package/dist/dtos/index.d.ts.map +1 -1
  11. package/dist/dtos/index.js +1 -0
  12. package/dist/dtos/index.js.map +1 -1
  13. package/dist/entities/workflow-webhook.entity.d.ts +22 -0
  14. package/dist/entities/workflow-webhook.entity.d.ts.map +1 -0
  15. package/dist/entities/workflow-webhook.entity.js +103 -0
  16. package/dist/entities/workflow-webhook.entity.js.map +1 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/modules/conditional/services/evaluate-condition.service.d.ts.map +1 -1
  22. package/dist/modules/conditional/services/evaluate-condition.service.js +39 -23
  23. package/dist/modules/conditional/services/evaluate-condition.service.js.map +1 -1
  24. package/dist/modules/index.d.ts +1 -0
  25. package/dist/modules/index.d.ts.map +1 -1
  26. package/dist/modules/index.js +5 -1
  27. package/dist/modules/index.js.map +1 -1
  28. package/dist/modules/twilio/actions/cancel-verification.action.d.ts +3 -0
  29. package/dist/modules/twilio/actions/cancel-verification.action.d.ts.map +1 -0
  30. package/dist/modules/twilio/actions/cancel-verification.action.js +56 -0
  31. package/dist/modules/twilio/actions/cancel-verification.action.js.map +1 -0
  32. package/dist/modules/twilio/actions/create-conversation.action.d.ts +3 -0
  33. package/dist/modules/twilio/actions/create-conversation.action.d.ts.map +1 -0
  34. package/dist/modules/twilio/actions/create-conversation.action.js +79 -0
  35. package/dist/modules/twilio/actions/create-conversation.action.js.map +1 -0
  36. package/dist/modules/twilio/actions/create-video-room.action.d.ts +3 -0
  37. package/dist/modules/twilio/actions/create-video-room.action.d.ts.map +1 -0
  38. package/dist/modules/twilio/actions/create-video-room.action.js +89 -0
  39. package/dist/modules/twilio/actions/create-video-room.action.js.map +1 -0
  40. package/dist/modules/twilio/actions/delete-call.action.d.ts +3 -0
  41. package/dist/modules/twilio/actions/delete-call.action.d.ts.map +1 -0
  42. package/dist/modules/twilio/actions/delete-call.action.js +40 -0
  43. package/dist/modules/twilio/actions/delete-call.action.js.map +1 -0
  44. package/dist/modules/twilio/actions/delete-message.action.d.ts +3 -0
  45. package/dist/modules/twilio/actions/delete-message.action.d.ts.map +1 -0
  46. package/dist/modules/twilio/actions/delete-message.action.js +40 -0
  47. package/dist/modules/twilio/actions/delete-message.action.js.map +1 -0
  48. package/dist/modules/twilio/actions/fetch-call-recordings.action.d.ts +3 -0
  49. package/dist/modules/twilio/actions/fetch-call-recordings.action.d.ts.map +1 -0
  50. package/dist/modules/twilio/actions/fetch-call-recordings.action.js +46 -0
  51. package/dist/modules/twilio/actions/fetch-call-recordings.action.js.map +1 -0
  52. package/dist/modules/twilio/actions/fetch-call.action.d.ts +3 -0
  53. package/dist/modules/twilio/actions/fetch-call.action.d.ts.map +1 -0
  54. package/dist/modules/twilio/actions/fetch-call.action.js +52 -0
  55. package/dist/modules/twilio/actions/fetch-call.action.js.map +1 -0
  56. package/dist/modules/twilio/actions/fetch-message.action.d.ts +3 -0
  57. package/dist/modules/twilio/actions/fetch-message.action.d.ts.map +1 -0
  58. package/dist/modules/twilio/actions/fetch-message.action.js +58 -0
  59. package/dist/modules/twilio/actions/fetch-message.action.js.map +1 -0
  60. package/dist/modules/twilio/actions/fetch-verification.action.d.ts +3 -0
  61. package/dist/modules/twilio/actions/fetch-verification.action.d.ts.map +1 -0
  62. package/dist/modules/twilio/actions/fetch-verification.action.js +62 -0
  63. package/dist/modules/twilio/actions/fetch-verification.action.js.map +1 -0
  64. package/dist/modules/twilio/actions/generate-twiml-dial.action.d.ts +3 -0
  65. package/dist/modules/twilio/actions/generate-twiml-dial.action.d.ts.map +1 -0
  66. package/dist/modules/twilio/actions/generate-twiml-dial.action.js +72 -0
  67. package/dist/modules/twilio/actions/generate-twiml-dial.action.js.map +1 -0
  68. package/dist/modules/twilio/actions/generate-twiml-say.action.d.ts +3 -0
  69. package/dist/modules/twilio/actions/generate-twiml-say.action.d.ts.map +1 -0
  70. package/dist/modules/twilio/actions/generate-twiml-say.action.js +68 -0
  71. package/dist/modules/twilio/actions/generate-twiml-say.action.js.map +1 -0
  72. package/dist/modules/twilio/actions/index.d.ts +20 -0
  73. package/dist/modules/twilio/actions/index.d.ts.map +1 -1
  74. package/dist/modules/twilio/actions/index.js +20 -0
  75. package/dist/modules/twilio/actions/index.js.map +1 -1
  76. package/dist/modules/twilio/actions/list-calls.action.d.ts +3 -0
  77. package/dist/modules/twilio/actions/list-calls.action.d.ts.map +1 -0
  78. package/dist/modules/twilio/actions/list-calls.action.js +80 -0
  79. package/dist/modules/twilio/actions/list-calls.action.js.map +1 -0
  80. package/dist/modules/twilio/actions/list-messages.action.d.ts +3 -0
  81. package/dist/modules/twilio/actions/list-messages.action.d.ts.map +1 -0
  82. package/dist/modules/twilio/actions/list-messages.action.js +89 -0
  83. package/dist/modules/twilio/actions/list-messages.action.js.map +1 -0
  84. package/dist/modules/twilio/actions/lookup-phone-number.action.d.ts +3 -0
  85. package/dist/modules/twilio/actions/lookup-phone-number.action.d.ts.map +1 -0
  86. package/dist/modules/twilio/actions/lookup-phone-number.action.js +79 -0
  87. package/dist/modules/twilio/actions/lookup-phone-number.action.js.map +1 -0
  88. package/dist/modules/twilio/actions/make-call.action.d.ts +3 -0
  89. package/dist/modules/twilio/actions/make-call.action.d.ts.map +1 -0
  90. package/dist/modules/twilio/actions/make-call.action.js +109 -0
  91. package/dist/modules/twilio/actions/make-call.action.js.map +1 -0
  92. package/dist/modules/twilio/actions/send-conversation-message.action.d.ts +3 -0
  93. package/dist/modules/twilio/actions/send-conversation-message.action.d.ts.map +1 -0
  94. package/dist/modules/twilio/actions/send-conversation-message.action.js +72 -0
  95. package/dist/modules/twilio/actions/send-conversation-message.action.js.map +1 -0
  96. package/dist/modules/twilio/actions/send-sms.action.d.ts.map +1 -1
  97. package/dist/modules/twilio/actions/send-sms.action.js.map +1 -1
  98. package/dist/modules/twilio/actions/send-verification.action.d.ts +3 -0
  99. package/dist/modules/twilio/actions/send-verification.action.d.ts.map +1 -0
  100. package/dist/modules/twilio/actions/send-verification.action.js +99 -0
  101. package/dist/modules/twilio/actions/send-verification.action.js.map +1 -0
  102. package/dist/modules/twilio/actions/update-call.action.d.ts +3 -0
  103. package/dist/modules/twilio/actions/update-call.action.d.ts.map +1 -0
  104. package/dist/modules/twilio/actions/update-call.action.js +72 -0
  105. package/dist/modules/twilio/actions/update-call.action.js.map +1 -0
  106. package/dist/modules/twilio/actions/update-message.action.d.ts +3 -0
  107. package/dist/modules/twilio/actions/update-message.action.d.ts.map +1 -0
  108. package/dist/modules/twilio/actions/update-message.action.js +57 -0
  109. package/dist/modules/twilio/actions/update-message.action.js.map +1 -0
  110. package/dist/modules/twilio/actions/verify-code.action.d.ts +3 -0
  111. package/dist/modules/twilio/actions/verify-code.action.d.ts.map +1 -0
  112. package/dist/modules/twilio/actions/verify-code.action.js +72 -0
  113. package/dist/modules/twilio/actions/verify-code.action.js.map +1 -0
  114. package/dist/modules/twilio/services/cancel-verification.service.d.ts +8 -0
  115. package/dist/modules/twilio/services/cancel-verification.service.d.ts.map +1 -0
  116. package/dist/modules/twilio/services/cancel-verification.service.js +53 -0
  117. package/dist/modules/twilio/services/cancel-verification.service.js.map +1 -0
  118. package/dist/modules/twilio/services/create-conversation.service.d.ts +8 -0
  119. package/dist/modules/twilio/services/create-conversation.service.d.ts.map +1 -0
  120. package/dist/modules/twilio/services/create-conversation.service.js +56 -0
  121. package/dist/modules/twilio/services/create-conversation.service.js.map +1 -0
  122. package/dist/modules/twilio/services/create-video-room.service.d.ts +8 -0
  123. package/dist/modules/twilio/services/create-video-room.service.d.ts.map +1 -0
  124. package/dist/modules/twilio/services/create-video-room.service.js +57 -0
  125. package/dist/modules/twilio/services/create-video-room.service.js.map +1 -0
  126. package/dist/modules/twilio/services/delete-call.service.d.ts +8 -0
  127. package/dist/modules/twilio/services/delete-call.service.d.ts.map +1 -0
  128. package/dist/modules/twilio/services/delete-call.service.js +48 -0
  129. package/dist/modules/twilio/services/delete-call.service.js.map +1 -0
  130. package/dist/modules/twilio/services/delete-message.service.d.ts +8 -0
  131. package/dist/modules/twilio/services/delete-message.service.d.ts.map +1 -0
  132. package/dist/modules/twilio/services/delete-message.service.js +43 -0
  133. package/dist/modules/twilio/services/delete-message.service.js.map +1 -0
  134. package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts +8 -0
  135. package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts.map +1 -0
  136. package/dist/modules/twilio/services/fetch-call-recordings.service.js +56 -0
  137. package/dist/modules/twilio/services/fetch-call-recordings.service.js.map +1 -0
  138. package/dist/modules/twilio/services/fetch-call.service.d.ts +8 -0
  139. package/dist/modules/twilio/services/fetch-call.service.d.ts.map +1 -0
  140. package/dist/modules/twilio/services/fetch-call.service.js +52 -0
  141. package/dist/modules/twilio/services/fetch-call.service.js.map +1 -0
  142. package/dist/modules/twilio/services/fetch-message.service.d.ts +8 -0
  143. package/dist/modules/twilio/services/fetch-message.service.d.ts.map +1 -0
  144. package/dist/modules/twilio/services/fetch-message.service.js +60 -0
  145. package/dist/modules/twilio/services/fetch-message.service.js.map +1 -0
  146. package/dist/modules/twilio/services/fetch-verification.service.d.ts +8 -0
  147. package/dist/modules/twilio/services/fetch-verification.service.d.ts.map +1 -0
  148. package/dist/modules/twilio/services/fetch-verification.service.js +58 -0
  149. package/dist/modules/twilio/services/fetch-verification.service.js.map +1 -0
  150. package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts +8 -0
  151. package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts.map +1 -0
  152. package/dist/modules/twilio/services/generate-twiml-dial.service.js +43 -0
  153. package/dist/modules/twilio/services/generate-twiml-dial.service.js.map +1 -0
  154. package/dist/modules/twilio/services/generate-twiml-say.service.d.ts +8 -0
  155. package/dist/modules/twilio/services/generate-twiml-say.service.d.ts.map +1 -0
  156. package/dist/modules/twilio/services/generate-twiml-say.service.js +41 -0
  157. package/dist/modules/twilio/services/generate-twiml-say.service.js.map +1 -0
  158. package/dist/modules/twilio/services/index.d.ts +20 -0
  159. package/dist/modules/twilio/services/index.d.ts.map +1 -1
  160. package/dist/modules/twilio/services/index.js +20 -0
  161. package/dist/modules/twilio/services/index.js.map +1 -1
  162. package/dist/modules/twilio/services/list-calls.service.d.ts +8 -0
  163. package/dist/modules/twilio/services/list-calls.service.d.ts.map +1 -0
  164. package/dist/modules/twilio/services/list-calls.service.js +62 -0
  165. package/dist/modules/twilio/services/list-calls.service.js.map +1 -0
  166. package/dist/modules/twilio/services/list-messages.service.d.ts +8 -0
  167. package/dist/modules/twilio/services/list-messages.service.d.ts.map +1 -0
  168. package/dist/modules/twilio/services/list-messages.service.js +65 -0
  169. package/dist/modules/twilio/services/list-messages.service.js.map +1 -0
  170. package/dist/modules/twilio/services/lookup-phone-number.service.d.ts +8 -0
  171. package/dist/modules/twilio/services/lookup-phone-number.service.d.ts.map +1 -0
  172. package/dist/modules/twilio/services/lookup-phone-number.service.js +61 -0
  173. package/dist/modules/twilio/services/lookup-phone-number.service.js.map +1 -0
  174. package/dist/modules/twilio/services/make-call.service.d.ts +8 -0
  175. package/dist/modules/twilio/services/make-call.service.d.ts.map +1 -0
  176. package/dist/modules/twilio/services/make-call.service.js +80 -0
  177. package/dist/modules/twilio/services/make-call.service.js.map +1 -0
  178. package/dist/modules/twilio/services/send-conversation-message.service.d.ts +8 -0
  179. package/dist/modules/twilio/services/send-conversation-message.service.d.ts.map +1 -0
  180. package/dist/modules/twilio/services/send-conversation-message.service.js +61 -0
  181. package/dist/modules/twilio/services/send-conversation-message.service.js.map +1 -0
  182. package/dist/modules/twilio/services/send-sms.service.d.ts.map +1 -1
  183. package/dist/modules/twilio/services/send-verification.service.d.ts +8 -0
  184. package/dist/modules/twilio/services/send-verification.service.d.ts.map +1 -0
  185. package/dist/modules/twilio/services/send-verification.service.js +64 -0
  186. package/dist/modules/twilio/services/send-verification.service.js.map +1 -0
  187. package/dist/modules/twilio/services/update-call.service.d.ts +8 -0
  188. package/dist/modules/twilio/services/update-call.service.d.ts.map +1 -0
  189. package/dist/modules/twilio/services/update-call.service.js +62 -0
  190. package/dist/modules/twilio/services/update-call.service.js.map +1 -0
  191. package/dist/modules/twilio/services/update-message.service.d.ts +8 -0
  192. package/dist/modules/twilio/services/update-message.service.d.ts.map +1 -0
  193. package/dist/modules/twilio/services/update-message.service.js +54 -0
  194. package/dist/modules/twilio/services/update-message.service.js.map +1 -0
  195. package/dist/modules/twilio/services/verify-code.service.d.ts +8 -0
  196. package/dist/modules/twilio/services/verify-code.service.d.ts.map +1 -0
  197. package/dist/modules/twilio/services/verify-code.service.js +62 -0
  198. package/dist/modules/twilio/services/verify-code.service.js.map +1 -0
  199. package/dist/modules/twilio/twilio-nest.module.d.ts.map +1 -1
  200. package/dist/modules/twilio/twilio-nest.module.js +51 -3
  201. package/dist/modules/twilio/twilio-nest.module.js.map +1 -1
  202. package/dist/modules/twilio/twilio.module.d.ts.map +1 -1
  203. package/dist/modules/twilio/twilio.module.js +24 -2
  204. package/dist/modules/twilio/twilio.module.js.map +1 -1
  205. package/dist/modules/types.d.ts +3 -1
  206. package/dist/modules/types.d.ts.map +1 -1
  207. package/dist/modules/types.js.map +1 -1
  208. package/dist/modules/webhook/controllers/index.d.ts +2 -0
  209. package/dist/modules/webhook/controllers/index.d.ts.map +1 -0
  210. package/dist/modules/webhook/controllers/index.js +18 -0
  211. package/dist/modules/webhook/controllers/index.js.map +1 -0
  212. package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts +12 -0
  213. package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts.map +1 -0
  214. package/dist/modules/webhook/controllers/webhook-receiver.controller.js +122 -0
  215. package/dist/modules/webhook/controllers/webhook-receiver.controller.js.map +1 -0
  216. package/dist/modules/webhook/credentials.d.ts +3 -0
  217. package/dist/modules/webhook/credentials.d.ts.map +1 -0
  218. package/dist/modules/webhook/credentials.js +5 -0
  219. package/dist/modules/webhook/credentials.js.map +1 -0
  220. package/dist/modules/webhook/services/index.d.ts +2 -0
  221. package/dist/modules/webhook/services/index.d.ts.map +1 -0
  222. package/dist/modules/webhook/services/index.js +18 -0
  223. package/dist/modules/webhook/services/index.js.map +1 -0
  224. package/dist/modules/webhook/services/webhook-received.service.d.ts +10 -0
  225. package/dist/modules/webhook/services/webhook-received.service.d.ts.map +1 -0
  226. package/dist/modules/webhook/services/webhook-received.service.js +94 -0
  227. package/dist/modules/webhook/services/webhook-received.service.js.map +1 -0
  228. package/dist/modules/webhook/triggers/index.d.ts +2 -0
  229. package/dist/modules/webhook/triggers/index.d.ts.map +1 -0
  230. package/dist/modules/webhook/triggers/index.js +18 -0
  231. package/dist/modules/webhook/triggers/index.js.map +1 -0
  232. package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts +3 -0
  233. package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts.map +1 -0
  234. package/dist/modules/webhook/triggers/webhook-received.trigger.js +78 -0
  235. package/dist/modules/webhook/triggers/webhook-received.trigger.js.map +1 -0
  236. package/dist/modules/webhook/webhook-nest.module.d.ts +3 -0
  237. package/dist/modules/webhook/webhook-nest.module.d.ts.map +1 -0
  238. package/dist/modules/webhook/webhook-nest.module.js +32 -0
  239. package/dist/modules/webhook/webhook-nest.module.js.map +1 -0
  240. package/dist/modules/webhook/webhook.module.d.ts +3 -0
  241. package/dist/modules/webhook/webhook.module.d.ts.map +1 -0
  242. package/dist/modules/webhook/webhook.module.js +16 -0
  243. package/dist/modules/webhook/webhook.module.js.map +1 -0
  244. package/dist/services/workflow-execution.service.d.ts +14 -1
  245. package/dist/services/workflow-execution.service.d.ts.map +1 -1
  246. package/dist/services/workflow-execution.service.js +319 -2
  247. package/dist/services/workflow-execution.service.js.map +1 -1
  248. package/dist/services/workflow-webhook.service.d.ts +13 -0
  249. package/dist/services/workflow-webhook.service.d.ts.map +1 -0
  250. package/dist/services/workflow-webhook.service.js +72 -0
  251. package/dist/services/workflow-webhook.service.js.map +1 -0
  252. package/dist/workflow-core.module.d.ts.map +1 -1
  253. package/dist/workflow-core.module.js +5 -0
  254. package/dist/workflow-core.module.js.map +1 -1
  255. package/dist/workflow.module.d.ts.map +1 -1
  256. package/dist/workflow.module.js +3 -0
  257. package/dist/workflow.module.js.map +1 -1
  258. package/package.json +2 -2
@@ -0,0 +1,54 @@
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.UpdateMessageService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const twilio_1 = require("@venturialstd/twilio");
15
+ let UpdateMessageService = class UpdateMessageService {
16
+ twilioMessageService;
17
+ constructor(twilioMessageService) {
18
+ this.twilioMessageService = twilioMessageService;
19
+ }
20
+ async perform(inputs, context) {
21
+ const messageSid = inputs.messageSid;
22
+ const body = inputs.body;
23
+ if (!messageSid) {
24
+ throw new Error('Message SID is required');
25
+ }
26
+ if (!body) {
27
+ throw new Error('Message body is required');
28
+ }
29
+ const accountSid = context.credentials?.accountSid;
30
+ const authToken = context.credentials?.authToken;
31
+ if (!accountSid || !authToken) {
32
+ throw new Error('Twilio credentials (accountSid and authToken) are required');
33
+ }
34
+ const config = {
35
+ auth: {
36
+ accountSid,
37
+ authToken,
38
+ },
39
+ };
40
+ const message = await this.twilioMessageService.updateMessage(config, messageSid, body);
41
+ return {
42
+ messageSid: message.sid,
43
+ status: message.status,
44
+ body: message.body,
45
+ dateUpdated: message.dateUpdated?.toISOString(),
46
+ };
47
+ }
48
+ };
49
+ exports.UpdateMessageService = UpdateMessageService;
50
+ exports.UpdateMessageService = UpdateMessageService = __decorate([
51
+ (0, common_1.Injectable)(),
52
+ __metadata("design:paramtypes", [twilio_1.TwilioMessageService])
53
+ ], UpdateMessageService);
54
+ //# sourceMappingURL=update-message.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-message.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/update-message.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAA0E;AAKnE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAE3E,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAc,CAAC;QAEnC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAExF,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,GAAG;YACvB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;SAChD,CAAC;IACJ,CAAC;CACF,CAAA;AA1CY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEwC,6BAAoB;GAD5D,oBAAoB,CA0ChC"}
@@ -0,0 +1,8 @@
1
+ import { TwilioVerifyService } from '@venturialstd/twilio';
2
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
3
+ export declare class VerifyCodeService implements IWorkflowActionService {
4
+ private readonly twilioVerifyService;
5
+ constructor(twilioVerifyService: TwilioVerifyService);
6
+ perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
7
+ }
8
+ //# sourceMappingURL=verify-code.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-code.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/verify-code.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,iBAAkB,YAAW,sBAAsB;IAClD,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB;IAE/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;CA6CpC"}
@@ -0,0 +1,62 @@
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.VerifyCodeService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const twilio_1 = require("@venturialstd/twilio");
15
+ let VerifyCodeService = class VerifyCodeService {
16
+ twilioVerifyService;
17
+ constructor(twilioVerifyService) {
18
+ this.twilioVerifyService = twilioVerifyService;
19
+ }
20
+ async perform(inputs, context) {
21
+ const to = inputs.to;
22
+ const code = inputs.code;
23
+ const serviceSid = inputs.serviceSid;
24
+ if (!to) {
25
+ throw new Error('Phone number (to) is required');
26
+ }
27
+ if (!code) {
28
+ throw new Error('Verification code is required');
29
+ }
30
+ if (!serviceSid) {
31
+ throw new Error('Verify Service SID is required');
32
+ }
33
+ const accountSid = context.credentials?.accountSid;
34
+ const authToken = context.credentials?.authToken;
35
+ if (!accountSid || !authToken) {
36
+ throw new Error('Twilio credentials (accountSid and authToken) are required');
37
+ }
38
+ const config = {
39
+ auth: {
40
+ accountSid,
41
+ authToken,
42
+ },
43
+ };
44
+ const verificationCheck = await this.twilioVerifyService.verifyCode(config, serviceSid, {
45
+ to,
46
+ code,
47
+ });
48
+ return {
49
+ verificationCheckSid: verificationCheck.sid,
50
+ status: verificationCheck.status,
51
+ to: verificationCheck.to,
52
+ valid: verificationCheck.status === 'approved',
53
+ dateCreated: verificationCheck.dateCreated?.toISOString(),
54
+ };
55
+ }
56
+ };
57
+ exports.VerifyCodeService = VerifyCodeService;
58
+ exports.VerifyCodeService = VerifyCodeService = __decorate([
59
+ (0, common_1.Injectable)(),
60
+ __metadata("design:paramtypes", [twilio_1.TwilioVerifyService])
61
+ ], VerifyCodeService);
62
+ //# sourceMappingURL=verify-code.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-code.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/verify-code.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAyE;AAKlE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACC;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAEzE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,EAAE,GAAG,MAAM,CAAC,EAAY,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAc,CAAC;QACnC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE;YACtF,EAAE;YACF,IAAI;SACL,CAAC,CAAC;QAEH,OAAO;YACL,oBAAoB,EAAE,iBAAiB,CAAC,GAAG;YAC3C,MAAM,EAAE,iBAAiB,CAAC,MAAM;YAChC,EAAE,EAAE,iBAAiB,CAAC,EAAE;YACxB,KAAK,EAAE,iBAAiB,CAAC,MAAM,KAAK,UAAU;YAC9C,WAAW,EAAE,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE;SAC1D,CAAC;IACJ,CAAC;CACF,CAAA;AAnDY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEuC,4BAAmB;GAD1D,iBAAiB,CAmD7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"twilio-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/twilio/twilio-nest.module.ts"],"names":[],"mappings":"AAMA,qBAKa,gBAAgB;CAAG"}
1
+ {"version":3,"file":"twilio-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/twilio/twilio-nest.module.ts"],"names":[],"mappings":"AA6BA,qBAqDa,gBAAgB;CAAG"}
@@ -8,17 +8,65 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.TwilioNestModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
+ const twilio_1 = require("@venturialstd/twilio");
11
12
  const twilio_auth_service_1 = require("./auth/twilio-auth.service");
12
13
  const services_1 = require("./services");
13
- const twilio_1 = require("@venturialstd/twilio");
14
14
  let TwilioNestModule = class TwilioNestModule {
15
15
  };
16
16
  exports.TwilioNestModule = TwilioNestModule;
17
17
  exports.TwilioNestModule = TwilioNestModule = __decorate([
18
18
  (0, common_1.Module)({
19
19
  imports: [twilio_1.TwilioModule],
20
- providers: [services_1.SendSmsService, services_1.MessageReceivedService, twilio_auth_service_1.TwilioAuthService],
21
- exports: [services_1.SendSmsService, services_1.MessageReceivedService, twilio_auth_service_1.TwilioAuthService],
20
+ providers: [
21
+ services_1.SendSmsService,
22
+ services_1.MessageReceivedService,
23
+ twilio_auth_service_1.TwilioAuthService,
24
+ services_1.FetchMessageService,
25
+ services_1.ListMessagesService,
26
+ services_1.DeleteMessageService,
27
+ services_1.UpdateMessageService,
28
+ services_1.MakeCallService,
29
+ services_1.FetchCallService,
30
+ services_1.ListCallsService,
31
+ services_1.UpdateCallService,
32
+ services_1.DeleteCallService,
33
+ services_1.FetchCallRecordingsService,
34
+ services_1.SendVerificationService,
35
+ services_1.VerifyCodeService,
36
+ services_1.FetchVerificationService,
37
+ services_1.CancelVerificationService,
38
+ services_1.CreateConversationService,
39
+ services_1.SendConversationMessageService,
40
+ services_1.LookupPhoneNumberService,
41
+ services_1.CreateVideoRoomService,
42
+ services_1.GenerateTwiMLSayService,
43
+ services_1.GenerateTwiMLDialService,
44
+ ],
45
+ exports: [
46
+ services_1.SendSmsService,
47
+ services_1.MessageReceivedService,
48
+ twilio_auth_service_1.TwilioAuthService,
49
+ services_1.FetchMessageService,
50
+ services_1.ListMessagesService,
51
+ services_1.DeleteMessageService,
52
+ services_1.UpdateMessageService,
53
+ services_1.MakeCallService,
54
+ services_1.FetchCallService,
55
+ services_1.ListCallsService,
56
+ services_1.UpdateCallService,
57
+ services_1.DeleteCallService,
58
+ services_1.FetchCallRecordingsService,
59
+ services_1.SendVerificationService,
60
+ services_1.VerifyCodeService,
61
+ services_1.FetchVerificationService,
62
+ services_1.CancelVerificationService,
63
+ services_1.CreateConversationService,
64
+ services_1.SendConversationMessageService,
65
+ services_1.LookupPhoneNumberService,
66
+ services_1.CreateVideoRoomService,
67
+ services_1.GenerateTwiMLSayService,
68
+ services_1.GenerateTwiMLDialService,
69
+ ],
22
70
  })
23
71
  ], TwilioNestModule);
24
72
  //# sourceMappingURL=twilio-nest.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"twilio-nest.module.js","sourceRoot":"","sources":["../../../src/modules/twilio/twilio-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,oEAA+D;AAC/D,yCAAoE;AACpE,iDAAoD;AAO7C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAL5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,CAAC;QACvB,SAAS,EAAE,CAAC,yBAAc,EAAE,iCAAsB,EAAE,uCAAiB,CAAC;QACtE,OAAO,EAAE,CAAC,yBAAc,EAAE,iCAAsB,EAAE,uCAAiB,CAAC;KACrE,CAAC;GACW,gBAAgB,CAAG"}
1
+ {"version":3,"file":"twilio-nest.module.js","sourceRoot":"","sources":["../../../src/modules/twilio/twilio-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iDAAoD;AAEpD,oEAA+D;AAC/D,yCAuBoB;AAuDb,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IArD5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,CAAC;QACvB,SAAS,EAAE;YACT,yBAAc;YACd,iCAAsB;YACtB,uCAAiB;YACjB,8BAAmB;YACnB,8BAAmB;YACnB,+BAAoB;YACpB,+BAAoB;YACpB,0BAAe;YACf,2BAAgB;YAChB,2BAAgB;YAChB,4BAAiB;YACjB,4BAAiB;YACjB,qCAA0B;YAC1B,kCAAuB;YACvB,4BAAiB;YACjB,mCAAwB;YACxB,oCAAyB;YACzB,oCAAyB;YACzB,yCAA8B;YAC9B,mCAAwB;YACxB,iCAAsB;YACtB,kCAAuB;YACvB,mCAAwB;SACzB;QACD,OAAO,EAAE;YACP,yBAAc;YACd,iCAAsB;YACtB,uCAAiB;YACjB,8BAAmB;YACnB,8BAAmB;YACnB,+BAAoB;YACpB,+BAAoB;YACpB,0BAAe;YACf,2BAAgB;YAChB,2BAAgB;YAChB,4BAAiB;YACjB,4BAAiB;YACjB,qCAA0B;YAC1B,kCAAuB;YACvB,4BAAiB;YACjB,mCAAwB;YACxB,oCAAyB;YACzB,oCAAyB;YACzB,yCAA8B;YAC9B,mCAAwB;YACxB,iCAAsB;YACtB,kCAAuB;YACvB,mCAAwB;SACzB;KACF,CAAC;GACW,gBAAgB,CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"twilio.module.d.ts","sourceRoot":"","sources":["../../../src/modules/twilio/twilio.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAMpF,eAAO,MAAM,YAAY,EAAE,wBAU1B,CAAC"}
1
+ {"version":3,"file":"twilio.module.d.ts","sourceRoot":"","sources":["../../../src/modules/twilio/twilio.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,wBAAwB,EAAE,MAAM,UAAU,CAAC;AA4BpF,eAAO,MAAM,YAAY,EAAE,wBAgC1B,CAAC"}
@@ -8,12 +8,34 @@ const triggers_1 = require("./triggers");
8
8
  exports.twilioModule = {
9
9
  key: 'twilio',
10
10
  name: 'Twilio',
11
- description: 'Send and receive SMS messages via Twilio',
11
+ description: 'Send and receive SMS messages, make calls, verify users, and more via Twilio',
12
12
  icon: '📱',
13
13
  version: '1.0.0',
14
14
  credentialFields: credentials_1.twilioCredentials,
15
15
  authServiceClass: twilio_auth_service_1.TwilioAuthService,
16
- actions: [actions_1.sendSmsAction],
16
+ actions: [
17
+ actions_1.sendSmsAction,
18
+ actions_1.fetchMessageAction,
19
+ actions_1.listMessagesAction,
20
+ actions_1.deleteMessageAction,
21
+ actions_1.updateMessageAction,
22
+ actions_1.makeCallAction,
23
+ actions_1.fetchCallAction,
24
+ actions_1.listCallsAction,
25
+ actions_1.updateCallAction,
26
+ actions_1.deleteCallAction,
27
+ actions_1.fetchCallRecordingsAction,
28
+ actions_1.sendVerificationAction,
29
+ actions_1.verifyCodeAction,
30
+ actions_1.fetchVerificationAction,
31
+ actions_1.cancelVerificationAction,
32
+ actions_1.createConversationAction,
33
+ actions_1.sendConversationMessageAction,
34
+ actions_1.lookupPhoneNumberAction,
35
+ actions_1.createVideoRoomAction,
36
+ actions_1.generateTwiMLSayAction,
37
+ actions_1.generateTwiMLDialAction,
38
+ ],
17
39
  triggers: [triggers_1.messageReceivedTrigger],
18
40
  };
19
41
  //# sourceMappingURL=twilio.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"twilio.module.js","sourceRoot":"","sources":["../../../src/modules/twilio/twilio.module.ts"],"names":[],"mappings":";;;AACA,uCAA0C;AAC1C,oEAA+D;AAC/D,+CAAkD;AAClD,yCAAoD;AAEvC,QAAA,YAAY,GAA6B;IACpD,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0CAA0C;IACvD,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,+BAAiB;IACnC,gBAAgB,EAAE,uCAA+E;IACjG,OAAO,EAAE,CAAC,uBAAa,CAAC;IACxB,QAAQ,EAAE,CAAC,iCAAsB,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"twilio.module.js","sourceRoot":"","sources":["../../../src/modules/twilio/twilio.module.ts"],"names":[],"mappings":";;;AACA,uCAsBmB;AACnB,oEAA+D;AAC/D,+CAAkD;AAClD,yCAAoD;AAEvC,QAAA,YAAY,GAA6B;IACpD,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,8EAA8E;IAC3F,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,+BAAiB;IACnC,gBAAgB,EAAE,uCAA+E;IACjG,OAAO,EAAE;QACP,uBAAa;QACb,4BAAkB;QAClB,4BAAkB;QAClB,6BAAmB;QACnB,6BAAmB;QACnB,wBAAc;QACd,yBAAe;QACf,yBAAe;QACf,0BAAgB;QAChB,0BAAgB;QAChB,mCAAyB;QACzB,gCAAsB;QACtB,0BAAgB;QAChB,iCAAuB;QACvB,kCAAwB;QACxB,kCAAwB;QACxB,uCAA6B;QAC7B,iCAAuB;QACvB,+BAAqB;QACrB,gCAAsB;QACtB,iCAAuB;KACxB;IACD,QAAQ,EAAE,CAAC,iCAAsB,CAAC;CACnC,CAAC"}
@@ -65,8 +65,10 @@ export interface WorkflowActionTrigger {
65
65
  icon?: string;
66
66
  inputs: FieldDefinition[];
67
67
  outputs: FieldDefinition[];
68
- serviceClass?: new (...args: any[]) => IWorkflowActionService;
68
+ serviceClass?: new (...args: unknown[]) => IWorkflowActionService;
69
69
  metadata?: Record<string, unknown>;
70
+ performSubscribe?: (inputs: Record<string, unknown>, context: WorkflowActionContext, nodeId: string) => Promise<void> | void;
71
+ performUnsubscribe?: (inputs: Record<string, unknown>, context: WorkflowActionContext, nodeId: string) => Promise<void> | void;
70
72
  }
71
73
  export interface CredentialFieldDefinition {
72
74
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/modules/types.ts"],"names":[],"mappings":"AAGA,oBAAY,aAAa;IACvB,OAAO,YAAY;I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AC,SAAiB;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACnC,OAAO,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;IAC/B,CAAC;IAKD,WAAW,CAAC,SAAiB;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACnC,OAAO,MAAM,EAAE,QAAQ,IAAI,EAAE,CAAC;IAChC,CAAC;IAKD,kBAAkB,CAChB,SAAiB,EACjB,gBAAwB;QAExB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAE9B,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF;AApDD,wDAoDC;AAGY,QAAA,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './webhook-receiver.controller';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,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("./webhook-receiver.controller"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/webhook/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C"}
@@ -0,0 +1,12 @@
1
+ import { Request, Response } from 'express';
2
+ import { WorkflowExecutionService } from '../../../services/workflow-execution.service';
3
+ import { WorkflowNodeService } from '../../../services/workflow-node.service';
4
+ import { WorkflowWebhookService } from '../../../services/workflow-webhook.service';
5
+ export declare class WebhookReceiverController {
6
+ private readonly workflowWebhookService;
7
+ private readonly workflowNodeService;
8
+ private readonly workflowExecutionService;
9
+ constructor(workflowWebhookService: WorkflowWebhookService, workflowNodeService: WorkflowNodeService, workflowExecutionService: WorkflowExecutionService);
10
+ receiveWebhook(path: string, req: Request, res: Response, body: Record<string, unknown>, headers: Record<string, string>, query: Record<string, string>): Promise<Response<any, Record<string, any>>>;
11
+ }
12
+ //# sourceMappingURL=webhook-receiver.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-receiver.controller.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/controllers/webhook-receiver.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEpF,qBAEa,yBAAyB;IAElC,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAFxB,sBAAsB,EAAE,sBAAsB,EAC9C,mBAAmB,EAAE,mBAAmB,EACxC,wBAAwB,EAAE,wBAAwB;IAS/D,cAAc,CACH,IAAI,EAAE,MAAM,EACpB,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CA2FzC"}
@@ -0,0 +1,122 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.WebhookReceiverController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const swagger_1 = require("@nestjs/swagger");
18
+ const workflow_constant_1 = require("../../../constants/workflow.constant");
19
+ const workflow_execution_service_1 = require("../../../services/workflow-execution.service");
20
+ const workflow_node_service_1 = require("../../../services/workflow-node.service");
21
+ const workflow_webhook_service_1 = require("../../../services/workflow-webhook.service");
22
+ let WebhookReceiverController = class WebhookReceiverController {
23
+ workflowWebhookService;
24
+ workflowNodeService;
25
+ workflowExecutionService;
26
+ constructor(workflowWebhookService, workflowNodeService, workflowExecutionService) {
27
+ this.workflowWebhookService = workflowWebhookService;
28
+ this.workflowNodeService = workflowNodeService;
29
+ this.workflowExecutionService = workflowExecutionService;
30
+ }
31
+ async receiveWebhook(path, req, res, body, headers, query) {
32
+ const httpMethod = req.method;
33
+ const webhook = await this.workflowWebhookService.findByPathAndMethod(path, httpMethod);
34
+ if (!webhook) {
35
+ throw new common_1.NotFoundException(`Webhook not found for path "${path}" with method "${httpMethod}"`);
36
+ }
37
+ if (!webhook.isActive) {
38
+ return res.status(common_1.HttpStatus.SERVICE_UNAVAILABLE).json({
39
+ success: false,
40
+ message: 'Webhook is not active',
41
+ webhookId: webhook.id,
42
+ });
43
+ }
44
+ const node = await this.workflowNodeService.findOne({
45
+ where: { id: webhook.nodeId },
46
+ });
47
+ if (!node) {
48
+ throw new common_1.NotFoundException(`Node with id "${webhook.nodeId}" not found`);
49
+ }
50
+ if (node.type !== workflow_constant_1.NODE_TYPE.WEBHOOK || node.actionType !== 'webhook-received') {
51
+ return res.status(common_1.HttpStatus.BAD_REQUEST).json({
52
+ success: false,
53
+ message: 'Node is not a webhook trigger',
54
+ nodeId: node.id,
55
+ nodeType: node.type,
56
+ actionType: node.actionType,
57
+ });
58
+ }
59
+ const webhookData = {
60
+ body: body || {},
61
+ headers: headers || {},
62
+ query: query || {},
63
+ method: httpMethod,
64
+ url: req.url,
65
+ receivedAt: new Date().toISOString(),
66
+ };
67
+ try {
68
+ const execution = await this.workflowExecutionService.repo.create({
69
+ workflowId: webhook.workflowId,
70
+ status: workflow_constant_1.EXECUTION_STATUS.PENDING,
71
+ inputData: {
72
+ webhook: webhookData,
73
+ triggerNodeId: node.nodeId,
74
+ },
75
+ });
76
+ const savedExecution = await this.workflowExecutionService.repo.save(execution);
77
+ await this.workflowExecutionService.startExecution(savedExecution.id);
78
+ return res.status(common_1.HttpStatus.OK).json({
79
+ success: true,
80
+ message: 'Webhook received and workflow execution started',
81
+ executionId: savedExecution.id,
82
+ workflowId: webhook.workflowId,
83
+ nodeId: node.nodeId,
84
+ webhookPath: webhook.webhookPath,
85
+ httpMethod: webhook.httpMethod,
86
+ });
87
+ }
88
+ catch (error) {
89
+ return res.status(common_1.HttpStatus.INTERNAL_SERVER_ERROR).json({
90
+ success: false,
91
+ message: 'Failed to process webhook',
92
+ error: error instanceof Error ? error.message : 'Unknown error',
93
+ });
94
+ }
95
+ }
96
+ };
97
+ exports.WebhookReceiverController = WebhookReceiverController;
98
+ __decorate([
99
+ (0, common_1.All)(':path'),
100
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
101
+ (0, swagger_1.ApiOperation)({ summary: 'Receive webhook and trigger workflow' }),
102
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Webhook received and processed' }),
103
+ (0, swagger_1.ApiResponse)({ status: 404, description: 'Webhook not found' }),
104
+ (0, swagger_1.ApiResponse)({ status: 503, description: 'Webhook is not active' }),
105
+ __param(0, (0, common_1.Param)('path')),
106
+ __param(1, (0, common_1.Req)()),
107
+ __param(2, (0, common_1.Res)()),
108
+ __param(3, (0, common_1.Body)()),
109
+ __param(4, (0, common_1.Headers)()),
110
+ __param(5, (0, common_1.Query)()),
111
+ __metadata("design:type", Function),
112
+ __metadata("design:paramtypes", [String, Object, Object, Object, Object, Object]),
113
+ __metadata("design:returntype", Promise)
114
+ ], WebhookReceiverController.prototype, "receiveWebhook", null);
115
+ exports.WebhookReceiverController = WebhookReceiverController = __decorate([
116
+ (0, swagger_1.ApiTags)('workflow/webhook'),
117
+ (0, common_1.Controller)('workflow/webhook'),
118
+ __metadata("design:paramtypes", [workflow_webhook_service_1.WorkflowWebhookService,
119
+ workflow_node_service_1.WorkflowNodeService,
120
+ workflow_execution_service_1.WorkflowExecutionService])
121
+ ], WebhookReceiverController);
122
+ //# sourceMappingURL=webhook-receiver.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-receiver.controller.js","sourceRoot":"","sources":["../../../../src/modules/webhook/controllers/webhook-receiver.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,6CAAqE;AAGrE,4EAAmF;AAEnF,6FAAwF;AACxF,mFAA8E;AAC9E,yFAAoF;AAI7E,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEjB;IACA;IACA;IAHnB,YACmB,sBAA8C,EAC9C,mBAAwC,EACxC,wBAAkD;QAFlD,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAQE,AAAN,KAAK,CAAC,cAAc,CACH,IAAY,EACpB,GAAY,EACZ,GAAa,EACZ,IAA6B,EAC1B,OAA+B,EACjC,KAA6B;QAGtC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAqB,CAAC;QAG7C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAExF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,0BAAiB,CACzB,+BAA+B,IAAI,kBAAkB,UAAU,GAAG,CACnE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO,GAAG,CAAC,MAAM,CAAC,mBAAU,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC;gBACrD,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,OAAO,CAAC,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;QAGD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,EA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E,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;IACT,WAAA,IAAA,cAAK,GAAE,CAAA;;;;+DA0FT;oCA7GU,yBAAyB;IAFrC,IAAA,iBAAO,EAAC,kBAAkB,CAAC;IAC3B,IAAA,mBAAU,EAAC,kBAAkB,CAAC;qCAGc,iDAAsB;QACzB,2CAAmB;QACd,qDAAwB;GAJ1D,yBAAyB,CA8GrC"}
@@ -0,0 +1,3 @@
1
+ import { CredentialFieldDefinition } from '../types';
2
+ export declare const webhookCredentials: CredentialFieldDefinition[];
3
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/modules/webhook/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,kBAAkB,EAAE,yBAAyB,EAAO,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webhookCredentials = void 0;
4
+ exports.webhookCredentials = [];
5
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/modules/webhook/credentials.ts"],"names":[],"mappings":";;;AAGa,QAAA,kBAAkB,GAAgC,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './webhook-received.service';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,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("./webhook-received.service"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/webhook/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
@@ -0,0 +1,10 @@
1
+ import { WorkflowWebhookService } from '../../../services/workflow-webhook.service';
2
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
3
+ export declare class WebhookReceivedService implements IWorkflowActionService {
4
+ private readonly workflowWebhookService;
5
+ constructor(workflowWebhookService: WorkflowWebhookService);
6
+ perform(_inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
7
+ performSubscribe(inputs: Record<string, unknown>, context: WorkflowActionContext, nodeId: string): Promise<void>;
8
+ performUnsubscribe(inputs: Record<string, unknown>, context: WorkflowActionContext, nodeId: string): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=webhook-received.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-received.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/services/webhook-received.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAc5E,qBACa,sBAAuB,YAAW,sBAAsB;IACvD,OAAO,CAAC,QAAQ,CAAC,sBAAsB;gBAAtB,sBAAsB,EAAE,sBAAsB;IAErE,OAAO,CACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmB7B,gBAAgB,CACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IA4DV,kBAAkB,CACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;CAUjB"}