@venturialstd/workflow 0.1.0 → 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 (266) 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 +15 -0
  98. package/dist/modules/twilio/actions/send-sms.action.js.map +1 -1
  99. package/dist/modules/twilio/actions/send-verification.action.d.ts +3 -0
  100. package/dist/modules/twilio/actions/send-verification.action.d.ts.map +1 -0
  101. package/dist/modules/twilio/actions/send-verification.action.js +99 -0
  102. package/dist/modules/twilio/actions/send-verification.action.js.map +1 -0
  103. package/dist/modules/twilio/actions/update-call.action.d.ts +3 -0
  104. package/dist/modules/twilio/actions/update-call.action.d.ts.map +1 -0
  105. package/dist/modules/twilio/actions/update-call.action.js +72 -0
  106. package/dist/modules/twilio/actions/update-call.action.js.map +1 -0
  107. package/dist/modules/twilio/actions/update-message.action.d.ts +3 -0
  108. package/dist/modules/twilio/actions/update-message.action.d.ts.map +1 -0
  109. package/dist/modules/twilio/actions/update-message.action.js +57 -0
  110. package/dist/modules/twilio/actions/update-message.action.js.map +1 -0
  111. package/dist/modules/twilio/actions/verify-code.action.d.ts +3 -0
  112. package/dist/modules/twilio/actions/verify-code.action.d.ts.map +1 -0
  113. package/dist/modules/twilio/actions/verify-code.action.js +72 -0
  114. package/dist/modules/twilio/actions/verify-code.action.js.map +1 -0
  115. package/dist/modules/twilio/services/cancel-verification.service.d.ts +8 -0
  116. package/dist/modules/twilio/services/cancel-verification.service.d.ts.map +1 -0
  117. package/dist/modules/twilio/services/cancel-verification.service.js +53 -0
  118. package/dist/modules/twilio/services/cancel-verification.service.js.map +1 -0
  119. package/dist/modules/twilio/services/create-conversation.service.d.ts +8 -0
  120. package/dist/modules/twilio/services/create-conversation.service.d.ts.map +1 -0
  121. package/dist/modules/twilio/services/create-conversation.service.js +56 -0
  122. package/dist/modules/twilio/services/create-conversation.service.js.map +1 -0
  123. package/dist/modules/twilio/services/create-video-room.service.d.ts +8 -0
  124. package/dist/modules/twilio/services/create-video-room.service.d.ts.map +1 -0
  125. package/dist/modules/twilio/services/create-video-room.service.js +57 -0
  126. package/dist/modules/twilio/services/create-video-room.service.js.map +1 -0
  127. package/dist/modules/twilio/services/delete-call.service.d.ts +8 -0
  128. package/dist/modules/twilio/services/delete-call.service.d.ts.map +1 -0
  129. package/dist/modules/twilio/services/delete-call.service.js +48 -0
  130. package/dist/modules/twilio/services/delete-call.service.js.map +1 -0
  131. package/dist/modules/twilio/services/delete-message.service.d.ts +8 -0
  132. package/dist/modules/twilio/services/delete-message.service.d.ts.map +1 -0
  133. package/dist/modules/twilio/services/delete-message.service.js +43 -0
  134. package/dist/modules/twilio/services/delete-message.service.js.map +1 -0
  135. package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts +8 -0
  136. package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts.map +1 -0
  137. package/dist/modules/twilio/services/fetch-call-recordings.service.js +56 -0
  138. package/dist/modules/twilio/services/fetch-call-recordings.service.js.map +1 -0
  139. package/dist/modules/twilio/services/fetch-call.service.d.ts +8 -0
  140. package/dist/modules/twilio/services/fetch-call.service.d.ts.map +1 -0
  141. package/dist/modules/twilio/services/fetch-call.service.js +52 -0
  142. package/dist/modules/twilio/services/fetch-call.service.js.map +1 -0
  143. package/dist/modules/twilio/services/fetch-message.service.d.ts +8 -0
  144. package/dist/modules/twilio/services/fetch-message.service.d.ts.map +1 -0
  145. package/dist/modules/twilio/services/fetch-message.service.js +60 -0
  146. package/dist/modules/twilio/services/fetch-message.service.js.map +1 -0
  147. package/dist/modules/twilio/services/fetch-verification.service.d.ts +8 -0
  148. package/dist/modules/twilio/services/fetch-verification.service.d.ts.map +1 -0
  149. package/dist/modules/twilio/services/fetch-verification.service.js +58 -0
  150. package/dist/modules/twilio/services/fetch-verification.service.js.map +1 -0
  151. package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts +8 -0
  152. package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts.map +1 -0
  153. package/dist/modules/twilio/services/generate-twiml-dial.service.js +43 -0
  154. package/dist/modules/twilio/services/generate-twiml-dial.service.js.map +1 -0
  155. package/dist/modules/twilio/services/generate-twiml-say.service.d.ts +8 -0
  156. package/dist/modules/twilio/services/generate-twiml-say.service.d.ts.map +1 -0
  157. package/dist/modules/twilio/services/generate-twiml-say.service.js +41 -0
  158. package/dist/modules/twilio/services/generate-twiml-say.service.js.map +1 -0
  159. package/dist/modules/twilio/services/index.d.ts +20 -0
  160. package/dist/modules/twilio/services/index.d.ts.map +1 -1
  161. package/dist/modules/twilio/services/index.js +20 -0
  162. package/dist/modules/twilio/services/index.js.map +1 -1
  163. package/dist/modules/twilio/services/list-calls.service.d.ts +8 -0
  164. package/dist/modules/twilio/services/list-calls.service.d.ts.map +1 -0
  165. package/dist/modules/twilio/services/list-calls.service.js +62 -0
  166. package/dist/modules/twilio/services/list-calls.service.js.map +1 -0
  167. package/dist/modules/twilio/services/list-messages.service.d.ts +8 -0
  168. package/dist/modules/twilio/services/list-messages.service.d.ts.map +1 -0
  169. package/dist/modules/twilio/services/list-messages.service.js +65 -0
  170. package/dist/modules/twilio/services/list-messages.service.js.map +1 -0
  171. package/dist/modules/twilio/services/lookup-phone-number.service.d.ts +8 -0
  172. package/dist/modules/twilio/services/lookup-phone-number.service.d.ts.map +1 -0
  173. package/dist/modules/twilio/services/lookup-phone-number.service.js +61 -0
  174. package/dist/modules/twilio/services/lookup-phone-number.service.js.map +1 -0
  175. package/dist/modules/twilio/services/make-call.service.d.ts +8 -0
  176. package/dist/modules/twilio/services/make-call.service.d.ts.map +1 -0
  177. package/dist/modules/twilio/services/make-call.service.js +80 -0
  178. package/dist/modules/twilio/services/make-call.service.js.map +1 -0
  179. package/dist/modules/twilio/services/send-conversation-message.service.d.ts +8 -0
  180. package/dist/modules/twilio/services/send-conversation-message.service.d.ts.map +1 -0
  181. package/dist/modules/twilio/services/send-conversation-message.service.js +61 -0
  182. package/dist/modules/twilio/services/send-conversation-message.service.js.map +1 -0
  183. package/dist/modules/twilio/services/send-sms.service.d.ts +3 -0
  184. package/dist/modules/twilio/services/send-sms.service.d.ts.map +1 -1
  185. package/dist/modules/twilio/services/send-sms.service.js +44 -9
  186. package/dist/modules/twilio/services/send-sms.service.js.map +1 -1
  187. package/dist/modules/twilio/services/send-verification.service.d.ts +8 -0
  188. package/dist/modules/twilio/services/send-verification.service.d.ts.map +1 -0
  189. package/dist/modules/twilio/services/send-verification.service.js +64 -0
  190. package/dist/modules/twilio/services/send-verification.service.js.map +1 -0
  191. package/dist/modules/twilio/services/update-call.service.d.ts +8 -0
  192. package/dist/modules/twilio/services/update-call.service.d.ts.map +1 -0
  193. package/dist/modules/twilio/services/update-call.service.js +62 -0
  194. package/dist/modules/twilio/services/update-call.service.js.map +1 -0
  195. package/dist/modules/twilio/services/update-message.service.d.ts +8 -0
  196. package/dist/modules/twilio/services/update-message.service.d.ts.map +1 -0
  197. package/dist/modules/twilio/services/update-message.service.js +54 -0
  198. package/dist/modules/twilio/services/update-message.service.js.map +1 -0
  199. package/dist/modules/twilio/services/verify-code.service.d.ts +8 -0
  200. package/dist/modules/twilio/services/verify-code.service.d.ts.map +1 -0
  201. package/dist/modules/twilio/services/verify-code.service.js +62 -0
  202. package/dist/modules/twilio/services/verify-code.service.js.map +1 -0
  203. package/dist/modules/twilio/twilio-nest.module.d.ts.map +1 -1
  204. package/dist/modules/twilio/twilio-nest.module.js +51 -3
  205. package/dist/modules/twilio/twilio-nest.module.js.map +1 -1
  206. package/dist/modules/twilio/twilio.module.d.ts.map +1 -1
  207. package/dist/modules/twilio/twilio.module.js +24 -2
  208. package/dist/modules/twilio/twilio.module.js.map +1 -1
  209. package/dist/modules/types.d.ts +2 -0
  210. package/dist/modules/types.d.ts.map +1 -1
  211. package/dist/modules/types.js.map +1 -1
  212. package/dist/modules/webhook/controllers/index.d.ts +2 -0
  213. package/dist/modules/webhook/controllers/index.d.ts.map +1 -0
  214. package/dist/modules/webhook/controllers/index.js +18 -0
  215. package/dist/modules/webhook/controllers/index.js.map +1 -0
  216. package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts +12 -0
  217. package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts.map +1 -0
  218. package/dist/modules/webhook/controllers/webhook-receiver.controller.js +122 -0
  219. package/dist/modules/webhook/controllers/webhook-receiver.controller.js.map +1 -0
  220. package/dist/modules/webhook/credentials.d.ts +3 -0
  221. package/dist/modules/webhook/credentials.d.ts.map +1 -0
  222. package/dist/modules/webhook/credentials.js +5 -0
  223. package/dist/modules/webhook/credentials.js.map +1 -0
  224. package/dist/modules/webhook/services/index.d.ts +2 -0
  225. package/dist/modules/webhook/services/index.d.ts.map +1 -0
  226. package/dist/modules/webhook/services/index.js +18 -0
  227. package/dist/modules/webhook/services/index.js.map +1 -0
  228. package/dist/modules/webhook/services/webhook-received.service.d.ts +10 -0
  229. package/dist/modules/webhook/services/webhook-received.service.d.ts.map +1 -0
  230. package/dist/modules/webhook/services/webhook-received.service.js +94 -0
  231. package/dist/modules/webhook/services/webhook-received.service.js.map +1 -0
  232. package/dist/modules/webhook/triggers/index.d.ts +2 -0
  233. package/dist/modules/webhook/triggers/index.d.ts.map +1 -0
  234. package/dist/modules/webhook/triggers/index.js +18 -0
  235. package/dist/modules/webhook/triggers/index.js.map +1 -0
  236. package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts +3 -0
  237. package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts.map +1 -0
  238. package/dist/modules/webhook/triggers/webhook-received.trigger.js +78 -0
  239. package/dist/modules/webhook/triggers/webhook-received.trigger.js.map +1 -0
  240. package/dist/modules/webhook/webhook-nest.module.d.ts +3 -0
  241. package/dist/modules/webhook/webhook-nest.module.d.ts.map +1 -0
  242. package/dist/modules/webhook/webhook-nest.module.js +32 -0
  243. package/dist/modules/webhook/webhook-nest.module.js.map +1 -0
  244. package/dist/modules/webhook/webhook.module.d.ts +3 -0
  245. package/dist/modules/webhook/webhook.module.d.ts.map +1 -0
  246. package/dist/modules/webhook/webhook.module.js +16 -0
  247. package/dist/modules/webhook/webhook.module.js.map +1 -0
  248. package/dist/services/workflow-execution.service.d.ts +14 -1
  249. package/dist/services/workflow-execution.service.d.ts.map +1 -1
  250. package/dist/services/workflow-execution.service.js +319 -2
  251. package/dist/services/workflow-execution.service.js.map +1 -1
  252. package/dist/services/workflow-module.service.d.ts +6 -1
  253. package/dist/services/workflow-module.service.d.ts.map +1 -1
  254. package/dist/services/workflow-module.service.js +56 -2
  255. package/dist/services/workflow-module.service.js.map +1 -1
  256. package/dist/services/workflow-webhook.service.d.ts +13 -0
  257. package/dist/services/workflow-webhook.service.d.ts.map +1 -0
  258. package/dist/services/workflow-webhook.service.js +72 -0
  259. package/dist/services/workflow-webhook.service.js.map +1 -0
  260. package/dist/workflow-core.module.d.ts.map +1 -1
  261. package/dist/workflow-core.module.js +5 -0
  262. package/dist/workflow-core.module.js.map +1 -1
  263. package/dist/workflow.module.d.ts.map +1 -1
  264. package/dist/workflow.module.js +3 -0
  265. package/dist/workflow.module.js.map +1 -1
  266. package/package.json +2 -2
@@ -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"}
@@ -0,0 +1,94 @@
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.WebhookReceivedService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const workflow_webhook_service_1 = require("../../../services/workflow-webhook.service");
15
+ function generateWebhookPath() {
16
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
17
+ let result = '';
18
+ for (let i = 0; i < 8; i++) {
19
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
20
+ }
21
+ return result;
22
+ }
23
+ let WebhookReceivedService = class WebhookReceivedService {
24
+ workflowWebhookService;
25
+ constructor(workflowWebhookService) {
26
+ this.workflowWebhookService = workflowWebhookService;
27
+ }
28
+ async perform(_inputs, _context) {
29
+ return {
30
+ body: _inputs.body || {},
31
+ headers: _inputs.headers || {},
32
+ query: _inputs.query || {},
33
+ method: _inputs.method || 'POST',
34
+ url: _inputs.url || '',
35
+ receivedAt: new Date().toISOString(),
36
+ };
37
+ }
38
+ async performSubscribe(inputs, context, nodeId) {
39
+ const httpMethod = inputs.httpMethod || 'POST';
40
+ const workflowId = context.workflowId;
41
+ if (!workflowId) {
42
+ throw new Error('Workflow ID is required in context');
43
+ }
44
+ const existingWebhook = await this.workflowWebhookService.findByNodeId(nodeId);
45
+ if (existingWebhook) {
46
+ if (existingWebhook.httpMethod !== httpMethod) {
47
+ existingWebhook.httpMethod = httpMethod;
48
+ existingWebhook.isActive = true;
49
+ await this.workflowWebhookService.repo.save(existingWebhook);
50
+ }
51
+ else {
52
+ if (!existingWebhook.isActive) {
53
+ await this.workflowWebhookService.activate(existingWebhook.id);
54
+ }
55
+ }
56
+ }
57
+ else {
58
+ let webhookPath;
59
+ let attempts = 0;
60
+ const maxAttempts = 10;
61
+ do {
62
+ webhookPath = generateWebhookPath();
63
+ const existing = await this.workflowWebhookService.findByPathAndMethod(webhookPath, httpMethod);
64
+ if (!existing) {
65
+ break;
66
+ }
67
+ attempts++;
68
+ } while (attempts < maxAttempts);
69
+ if (attempts >= maxAttempts) {
70
+ throw new Error('Failed to generate a unique webhook path after multiple attempts');
71
+ }
72
+ const newWebhook = this.workflowWebhookService.repo.create({
73
+ workflowId,
74
+ nodeId,
75
+ webhookPath,
76
+ httpMethod: httpMethod,
77
+ isActive: true,
78
+ });
79
+ await this.workflowWebhookService.repo.save(newWebhook);
80
+ }
81
+ }
82
+ async performUnsubscribe(inputs, context, nodeId) {
83
+ const webhook = await this.workflowWebhookService.findByNodeId(nodeId);
84
+ if (webhook) {
85
+ await this.workflowWebhookService.deactivate(webhook.id);
86
+ }
87
+ }
88
+ };
89
+ exports.WebhookReceivedService = WebhookReceivedService;
90
+ exports.WebhookReceivedService = WebhookReceivedService = __decorate([
91
+ (0, common_1.Injectable)(),
92
+ __metadata("design:paramtypes", [workflow_webhook_service_1.WorkflowWebhookService])
93
+ ], WebhookReceivedService);
94
+ //# sourceMappingURL=webhook-received.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-received.service.js","sourceRoot":"","sources":["../../../../src/modules/webhook/services/webhook-received.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAG5C,yFAAoF;AAMpF,SAAS,mBAAmB;IAC1B,MAAM,KAAK,GAAG,gEAAgE,CAAC;IAC/E,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACJ;IAA7B,YAA6B,sB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,0 +1,2 @@
1
+ export * from './webhook-received.trigger';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/triggers/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.trigger"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/webhook/triggers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowActionTrigger } from '../../types';
2
+ export declare const webhookReceivedTrigger: WorkflowActionTrigger;
3
+ //# sourceMappingURL=webhook-received.trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-received.trigger.d.ts","sourceRoot":"","sources":["../../../../src/modules/webhook/triggers/webhook-received.trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,sBAAsB,EAAE,qBAiGpC,CAAC"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webhookReceivedTrigger = void 0;
4
+ const types_1 = require("../../types");
5
+ const webhook_received_service_1 = require("../services/webhook-received.service");
6
+ exports.webhookReceivedTrigger = {
7
+ key: 'webhook-received',
8
+ name: 'Webhook Received',
9
+ description: 'Triggered when a webhook is received at the configured endpoint',
10
+ category: types_1.NODE_CATEGORY.TRIGGER,
11
+ icon: '🔗',
12
+ serviceClass: webhook_received_service_1.WebhookReceivedService,
13
+ performSubscribe: async (_inputs, _context, _nodeId) => {
14
+ throw new Error('performSubscribe must be called through WorkflowModuleService which resolves WebhookReceivedService from the container');
15
+ },
16
+ performUnsubscribe: async (_inputs, _context, _nodeId) => {
17
+ throw new Error('performUnsubscribe must be called through WorkflowModuleService which resolves WebhookReceivedService from the container');
18
+ },
19
+ inputs: [
20
+ {
21
+ id: 'httpMethod',
22
+ name: 'HTTP Method',
23
+ description: 'The HTTP method to accept (GET, POST, PUT, DELETE, etc.)',
24
+ type: types_1.FIELD_TYPE.STRING,
25
+ validation: {
26
+ required: true,
27
+ enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
28
+ },
29
+ defaultValue: 'POST',
30
+ options: [
31
+ { label: 'GET', value: 'GET' },
32
+ { label: 'POST', value: 'POST' },
33
+ { label: 'PUT', value: 'PUT' },
34
+ { label: 'DELETE', value: 'DELETE' },
35
+ { label: 'PATCH', value: 'PATCH' },
36
+ ],
37
+ },
38
+ ],
39
+ outputs: [
40
+ {
41
+ id: 'body',
42
+ name: 'Request Body',
43
+ description: 'The request body data (JSON parsed if applicable)',
44
+ type: types_1.FIELD_TYPE.OBJECT,
45
+ },
46
+ {
47
+ id: 'headers',
48
+ name: 'Request Headers',
49
+ description: 'HTTP headers from the webhook request',
50
+ type: types_1.FIELD_TYPE.OBJECT,
51
+ },
52
+ {
53
+ id: 'query',
54
+ name: 'Query Parameters',
55
+ description: 'URL query parameters from the webhook request',
56
+ type: types_1.FIELD_TYPE.OBJECT,
57
+ },
58
+ {
59
+ id: 'method',
60
+ name: 'HTTP Method',
61
+ description: 'The HTTP method used in the request',
62
+ type: types_1.FIELD_TYPE.STRING,
63
+ },
64
+ {
65
+ id: 'url',
66
+ name: 'Request URL',
67
+ description: 'The full URL of the webhook request',
68
+ type: types_1.FIELD_TYPE.URL,
69
+ },
70
+ {
71
+ id: 'receivedAt',
72
+ name: 'Received At',
73
+ description: 'Timestamp when the webhook was received',
74
+ type: types_1.FIELD_TYPE.DATE,
75
+ },
76
+ ],
77
+ };
78
+ //# sourceMappingURL=webhook-received.trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-received.trigger.js","sourceRoot":"","sources":["../../../../src/modules/webhook/triggers/webhook-received.trigger.ts"],"names":[],"mappings":";;;AAAA,uCAMqB;AACrB,mFAA8E;AAEjE,QAAA,sBAAsB,GAA0B;IAC3D,GAAG,EAAE,kBAAkB;IACvB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,iEAAiE;IAC9E,QAAQ,EAAE,qBAAa,CAAC,OAAO;IAC/B,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,iDAA4E;IAC1F,gBAAgB,EAAE,KAAK,EACrB,OAAgC,EAChC,QAA+B,EAC/B,OAAe,EACA,EAAE;QAQjB,MAAM,IAAI,KAAK,CACb,wHAAwH,CACzH,CAAC;IACJ,CAAC;IACD,kBAAkB,EAAE,KAAK,EACvB,OAAgC,EAChC,QAA+B,EAC/B,OAAe,EACA,EAAE;QAQjB,MAAM,IAAI,KAAK,CACb,0HAA0H,CAC3H,CAAC;IACJ,CAAC;IACD,MAAM,EAAE;QACN;YACE,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAA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//# sourceMappingURL=webhook-nest.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/webhook/webhook-nest.module.ts"],"names":[],"mappings":"AAUA,qBASa,iBAAiB;CAAG"}
@@ -0,0 +1,32 @@
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.WebhookNestModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const workflow_execution_entity_1 = require("../../entities/workflow-execution.entity");
13
+ const workflow_node_entity_1 = require("../../entities/workflow-node.entity");
14
+ const workflow_webhook_entity_1 = require("../../entities/workflow-webhook.entity");
15
+ const workflow_core_module_1 = require("../../workflow-core.module");
16
+ const controllers_1 = require("./controllers");
17
+ const services_1 = require("./services");
18
+ let WebhookNestModule = class WebhookNestModule {
19
+ };
20
+ exports.WebhookNestModule = WebhookNestModule;
21
+ exports.WebhookNestModule = WebhookNestModule = __decorate([
22
+ (0, common_1.Module)({
23
+ imports: [
24
+ workflow_core_module_1.WorkflowCoreModule,
25
+ typeorm_1.TypeOrmModule.forFeature([workflow_webhook_entity_1.WorkflowWebhook, workflow_node_entity_1.WorkflowNode, workflow_execution_entity_1.WorkflowExecution]),
26
+ ],
27
+ controllers: [controllers_1.WebhookReceiverController],
28
+ providers: [services_1.WebhookReceivedService],
29
+ exports: [services_1.WebhookReceivedService],
30
+ })
31
+ ], WebhookNestModule);
32
+ //# sourceMappingURL=webhook-nest.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-nest.module.js","sourceRoot":"","sources":["../../../src/modules/webhook/webhook-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAEhD,wFAA6E;AAC7E,8EAAmE;AACnE,oFAAyE;AACzE,qEAAgE;AAChE,+CAA0D;AAC1D,yCAAoD;AAW7C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAT7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yCAAkB;YAClB,uBAAa,CAAC,UAAU,CAAC,CAAC,yCAAe,EAAE,mCAAY,EAAE,6CAAiB,CAAC,CAAC;SAC7E;QACD,WAAW,EAAE,CAAC,uCAAyB,CAAC;QACxC,SAAS,EAAE,CAAC,iCAAsB,CAAC;QACnC,OAAO,EAAE,CAAC,iCAAsB,CAAC;KAClC,CAAC;GACW,iBAAiB,CAAG"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowModuleDefinition } from '../types';
2
+ export declare const webhookModule: WorkflowModuleDefinition;
3
+ //# sourceMappingURL=webhook.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.module.d.ts","sourceRoot":"","sources":["../../../src/modules/webhook/webhook.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD,eAAO,MAAM,aAAa,EAAE,wBAS3B,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webhookModule = void 0;
4
+ const credentials_1 = require("./credentials");
5
+ const triggers_1 = require("./triggers");
6
+ exports.webhookModule = {
7
+ key: 'webhook',
8
+ name: 'Webhook',
9
+ description: 'Receive webhooks from external services and trigger workflows',
10
+ icon: '🔗',
11
+ version: '1.0.0',
12
+ credentialFields: credentials_1.webhookCredentials,
13
+ actions: [],
14
+ triggers: [triggers_1.webhookReceivedTrigger],
15
+ };
16
+ //# sourceMappingURL=webhook.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.module.js","sourceRoot":"","sources":["../../../src/modules/webhook/webhook.module.ts"],"names":[],"mappings":";;;AACA,+CAAmD;AACnD,yCAAoD;AAEvC,QAAA,aAAa,GAA6B;IACrD,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,+DAA+D;IAC5E,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,gCAAkB;IACpC,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC,iCAAsB,CAAC;CACnC,CAAC"}
@@ -1,9 +1,21 @@
1
1
  import { TypeOrmCrudService } from '@dataui/crud-typeorm';
2
+ import { ModuleRef } from '@nestjs/core';
2
3
  import { Repository } from 'typeorm';
3
4
  import { WorkflowExecution } from '../entities/workflow-execution.entity';
5
+ import { WorkflowEdgeService } from './workflow-edge.service';
6
+ import { WorkflowModuleCredentialService } from './workflow-module-credential.service';
7
+ import { WorkflowModuleService } from './workflow-module.service';
8
+ import { WorkflowNodeService } from './workflow-node.service';
9
+ import { WorkflowSessionService } from './workflow-session.service';
4
10
  export declare class WorkflowExecutionService extends TypeOrmCrudService<WorkflowExecution> {
5
11
  readonly repo: Repository<WorkflowExecution>;
6
- constructor(repo: Repository<WorkflowExecution>);
12
+ private readonly workflowNodeService;
13
+ private readonly workflowEdgeService;
14
+ private readonly workflowModuleService;
15
+ private readonly workflowModuleCredentialService;
16
+ private readonly workflowSessionService;
17
+ private readonly moduleRef;
18
+ constructor(repo: Repository<WorkflowExecution>, workflowNodeService: WorkflowNodeService, workflowEdgeService: WorkflowEdgeService, workflowModuleService: WorkflowModuleService, workflowModuleCredentialService: WorkflowModuleCredentialService, workflowSessionService: WorkflowSessionService, moduleRef: ModuleRef);
7
19
  getExecutionsByWorkflowId(workflowId: string): Promise<WorkflowExecution[]>;
8
20
  getExecutionsBySessionId(sessionId: string): Promise<WorkflowExecution[]>;
9
21
  getActiveExecutions(workflowId?: string): Promise<WorkflowExecution[]>;
@@ -11,5 +23,6 @@ export declare class WorkflowExecutionService extends TypeOrmCrudService<Workflo
11
23
  completeExecution(executionId: string, outputData?: Record<string, unknown>): Promise<WorkflowExecution>;
12
24
  failExecution(executionId: string, errorMessage: string, errorData?: Record<string, unknown>): Promise<WorkflowExecution>;
13
25
  updateCurrentNode(executionId: string, currentNodeId: string): Promise<WorkflowExecution>;
26
+ executeNextNode(executionId: string, maxIterations?: number): Promise<WorkflowExecution>;
14
27
  }
15
28
  //# sourceMappingURL=workflow-execution.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-execution.service.d.ts","sourceRoot":"","sources":["../../src/services/workflow-execution.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,qBACa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;aAG/D,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;gBAAnC,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAK/C,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAO3E,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAOzE,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAQtE,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAW/D,iBAAiB,CACrB,WAAW,EAAE,MAAM,E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