next-workflow-builder 0.1.0

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 (754) hide show
  1. package/dist/client/components/ai-elements/canvas.d.ts +9 -0
  2. package/dist/client/components/ai-elements/canvas.d.ts.map +1 -0
  3. package/dist/client/components/ai-elements/canvas.js +7 -0
  4. package/dist/client/components/ai-elements/canvas.js.map +1 -0
  5. package/dist/client/components/ai-elements/connection.d.ts +3 -0
  6. package/dist/client/components/ai-elements/connection.d.ts.map +1 -0
  7. package/dist/client/components/ai-elements/connection.js +4 -0
  8. package/dist/client/components/ai-elements/connection.js.map +1 -0
  9. package/dist/client/components/ai-elements/controls.d.ts +2 -0
  10. package/dist/client/components/ai-elements/controls.d.ts.map +1 -0
  11. package/dist/client/components/ai-elements/controls.js +26 -0
  12. package/dist/client/components/ai-elements/controls.js.map +1 -0
  13. package/dist/client/components/ai-elements/edge.d.ts +6 -0
  14. package/dist/client/components/ai-elements/edge.d.ts.map +1 -0
  15. package/dist/client/components/ai-elements/edge.js +86 -0
  16. package/dist/client/components/ai-elements/edge.js.map +1 -0
  17. package/dist/client/components/ai-elements/node.d.ts +23 -0
  18. package/dist/client/components/ai-elements/node.d.ts.map +1 -0
  19. package/dist/client/components/ai-elements/node.js +13 -0
  20. package/dist/client/components/ai-elements/node.js.map +1 -0
  21. package/dist/client/components/ai-elements/panel.d.ts +6 -0
  22. package/dist/client/components/ai-elements/panel.d.ts.map +1 -0
  23. package/dist/client/components/ai-elements/panel.js +5 -0
  24. package/dist/client/components/ai-elements/panel.js.map +1 -0
  25. package/dist/client/components/ai-elements/prompt.d.ts +7 -0
  26. package/dist/client/components/ai-elements/prompt.d.ts.map +1 -0
  27. package/dist/client/components/ai-elements/prompt.js +220 -0
  28. package/dist/client/components/ai-elements/prompt.js.map +1 -0
  29. package/dist/client/components/ai-elements/shimmer.d.ts +10 -0
  30. package/dist/client/components/ai-elements/shimmer.d.ts.map +1 -0
  31. package/dist/client/components/ai-elements/shimmer.js +19 -0
  32. package/dist/client/components/ai-elements/shimmer.js.map +1 -0
  33. package/dist/client/components/auth/dialog.d.ts +8 -0
  34. package/dist/client/components/auth/dialog.d.ts.map +1 -0
  35. package/dist/client/components/auth/dialog.js +181 -0
  36. package/dist/client/components/auth/dialog.js.map +1 -0
  37. package/dist/client/components/deploy-button.d.ts +2 -0
  38. package/dist/client/components/deploy-button.d.ts.map +1 -0
  39. package/dist/client/components/deploy-button.js +8 -0
  40. package/dist/client/components/deploy-button.js.map +1 -0
  41. package/dist/client/components/global-modals.d.ts +2 -0
  42. package/dist/client/components/global-modals.d.ts.map +1 -0
  43. package/dist/client/components/global-modals.js +8 -0
  44. package/dist/client/components/global-modals.js.map +1 -0
  45. package/dist/client/components/icons/github-icon.d.ts +4 -0
  46. package/dist/client/components/icons/github-icon.d.ts.map +1 -0
  47. package/dist/client/components/icons/github-icon.js +5 -0
  48. package/dist/client/components/icons/github-icon.js.map +1 -0
  49. package/dist/client/components/index.d.ts +7 -0
  50. package/dist/client/components/index.d.ts.map +1 -0
  51. package/dist/client/components/index.js +8 -0
  52. package/dist/client/components/index.js.map +1 -0
  53. package/dist/client/components/layout-provider.d.ts +4 -0
  54. package/dist/client/components/layout-provider.d.ts.map +1 -0
  55. package/dist/client/components/layout-provider.js +20 -0
  56. package/dist/client/components/layout-provider.js.map +1 -0
  57. package/dist/client/components/overlays/add-connection-overlay.d.ts +14 -0
  58. package/dist/client/components/overlays/add-connection-overlay.d.ts.map +1 -0
  59. package/dist/client/components/overlays/add-connection-overlay.js +218 -0
  60. package/dist/client/components/overlays/add-connection-overlay.js.map +1 -0
  61. package/dist/client/components/overlays/api-keys-overlay.d.ts +6 -0
  62. package/dist/client/components/overlays/api-keys-overlay.d.ts.map +1 -0
  63. package/dist/client/components/overlays/api-keys-overlay.js +124 -0
  64. package/dist/client/components/overlays/api-keys-overlay.js.map +1 -0
  65. package/dist/client/components/overlays/configuration-overlay.d.ts +5 -0
  66. package/dist/client/components/overlays/configuration-overlay.d.ts.map +1 -0
  67. package/dist/client/components/overlays/configuration-overlay.js +325 -0
  68. package/dist/client/components/overlays/configuration-overlay.js.map +1 -0
  69. package/dist/client/components/overlays/confirm-overlay.d.ts +15 -0
  70. package/dist/client/components/overlays/confirm-overlay.d.ts.map +1 -0
  71. package/dist/client/components/overlays/confirm-overlay.js +31 -0
  72. package/dist/client/components/overlays/confirm-overlay.js.map +1 -0
  73. package/dist/client/components/overlays/edit-connection-overlay.d.ts +16 -0
  74. package/dist/client/components/overlays/edit-connection-overlay.d.ts.map +1 -0
  75. package/dist/client/components/overlays/edit-connection-overlay.js +213 -0
  76. package/dist/client/components/overlays/edit-connection-overlay.js.map +1 -0
  77. package/dist/client/components/overlays/export-workflow-overlay.d.ts +8 -0
  78. package/dist/client/components/overlays/export-workflow-overlay.d.ts.map +1 -0
  79. package/dist/client/components/overlays/export-workflow-overlay.js +22 -0
  80. package/dist/client/components/overlays/export-workflow-overlay.js.map +1 -0
  81. package/dist/client/components/overlays/integrations-overlay.d.ts +6 -0
  82. package/dist/client/components/overlays/integrations-overlay.d.ts.map +1 -0
  83. package/dist/client/components/overlays/integrations-overlay.js +56 -0
  84. package/dist/client/components/overlays/integrations-overlay.js.map +1 -0
  85. package/dist/client/components/overlays/make-public-overlay.d.ts +7 -0
  86. package/dist/client/components/overlays/make-public-overlay.d.ts.map +1 -0
  87. package/dist/client/components/overlays/make-public-overlay.js +17 -0
  88. package/dist/client/components/overlays/make-public-overlay.js.map +1 -0
  89. package/dist/client/components/overlays/overlay-container.d.ts +2 -0
  90. package/dist/client/components/overlays/overlay-container.d.ts.map +1 -0
  91. package/dist/client/components/overlays/overlay-container.js +236 -0
  92. package/dist/client/components/overlays/overlay-container.js.map +1 -0
  93. package/dist/client/components/overlays/overlay-footer.d.ts +3 -0
  94. package/dist/client/components/overlays/overlay-footer.d.ts.map +1 -0
  95. package/dist/client/components/overlays/overlay-footer.js +25 -0
  96. package/dist/client/components/overlays/overlay-footer.js.map +1 -0
  97. package/dist/client/components/overlays/overlay-header.d.ts +8 -0
  98. package/dist/client/components/overlays/overlay-header.d.ts.map +1 -0
  99. package/dist/client/components/overlays/overlay-header.js +32 -0
  100. package/dist/client/components/overlays/overlay-header.js.map +1 -0
  101. package/dist/client/components/overlays/overlay-provider.d.ts +17 -0
  102. package/dist/client/components/overlays/overlay-provider.d.ts.map +1 -0
  103. package/dist/client/components/overlays/overlay-provider.js +120 -0
  104. package/dist/client/components/overlays/overlay-provider.js.map +1 -0
  105. package/dist/client/components/overlays/overlay-sync.d.ts +2 -0
  106. package/dist/client/components/overlays/overlay-sync.d.ts.map +1 -0
  107. package/dist/client/components/overlays/overlay-sync.js +21 -0
  108. package/dist/client/components/overlays/overlay-sync.js.map +1 -0
  109. package/dist/client/components/overlays/overlay.d.ts +7 -0
  110. package/dist/client/components/overlays/overlay.d.ts.map +1 -0
  111. package/dist/client/components/overlays/overlay.js +9 -0
  112. package/dist/client/components/overlays/overlay.js.map +1 -0
  113. package/dist/client/components/overlays/settings-overlay.d.ts +6 -0
  114. package/dist/client/components/overlays/settings-overlay.d.ts.map +1 -0
  115. package/dist/client/components/overlays/settings-overlay.js +64 -0
  116. package/dist/client/components/overlays/settings-overlay.js.map +1 -0
  117. package/dist/client/components/overlays/types.d.ts +64 -0
  118. package/dist/client/components/overlays/types.d.ts.map +1 -0
  119. package/dist/client/components/overlays/types.js +2 -0
  120. package/dist/client/components/overlays/types.js.map +1 -0
  121. package/dist/client/components/overlays/workflow-issues-overlay.d.ts +37 -0
  122. package/dist/client/components/overlays/workflow-issues-overlay.d.ts.map +1 -0
  123. package/dist/client/components/overlays/workflow-issues-overlay.js +67 -0
  124. package/dist/client/components/overlays/workflow-issues-overlay.js.map +1 -0
  125. package/dist/client/components/pages/home-page.d.ts +3 -0
  126. package/dist/client/components/pages/home-page.d.ts.map +1 -0
  127. package/dist/client/components/pages/home-page.js +100 -0
  128. package/dist/client/components/pages/home-page.js.map +1 -0
  129. package/dist/client/components/pages/workflow-page.d.ts +4 -0
  130. package/dist/client/components/pages/workflow-page.d.ts.map +1 -0
  131. package/dist/client/components/pages/workflow-page.js +23 -0
  132. package/dist/client/components/pages/workflow-page.js.map +1 -0
  133. package/dist/client/components/pages/workflows-redirect.d.ts +3 -0
  134. package/dist/client/components/pages/workflows-redirect.d.ts.map +1 -0
  135. package/dist/client/components/pages/workflows-redirect.js +30 -0
  136. package/dist/client/components/pages/workflows-redirect.js.map +1 -0
  137. package/dist/client/components/settings/account-settings.d.ts +9 -0
  138. package/dist/client/components/settings/account-settings.d.ts.map +1 -0
  139. package/dist/client/components/settings/account-settings.js +8 -0
  140. package/dist/client/components/settings/account-settings.js.map +1 -0
  141. package/dist/client/components/settings/integrations-manager.d.ts +7 -0
  142. package/dist/client/components/settings/integrations-manager.d.ts.map +1 -0
  143. package/dist/client/components/settings/integrations-manager.js +120 -0
  144. package/dist/client/components/settings/integrations-manager.js.map +1 -0
  145. package/dist/client/components/theme-provider.d.ts +5 -0
  146. package/dist/client/components/theme-provider.d.ts.map +1 -0
  147. package/dist/client/components/theme-provider.js +6 -0
  148. package/dist/client/components/theme-provider.js.map +1 -0
  149. package/dist/client/components/ui/alert-dialog.d.ts +15 -0
  150. package/dist/client/components/ui/alert-dialog.d.ts.map +1 -0
  151. package/dist/client/components/ui/alert-dialog.js +40 -0
  152. package/dist/client/components/ui/alert-dialog.js.map +1 -0
  153. package/dist/client/components/ui/alert.d.ts +10 -0
  154. package/dist/client/components/ui/alert.d.ts.map +1 -0
  155. package/dist/client/components/ui/alert.js +25 -0
  156. package/dist/client/components/ui/alert.js.map +1 -0
  157. package/dist/client/components/ui/animated-border.d.ts +6 -0
  158. package/dist/client/components/ui/animated-border.d.ts.map +1 -0
  159. package/dist/client/components/ui/animated-border.js +34 -0
  160. package/dist/client/components/ui/animated-border.js.map +1 -0
  161. package/dist/client/components/ui/avatar.d.ts +7 -0
  162. package/dist/client/components/ui/avatar.d.ts.map +1 -0
  163. package/dist/client/components/ui/avatar.js +15 -0
  164. package/dist/client/components/ui/avatar.js.map +1 -0
  165. package/dist/client/components/ui/button-group.d.ts +12 -0
  166. package/dist/client/components/ui/button-group.d.ts.map +1 -0
  167. package/dist/client/components/ui/button-group.js +28 -0
  168. package/dist/client/components/ui/button-group.js.map +1 -0
  169. package/dist/client/components/ui/button.d.ts +11 -0
  170. package/dist/client/components/ui/button.d.ts.map +1 -0
  171. package/dist/client/components/ui/button.js +34 -0
  172. package/dist/client/components/ui/button.js.map +1 -0
  173. package/dist/client/components/ui/card.d.ts +10 -0
  174. package/dist/client/components/ui/card.d.ts.map +1 -0
  175. package/dist/client/components/ui/card.js +25 -0
  176. package/dist/client/components/ui/card.js.map +1 -0
  177. package/dist/client/components/ui/checkbox.d.ts +5 -0
  178. package/dist/client/components/ui/checkbox.d.ts.map +1 -0
  179. package/dist/client/components/ui/checkbox.js +10 -0
  180. package/dist/client/components/ui/checkbox.js.map +1 -0
  181. package/dist/client/components/ui/code-editor.d.ts +3 -0
  182. package/dist/client/components/ui/code-editor.d.ts.map +1 -0
  183. package/dist/client/components/ui/code-editor.js +17 -0
  184. package/dist/client/components/ui/code-editor.js.map +1 -0
  185. package/dist/client/components/ui/collapsible.d.ts +6 -0
  186. package/dist/client/components/ui/collapsible.d.ts.map +1 -0
  187. package/dist/client/components/ui/collapsible.js +14 -0
  188. package/dist/client/components/ui/collapsible.js.map +1 -0
  189. package/dist/client/components/ui/context-menu.d.ts +26 -0
  190. package/dist/client/components/ui/context-menu.d.ts.map +1 -0
  191. package/dist/client/components/ui/context-menu.js +52 -0
  192. package/dist/client/components/ui/context-menu.js.map +1 -0
  193. package/dist/client/components/ui/dialog.d.ts +16 -0
  194. package/dist/client/components/ui/dialog.d.ts.map +1 -0
  195. package/dist/client/components/ui/dialog.js +37 -0
  196. package/dist/client/components/ui/dialog.js.map +1 -0
  197. package/dist/client/components/ui/drawer.d.ts +14 -0
  198. package/dist/client/components/ui/drawer.d.ts.map +1 -0
  199. package/dist/client/components/ui/drawer.js +36 -0
  200. package/dist/client/components/ui/drawer.js.map +1 -0
  201. package/dist/client/components/ui/dropdown-menu.d.ts +26 -0
  202. package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -0
  203. package/dist/client/components/ui/dropdown-menu.js +52 -0
  204. package/dist/client/components/ui/dropdown-menu.js.map +1 -0
  205. package/dist/client/components/ui/input.d.ts +4 -0
  206. package/dist/client/components/ui/input.d.ts.map +1 -0
  207. package/dist/client/components/ui/input.js +7 -0
  208. package/dist/client/components/ui/input.js.map +1 -0
  209. package/dist/client/components/ui/integration-icon.d.ts +7 -0
  210. package/dist/client/components/ui/integration-icon.d.ts.map +1 -0
  211. package/dist/client/components/ui/integration-icon.js +25 -0
  212. package/dist/client/components/ui/integration-icon.js.map +1 -0
  213. package/dist/client/components/ui/integration-selector.d.ts +12 -0
  214. package/dist/client/components/ui/integration-selector.d.ts.map +1 -0
  215. package/dist/client/components/ui/integration-selector.js +198 -0
  216. package/dist/client/components/ui/integration-selector.js.map +1 -0
  217. package/dist/client/components/ui/label.d.ts +5 -0
  218. package/dist/client/components/ui/label.d.ts.map +1 -0
  219. package/dist/client/components/ui/label.js +9 -0
  220. package/dist/client/components/ui/label.js.map +1 -0
  221. package/dist/client/components/ui/resizable.d.ts +9 -0
  222. package/dist/client/components/ui/resizable.d.ts.map +1 -0
  223. package/dist/client/components/ui/resizable.js +16 -0
  224. package/dist/client/components/ui/resizable.js.map +1 -0
  225. package/dist/client/components/ui/select.d.ts +16 -0
  226. package/dist/client/components/ui/select.d.ts.map +1 -0
  227. package/dist/client/components/ui/select.js +39 -0
  228. package/dist/client/components/ui/select.js.map +1 -0
  229. package/dist/client/components/ui/separator.d.ts +5 -0
  230. package/dist/client/components/ui/separator.d.ts.map +1 -0
  231. package/dist/client/components/ui/separator.js +9 -0
  232. package/dist/client/components/ui/separator.js.map +1 -0
  233. package/dist/client/components/ui/sheet.d.ts +14 -0
  234. package/dist/client/components/ui/sheet.d.ts.map +1 -0
  235. package/dist/client/components/ui/sheet.js +41 -0
  236. package/dist/client/components/ui/sheet.js.map +1 -0
  237. package/dist/client/components/ui/sonner.d.ts +4 -0
  238. package/dist/client/components/ui/sonner.d.ts.map +1 -0
  239. package/dist/client/components/ui/sonner.js +22 -0
  240. package/dist/client/components/ui/sonner.js.map +1 -0
  241. package/dist/client/components/ui/spinner.d.ts +4 -0
  242. package/dist/client/components/ui/spinner.d.ts.map +1 -0
  243. package/dist/client/components/ui/spinner.js +9 -0
  244. package/dist/client/components/ui/spinner.js.map +1 -0
  245. package/dist/client/components/ui/tabs.d.ts +8 -0
  246. package/dist/client/components/ui/tabs.d.ts.map +1 -0
  247. package/dist/client/components/ui/tabs.js +18 -0
  248. package/dist/client/components/ui/tabs.js.map +1 -0
  249. package/dist/client/components/ui/template-autocomplete.d.ts +14 -0
  250. package/dist/client/components/ui/template-autocomplete.d.ts.map +1 -0
  251. package/dist/client/components/ui/template-autocomplete.js +239 -0
  252. package/dist/client/components/ui/template-autocomplete.js.map +1 -0
  253. package/dist/client/components/ui/template-badge-input.d.ts +10 -0
  254. package/dist/client/components/ui/template-badge-input.d.ts.map +1 -0
  255. package/dist/client/components/ui/template-badge-input.js +360 -0
  256. package/dist/client/components/ui/template-badge-input.js.map +1 -0
  257. package/dist/client/components/ui/template-badge-textarea.d.ts +11 -0
  258. package/dist/client/components/ui/template-badge-textarea.d.ts.map +1 -0
  259. package/dist/client/components/ui/template-badge-textarea.js +431 -0
  260. package/dist/client/components/ui/template-badge-textarea.js.map +1 -0
  261. package/dist/client/components/ui/timezone-select.d.ts +9 -0
  262. package/dist/client/components/ui/timezone-select.d.ts.map +1 -0
  263. package/dist/client/components/ui/timezone-select.js +87 -0
  264. package/dist/client/components/ui/timezone-select.js.map +1 -0
  265. package/dist/client/components/ui/tooltip.d.ts +8 -0
  266. package/dist/client/components/ui/tooltip.d.ts.map +1 -0
  267. package/dist/client/components/ui/tooltip.js +18 -0
  268. package/dist/client/components/ui/tooltip.js.map +1 -0
  269. package/dist/client/components/ui/workflow-icon.d.ts +4 -0
  270. package/dist/client/components/ui/workflow-icon.d.ts.map +1 -0
  271. package/dist/client/components/ui/workflow-icon.js +5 -0
  272. package/dist/client/components/ui/workflow-icon.js.map +1 -0
  273. package/dist/client/components/workflow/config/action-config-renderer.d.ts +10 -0
  274. package/dist/client/components/workflow/config/action-config-renderer.d.ts.map +1 -0
  275. package/dist/client/components/workflow/config/action-config-renderer.js +64 -0
  276. package/dist/client/components/workflow/config/action-config-renderer.js.map +1 -0
  277. package/dist/client/components/workflow/config/action-config.d.ts +9 -0
  278. package/dist/client/components/workflow/config/action-config.d.ts.map +1 -0
  279. package/dist/client/components/workflow/config/action-config.js +174 -0
  280. package/dist/client/components/workflow/config/action-config.js.map +1 -0
  281. package/dist/client/components/workflow/config/action-grid.d.ts +8 -0
  282. package/dist/client/components/workflow/config/action-grid.d.ts.map +1 -0
  283. package/dist/client/components/workflow/config/action-grid.js +162 -0
  284. package/dist/client/components/workflow/config/action-grid.js.map +1 -0
  285. package/dist/client/components/workflow/config/condition-config.d.ts +8 -0
  286. package/dist/client/components/workflow/config/condition-config.d.ts.map +1 -0
  287. package/dist/client/components/workflow/config/condition-config.js +7 -0
  288. package/dist/client/components/workflow/config/condition-config.js.map +1 -0
  289. package/dist/client/components/workflow/config/editor-config.d.ts +13 -0
  290. package/dist/client/components/workflow/config/editor-config.d.ts.map +1 -0
  291. package/dist/client/components/workflow/config/editor-config.js +34 -0
  292. package/dist/client/components/workflow/config/editor-config.js.map +1 -0
  293. package/dist/client/components/workflow/config/schema-builder.d.ts +17 -0
  294. package/dist/client/components/workflow/config/schema-builder.d.ts.map +1 -0
  295. package/dist/client/components/workflow/config/schema-builder.js +55 -0
  296. package/dist/client/components/workflow/config/schema-builder.js.map +1 -0
  297. package/dist/client/components/workflow/config/system-action.d.ts +9 -0
  298. package/dist/client/components/workflow/config/system-action.d.ts.map +1 -0
  299. package/dist/client/components/workflow/config/system-action.js +33 -0
  300. package/dist/client/components/workflow/config/system-action.js.map +1 -0
  301. package/dist/client/components/workflow/config/trigger-config.d.ts +9 -0
  302. package/dist/client/components/workflow/config/trigger-config.d.ts.map +1 -0
  303. package/dist/client/components/workflow/config/trigger-config.js +33 -0
  304. package/dist/client/components/workflow/config/trigger-config.js.map +1 -0
  305. package/dist/client/components/workflow/node-config-panel.d.ts +3 -0
  306. package/dist/client/components/workflow/node-config-panel.d.ts.map +1 -0
  307. package/dist/client/components/workflow/node-config-panel.js +353 -0
  308. package/dist/client/components/workflow/node-config-panel.js.map +1 -0
  309. package/dist/client/components/workflow/nodes/action-node.d.ts +10 -0
  310. package/dist/client/components/workflow/nodes/action-node.d.ts.map +1 -0
  311. package/dist/client/components/workflow/nodes/action-node.js +176 -0
  312. package/dist/client/components/workflow/nodes/action-node.js.map +1 -0
  313. package/dist/client/components/workflow/nodes/add-node.d.ts +9 -0
  314. package/dist/client/components/workflow/nodes/add-node.d.ts.map +1 -0
  315. package/dist/client/components/workflow/nodes/add-node.js +8 -0
  316. package/dist/client/components/workflow/nodes/add-node.js.map +1 -0
  317. package/dist/client/components/workflow/nodes/trigger-node.d.ts +8 -0
  318. package/dist/client/components/workflow/nodes/trigger-node.d.ts.map +1 -0
  319. package/dist/client/components/workflow/nodes/trigger-node.js +25 -0
  320. package/dist/client/components/workflow/nodes/trigger-node.js.map +1 -0
  321. package/dist/client/components/workflow/persistent-canvas.d.ts +2 -0
  322. package/dist/client/components/workflow/persistent-canvas.d.ts.map +1 -0
  323. package/dist/client/components/workflow/persistent-canvas.js +13 -0
  324. package/dist/client/components/workflow/persistent-canvas.js.map +1 -0
  325. package/dist/client/components/workflow/utils/code-generators.d.ts +12 -0
  326. package/dist/client/components/workflow/utils/code-generators.d.ts.map +1 -0
  327. package/dist/client/components/workflow/utils/code-generators.js +70 -0
  328. package/dist/client/components/workflow/utils/code-generators.js.map +1 -0
  329. package/dist/client/components/workflow/workflow-canvas.d.ts +3 -0
  330. package/dist/client/components/workflow/workflow-canvas.d.ts.map +1 -0
  331. package/dist/client/components/workflow/workflow-canvas.js +347 -0
  332. package/dist/client/components/workflow/workflow-canvas.js.map +1 -0
  333. package/dist/client/components/workflow/workflow-context-menu.d.ts +27 -0
  334. package/dist/client/components/workflow/workflow-context-menu.d.ts.map +1 -0
  335. package/dist/client/components/workflow/workflow-context-menu.js +156 -0
  336. package/dist/client/components/workflow/workflow-context-menu.js.map +1 -0
  337. package/dist/client/components/workflow/workflow-editor.d.ts +6 -0
  338. package/dist/client/components/workflow/workflow-editor.d.ts.map +1 -0
  339. package/dist/client/components/workflow/workflow-editor.js +443 -0
  340. package/dist/client/components/workflow/workflow-editor.js.map +1 -0
  341. package/dist/client/components/workflow/workflow-runs.d.ts +8 -0
  342. package/dist/client/components/workflow/workflow-runs.d.ts.map +1 -0
  343. package/dist/client/components/workflow/workflow-runs.js +336 -0
  344. package/dist/client/components/workflow/workflow-runs.js.map +1 -0
  345. package/dist/client/components/workflow/workflow-toolbar.d.ts +6 -0
  346. package/dist/client/components/workflow/workflow-toolbar.d.ts.map +1 -0
  347. package/dist/client/components/workflow/workflow-toolbar.js +707 -0
  348. package/dist/client/components/workflow/workflow-toolbar.js.map +1 -0
  349. package/dist/client/components/workflows/user-menu.d.ts +2 -0
  350. package/dist/client/components/workflows/user-menu.d.ts.map +1 -0
  351. package/dist/client/components/workflows/user-menu.js +65 -0
  352. package/dist/client/components/workflows/user-menu.js.map +1 -0
  353. package/dist/client/hooks/use-mobile.d.ts +2 -0
  354. package/dist/client/hooks/use-mobile.d.ts.map +1 -0
  355. package/dist/client/hooks/use-mobile.js +16 -0
  356. package/dist/client/hooks/use-mobile.js.map +1 -0
  357. package/dist/client/hooks/use-touch.d.ts +2 -0
  358. package/dist/client/hooks/use-touch.d.ts.map +1 -0
  359. package/dist/client/hooks/use-touch.js +12 -0
  360. package/dist/client/hooks/use-touch.js.map +1 -0
  361. package/dist/client/index.d.ts +11 -0
  362. package/dist/client/index.d.ts.map +1 -0
  363. package/dist/client/index.js +12 -0
  364. package/dist/client/index.js.map +1 -0
  365. package/dist/client/package.json +1 -0
  366. package/dist/lib/api-client.d.ts +330 -0
  367. package/dist/lib/api-client.d.ts.map +1 -0
  368. package/dist/lib/api-client.js +274 -0
  369. package/dist/lib/api-client.js.map +1 -0
  370. package/dist/lib/atoms/overlay.d.ts +15 -0
  371. package/dist/lib/atoms/overlay.d.ts.map +1 -0
  372. package/dist/lib/atoms/overlay.js +78 -0
  373. package/dist/lib/atoms/overlay.js.map +1 -0
  374. package/dist/lib/auth-client.d.ts +871 -0
  375. package/dist/lib/auth-client.d.ts.map +1 -0
  376. package/dist/lib/auth-client.js +10 -0
  377. package/dist/lib/auth-client.js.map +1 -0
  378. package/dist/lib/auth-providers.d.ts +12 -0
  379. package/dist/lib/auth-providers.d.ts.map +1 -0
  380. package/dist/lib/auth-providers.js +27 -0
  381. package/dist/lib/auth-providers.js.map +1 -0
  382. package/dist/lib/auth.d.ts +5 -0
  383. package/dist/lib/auth.d.ts.map +1 -0
  384. package/dist/lib/auth.js +62 -0
  385. package/dist/lib/auth.js.map +1 -0
  386. package/dist/lib/codegen-templates/condition.d.ts +3 -0
  387. package/dist/lib/codegen-templates/condition.d.ts.map +1 -0
  388. package/dist/lib/codegen-templates/condition.js +9 -0
  389. package/dist/lib/codegen-templates/condition.js.map +1 -0
  390. package/dist/lib/codegen-templates/database-query.d.ts +3 -0
  391. package/dist/lib/codegen-templates/database-query.d.ts.map +1 -0
  392. package/dist/lib/codegen-templates/database-query.js +24 -0
  393. package/dist/lib/codegen-templates/database-query.js.map +1 -0
  394. package/dist/lib/codegen-templates/http-request.d.ts +3 -0
  395. package/dist/lib/codegen-templates/http-request.d.ts.map +1 -0
  396. package/dist/lib/codegen-templates/http-request.js +44 -0
  397. package/dist/lib/codegen-templates/http-request.js.map +1 -0
  398. package/dist/lib/condition-validator.d.ts +10 -0
  399. package/dist/lib/condition-validator.d.ts.map +1 -0
  400. package/dist/lib/condition-validator.js +230 -0
  401. package/dist/lib/condition-validator.js.map +1 -0
  402. package/dist/lib/constants.d.ts +3 -0
  403. package/dist/lib/constants.d.ts.map +1 -0
  404. package/dist/lib/constants.js +3 -0
  405. package/dist/lib/constants.js.map +1 -0
  406. package/dist/lib/credential-fetcher.d.ts +4 -0
  407. package/dist/lib/credential-fetcher.d.ts.map +1 -0
  408. package/dist/lib/credential-fetcher.js +38 -0
  409. package/dist/lib/credential-fetcher.js.map +1 -0
  410. package/dist/lib/db/index.d.ts +4 -0
  411. package/dist/lib/db/index.d.ts.map +1 -0
  412. package/dist/lib/db/index.js +17 -0
  413. package/dist/lib/db/index.js.map +1 -0
  414. package/dist/lib/db/integrations.d.ts +36 -0
  415. package/dist/lib/db/integrations.d.ts.map +1 -0
  416. package/dist/lib/db/integrations.js +170 -0
  417. package/dist/lib/db/integrations.js.map +1 -0
  418. package/dist/lib/db/schema.d.ts +1474 -0
  419. package/dist/lib/db/schema.d.ts.map +1 -0
  420. package/dist/lib/db/schema.js +143 -0
  421. package/dist/lib/db/schema.js.map +1 -0
  422. package/dist/lib/integrations-store.d.ts +13 -0
  423. package/dist/lib/integrations-store.d.ts.map +1 -0
  424. package/dist/lib/integrations-store.js +10 -0
  425. package/dist/lib/integrations-store.js.map +1 -0
  426. package/dist/lib/managed-connection.d.ts +49 -0
  427. package/dist/lib/managed-connection.d.ts.map +1 -0
  428. package/dist/lib/managed-connection.js +21 -0
  429. package/dist/lib/managed-connection.js.map +1 -0
  430. package/dist/lib/monaco-theme.d.ts +29 -0
  431. package/dist/lib/monaco-theme.d.ts.map +1 -0
  432. package/dist/lib/monaco-theme.js +54 -0
  433. package/dist/lib/monaco-theme.js.map +1 -0
  434. package/dist/lib/plugin-registry.d.ts +10 -0
  435. package/dist/lib/plugin-registry.d.ts.map +1 -0
  436. package/dist/lib/plugin-registry.js +16 -0
  437. package/dist/lib/plugin-registry.js.map +1 -0
  438. package/dist/lib/steps/credentials.d.ts +14 -0
  439. package/dist/lib/steps/credentials.d.ts.map +1 -0
  440. package/dist/lib/steps/credentials.js +65 -0
  441. package/dist/lib/steps/credentials.js.map +1 -0
  442. package/dist/lib/steps/http-request.d.ts +22 -0
  443. package/dist/lib/steps/http-request.d.ts.map +1 -0
  444. package/dist/lib/steps/http-request.js +72 -0
  445. package/dist/lib/steps/http-request.js.map +1 -0
  446. package/dist/lib/steps/index.d.ts +10 -0
  447. package/dist/lib/steps/index.d.ts.map +1 -0
  448. package/dist/lib/steps/index.js +14 -0
  449. package/dist/lib/steps/index.js.map +1 -0
  450. package/dist/lib/steps/step-handler.d.ts +30 -0
  451. package/dist/lib/steps/step-handler.d.ts.map +1 -0
  452. package/dist/lib/steps/step-handler.js +105 -0
  453. package/dist/lib/steps/step-handler.js.map +1 -0
  454. package/dist/lib/steps/trigger.d.ts +21 -0
  455. package/dist/lib/steps/trigger.d.ts.map +1 -0
  456. package/dist/lib/steps/trigger.js +17 -0
  457. package/dist/lib/steps/trigger.js.map +1 -0
  458. package/dist/lib/types/integration.d.ts +3 -0
  459. package/dist/lib/types/integration.d.ts.map +1 -0
  460. package/dist/lib/types/integration.js +2 -0
  461. package/dist/lib/types/integration.js.map +1 -0
  462. package/dist/lib/utils/format-number.d.ts +2 -0
  463. package/dist/lib/utils/format-number.d.ts.map +1 -0
  464. package/dist/lib/utils/format-number.js +16 -0
  465. package/dist/lib/utils/format-number.js.map +1 -0
  466. package/dist/lib/utils/id.d.ts +2 -0
  467. package/dist/lib/utils/id.d.ts.map +1 -0
  468. package/dist/lib/utils/id.js +6 -0
  469. package/dist/lib/utils/id.js.map +1 -0
  470. package/dist/lib/utils/redact.d.ts +4 -0
  471. package/dist/lib/utils/redact.d.ts.map +1 -0
  472. package/dist/lib/utils/redact.js +143 -0
  473. package/dist/lib/utils/redact.js.map +1 -0
  474. package/dist/lib/utils/template.d.ts +18 -0
  475. package/dist/lib/utils/template.d.ts.map +1 -0
  476. package/dist/lib/utils/template.js +323 -0
  477. package/dist/lib/utils/template.js.map +1 -0
  478. package/dist/lib/utils/time.d.ts +2 -0
  479. package/dist/lib/utils/time.d.ts.map +1 -0
  480. package/dist/lib/utils/time.js +34 -0
  481. package/dist/lib/utils/time.js.map +1 -0
  482. package/dist/lib/utils.d.ts +5 -0
  483. package/dist/lib/utils.d.ts.map +1 -0
  484. package/dist/lib/utils.js +99 -0
  485. package/dist/lib/utils.js.map +1 -0
  486. package/dist/lib/workflow-codegen-sdk.d.ts +4 -0
  487. package/dist/lib/workflow-codegen-sdk.d.ts.map +1 -0
  488. package/dist/lib/workflow-codegen-sdk.js +482 -0
  489. package/dist/lib/workflow-codegen-sdk.js.map +1 -0
  490. package/dist/lib/workflow-codegen-shared.d.ts +26 -0
  491. package/dist/lib/workflow-codegen-shared.d.ts.map +1 -0
  492. package/dist/lib/workflow-codegen-shared.js +232 -0
  493. package/dist/lib/workflow-codegen-shared.js.map +1 -0
  494. package/dist/lib/workflow-codegen.d.ts +18 -0
  495. package/dist/lib/workflow-codegen.d.ts.map +1 -0
  496. package/dist/lib/workflow-codegen.js +786 -0
  497. package/dist/lib/workflow-codegen.js.map +1 -0
  498. package/dist/lib/workflow-executor.workflow.d.ts +33 -0
  499. package/dist/lib/workflow-executor.workflow.d.ts.map +1 -0
  500. package/dist/lib/workflow-executor.workflow.js +605 -0
  501. package/dist/lib/workflow-executor.workflow.js.map +1 -0
  502. package/dist/lib/workflow-logging.d.ts +29 -0
  503. package/dist/lib/workflow-logging.d.ts.map +1 -0
  504. package/dist/lib/workflow-logging.js +48 -0
  505. package/dist/lib/workflow-logging.js.map +1 -0
  506. package/dist/lib/workflow-store.d.ts +118 -0
  507. package/dist/lib/workflow-store.d.ts.map +1 -0
  508. package/dist/lib/workflow-store.js +351 -0
  509. package/dist/lib/workflow-store.js.map +1 -0
  510. package/dist/plugins/condition/components/condition-fields.d.ts +7 -0
  511. package/dist/plugins/condition/components/condition-fields.d.ts.map +1 -0
  512. package/dist/plugins/condition/components/condition-fields.js +8 -0
  513. package/dist/plugins/condition/components/condition-fields.js.map +1 -0
  514. package/dist/plugins/condition/index.d.ts +4 -0
  515. package/dist/plugins/condition/index.d.ts.map +1 -0
  516. package/dist/plugins/condition/index.js +23 -0
  517. package/dist/plugins/condition/index.js.map +1 -0
  518. package/dist/plugins/condition/steps/evaluate.d.ts +15 -0
  519. package/dist/plugins/condition/steps/evaluate.d.ts.map +1 -0
  520. package/dist/plugins/condition/steps/evaluate.js +10 -0
  521. package/dist/plugins/condition/steps/evaluate.js.map +1 -0
  522. package/dist/plugins/database/components/database-query-fields.d.ts +7 -0
  523. package/dist/plugins/database/components/database-query-fields.d.ts.map +1 -0
  524. package/dist/plugins/database/components/database-query-fields.js +18 -0
  525. package/dist/plugins/database/components/database-query-fields.js.map +1 -0
  526. package/dist/plugins/database/index.d.ts +4 -0
  527. package/dist/plugins/database/index.d.ts.map +1 -0
  528. package/dist/plugins/database/index.js +23 -0
  529. package/dist/plugins/database/index.js.map +1 -0
  530. package/dist/plugins/database/steps/query.d.ts +20 -0
  531. package/dist/plugins/database/steps/query.d.ts.map +1 -0
  532. package/dist/plugins/database/steps/query.js +92 -0
  533. package/dist/plugins/database/steps/query.js.map +1 -0
  534. package/dist/plugins/index.d.ts +10 -0
  535. package/dist/plugins/index.d.ts.map +1 -0
  536. package/dist/plugins/index.js +6 -0
  537. package/dist/plugins/index.js.map +1 -0
  538. package/dist/plugins/legacy-mappings.d.ts +2 -0
  539. package/dist/plugins/legacy-mappings.d.ts.map +1 -0
  540. package/dist/plugins/legacy-mappings.js +2 -0
  541. package/dist/plugins/legacy-mappings.js.map +1 -0
  542. package/dist/plugins/loop/components/loop-fields.d.ts +7 -0
  543. package/dist/plugins/loop/components/loop-fields.d.ts.map +1 -0
  544. package/dist/plugins/loop/components/loop-fields.js +8 -0
  545. package/dist/plugins/loop/components/loop-fields.js.map +1 -0
  546. package/dist/plugins/loop/icon.d.ts +4 -0
  547. package/dist/plugins/loop/icon.d.ts.map +1 -0
  548. package/dist/plugins/loop/icon.js +5 -0
  549. package/dist/plugins/loop/icon.js.map +1 -0
  550. package/dist/plugins/loop/index.d.ts +4 -0
  551. package/dist/plugins/loop/index.d.ts.map +1 -0
  552. package/dist/plugins/loop/index.js +52 -0
  553. package/dist/plugins/loop/index.js.map +1 -0
  554. package/dist/plugins/loop/steps/iterate.d.ts +24 -0
  555. package/dist/plugins/loop/steps/iterate.d.ts.map +1 -0
  556. package/dist/plugins/loop/steps/iterate.js +31 -0
  557. package/dist/plugins/loop/steps/iterate.js.map +1 -0
  558. package/dist/plugins/registry.d.ts +136 -0
  559. package/dist/plugins/registry.d.ts.map +1 -0
  560. package/dist/plugins/registry.js +241 -0
  561. package/dist/plugins/registry.js.map +1 -0
  562. package/dist/plugins/switch/icon.d.ts +4 -0
  563. package/dist/plugins/switch/icon.d.ts.map +1 -0
  564. package/dist/plugins/switch/icon.js +5 -0
  565. package/dist/plugins/switch/icon.js.map +1 -0
  566. package/dist/plugins/switch/index.d.ts +4 -0
  567. package/dist/plugins/switch/index.d.ts.map +1 -0
  568. package/dist/plugins/switch/index.js +81 -0
  569. package/dist/plugins/switch/index.js.map +1 -0
  570. package/dist/plugins/switch/steps/evaluate.d.ts +27 -0
  571. package/dist/plugins/switch/steps/evaluate.d.ts.map +1 -0
  572. package/dist/plugins/switch/steps/evaluate.js +81 -0
  573. package/dist/plugins/switch/steps/evaluate.js.map +1 -0
  574. package/dist/scripts/create-plugin.d.ts +3 -0
  575. package/dist/scripts/create-plugin.d.ts.map +1 -0
  576. package/dist/scripts/create-plugin.js +205 -0
  577. package/dist/scripts/create-plugin.js.map +1 -0
  578. package/dist/scripts/discover-plugins.d.ts +3 -0
  579. package/dist/scripts/discover-plugins.d.ts.map +1 -0
  580. package/dist/scripts/discover-plugins.js +729 -0
  581. package/dist/scripts/discover-plugins.js.map +1 -0
  582. package/dist/scripts/migrate-prod.d.ts +2 -0
  583. package/dist/scripts/migrate-prod.d.ts.map +1 -0
  584. package/dist/scripts/migrate-prod.js +17 -0
  585. package/dist/scripts/migrate-prod.js.map +1 -0
  586. package/dist/scripts/nwb.d.ts +3 -0
  587. package/dist/scripts/nwb.d.ts.map +1 -0
  588. package/dist/scripts/nwb.js +33 -0
  589. package/dist/scripts/nwb.js.map +1 -0
  590. package/dist/server/api/handler-utils.d.ts +22 -0
  591. package/dist/server/api/handler-utils.d.ts.map +1 -0
  592. package/dist/server/api/handler-utils.js +42 -0
  593. package/dist/server/api/handler-utils.js.map +1 -0
  594. package/dist/server/api/handlers/ai/generate/route.d.ts +3 -0
  595. package/dist/server/api/handlers/ai/generate/route.d.ts.map +1 -0
  596. package/dist/server/api/handlers/ai/generate/route.js +260 -0
  597. package/dist/server/api/handlers/ai/generate/route.js.map +1 -0
  598. package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts +3 -0
  599. package/dist/server/api/handlers/api-keys/[keyId]/route.d.ts.map +1 -0
  600. package/dist/server/api/handlers/api-keys/[keyId]/route.js +25 -0
  601. package/dist/server/api/handlers/api-keys/[keyId]/route.js.map +1 -0
  602. package/dist/server/api/handlers/api-keys/route.d.ts +3 -0
  603. package/dist/server/api/handlers/api-keys/route.d.ts.map +1 -0
  604. package/dist/server/api/handlers/api-keys/route.js +84 -0
  605. package/dist/server/api/handlers/api-keys/route.js.map +1 -0
  606. package/dist/server/api/handlers/auth/route.d.ts +3 -0
  607. package/dist/server/api/handlers/auth/route.d.ts.map +1 -0
  608. package/dist/server/api/handlers/auth/route.js +14 -0
  609. package/dist/server/api/handlers/auth/route.js.map +1 -0
  610. package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts +16 -0
  611. package/dist/server/api/handlers/integrations/[integrationId]/route.d.ts.map +1 -0
  612. package/dist/server/api/handlers/integrations/[integrationId]/route.js +117 -0
  613. package/dist/server/api/handlers/integrations/[integrationId]/route.js.map +1 -0
  614. package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts +7 -0
  615. package/dist/server/api/handlers/integrations/[integrationId]/test/route.d.ts.map +1 -0
  616. package/dist/server/api/handlers/integrations/[integrationId]/test/route.js +96 -0
  617. package/dist/server/api/handlers/integrations/[integrationId]/test/route.js.map +1 -0
  618. package/dist/server/api/handlers/integrations/route.d.ts +24 -0
  619. package/dist/server/api/handlers/integrations/route.d.ts.map +1 -0
  620. package/dist/server/api/handlers/integrations/route.js +80 -0
  621. package/dist/server/api/handlers/integrations/route.js.map +1 -0
  622. package/dist/server/api/handlers/integrations/test/route.d.ts +12 -0
  623. package/dist/server/api/handlers/integrations/test/route.d.ts.map +1 -0
  624. package/dist/server/api/handlers/integrations/test/route.js +76 -0
  625. package/dist/server/api/handlers/integrations/test/route.js.map +1 -0
  626. package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts +7 -0
  627. package/dist/server/api/handlers/og/workflow/[workflowId]/route.d.ts.map +1 -0
  628. package/dist/server/api/handlers/og/workflow/[workflowId]/route.js +197 -0
  629. package/dist/server/api/handlers/og/workflow/[workflowId]/route.js.map +1 -0
  630. package/dist/server/api/handlers/user/route.d.ts +3 -0
  631. package/dist/server/api/handlers/user/route.d.ts.map +1 -0
  632. package/dist/server/api/handlers/user/route.js +81 -0
  633. package/dist/server/api/handlers/user/route.js.map +1 -0
  634. package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts +3 -0
  635. package/dist/server/api/handlers/workflow/[workflowId]/cron/route.d.ts.map +1 -0
  636. package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js +65 -0
  637. package/dist/server/api/handlers/workflow/[workflowId]/cron/route.js.map +1 -0
  638. package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts +3 -0
  639. package/dist/server/api/handlers/workflow/[workflowId]/execute/route.d.ts.map +1 -0
  640. package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js +72 -0
  641. package/dist/server/api/handlers/workflow/[workflowId]/execute/route.js.map +1 -0
  642. package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts +3 -0
  643. package/dist/server/api/handlers/workflows/[workflowId]/code/route.d.ts.map +1 -0
  644. package/dist/server/api/handlers/workflows/[workflowId]/code/route.js +24 -0
  645. package/dist/server/api/handlers/workflows/[workflowId]/code/route.js.map +1 -0
  646. package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts +3 -0
  647. package/dist/server/api/handlers/workflows/[workflowId]/cron/route.d.ts.map +1 -0
  648. package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js +65 -0
  649. package/dist/server/api/handlers/workflows/[workflowId]/cron/route.js.map +1 -0
  650. package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts +3 -0
  651. package/dist/server/api/handlers/workflows/[workflowId]/download/route.d.ts.map +1 -0
  652. package/dist/server/api/handlers/workflows/[workflowId]/download/route.js +24 -0
  653. package/dist/server/api/handlers/workflows/[workflowId]/download/route.js.map +1 -0
  654. package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts +3 -0
  655. package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.d.ts.map +1 -0
  656. package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js +89 -0
  657. package/dist/server/api/handlers/workflows/[workflowId]/duplicate/route.js.map +1 -0
  658. package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts +3 -0
  659. package/dist/server/api/handlers/workflows/[workflowId]/execute/route.d.ts.map +1 -0
  660. package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js +72 -0
  661. package/dist/server/api/handlers/workflows/[workflowId]/execute/route.js.map +1 -0
  662. package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts +3 -0
  663. package/dist/server/api/handlers/workflows/[workflowId]/executions/route.d.ts.map +1 -0
  664. package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js +63 -0
  665. package/dist/server/api/handlers/workflows/[workflowId]/executions/route.js.map +1 -0
  666. package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts +3 -0
  667. package/dist/server/api/handlers/workflows/[workflowId]/route.d.ts.map +1 -0
  668. package/dist/server/api/handlers/workflows/[workflowId]/route.js +132 -0
  669. package/dist/server/api/handlers/workflows/[workflowId]/route.js.map +1 -0
  670. package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts +3 -0
  671. package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.d.ts.map +1 -0
  672. package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js +111 -0
  673. package/dist/server/api/handlers/workflows/[workflowId]/webhook/route.js.map +1 -0
  674. package/dist/server/api/handlers/workflows/create/route.d.ts +3 -0
  675. package/dist/server/api/handlers/workflows/create/route.d.ts.map +1 -0
  676. package/dist/server/api/handlers/workflows/create/route.js +67 -0
  677. package/dist/server/api/handlers/workflows/create/route.js.map +1 -0
  678. package/dist/server/api/handlers/workflows/current/route.d.ts +3 -0
  679. package/dist/server/api/handlers/workflows/current/route.d.ts.map +1 -0
  680. package/dist/server/api/handlers/workflows/current/route.js +89 -0
  681. package/dist/server/api/handlers/workflows/current/route.js.map +1 -0
  682. package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts +3 -0
  683. package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.d.ts.map +1 -0
  684. package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js +38 -0
  685. package/dist/server/api/handlers/workflows/executions/[executionId]/logs/route.js.map +1 -0
  686. package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts +3 -0
  687. package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.d.ts.map +1 -0
  688. package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js +35 -0
  689. package/dist/server/api/handlers/workflows/executions/[executionId]/status/route.js.map +1 -0
  690. package/dist/server/api/handlers/workflows/route.d.ts +3 -0
  691. package/dist/server/api/handlers/workflows/route.d.ts.map +1 -0
  692. package/dist/server/api/handlers/workflows/route.js +22 -0
  693. package/dist/server/api/handlers/workflows/route.js.map +1 -0
  694. package/dist/server/api/routes.d.ts +4 -0
  695. package/dist/server/api/routes.d.ts.map +1 -0
  696. package/dist/server/api/routes.js +51 -0
  697. package/dist/server/api/routes.js.map +1 -0
  698. package/dist/server/api/types.d.ts +41 -0
  699. package/dist/server/api/types.d.ts.map +1 -0
  700. package/dist/server/api/types.js +2 -0
  701. package/dist/server/api/types.js.map +1 -0
  702. package/dist/server/api/workflows.d.ts +8 -0
  703. package/dist/server/api/workflows.d.ts.map +1 -0
  704. package/dist/server/api/workflows.js +75 -0
  705. package/dist/server/api/workflows.js.map +1 -0
  706. package/dist/server/db/migrate.d.ts +2 -0
  707. package/dist/server/db/migrate.d.ts.map +1 -0
  708. package/dist/server/db/migrate.js +2 -0
  709. package/dist/server/db/migrate.js.map +1 -0
  710. package/dist/server/db/schema.d.ts +1465 -0
  711. package/dist/server/db/schema.d.ts.map +1 -0
  712. package/dist/server/db/schema.js +15 -0
  713. package/dist/server/db/schema.js.map +1 -0
  714. package/dist/server/index.d.ts +11 -0
  715. package/dist/server/index.d.ts.map +1 -0
  716. package/dist/server/index.js +9 -0
  717. package/dist/server/index.js.map +1 -0
  718. package/dist/server/plugin.d.ts +17 -0
  719. package/dist/server/plugin.d.ts.map +1 -0
  720. package/dist/server/plugin.js +27 -0
  721. package/dist/server/plugin.js.map +1 -0
  722. package/dist/server/utils.d.ts +3 -0
  723. package/dist/server/utils.d.ts.map +1 -0
  724. package/dist/server/utils.js +7 -0
  725. package/dist/server/utils.js.map +1 -0
  726. package/dist/styles/globals.css +254 -0
  727. package/package.json +130 -0
  728. package/src/plugins/_template/credentials.ts.txt +10 -0
  729. package/src/plugins/_template/icon.tsx.txt +28 -0
  730. package/src/plugins/_template/index.ts.txt +122 -0
  731. package/src/plugins/_template/steps/action.ts.txt +103 -0
  732. package/src/plugins/_template/test.ts.txt +57 -0
  733. package/src/plugins/condition/components/condition-fields.tsx +32 -0
  734. package/src/plugins/condition/index.ts +27 -0
  735. package/src/plugins/condition/steps/evaluate.ts +32 -0
  736. package/src/plugins/database/components/database-query-fields.tsx +58 -0
  737. package/src/plugins/database/index.ts +27 -0
  738. package/src/plugins/database/steps/query.ts +141 -0
  739. package/src/plugins/index.ts +37 -0
  740. package/src/plugins/legacy-mappings.ts +11 -0
  741. package/src/plugins/loop/components/loop-fields.tsx +46 -0
  742. package/src/plugins/loop/icon.tsx +21 -0
  743. package/src/plugins/loop/index.ts +57 -0
  744. package/src/plugins/loop/steps/iterate.ts +74 -0
  745. package/src/plugins/loop/workflow-executor.patch +241 -0
  746. package/src/plugins/registry.ts +660 -0
  747. package/src/plugins/switch/icon.tsx +23 -0
  748. package/src/plugins/switch/index.ts +87 -0
  749. package/src/plugins/switch/steps/evaluate.ts +139 -0
  750. package/src/plugins/switch/workflow-executor.patch +130 -0
  751. package/src/scripts/create-plugin.ts +301 -0
  752. package/src/scripts/discover-plugins.ts +1122 -0
  753. package/src/scripts/migrate-prod.ts +16 -0
  754. package/src/scripts/nwb.ts +54 -0
@@ -0,0 +1,786 @@
1
+ import { findActionById, flattenConfigFields } from "../plugins/registry.js";
2
+ import { analyzeNodeUsage, buildAccessPath, getStepInfo, removeInvisibleChars, TEMPLATE_PATTERN, toFriendlyVarName, toTypeScriptLiteral, } from "./workflow-codegen-shared.js";
3
+ const CONST_ASSIGNMENT_PATTERN = /^(\s*)(const\s+\w+\s*=\s*)(.*)$/;
4
+ export function generateWorkflowCode(nodes, edges, options = {}) {
5
+ const { functionName = "executeWorkflow" } = options;
6
+ const usedNodeOutputs = analyzeNodeUsage(nodes);
7
+ const imports = new Set();
8
+ const nodeMap = new Map(nodes.map((n) => [n.id, n]));
9
+ const edgesBySource = new Map();
10
+ for (const edge of edges) {
11
+ const targets = edgesBySource.get(edge.source) || [];
12
+ targets.push(edge.target);
13
+ edgesBySource.set(edge.source, targets);
14
+ }
15
+ const nodesWithIncoming = new Set(edges.map((e) => e.target));
16
+ const triggerNodes = nodes.filter((node) => node.data.type === "trigger" && !nodesWithIncoming.has(node.id));
17
+ const inputIsUsed = triggerNodes.some((trigger) => usedNodeOutputs.has(trigger.id));
18
+ const codeLines = [];
19
+ const visited = new Set();
20
+ const functionSignature = inputIsUsed
21
+ ? `export async function ${functionName}<TInput>(input: TInput) {`
22
+ : `export async function ${functionName}() {`;
23
+ codeLines.push(functionSignature);
24
+ codeLines.push(` "use workflow";`);
25
+ codeLines.push("");
26
+ const nodeIdToVarName = new Map();
27
+ const usedVarNames = new Set();
28
+ for (const node of nodes) {
29
+ let varName;
30
+ if (node.data.type === "action") {
31
+ const actionType = node.data.config?.actionType;
32
+ const label = node.data.label || "";
33
+ const baseVarName = toFriendlyVarName(label, actionType);
34
+ varName = baseVarName;
35
+ let counter = 1;
36
+ while (usedVarNames.has(varName)) {
37
+ varName = `${baseVarName}${counter}`;
38
+ counter += 1;
39
+ }
40
+ usedVarNames.add(varName);
41
+ }
42
+ else {
43
+ varName = "input";
44
+ }
45
+ nodeIdToVarName.set(node.id, varName);
46
+ }
47
+ function processAtFormat(trimmed, match) {
48
+ const withoutAt = trimmed.substring(1);
49
+ const colonIndex = withoutAt.indexOf(":");
50
+ if (colonIndex === -1) {
51
+ return match;
52
+ }
53
+ const nodeId = withoutAt.substring(0, colonIndex);
54
+ const rest = withoutAt.substring(colonIndex + 1);
55
+ const dotIndex = rest.indexOf(".");
56
+ const fieldPath = dotIndex !== -1 ? rest.substring(dotIndex + 1) : "";
57
+ const varName = nodeIdToVarName.get(nodeId);
58
+ if (!varName) {
59
+ return match;
60
+ }
61
+ if (!fieldPath) {
62
+ return `\${${varName}}`;
63
+ }
64
+ const accessPath = buildAccessPath(fieldPath);
65
+ return `\${${varName}${accessPath}}`;
66
+ }
67
+ function processDollarFormat(trimmed, match) {
68
+ const withoutDollar = trimmed.substring(1);
69
+ const parts = withoutDollar.split(".");
70
+ const nodeId = parts[0];
71
+ const fieldPath = parts.slice(1).join(".");
72
+ const varName = nodeIdToVarName.get(nodeId);
73
+ if (!varName) {
74
+ return match;
75
+ }
76
+ if (!fieldPath) {
77
+ return `\${${varName}}`;
78
+ }
79
+ const accessPath = buildAccessPath(fieldPath);
80
+ return `\${${varName}${accessPath}}`;
81
+ }
82
+ function processAtFormatForExpression(trimmed, match) {
83
+ const withoutAt = trimmed.substring(1);
84
+ const colonIndex = withoutAt.indexOf(":");
85
+ if (colonIndex === -1) {
86
+ return match;
87
+ }
88
+ const nodeId = withoutAt.substring(0, colonIndex);
89
+ const rest = withoutAt.substring(colonIndex + 1);
90
+ const dotIndex = rest.indexOf(".");
91
+ const fieldPath = dotIndex !== -1 ? rest.substring(dotIndex + 1) : "";
92
+ const varName = nodeIdToVarName.get(nodeId);
93
+ if (!varName) {
94
+ return match;
95
+ }
96
+ if (!fieldPath) {
97
+ return varName;
98
+ }
99
+ const accessPath = buildAccessPath(fieldPath);
100
+ return `${varName}${accessPath}`;
101
+ }
102
+ function processDollarFormatForExpression(trimmed, match) {
103
+ const withoutDollar = trimmed.substring(1);
104
+ const parts = withoutDollar.split(".");
105
+ const nodeId = parts[0];
106
+ const fieldPath = parts.slice(1).join(".");
107
+ const varName = nodeIdToVarName.get(nodeId);
108
+ if (!varName) {
109
+ return match;
110
+ }
111
+ if (!fieldPath) {
112
+ return varName;
113
+ }
114
+ const accessPath = buildAccessPath(fieldPath);
115
+ return `${varName}${accessPath}`;
116
+ }
117
+ function convertTemplateToJS(template) {
118
+ if (!template || typeof template !== "string") {
119
+ return template;
120
+ }
121
+ return template.replace(TEMPLATE_PATTERN, (match, expression) => {
122
+ const trimmed = expression.trim();
123
+ if (trimmed.startsWith("@")) {
124
+ return processAtFormat(trimmed, match);
125
+ }
126
+ if (trimmed.startsWith("$")) {
127
+ return processDollarFormat(trimmed, match);
128
+ }
129
+ return match;
130
+ });
131
+ }
132
+ function convertConditionToJS(condition) {
133
+ if (!condition || typeof condition !== "string") {
134
+ return condition;
135
+ }
136
+ const cleaned = removeInvisibleChars(condition);
137
+ const converted = cleaned.replace(TEMPLATE_PATTERN, (match, expression) => {
138
+ const trimmed = expression.trim();
139
+ if (trimmed.startsWith("@")) {
140
+ return processAtFormatForExpression(trimmed, match);
141
+ }
142
+ if (trimmed.startsWith("$")) {
143
+ return processDollarFormatForExpression(trimmed, match);
144
+ }
145
+ return match;
146
+ });
147
+ return removeInvisibleChars(converted);
148
+ }
149
+ function generateEmailActionCode(node, indent, varName) {
150
+ const stepInfo = getStepInfo("Send Email");
151
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
152
+ const config = node.data.config || {};
153
+ const emailTo = config.emailTo || "user@example.com";
154
+ const emailSubject = config.emailSubject || "Notification";
155
+ const emailBody = config.emailBody || "No content";
156
+ const convertedEmailTo = convertTemplateToJS(emailTo);
157
+ const convertedSubject = convertTemplateToJS(emailSubject);
158
+ const convertedBody = convertTemplateToJS(emailBody);
159
+ const hasTemplateRefs = (str) => str.includes("${");
160
+ const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
161
+ const emailToValue = hasTemplateRefs(convertedEmailTo)
162
+ ? `\`${escapeForOuterTemplate(convertedEmailTo).replace(/`/g, "\\`")}\``
163
+ : `'${emailTo.replace(/'/g, "\\'")}'`;
164
+ const subjectValue = hasTemplateRefs(convertedSubject)
165
+ ? `\`${escapeForOuterTemplate(convertedSubject).replace(/`/g, "\\`")}\``
166
+ : `'${emailSubject.replace(/'/g, "\\'")}'`;
167
+ const bodyValue = hasTemplateRefs(convertedBody)
168
+ ? `\`${escapeForOuterTemplate(convertedBody).replace(/`/g, "\\`")}\``
169
+ : `'${emailBody.replace(/'/g, "\\'")}'`;
170
+ return [
171
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
172
+ `${indent} emailTo: ${emailToValue},`,
173
+ `${indent} emailSubject: ${subjectValue},`,
174
+ `${indent} emailBody: ${bodyValue},`,
175
+ `${indent}});`,
176
+ ];
177
+ }
178
+ function generateTicketActionCode(node, indent, varName) {
179
+ const stepInfo = getStepInfo("Create Ticket");
180
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
181
+ const config = node.data.config || {};
182
+ const ticketTitle = config.ticketTitle || "New Ticket";
183
+ const ticketDescription = config.ticketDescription || "";
184
+ const convertedTitle = convertTemplateToJS(ticketTitle);
185
+ const convertedDescription = convertTemplateToJS(ticketDescription);
186
+ const hasTemplateRefs = (str) => str.includes("${");
187
+ const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
188
+ const titleValue = hasTemplateRefs(convertedTitle)
189
+ ? `\`${escapeForOuterTemplate(convertedTitle).replace(/`/g, "\\`")}\``
190
+ : `'${ticketTitle.replace(/'/g, "\\'")}'`;
191
+ const descValue = hasTemplateRefs(convertedDescription)
192
+ ? `\`${escapeForOuterTemplate(convertedDescription).replace(/`/g, "\\`")}\``
193
+ : `'${ticketDescription.replace(/'/g, "\\'")}'`;
194
+ return [
195
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
196
+ `${indent} ticketTitle: ${titleValue},`,
197
+ `${indent} ticketDescription: ${descValue},`,
198
+ `${indent}});`,
199
+ ];
200
+ }
201
+ function generateDatabaseActionCode(node, indent, varName) {
202
+ const stepInfo = getStepInfo("Database Query");
203
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
204
+ const config = node.data.config || {};
205
+ const dbQuery = config.dbQuery || "";
206
+ const dataSource = config.dataSource || "";
207
+ const tableName = config.dbTable ||
208
+ config.tableName ||
209
+ "your_table";
210
+ const lines = [
211
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
212
+ ];
213
+ if (dataSource) {
214
+ lines.push(`${indent} dataSource: { name: "${dataSource}" },`);
215
+ }
216
+ else {
217
+ lines.push(`${indent} dataSource: {},`);
218
+ }
219
+ if (dbQuery) {
220
+ const convertedQuery = convertTemplateToJS(dbQuery);
221
+ const hasTemplateRefs = convertedQuery.includes("${");
222
+ const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
223
+ const queryValue = hasTemplateRefs
224
+ ? `\`${escapeForOuterTemplate(convertedQuery).replace(/`/g, "\\`")}\``
225
+ : `\`${dbQuery.replace(/`/g, "\\`")}\``;
226
+ lines.push(`${indent} query: ${queryValue},`);
227
+ }
228
+ else {
229
+ lines.push(`${indent} query: "${tableName}",`);
230
+ }
231
+ lines.push(`${indent}});`);
232
+ return lines;
233
+ }
234
+ function generateHTTPActionCode(node, indent, varName) {
235
+ const stepInfo = getStepInfo("HTTP Request");
236
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
237
+ const config = node.data.config || {};
238
+ const endpoint = config.endpoint || "https://api.example.com/endpoint";
239
+ const method = config.httpMethod || "POST";
240
+ return [
241
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
242
+ `${indent} url: '${endpoint}',`,
243
+ `${indent} method: '${method}',`,
244
+ `${indent} body: {},`,
245
+ `${indent}});`,
246
+ ];
247
+ }
248
+ function processAiSchema(aiSchema) {
249
+ if (!aiSchema) {
250
+ return null;
251
+ }
252
+ try {
253
+ const parsedSchema = JSON.parse(aiSchema);
254
+ const schemaWithoutIds = Array.isArray(parsedSchema)
255
+ ? parsedSchema.map((field) => {
256
+ const { id: _id, ...rest } = field;
257
+ return rest;
258
+ })
259
+ : parsedSchema;
260
+ return toTypeScriptLiteral(schemaWithoutIds);
261
+ }
262
+ catch {
263
+ return null;
264
+ }
265
+ }
266
+ function generatePromptValue(aiPrompt) {
267
+ const convertedPrompt = convertTemplateToJS(aiPrompt);
268
+ const hasTemplateRefs = convertedPrompt.includes("${");
269
+ const escapeForOuterTemplate = (str) => str.replace(/\$\{/g, "$${");
270
+ if (hasTemplateRefs) {
271
+ return `\`${escapeForOuterTemplate(convertedPrompt).replace(/`/g, "\\`")}\``;
272
+ }
273
+ return `\`${aiPrompt.replace(/`/g, "\\`")}\``;
274
+ }
275
+ function generateAiTextActionCode(node, indent, varName) {
276
+ const stepInfo = getStepInfo("Generate Text");
277
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
278
+ const config = node.data.config || {};
279
+ const aiPrompt = config.aiPrompt || "Generate a summary";
280
+ const aiModel = config.aiModel || "meta/llama-4-scout";
281
+ const aiFormat = config.aiFormat || "text";
282
+ const aiSchema = config.aiSchema;
283
+ const promptValue = generatePromptValue(aiPrompt);
284
+ const lines = [
285
+ `${indent}// Generate text using AI`,
286
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
287
+ `${indent} model: "${aiModel}",`,
288
+ `${indent} prompt: ${promptValue},`,
289
+ ];
290
+ if (aiFormat === "object") {
291
+ lines.push(`${indent} format: "object",`);
292
+ const schemaString = processAiSchema(aiSchema);
293
+ if (schemaString) {
294
+ lines.push(`${indent} schema: ${schemaString},`);
295
+ }
296
+ }
297
+ lines.push(`${indent}});`);
298
+ return lines;
299
+ }
300
+ function generateAiImageActionCode(node, indent, varName) {
301
+ imports.add("import { experimental_generateImage as generateImage } from 'ai';");
302
+ const imagePrompt = node.data.config?.imagePrompt || "A beautiful landscape";
303
+ const imageModel = node.data.config?.imageModel || "google/imagen-4.0-generate";
304
+ return [
305
+ `${indent}// Generate image using AI`,
306
+ `${indent}const ${varName} = await generateImage({`,
307
+ `${indent} model: "${imageModel}",`,
308
+ `${indent} prompt: \`${imagePrompt}\`,`,
309
+ `${indent} size: "1024x1024",`,
310
+ `${indent}});`,
311
+ ];
312
+ }
313
+ function formatTemplateValue(value) {
314
+ const converted = convertTemplateToJS(value);
315
+ const hasTemplateRefs = converted.includes("${");
316
+ const escaped = converted.replace(/\$\{/g, "$${").replace(/`/g, "\\`");
317
+ return hasTemplateRefs
318
+ ? `\`${escaped}\``
319
+ : `\`${value.replace(/`/g, "\\`")}\``;
320
+ }
321
+ function generateFirecrawlActionCode(node, indent, varName) {
322
+ const actionType = node.data.config?.actionType;
323
+ const stepInfo = getStepInfo(actionType);
324
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
325
+ const config = node.data.config || {};
326
+ const url = config.url || "";
327
+ const query = config.query || "";
328
+ const limit = config.limit ? Number(config.limit) : undefined;
329
+ const lines = [
330
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
331
+ ];
332
+ if (url) {
333
+ lines.push(`${indent} url: ${formatTemplateValue(url)},`);
334
+ }
335
+ if (query) {
336
+ lines.push(`${indent} query: ${formatTemplateValue(query)},`);
337
+ }
338
+ if (limit) {
339
+ lines.push(`${indent} limit: ${limit},`);
340
+ }
341
+ lines.push(`${indent}});`);
342
+ return lines;
343
+ }
344
+ function generateV0CreateChatActionCode(node, indent, varName) {
345
+ const stepInfo = getStepInfo("Create Chat");
346
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
347
+ const config = node.data.config || {};
348
+ const message = config.message || "";
349
+ const system = config.system || "";
350
+ const lines = [
351
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
352
+ `${indent} message: ${formatTemplateValue(message)},`,
353
+ ];
354
+ if (system) {
355
+ lines.push(`${indent} system: ${formatTemplateValue(system)},`);
356
+ }
357
+ lines.push(`${indent}});`);
358
+ return lines;
359
+ }
360
+ function generateV0SendMessageActionCode(node, indent, varName) {
361
+ const stepInfo = getStepInfo("Send Message");
362
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
363
+ const config = node.data.config || {};
364
+ const chatId = config.chatId || "";
365
+ const message = config.message || "";
366
+ const lines = [
367
+ `${indent}const ${varName} = await ${stepInfo.functionName}({`,
368
+ `${indent} chatId: ${formatTemplateValue(chatId)},`,
369
+ `${indent} message: ${formatTemplateValue(message)},`,
370
+ `${indent}});`,
371
+ ];
372
+ return lines;
373
+ }
374
+ function formatFieldValue(fieldType, value, indent, key) {
375
+ const fieldTypeFormatters = {
376
+ "template-input": () => `${indent} ${key}: ${formatTemplateValue(String(value))},`,
377
+ "template-textarea": () => `${indent} ${key}: ${formatTemplateValue(String(value))},`,
378
+ number: () => `${indent} ${key}: ${value},`,
379
+ select: () => `${indent} ${key}: "${value}",`,
380
+ "schema-builder": () => `${indent} ${key}: ${JSON.stringify(value)},`,
381
+ };
382
+ const formatter = fieldTypeFormatters[fieldType];
383
+ return formatter ? formatter() : `${indent} ${key}: "${value}",`;
384
+ }
385
+ function generatePluginActionCode(node, actionType, indent, varName) {
386
+ const action = findActionById(actionType);
387
+ if (!action) {
388
+ return null;
389
+ }
390
+ const stepInfo = getStepInfo(actionType);
391
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
392
+ const config = node.data.config || {};
393
+ const configFields = flattenConfigFields(action.configFields);
394
+ const paramLines = [];
395
+ for (const field of configFields) {
396
+ const value = config[field.key];
397
+ if (value === undefined || value === null || value === "") {
398
+ continue;
399
+ }
400
+ paramLines.push(formatFieldValue(field.type, value, indent, field.key));
401
+ }
402
+ const lines = [];
403
+ if (paramLines.length > 0) {
404
+ lines.push(`${indent}const ${varName} = await ${stepInfo.functionName}({`);
405
+ lines.push(...paramLines);
406
+ lines.push(`${indent}});`);
407
+ }
408
+ else {
409
+ lines.push(`${indent}const ${varName} = await ${stepInfo.functionName}({});`);
410
+ }
411
+ return lines;
412
+ }
413
+ function generateActionNodeCode(node, nodeId, indent, varName) {
414
+ const actionType = node.data.config?.actionType;
415
+ const actionLabel = node.data.label || actionType || "Unknown Action";
416
+ const lines = [`${indent}// Action: ${actionLabel}`];
417
+ if (node.data.description) {
418
+ lines.push(`${indent}// ${node.data.description}`);
419
+ }
420
+ const outputIsUsed = usedNodeOutputs.has(nodeId);
421
+ function processAwaitLine(line) {
422
+ const match = CONST_ASSIGNMENT_PATTERN.exec(line);
423
+ if (match) {
424
+ const [, lineIndent, , rest] = match;
425
+ return `${lineIndent}${rest}`;
426
+ }
427
+ return line;
428
+ }
429
+ function processConstLine(line) {
430
+ const match = CONST_ASSIGNMENT_PATTERN.exec(line);
431
+ if (match) {
432
+ const [, lineIndent, , rest] = match;
433
+ return `${lineIndent}void ${rest}`;
434
+ }
435
+ return line;
436
+ }
437
+ function removeVariableAssignment(actionLines) {
438
+ const result = [];
439
+ for (const line of actionLines) {
440
+ if (line.includes("await")) {
441
+ result.push(processAwaitLine(line));
442
+ }
443
+ else if (line.trim().startsWith("const") && line.includes("{")) {
444
+ result.push(processConstLine(line));
445
+ }
446
+ else {
447
+ result.push(line);
448
+ }
449
+ }
450
+ return result;
451
+ }
452
+ const wrapActionCall = (actionLines) => {
453
+ if (outputIsUsed) {
454
+ return actionLines;
455
+ }
456
+ return removeVariableAssignment(actionLines);
457
+ };
458
+ if (actionType === "Generate Text") {
459
+ lines.push(...wrapActionCall(generateAiTextActionCode(node, indent, varName)));
460
+ }
461
+ else if (actionType === "Generate Image") {
462
+ lines.push(...wrapActionCall(generateAiImageActionCode(node, indent, varName)));
463
+ }
464
+ else if (actionType === "Send Email") {
465
+ lines.push(...wrapActionCall(generateEmailActionCode(node, indent, varName)));
466
+ }
467
+ else if (actionType === "Create Ticket") {
468
+ lines.push(...wrapActionCall(generateTicketActionCode(node, indent, varName)));
469
+ }
470
+ else if (actionType === "Scrape" || actionType === "Search") {
471
+ lines.push(...wrapActionCall(generateFirecrawlActionCode(node, indent, varName)));
472
+ }
473
+ else if (actionType === "Create Chat") {
474
+ lines.push(...wrapActionCall(generateV0CreateChatActionCode(node, indent, varName)));
475
+ }
476
+ else if (actionType === "Send Message") {
477
+ lines.push(...wrapActionCall(generateV0SendMessageActionCode(node, indent, varName)));
478
+ }
479
+ else if (actionType === "Database Query") {
480
+ lines.push(...wrapActionCall(generateDatabaseActionCode(node, indent, varName)));
481
+ }
482
+ else if (actionType === "HTTP Request") {
483
+ lines.push(...wrapActionCall(generateHTTPActionCode(node, indent, varName)));
484
+ }
485
+ else {
486
+ const pluginCode = generatePluginActionCode(node, actionType, indent, varName);
487
+ if (pluginCode) {
488
+ lines.push(...wrapActionCall(pluginCode));
489
+ }
490
+ else if (outputIsUsed) {
491
+ lines.push(`${indent}// TODO: Implement action type "${actionType}"`);
492
+ lines.push(`${indent}const ${varName} = { status: 'pending', actionType: "${actionType}" };`);
493
+ }
494
+ else {
495
+ lines.push(`${indent}// TODO: Implement action type "${actionType}"`);
496
+ lines.push(`${indent}void ({ status: 'pending', actionType: "${actionType}" });`);
497
+ }
498
+ }
499
+ return lines;
500
+ }
501
+ function generateConditionNodeCode(node, nodeId, indent) {
502
+ const lines = [`${indent}// Condition: ${node.data.label}`];
503
+ if (node.data.description) {
504
+ lines.push(`${indent}// ${node.data.description}`);
505
+ }
506
+ const condition = node.data.config?.condition;
507
+ const nextNodes = edgesBySource.get(nodeId) || [];
508
+ if (nextNodes.length > 0) {
509
+ const trueNode = nextNodes[0];
510
+ const falseNode = nextNodes[1];
511
+ const convertedCondition = condition
512
+ ? convertConditionToJS(condition)
513
+ : "true";
514
+ lines.push(`${indent}if (${convertedCondition}) {`);
515
+ if (trueNode) {
516
+ const trueNodeCode = generateNodeCode(trueNode, `${indent} `);
517
+ lines.push(...trueNodeCode);
518
+ }
519
+ if (falseNode) {
520
+ lines.push(`${indent}} else {`);
521
+ const falseNodeCode = generateNodeCode(falseNode, `${indent} `);
522
+ lines.push(...falseNodeCode);
523
+ }
524
+ lines.push(`${indent}}`);
525
+ }
526
+ return lines;
527
+ }
528
+ function processTriggerNode(nodeId, indent) {
529
+ const nextNodes = edgesBySource.get(nodeId) || [];
530
+ const lines = generateParallelNodeCode(nextNodes, indent);
531
+ return { lines, wasSkipped: true };
532
+ }
533
+ function processActionNode(node, nodeId, varName, indent) {
534
+ const lines = [];
535
+ const actionType = node.data.config?.actionType;
536
+ if (actionType === "Condition") {
537
+ lines.push(...generateConditionNodeCode(node, nodeId, indent));
538
+ return lines;
539
+ }
540
+ lines.push(...generateActionNodeCode(node, nodeId, indent, varName));
541
+ return lines;
542
+ }
543
+ function generateBranchCode(nodeId, indent, branchVisited) {
544
+ if (branchVisited.has(nodeId)) {
545
+ return [];
546
+ }
547
+ branchVisited.add(nodeId);
548
+ const node = nodeMap.get(nodeId);
549
+ if (!node) {
550
+ return [];
551
+ }
552
+ const lines = [];
553
+ if (node.data.type === "action") {
554
+ const actionType = node.data.config?.actionType;
555
+ if (actionType === "Condition") {
556
+ lines.push(...generateConditionBranchCode(node, nodeId, indent, branchVisited));
557
+ }
558
+ else {
559
+ lines.push(...generateActionCallCode(node, indent));
560
+ const children = edgesBySource.get(nodeId) || [];
561
+ if (children.length > 0) {
562
+ lines.push("");
563
+ lines.push(...generateChildrenCode(children, indent, branchVisited));
564
+ }
565
+ }
566
+ }
567
+ return lines;
568
+ }
569
+ function generateConditionBranchCode(node, nodeId, indent, branchVisited) {
570
+ const lines = [`${indent}// Condition: ${node.data.label}`];
571
+ const condition = node.data.config?.condition;
572
+ const nextNodes = edgesBySource.get(nodeId) || [];
573
+ if (nextNodes.length > 0) {
574
+ const convertedCondition = condition
575
+ ? convertConditionToJS(condition)
576
+ : "true";
577
+ lines.push(`${indent}if (${convertedCondition}) {`);
578
+ if (nextNodes[0]) {
579
+ lines.push(...generateBranchCode(nextNodes[0], `${indent} `, branchVisited));
580
+ }
581
+ if (nextNodes[1]) {
582
+ lines.push(`${indent}} else {`);
583
+ lines.push(...generateBranchCode(nextNodes[1], `${indent} `, branchVisited));
584
+ }
585
+ lines.push(`${indent}}`);
586
+ }
587
+ return lines;
588
+ }
589
+ function generateActionCallCode(node, indent) {
590
+ const actionType = node.data.config?.actionType;
591
+ const actionLabel = node.data.label || actionType || "Unknown Action";
592
+ const stepInfo = getStepInfo(actionType);
593
+ const configParams = buildActionConfigParams(node, `${indent} `);
594
+ imports.add(`import { ${stepInfo.functionName} } from '${stepInfo.importPath}';`);
595
+ const lines = [`${indent}// ${actionLabel}`];
596
+ if (configParams.length > 0) {
597
+ lines.push(`${indent}await ${stepInfo.functionName}({`);
598
+ lines.push(...configParams);
599
+ lines.push(`${indent}});`);
600
+ }
601
+ else {
602
+ lines.push(`${indent}await ${stepInfo.functionName}({});`);
603
+ }
604
+ return lines;
605
+ }
606
+ function generateChildrenCode(childIds, indent, branchVisited) {
607
+ const unvisited = childIds.filter((id) => !branchVisited.has(id));
608
+ if (unvisited.length === 0) {
609
+ return [];
610
+ }
611
+ if (unvisited.length === 1) {
612
+ return generateBranchCode(unvisited[0], indent, branchVisited);
613
+ }
614
+ const lines = [`${indent}await Promise.all([`];
615
+ for (let i = 0; i < unvisited.length; i++) {
616
+ const childId = unvisited[i];
617
+ const isLast = i === unvisited.length - 1;
618
+ const comma = isLast ? "" : ",";
619
+ const childBranchVisited = new Set(branchVisited);
620
+ const branchCode = generateBranchCode(childId, `${indent} `, childBranchVisited);
621
+ if (branchCode.length > 0) {
622
+ lines.push(`${indent} (async () => {`);
623
+ lines.push(...branchCode);
624
+ lines.push(`${indent} })()${comma}`);
625
+ }
626
+ }
627
+ lines.push(`${indent}]);`);
628
+ return lines;
629
+ }
630
+ function generateAsyncIIFEBranch(nodeId, indent, isLast) {
631
+ const branchVisited = new Set(visited);
632
+ branchVisited.delete(nodeId);
633
+ const branchCode = generateBranchCode(nodeId, `${indent} `, branchVisited);
634
+ const comma = isLast ? "" : ",";
635
+ if (branchCode.length === 0) {
636
+ return [];
637
+ }
638
+ return [
639
+ `${indent} (async () => {`,
640
+ ...branchCode,
641
+ `${indent} })()${comma}`,
642
+ ];
643
+ }
644
+ function generateParallelNodeCode(nodeIds, indent) {
645
+ if (nodeIds.length === 0) {
646
+ return [];
647
+ }
648
+ const unvisited = nodeIds.filter((id) => !visited.has(id) && nodeMap.get(id)?.data.type === "action");
649
+ if (unvisited.length === 0) {
650
+ return [];
651
+ }
652
+ if (unvisited.length === 1) {
653
+ const branchVisited = new Set(visited);
654
+ visited.add(unvisited[0]);
655
+ return generateBranchCode(unvisited[0], indent, branchVisited);
656
+ }
657
+ for (const id of unvisited) {
658
+ visited.add(id);
659
+ }
660
+ const lines = [`${indent}await Promise.all([`];
661
+ for (let i = 0; i < unvisited.length; i++) {
662
+ lines.push(...generateAsyncIIFEBranch(unvisited[i], indent, i === unvisited.length - 1));
663
+ }
664
+ lines.push(`${indent}]);`);
665
+ return lines;
666
+ }
667
+ function buildPluginConfigParams(config, actionType, indent) {
668
+ const action = findActionById(actionType);
669
+ if (!action) {
670
+ return [];
671
+ }
672
+ const params = [];
673
+ for (const field of flattenConfigFields(action.configFields)) {
674
+ const value = config[field.key];
675
+ if (value === undefined || value === null || value === "") {
676
+ continue;
677
+ }
678
+ params.push(formatFieldValue(field.type, value, indent, field.key));
679
+ }
680
+ return params;
681
+ }
682
+ const EXCLUDED_CONFIG_KEYS = new Set(["actionType", "integrationId"]);
683
+ function buildFallbackConfigParams(config, indent) {
684
+ const params = [];
685
+ for (const [key, value] of Object.entries(config)) {
686
+ if (EXCLUDED_CONFIG_KEYS.has(key) ||
687
+ value === undefined ||
688
+ value === null) {
689
+ continue;
690
+ }
691
+ if (typeof value === "string") {
692
+ params.push(`${indent}${key}: ${formatTemplateValue(value)},`);
693
+ }
694
+ else if (typeof value === "number" || typeof value === "boolean") {
695
+ params.push(`${indent}${key}: ${value},`);
696
+ }
697
+ else {
698
+ params.push(`${indent}${key}: ${JSON.stringify(value)},`);
699
+ }
700
+ }
701
+ return params;
702
+ }
703
+ function buildActionConfigParams(node, indent) {
704
+ const actionType = node.data.config?.actionType;
705
+ const config = node.data.config || {};
706
+ const pluginParams = buildPluginConfigParams(config, actionType, indent);
707
+ if (pluginParams.length > 0) {
708
+ return pluginParams;
709
+ }
710
+ return buildFallbackConfigParams(config, indent);
711
+ }
712
+ function processNextNodes(nodeId, currentLines, indent) {
713
+ const nextNodes = edgesBySource.get(nodeId) || [];
714
+ const result = [...currentLines];
715
+ if (currentLines.length > 0 && nextNodes.length > 0) {
716
+ result.push("");
717
+ }
718
+ result.push(...generateParallelNodeCode(nextNodes, indent));
719
+ return result;
720
+ }
721
+ function generateNodeCode(nodeId, indent = " ") {
722
+ if (visited.has(nodeId)) {
723
+ return [`${indent}// Already processed: ${nodeId}`];
724
+ }
725
+ visited.add(nodeId);
726
+ const node = nodeMap.get(nodeId);
727
+ if (!node) {
728
+ return [];
729
+ }
730
+ const varName = nodeIdToVarName.get(nodeId) ||
731
+ `${node.data.type}_${nodeId.replace(/-/g, "_")}`;
732
+ let lines = [];
733
+ switch (node.data.type) {
734
+ case "trigger": {
735
+ const { lines: triggerLines, wasSkipped } = processTriggerNode(nodeId, indent);
736
+ if (wasSkipped) {
737
+ return triggerLines;
738
+ }
739
+ return processNextNodes(nodeId, triggerLines, indent);
740
+ }
741
+ case "action": {
742
+ const actionLines = processActionNode(node, nodeId, varName, indent);
743
+ const actionType = node.data.config?.actionType;
744
+ if (actionType === "Condition") {
745
+ return actionLines;
746
+ }
747
+ lines = actionLines;
748
+ break;
749
+ }
750
+ default:
751
+ lines.push(`${indent}// Unknown node type: ${node.data.type}`);
752
+ break;
753
+ }
754
+ return processNextNodes(nodeId, lines, indent);
755
+ }
756
+ if (triggerNodes.length === 0) {
757
+ codeLines.push(" // No trigger nodes found");
758
+ }
759
+ else {
760
+ for (const trigger of triggerNodes) {
761
+ const triggerCode = generateNodeCode(trigger.id, " ");
762
+ codeLines.push(...triggerCode);
763
+ }
764
+ }
765
+ codeLines.push("}");
766
+ const importStatements = Array.from(imports).join("\n");
767
+ const code = `${importStatements}\n\n${codeLines.join("\n")}\n`;
768
+ return {
769
+ code,
770
+ functionName,
771
+ imports: Array.from(imports),
772
+ };
773
+ }
774
+ export function generateWorkflowModule(workflowName, nodes, edges, options = {}) {
775
+ const { code } = generateWorkflowCode(nodes, edges, options);
776
+ return `/**
777
+ * Generated Workflow: ${workflowName}
778
+ *
779
+ * This file was automatically generated from a workflow definition.
780
+ * DO NOT EDIT MANUALLY - regenerate from the workflow editor instead.
781
+ */
782
+
783
+ ${code}
784
+ `;
785
+ }
786
+ //# sourceMappingURL=workflow-codegen.js.map