@open-mercato/core 0.7.1-develop.7193.1.910a5b0a1e → 0.7.1-develop.7195.1.b5efd1d51a

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 (1241) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/AGENTS.md +4 -3
  3. package/agentic/standalone-guide.md +1 -1
  4. package/build.mjs +16 -0
  5. package/dist/bootstrap.js +7 -3
  6. package/dist/bootstrap.js.map +2 -2
  7. package/dist/generated/entities/action_log/index.js +2 -0
  8. package/dist/generated/entities/action_log/index.js.map +2 -2
  9. package/dist/generated/entities/user/index.js +2 -0
  10. package/dist/generated/entities/user/index.js.map +2 -2
  11. package/dist/generated/entities/user_task/index.js +14 -0
  12. package/dist/generated/entities/user_task/index.js.map +2 -2
  13. package/dist/generated/entities/workflow_definition/index.js +6 -0
  14. package/dist/generated/entities/workflow_definition/index.js.map +2 -2
  15. package/dist/generated/entities/workflow_definition_draft/index.js +25 -0
  16. package/dist/generated/entities/workflow_definition_draft/index.js.map +7 -0
  17. package/dist/generated/entities/workflow_definition_metric_rollup/index.js +23 -0
  18. package/dist/generated/entities/workflow_definition_metric_rollup/index.js.map +7 -0
  19. package/dist/generated/entities/workflow_instance/index.js +4 -0
  20. package/dist/generated/entities/workflow_instance/index.js.map +2 -2
  21. package/dist/generated/entities.ids.generated.js +4 -1
  22. package/dist/generated/entities.ids.generated.js.map +2 -2
  23. package/dist/generated/entity-fields-registry.js +39 -0
  24. package/dist/generated/entity-fields-registry.js.map +2 -2
  25. package/dist/helpers/integration/workflowsFixtures.js +477 -2
  26. package/dist/helpers/integration/workflowsFixtures.js.map +2 -2
  27. package/dist/helpers/integration/workflowsUi.js +148 -0
  28. package/dist/helpers/integration/workflowsUi.js.map +7 -0
  29. package/dist/modules/attachments/lib/createFromBuffer.js +79 -0
  30. package/dist/modules/attachments/lib/createFromBuffer.js.map +7 -0
  31. package/dist/modules/audit_logs/data/entities.js +5 -0
  32. package/dist/modules/audit_logs/data/entities.js.map +2 -2
  33. package/dist/modules/audit_logs/data/validators.js +1 -0
  34. package/dist/modules/audit_logs/data/validators.js.map +2 -2
  35. package/dist/modules/audit_logs/lib/projections.js +2 -1
  36. package/dist/modules/audit_logs/lib/projections.js.map +2 -2
  37. package/dist/modules/audit_logs/migrations/Migration20260625120000.js +15 -0
  38. package/dist/modules/audit_logs/migrations/Migration20260625120000.js.map +7 -0
  39. package/dist/modules/audit_logs/services/actionLogService.js +3 -0
  40. package/dist/modules/audit_logs/services/actionLogService.js.map +2 -2
  41. package/dist/modules/auth/data/entities.js +6 -0
  42. package/dist/modules/auth/data/entities.js.map +2 -2
  43. package/dist/modules/auth/lib/executionPrincipal.js +140 -0
  44. package/dist/modules/auth/lib/executionPrincipal.js.map +7 -0
  45. package/dist/modules/auth/migrations/Migration20260625050000.js +13 -0
  46. package/dist/modules/auth/migrations/Migration20260625050000.js.map +7 -0
  47. package/dist/modules/business_rules/components/InlineRuleEditor.js +154 -0
  48. package/dist/modules/business_rules/components/InlineRuleEditor.js.map +7 -0
  49. package/dist/modules/business_rules/data/validators.js +6 -0
  50. package/dist/modules/business_rules/data/validators.js.map +2 -2
  51. package/dist/modules/business_rules/lib/rule-engine.js +5 -3
  52. package/dist/modules/business_rules/lib/rule-engine.js.map +2 -2
  53. package/dist/modules/catalog/commands/products.js +5 -0
  54. package/dist/modules/catalog/commands/products.js.map +2 -2
  55. package/dist/modules/catalog/workflows.js +19 -0
  56. package/dist/modules/catalog/workflows.js.map +7 -0
  57. package/dist/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.js +3 -1
  58. package/dist/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.js.map +2 -2
  59. package/dist/modules/customer_accounts/cli.js +80 -0
  60. package/dist/modules/customer_accounts/cli.js.map +7 -0
  61. package/dist/modules/customer_accounts/lib/customerRoleAclSync.js +59 -0
  62. package/dist/modules/customer_accounts/lib/customerRoleAclSync.js.map +7 -0
  63. package/dist/modules/customer_accounts/setup.js +4 -2
  64. package/dist/modules/customer_accounts/setup.js.map +2 -2
  65. package/dist/modules/customers/commands/deals.js +4 -0
  66. package/dist/modules/customers/commands/deals.js.map +2 -2
  67. package/dist/modules/customers/components/detail/ChangelogEntryRow.js +1 -1
  68. package/dist/modules/customers/components/detail/ChangelogEntryRow.js.map +2 -2
  69. package/dist/modules/customers/components/detail/utils.js +2 -0
  70. package/dist/modules/customers/components/detail/utils.js.map +2 -2
  71. package/dist/modules/customers/events.js +13 -2
  72. package/dist/modules/customers/events.js.map +2 -2
  73. package/dist/modules/customers/lib/link-workflow-task-handler.js +64 -0
  74. package/dist/modules/customers/lib/link-workflow-task-handler.js.map +7 -0
  75. package/dist/modules/customers/lib/todoCompatibility.js +1 -1
  76. package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
  77. package/dist/modules/customers/lib/workflowTaskLink.js +9 -0
  78. package/dist/modules/customers/lib/workflowTaskLink.js.map +7 -0
  79. package/dist/modules/customers/subscribers/link-workflow-task.js +12 -0
  80. package/dist/modules/customers/subscribers/link-workflow-task.js.map +7 -0
  81. package/dist/modules/customers/workflows.js +29 -0
  82. package/dist/modules/customers/workflows.js.map +7 -0
  83. package/dist/modules/entities/api/records.js +13 -33
  84. package/dist/modules/entities/api/records.js.map +3 -3
  85. package/dist/modules/entities/lib/entityClassification.js +60 -0
  86. package/dist/modules/entities/lib/entityClassification.js.map +7 -0
  87. package/dist/modules/sales/commands/documents.js +31 -0
  88. package/dist/modules/sales/commands/documents.js.map +2 -2
  89. package/dist/modules/sales/events.js +12 -1
  90. package/dist/modules/sales/events.js.map +2 -2
  91. package/dist/modules/sales/workflows.js +12 -1
  92. package/dist/modules/sales/workflows.js.map +2 -2
  93. package/dist/modules/seeds/cli.js +199 -0
  94. package/dist/modules/seeds/cli.js.map +7 -0
  95. package/dist/modules/seeds/examples/sample-seed.json +26 -0
  96. package/dist/modules/seeds/index.js +12 -0
  97. package/dist/modules/seeds/index.js.map +7 -0
  98. package/dist/modules/workflows/acl.js +96 -0
  99. package/dist/modules/workflows/acl.js.map +2 -2
  100. package/dist/modules/workflows/ai-agents.js +50 -0
  101. package/dist/modules/workflows/ai-agents.js.map +7 -0
  102. package/dist/modules/workflows/ai-tools/authoring-pack.js +582 -0
  103. package/dist/modules/workflows/ai-tools/authoring-pack.js.map +7 -0
  104. package/dist/modules/workflows/ai-tools/types.js +43 -0
  105. package/dist/modules/workflows/ai-tools/types.js.map +7 -0
  106. package/dist/modules/workflows/ai-tools.js +10 -0
  107. package/dist/modules/workflows/ai-tools.js.map +7 -0
  108. package/dist/modules/workflows/api/command-settings/route.js +137 -0
  109. package/dist/modules/workflows/api/command-settings/route.js.map +7 -0
  110. package/dist/modules/workflows/api/commands/route.js +72 -0
  111. package/dist/modules/workflows/api/commands/route.js.map +7 -0
  112. package/dist/modules/workflows/api/definitions/[id]/callers/route.js +76 -0
  113. package/dist/modules/workflows/api/definitions/[id]/callers/route.js.map +7 -0
  114. package/dist/modules/workflows/api/definitions/[id]/context-schema/route.js +134 -0
  115. package/dist/modules/workflows/api/definitions/[id]/context-schema/route.js.map +7 -0
  116. package/dist/modules/workflows/api/definitions/[id]/customize/route.js +5 -1
  117. package/dist/modules/workflows/api/definitions/[id]/customize/route.js.map +2 -2
  118. package/dist/modules/workflows/api/definitions/[id]/draft/route.js +286 -0
  119. package/dist/modules/workflows/api/definitions/[id]/draft/route.js.map +7 -0
  120. package/dist/modules/workflows/api/definitions/[id]/publish/route.js +207 -0
  121. package/dist/modules/workflows/api/definitions/[id]/publish/route.js.map +7 -0
  122. package/dist/modules/workflows/api/definitions/[id]/reset-to-code/route.js +5 -0
  123. package/dist/modules/workflows/api/definitions/[id]/reset-to-code/route.js.map +2 -2
  124. package/dist/modules/workflows/api/definitions/[id]/route.js +93 -9
  125. package/dist/modules/workflows/api/definitions/[id]/route.js.map +3 -3
  126. package/dist/modules/workflows/api/definitions/[id]/test-step/route.js +210 -0
  127. package/dist/modules/workflows/api/definitions/[id]/test-step/route.js.map +7 -0
  128. package/dist/modules/workflows/api/definitions/generate/route.js +233 -0
  129. package/dist/modules/workflows/api/definitions/generate/route.js.map +7 -0
  130. package/dist/modules/workflows/api/definitions/route.js +61 -113
  131. package/dist/modules/workflows/api/definitions/route.js.map +2 -2
  132. package/dist/modules/workflows/api/definitions/serialize.js +9 -0
  133. package/dist/modules/workflows/api/definitions/serialize.js.map +2 -2
  134. package/dist/modules/workflows/api/endpoints/route.js +69 -0
  135. package/dist/modules/workflows/api/endpoints/route.js.map +7 -0
  136. package/dist/modules/workflows/api/functions/route.js +73 -0
  137. package/dist/modules/workflows/api/functions/route.js.map +7 -0
  138. package/dist/modules/workflows/api/grantable-features/route.js +75 -0
  139. package/dist/modules/workflows/api/grantable-features/route.js.map +7 -0
  140. package/dist/modules/workflows/api/instances/[id]/context/route.js +180 -0
  141. package/dist/modules/workflows/api/instances/[id]/context/route.js.map +7 -0
  142. package/dist/modules/workflows/api/instances/[id]/rerun-step/route.js +184 -0
  143. package/dist/modules/workflows/api/instances/[id]/rerun-step/route.js.map +7 -0
  144. package/dist/modules/workflows/api/instances/[id]/retry/route.js +12 -2
  145. package/dist/modules/workflows/api/instances/[id]/retry/route.js.map +2 -2
  146. package/dist/modules/workflows/api/instances/[id]/step-through/route.js +148 -0
  147. package/dist/modules/workflows/api/instances/[id]/step-through/route.js.map +7 -0
  148. package/dist/modules/workflows/api/instances/[id]/steps/route.js +123 -0
  149. package/dist/modules/workflows/api/instances/[id]/steps/route.js.map +7 -0
  150. package/dist/modules/workflows/api/instances/[id]/would-do/route.js +172 -0
  151. package/dist/modules/workflows/api/instances/[id]/would-do/route.js.map +7 -0
  152. package/dist/modules/workflows/api/instances/bulk-replay/route.js +117 -0
  153. package/dist/modules/workflows/api/instances/bulk-replay/route.js.map +7 -0
  154. package/dist/modules/workflows/api/instances/failure-queue/route.js +165 -0
  155. package/dist/modules/workflows/api/instances/failure-queue/route.js.map +7 -0
  156. package/dist/modules/workflows/api/instances/route.js +94 -3
  157. package/dist/modules/workflows/api/instances/route.js.map +2 -2
  158. package/dist/modules/workflows/api/metrics/definitions/route.js +188 -0
  159. package/dist/modules/workflows/api/metrics/definitions/route.js.map +7 -0
  160. package/dist/modules/workflows/api/openapi.js +415 -4
  161. package/dist/modules/workflows/api/openapi.js.map +2 -2
  162. package/dist/modules/workflows/api/portal/tasks/[id]/complete/route.js +132 -0
  163. package/dist/modules/workflows/api/portal/tasks/[id]/complete/route.js.map +7 -0
  164. package/dist/modules/workflows/api/portal/tasks/[id]/route.js +97 -0
  165. package/dist/modules/workflows/api/portal/tasks/[id]/route.js.map +7 -0
  166. package/dist/modules/workflows/api/portal/tasks/route.js +126 -0
  167. package/dist/modules/workflows/api/portal/tasks/route.js.map +7 -0
  168. package/dist/modules/workflows/api/rule-usage/route.js +80 -0
  169. package/dist/modules/workflows/api/rule-usage/route.js.map +7 -0
  170. package/dist/modules/workflows/api/task-settings/route.js +107 -0
  171. package/dist/modules/workflows/api/task-settings/route.js.map +7 -0
  172. package/dist/modules/workflows/api/tasks/[id]/claim/route.js +27 -16
  173. package/dist/modules/workflows/api/tasks/[id]/claim/route.js.map +2 -2
  174. package/dist/modules/workflows/api/tasks/[id]/complete/route.js +40 -16
  175. package/dist/modules/workflows/api/tasks/[id]/complete/route.js.map +2 -2
  176. package/dist/modules/workflows/api/tasks/[id]/reassign/route.js +150 -0
  177. package/dist/modules/workflows/api/tasks/[id]/reassign/route.js.map +7 -0
  178. package/dist/modules/workflows/api/tasks/[id]/route.js +39 -6
  179. package/dist/modules/workflows/api/tasks/[id]/route.js.map +2 -2
  180. package/dist/modules/workflows/api/tasks/[id]/unclaim/route.js +100 -0
  181. package/dist/modules/workflows/api/tasks/[id]/unclaim/route.js.map +7 -0
  182. package/dist/modules/workflows/api/tasks/route.js +37 -6
  183. package/dist/modules/workflows/api/tasks/route.js.map +2 -2
  184. package/dist/modules/workflows/api/tasks/serialize.js +83 -0
  185. package/dist/modules/workflows/api/tasks/serialize.js.map +7 -0
  186. package/dist/modules/workflows/api/templates/route.js +69 -0
  187. package/dist/modules/workflows/api/templates/route.js.map +7 -0
  188. package/dist/modules/workflows/api/work-inbox/next/route.js +129 -0
  189. package/dist/modules/workflows/api/work-inbox/next/route.js.map +7 -0
  190. package/dist/modules/workflows/api/work-inbox/route.js +119 -0
  191. package/dist/modules/workflows/api/work-inbox/route.js.map +7 -0
  192. package/dist/modules/workflows/backend/config/workflows/page.js +10 -0
  193. package/dist/modules/workflows/backend/config/workflows/page.js.map +7 -0
  194. package/dist/modules/workflows/backend/config/workflows/page.meta.js +35 -0
  195. package/dist/modules/workflows/backend/config/workflows/page.meta.js.map +7 -0
  196. package/dist/modules/workflows/backend/definitions/[id]/page.js +6 -271
  197. package/dist/modules/workflows/backend/definitions/[id]/page.js.map +3 -3
  198. package/dist/modules/workflows/backend/definitions/create/page.js +7 -56
  199. package/dist/modules/workflows/backend/definitions/create/page.js.map +2 -2
  200. package/dist/modules/workflows/backend/definitions/create/page.meta.js +1 -1
  201. package/dist/modules/workflows/backend/definitions/create/page.meta.js.map +2 -2
  202. package/dist/modules/workflows/backend/definitions/page.js +131 -51
  203. package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
  204. package/dist/modules/workflows/backend/definitions/visual-editor/page.js +2606 -677
  205. package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +3 -3
  206. package/dist/modules/workflows/backend/instances/[id]/page.js +532 -421
  207. package/dist/modules/workflows/backend/instances/[id]/page.js.map +2 -2
  208. package/dist/modules/workflows/backend/instances/[id]/page.meta.js +1 -1
  209. package/dist/modules/workflows/backend/instances/[id]/page.meta.js.map +1 -1
  210. package/dist/modules/workflows/backend/instances/failure-queue/page.js +211 -0
  211. package/dist/modules/workflows/backend/instances/failure-queue/page.js.map +7 -0
  212. package/dist/modules/workflows/backend/instances/failure-queue/page.meta.js +20 -0
  213. package/dist/modules/workflows/backend/instances/failure-queue/page.meta.js.map +7 -0
  214. package/dist/modules/workflows/backend/instances/page.js +159 -22
  215. package/dist/modules/workflows/backend/instances/page.js.map +2 -2
  216. package/dist/modules/workflows/backend/instances/page.meta.js +1 -1
  217. package/dist/modules/workflows/backend/instances/page.meta.js.map +1 -1
  218. package/dist/modules/workflows/backend/tasks/[id]/page.js +553 -392
  219. package/dist/modules/workflows/backend/tasks/[id]/page.js.map +3 -3
  220. package/dist/modules/workflows/backend/tasks/page.js +8 -250
  221. package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
  222. package/dist/modules/workflows/backend/tasks/page.meta.js +1 -0
  223. package/dist/modules/workflows/backend/tasks/page.meta.js.map +2 -2
  224. package/dist/modules/workflows/backend/work-inbox/page.js +399 -0
  225. package/dist/modules/workflows/backend/work-inbox/page.js.map +7 -0
  226. package/dist/modules/workflows/backend/work-inbox/page.meta.js +19 -0
  227. package/dist/modules/workflows/backend/work-inbox/page.meta.js.map +7 -0
  228. package/dist/modules/workflows/cli.js +1 -1
  229. package/dist/modules/workflows/cli.js.map +2 -2
  230. package/dist/modules/workflows/commands/tasks.js +81 -0
  231. package/dist/modules/workflows/commands/tasks.js.map +7 -0
  232. package/dist/modules/workflows/components/ActivitiesEditor.js +281 -287
  233. package/dist/modules/workflows/components/ActivitiesEditor.js.map +2 -2
  234. package/dist/modules/workflows/components/ActivityEditDialog.js +220 -0
  235. package/dist/modules/workflows/components/ActivityEditDialog.js.map +7 -0
  236. package/dist/modules/workflows/components/AgentSelector.js +115 -0
  237. package/dist/modules/workflows/components/AgentSelector.js.map +7 -0
  238. package/dist/modules/workflows/components/AnnotationEditDialog.js +110 -0
  239. package/dist/modules/workflows/components/AnnotationEditDialog.js.map +7 -0
  240. package/dist/modules/workflows/components/BusinessRuleUsagePanel.js +71 -0
  241. package/dist/modules/workflows/components/BusinessRuleUsagePanel.js.map +7 -0
  242. package/dist/modules/workflows/components/BusinessRulesSelector.js +151 -93
  243. package/dist/modules/workflows/components/BusinessRulesSelector.js.map +2 -2
  244. package/dist/modules/workflows/components/ConfigJsonTextarea.js +85 -0
  245. package/dist/modules/workflows/components/ConfigJsonTextarea.js.map +7 -0
  246. package/dist/modules/workflows/components/ContextSchemaEditor.js +150 -0
  247. package/dist/modules/workflows/components/ContextSchemaEditor.js.map +7 -0
  248. package/dist/modules/workflows/components/DefinitionErrorHandlerField.js +102 -0
  249. package/dist/modules/workflows/components/DefinitionErrorHandlerField.js.map +7 -0
  250. package/dist/modules/workflows/components/DefinitionMetadataDrawer.js +377 -0
  251. package/dist/modules/workflows/components/DefinitionMetadataDrawer.js.map +7 -0
  252. package/dist/modules/workflows/components/DefinitionMetricsCells.js +132 -0
  253. package/dist/modules/workflows/components/DefinitionMetricsCells.js.map +7 -0
  254. package/dist/modules/workflows/components/DefinitionTriggersEditor.js +307 -216
  255. package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +2 -2
  256. package/dist/modules/workflows/components/EdgeEditDialog.js +11 -18
  257. package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
  258. package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js +112 -72
  259. package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js.map +2 -2
  260. package/dist/modules/workflows/components/InputDataPanel.js +128 -0
  261. package/dist/modules/workflows/components/InputDataPanel.js.map +7 -0
  262. package/dist/modules/workflows/components/InspectorPanel.js +161 -0
  263. package/dist/modules/workflows/components/InspectorPanel.js.map +7 -0
  264. package/dist/modules/workflows/components/NodeEditDialog.js +363 -41
  265. package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
  266. package/dist/modules/workflows/components/NodeEditDialogCrudForm.js +714 -159
  267. package/dist/modules/workflows/components/NodeEditDialogCrudForm.js.map +2 -2
  268. package/dist/modules/workflows/components/StepsEditor.js.map +2 -2
  269. package/dist/modules/workflows/components/TemplateGalleryDialog.js +148 -0
  270. package/dist/modules/workflows/components/TemplateGalleryDialog.js.map +7 -0
  271. package/dist/modules/workflows/components/TransitionsEditor.js +80 -74
  272. package/dist/modules/workflows/components/TransitionsEditor.js.map +2 -2
  273. package/dist/modules/workflows/components/TriggersDialog.js +53 -0
  274. package/dist/modules/workflows/components/TriggersDialog.js.map +7 -0
  275. package/dist/modules/workflows/components/TriggersEditor.js +331 -0
  276. package/dist/modules/workflows/components/TriggersEditor.js.map +7 -0
  277. package/dist/modules/workflows/components/WorkflowAiDraftDialog.js +278 -0
  278. package/dist/modules/workflows/components/WorkflowAiDraftDialog.js.map +7 -0
  279. package/dist/modules/workflows/components/WorkflowCodeView.js +173 -0
  280. package/dist/modules/workflows/components/WorkflowCodeView.js.map +7 -0
  281. package/dist/modules/workflows/components/WorkflowCommandPalette.js +62 -0
  282. package/dist/modules/workflows/components/WorkflowCommandPalette.js.map +7 -0
  283. package/dist/modules/workflows/components/WorkflowCompensationGhostEdge.js +70 -0
  284. package/dist/modules/workflows/components/WorkflowCompensationGhostEdge.js.map +7 -0
  285. package/dist/modules/workflows/components/WorkflowDataMappingEdge.js +36 -0
  286. package/dist/modules/workflows/components/WorkflowDataMappingEdge.js.map +7 -0
  287. package/dist/modules/workflows/components/WorkflowGraph.js +4 -2
  288. package/dist/modules/workflows/components/WorkflowGraph.js.map +2 -2
  289. package/dist/modules/workflows/components/WorkflowGraphImpl.js +324 -86
  290. package/dist/modules/workflows/components/WorkflowGraphImpl.js.map +3 -3
  291. package/dist/modules/workflows/components/WorkflowIconPicker.js +109 -0
  292. package/dist/modules/workflows/components/WorkflowIconPicker.js.map +7 -0
  293. package/dist/modules/workflows/components/WorkflowLegend.js +45 -29
  294. package/dist/modules/workflows/components/WorkflowLegend.js.map +2 -2
  295. package/dist/modules/workflows/components/WorkflowNodeCard.js +221 -22
  296. package/dist/modules/workflows/components/WorkflowNodeCard.js.map +2 -2
  297. package/dist/modules/workflows/components/WorkflowRouteChips.js +111 -0
  298. package/dist/modules/workflows/components/WorkflowRouteChips.js.map +7 -0
  299. package/dist/modules/workflows/components/WorkflowSelector.js +108 -88
  300. package/dist/modules/workflows/components/WorkflowSelector.js.map +2 -2
  301. package/dist/modules/workflows/components/WorkflowTransitionEdge.js +61 -11
  302. package/dist/modules/workflows/components/WorkflowTransitionEdge.js.map +2 -2
  303. package/dist/modules/workflows/components/WorkflowTransitionLabel.js +15 -5
  304. package/dist/modules/workflows/components/WorkflowTransitionLabel.js.map +2 -2
  305. package/dist/modules/workflows/components/fields/ActivityArrayEditor.js +88 -21
  306. package/dist/modules/workflows/components/fields/ActivityArrayEditor.js.map +2 -2
  307. package/dist/modules/workflows/components/fields/ActivityConfigFields.js +615 -0
  308. package/dist/modules/workflows/components/fields/ActivityConfigFields.js.map +7 -0
  309. package/dist/modules/workflows/components/fields/ActivityTestPanel.js +191 -0
  310. package/dist/modules/workflows/components/fields/ActivityTestPanel.js.map +7 -0
  311. package/dist/modules/workflows/components/fields/AgentInvokeConfigField.js +488 -0
  312. package/dist/modules/workflows/components/fields/AgentInvokeConfigField.js.map +7 -0
  313. package/dist/modules/workflows/components/fields/AgentReviewOnBreachField.js +61 -0
  314. package/dist/modules/workflows/components/fields/AgentReviewOnBreachField.js.map +7 -0
  315. package/dist/modules/workflows/components/fields/BranchingRoutesEditor.js +227 -0
  316. package/dist/modules/workflows/components/fields/BranchingRoutesEditor.js.map +7 -0
  317. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +37 -4
  318. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
  319. package/dist/modules/workflows/components/fields/CommandPicker.js +111 -0
  320. package/dist/modules/workflows/components/fields/CommandPicker.js.map +7 -0
  321. package/dist/modules/workflows/components/fields/EndpointPicker.js +235 -0
  322. package/dist/modules/workflows/components/fields/EndpointPicker.js.map +7 -0
  323. package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js +2 -2
  324. package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js.map +2 -2
  325. package/dist/modules/workflows/components/fields/FunctionPicker.js +55 -0
  326. package/dist/modules/workflows/components/fields/FunctionPicker.js.map +7 -0
  327. package/dist/modules/workflows/components/fields/MappingArrayEditor.js +38 -15
  328. package/dist/modules/workflows/components/fields/MappingArrayEditor.js.map +2 -2
  329. package/dist/modules/workflows/components/fields/PortFieldArrayEditor.js +206 -0
  330. package/dist/modules/workflows/components/fields/PortFieldArrayEditor.js.map +7 -0
  331. package/dist/modules/workflows/components/fields/RolesMultiSelect.js +53 -0
  332. package/dist/modules/workflows/components/fields/RolesMultiSelect.js.map +7 -0
  333. package/dist/modules/workflows/components/fields/RouteOrderEditor.js +130 -0
  334. package/dist/modules/workflows/components/fields/RouteOrderEditor.js.map +7 -0
  335. package/dist/modules/workflows/components/fields/SchemaBuilderDialog.js +104 -0
  336. package/dist/modules/workflows/components/fields/SchemaBuilderDialog.js.map +7 -0
  337. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +2 -2
  338. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
  339. package/dist/modules/workflows/components/fields/TaskAssignmentField.js +210 -0
  340. package/dist/modules/workflows/components/fields/TaskAssignmentField.js.map +7 -0
  341. package/dist/modules/workflows/components/fields/TaskDeadlineFields.js +126 -0
  342. package/dist/modules/workflows/components/fields/TaskDeadlineFields.js.map +7 -0
  343. package/dist/modules/workflows/components/fields/TaskDecisionsField.js +218 -0
  344. package/dist/modules/workflows/components/fields/TaskDecisionsField.js.map +7 -0
  345. package/dist/modules/workflows/components/fields/TaskEntityBindingsField.js +114 -0
  346. package/dist/modules/workflows/components/fields/TaskEntityBindingsField.js.map +7 -0
  347. package/dist/modules/workflows/components/fields/TemplateTextControl.js +64 -0
  348. package/dist/modules/workflows/components/fields/TemplateTextControl.js.map +7 -0
  349. package/dist/modules/workflows/components/fields/VariablePickerButton.js +121 -0
  350. package/dist/modules/workflows/components/fields/VariablePickerButton.js.map +7 -0
  351. package/dist/modules/workflows/components/fields/ledgerDropTarget.js +35 -0
  352. package/dist/modules/workflows/components/fields/ledgerDropTarget.js.map +7 -0
  353. package/dist/modules/workflows/components/fields/useActivityTypeOptions.js +16 -0
  354. package/dist/modules/workflows/components/fields/useActivityTypeOptions.js.map +7 -0
  355. package/dist/modules/workflows/components/formConfig.js +39 -10
  356. package/dist/modules/workflows/components/formConfig.js.map +2 -2
  357. package/dist/modules/workflows/components/mobile/MobileDefinitionDetail.js.map +2 -2
  358. package/dist/modules/workflows/components/mobile/MobileMetadataSheet.js.map +2 -2
  359. package/dist/modules/workflows/components/mobile/MobileTaskForm.js +29 -2
  360. package/dist/modules/workflows/components/mobile/MobileTaskForm.js.map +2 -2
  361. package/dist/modules/workflows/components/mobile/MobileVisualEditor.js +64 -65
  362. package/dist/modules/workflows/components/mobile/MobileVisualEditor.js.map +2 -2
  363. package/dist/modules/workflows/components/nodes/AnnotationGroupNode.js +64 -0
  364. package/dist/modules/workflows/components/nodes/AnnotationGroupNode.js.map +7 -0
  365. package/dist/modules/workflows/components/nodes/AutomatedNode.js +24 -16
  366. package/dist/modules/workflows/components/nodes/AutomatedNode.js.map +2 -2
  367. package/dist/modules/workflows/components/nodes/EndNode.js +13 -12
  368. package/dist/modules/workflows/components/nodes/EndNode.js.map +2 -2
  369. package/dist/modules/workflows/components/nodes/ErrorOutputHandle.js +29 -0
  370. package/dist/modules/workflows/components/nodes/ErrorOutputHandle.js.map +7 -0
  371. package/dist/modules/workflows/components/nodes/IfElseNode.js +51 -0
  372. package/dist/modules/workflows/components/nodes/IfElseNode.js.map +7 -0
  373. package/dist/modules/workflows/components/nodes/InvokeAgentNode.js +122 -0
  374. package/dist/modules/workflows/components/nodes/InvokeAgentNode.js.map +7 -0
  375. package/dist/modules/workflows/components/nodes/NodeOutcomeRows.js +100 -0
  376. package/dist/modules/workflows/components/nodes/NodeOutcomeRows.js.map +7 -0
  377. package/dist/modules/workflows/components/nodes/ParallelForkNode.js +18 -14
  378. package/dist/modules/workflows/components/nodes/ParallelForkNode.js.map +2 -2
  379. package/dist/modules/workflows/components/nodes/ParallelJoinNode.js +18 -14
  380. package/dist/modules/workflows/components/nodes/ParallelJoinNode.js.map +2 -2
  381. package/dist/modules/workflows/components/nodes/StartNode.js +66 -15
  382. package/dist/modules/workflows/components/nodes/StartNode.js.map +2 -2
  383. package/dist/modules/workflows/components/nodes/StickyNoteNode.js +54 -0
  384. package/dist/modules/workflows/components/nodes/StickyNoteNode.js.map +7 -0
  385. package/dist/modules/workflows/components/nodes/SubWorkflowNode.js +107 -41
  386. package/dist/modules/workflows/components/nodes/SubWorkflowNode.js.map +2 -2
  387. package/dist/modules/workflows/components/nodes/SwitchNode.js +51 -0
  388. package/dist/modules/workflows/components/nodes/SwitchNode.js.map +7 -0
  389. package/dist/modules/workflows/components/nodes/TriggerCap.js +65 -0
  390. package/dist/modules/workflows/components/nodes/TriggerCap.js.map +7 -0
  391. package/dist/modules/workflows/components/nodes/TriggerNode.js +111 -0
  392. package/dist/modules/workflows/components/nodes/TriggerNode.js.map +7 -0
  393. package/dist/modules/workflows/components/nodes/UserTaskNode.js +43 -17
  394. package/dist/modules/workflows/components/nodes/UserTaskNode.js.map +2 -2
  395. package/dist/modules/workflows/components/nodes/WaitForConditionNode.js +53 -0
  396. package/dist/modules/workflows/components/nodes/WaitForConditionNode.js.map +7 -0
  397. package/dist/modules/workflows/components/nodes/WaitForSignalNode.js +21 -15
  398. package/dist/modules/workflows/components/nodes/WaitForSignalNode.js.map +2 -2
  399. package/dist/modules/workflows/components/nodes/WaitForTimerNode.js +21 -15
  400. package/dist/modules/workflows/components/nodes/WaitForTimerNode.js.map +2 -2
  401. package/dist/modules/workflows/components/nodes/index.js +14 -0
  402. package/dist/modules/workflows/components/nodes/index.js.map +2 -2
  403. package/dist/modules/workflows/components/portal/PortalTaskForm.js +196 -0
  404. package/dist/modules/workflows/components/portal/PortalTaskForm.js.map +7 -0
  405. package/dist/modules/workflows/components/run/AgentActivityPanel.js +22 -0
  406. package/dist/modules/workflows/components/run/AgentActivityPanel.js.map +7 -0
  407. package/dist/modules/workflows/components/run/RerunStepDialog.js +106 -0
  408. package/dist/modules/workflows/components/run/RerunStepDialog.js.map +7 -0
  409. package/dist/modules/workflows/components/run/RunEventBadge.js +30 -0
  410. package/dist/modules/workflows/components/run/RunEventBadge.js.map +7 -0
  411. package/dist/modules/workflows/components/run/RunGantt.js +130 -0
  412. package/dist/modules/workflows/components/run/RunGantt.js.map +7 -0
  413. package/dist/modules/workflows/components/run/RunStatusBadge.js +82 -0
  414. package/dist/modules/workflows/components/run/RunStatusBadge.js.map +7 -0
  415. package/dist/modules/workflows/components/run/RunStepInspector.js +116 -0
  416. package/dist/modules/workflows/components/run/RunStepInspector.js.map +7 -0
  417. package/dist/modules/workflows/components/run/WouldDoReport.js +52 -0
  418. package/dist/modules/workflows/components/run/WouldDoReport.js.map +7 -0
  419. package/dist/modules/workflows/components/run/useAgentLabels.js +28 -0
  420. package/dist/modules/workflows/components/run/useAgentLabels.js.map +7 -0
  421. package/dist/modules/workflows/components/run/useLastRunOverlay.js +89 -0
  422. package/dist/modules/workflows/components/run/useLastRunOverlay.js.map +7 -0
  423. package/dist/modules/workflows/components/run/useLiveAgentActions.js +41 -0
  424. package/dist/modules/workflows/components/run/useLiveAgentActions.js.map +7 -0
  425. package/dist/modules/workflows/components/run/useLiveRunUpdates.js +57 -0
  426. package/dist/modules/workflows/components/run/useLiveRunUpdates.js.map +7 -0
  427. package/dist/modules/workflows/components/settings/CommandSettingsPageClient.js +156 -0
  428. package/dist/modules/workflows/components/settings/CommandSettingsPageClient.js.map +7 -0
  429. package/dist/modules/workflows/components/work-inbox/EntityContextPanel.js +72 -0
  430. package/dist/modules/workflows/components/work-inbox/EntityContextPanel.js.map +7 -0
  431. package/dist/modules/workflows/components/work-inbox/ReassignTaskDialog.js +156 -0
  432. package/dist/modules/workflows/components/work-inbox/ReassignTaskDialog.js.map +7 -0
  433. package/dist/modules/workflows/components/work-inbox/StatusChip.js +46 -0
  434. package/dist/modules/workflows/components/work-inbox/StatusChip.js.map +7 -0
  435. package/dist/modules/workflows/components/work-inbox/TaskActionNotice.js +53 -0
  436. package/dist/modules/workflows/components/work-inbox/TaskActionNotice.js.map +7 -0
  437. package/dist/modules/workflows/components/work-inbox/TaskFormFields.js +261 -0
  438. package/dist/modules/workflows/components/work-inbox/TaskFormFields.js.map +7 -0
  439. package/dist/modules/workflows/components/work-inbox/WorkInboxEmptyState.js +27 -0
  440. package/dist/modules/workflows/components/work-inbox/WorkInboxEmptyState.js.map +7 -0
  441. package/dist/modules/workflows/data/activity-config-schemas.js +191 -0
  442. package/dist/modules/workflows/data/activity-config-schemas.js.map +7 -0
  443. package/dist/modules/workflows/data/activity-config-warnings.js +42 -0
  444. package/dist/modules/workflows/data/activity-config-warnings.js.map +7 -0
  445. package/dist/modules/workflows/data/branching-route-warnings.js +65 -0
  446. package/dist/modules/workflows/data/branching-route-warnings.js.map +7 -0
  447. package/dist/modules/workflows/data/entities.js +144 -4
  448. package/dist/modules/workflows/data/entities.js.map +2 -2
  449. package/dist/modules/workflows/data/metrics-validators.js +35 -0
  450. package/dist/modules/workflows/data/metrics-validators.js.map +7 -0
  451. package/dist/modules/workflows/data/task-primitives.js +14 -0
  452. package/dist/modules/workflows/data/task-primitives.js.map +7 -0
  453. package/dist/modules/workflows/data/validators.js +504 -61
  454. package/dist/modules/workflows/data/validators.js.map +3 -3
  455. package/dist/modules/workflows/di.js +16 -1
  456. package/dist/modules/workflows/di.js.map +2 -2
  457. package/dist/modules/workflows/events.js +66 -8
  458. package/dist/modules/workflows/events.js.map +2 -2
  459. package/dist/modules/workflows/examples/oze-residential-install-60-nodes.json +1545 -0
  460. package/dist/modules/workflows/examples/sales-pipeline-definition.json +35 -35
  461. package/dist/modules/workflows/examples/templates/lead-to-install.json +160 -0
  462. package/dist/modules/workflows/examples/templates/order-approval.json +230 -0
  463. package/dist/modules/workflows/examples/templates/task-escalation.json +110 -0
  464. package/dist/modules/workflows/examples/templates/webhook-integration.json +113 -0
  465. package/dist/modules/workflows/extension-points.js +1 -1
  466. package/dist/modules/workflows/extension-points.js.map +2 -2
  467. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.js +144 -0
  468. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.js.map +7 -0
  469. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.meta.js +12 -0
  470. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.meta.js.map +7 -0
  471. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/page.js +114 -0
  472. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/page.js.map +7 -0
  473. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/page.meta.js +18 -0
  474. package/dist/modules/workflows/frontend/[orgSlug]/portal/tasks/page.meta.js.map +7 -0
  475. package/dist/modules/workflows/lib/activity-executor.js +505 -137
  476. package/dist/modules/workflows/lib/activity-executor.js.map +3 -3
  477. package/dist/modules/workflows/lib/activity-queue-types.js +3 -1
  478. package/dist/modules/workflows/lib/activity-queue-types.js.map +2 -2
  479. package/dist/modules/workflows/lib/activity-registry-bootstrap.js +2 -0
  480. package/dist/modules/workflows/lib/activity-registry-bootstrap.js.map +7 -0
  481. package/dist/modules/workflows/lib/activity-registry.js +27 -0
  482. package/dist/modules/workflows/lib/activity-registry.js.map +7 -0
  483. package/dist/modules/workflows/lib/activity-types.js +291 -0
  484. package/dist/modules/workflows/lib/activity-types.js.map +7 -0
  485. package/dist/modules/workflows/lib/activity-worker-handler.js +456 -32
  486. package/dist/modules/workflows/lib/activity-worker-handler.js.map +3 -3
  487. package/dist/modules/workflows/lib/advanced-config.js +31 -0
  488. package/dist/modules/workflows/lib/advanced-config.js.map +7 -0
  489. package/dist/modules/workflows/lib/agent-disposition-task.js +198 -0
  490. package/dist/modules/workflows/lib/agent-disposition-task.js.map +7 -0
  491. package/dist/modules/workflows/lib/agent-outcome-paths.js +82 -0
  492. package/dist/modules/workflows/lib/agent-outcome-paths.js.map +7 -0
  493. package/dist/modules/workflows/lib/agent-result-mapping.js +54 -0
  494. package/dist/modules/workflows/lib/agent-result-mapping.js.map +7 -0
  495. package/dist/modules/workflows/lib/agent-review-inspector.js +61 -0
  496. package/dist/modules/workflows/lib/agent-review-inspector.js.map +7 -0
  497. package/dist/modules/workflows/lib/agent-review.js +66 -0
  498. package/dist/modules/workflows/lib/agent-review.js.map +7 -0
  499. package/dist/modules/workflows/lib/ai-authoring.js +155 -0
  500. package/dist/modules/workflows/lib/ai-authoring.js.map +7 -0
  501. package/dist/modules/workflows/lib/ai-draft-runner.js +43 -0
  502. package/dist/modules/workflows/lib/ai-draft-runner.js.map +7 -0
  503. package/dist/modules/workflows/lib/annotation-events.js +10 -0
  504. package/dist/modules/workflows/lib/annotation-events.js.map +7 -0
  505. package/dist/modules/workflows/lib/branching-routes.js +182 -0
  506. package/dist/modules/workflows/lib/branching-routes.js.map +7 -0
  507. package/dist/modules/workflows/lib/breach-routing.js +50 -0
  508. package/dist/modules/workflows/lib/breach-routing.js.map +7 -0
  509. package/dist/modules/workflows/lib/bulk-replay.js +101 -0
  510. package/dist/modules/workflows/lib/bulk-replay.js.map +7 -0
  511. package/dist/modules/workflows/lib/business-rule-usage.js +91 -0
  512. package/dist/modules/workflows/lib/business-rule-usage.js.map +7 -0
  513. package/dist/modules/workflows/lib/caller-graph.js +53 -0
  514. package/dist/modules/workflows/lib/caller-graph.js.map +7 -0
  515. package/dist/modules/workflows/lib/code-view-apply.js +86 -0
  516. package/dist/modules/workflows/lib/code-view-apply.js.map +7 -0
  517. package/dist/modules/workflows/lib/collect-validation-issues.js +164 -0
  518. package/dist/modules/workflows/lib/collect-validation-issues.js.map +7 -0
  519. package/dist/modules/workflows/lib/compensation-ghosts.js +72 -0
  520. package/dist/modules/workflows/lib/compensation-ghosts.js.map +7 -0
  521. package/dist/modules/workflows/lib/component-guard.js +7 -0
  522. package/dist/modules/workflows/lib/component-guard.js.map +7 -0
  523. package/dist/modules/workflows/lib/condition-handler.js +443 -0
  524. package/dist/modules/workflows/lib/condition-handler.js.map +7 -0
  525. package/dist/modules/workflows/lib/context-ledger.js +448 -0
  526. package/dist/modules/workflows/lib/context-ledger.js.map +7 -0
  527. package/dist/modules/workflows/lib/crud-form-dialogs-flag.js +8 -0
  528. package/dist/modules/workflows/lib/crud-form-dialogs-flag.js.map +7 -0
  529. package/dist/modules/workflows/lib/data-edge-mapping.js +63 -0
  530. package/dist/modules/workflows/lib/data-edge-mapping.js.map +7 -0
  531. package/dist/modules/workflows/lib/definition-context-schema.js +56 -0
  532. package/dist/modules/workflows/lib/definition-context-schema.js.map +7 -0
  533. package/dist/modules/workflows/lib/definition-edit-safety.js +123 -0
  534. package/dist/modules/workflows/lib/definition-edit-safety.js.map +7 -0
  535. package/dist/modules/workflows/lib/definition-error-body.js +33 -0
  536. package/dist/modules/workflows/lib/definition-error-body.js.map +7 -0
  537. package/dist/modules/workflows/lib/definition-evaluation.js +79 -0
  538. package/dist/modules/workflows/lib/definition-evaluation.js.map +7 -0
  539. package/dist/modules/workflows/lib/definition-grant.js +90 -0
  540. package/dist/modules/workflows/lib/definition-grant.js.map +7 -0
  541. package/dist/modules/workflows/lib/definition-json-locations.js +139 -0
  542. package/dist/modules/workflows/lib/definition-json-locations.js.map +7 -0
  543. package/dist/modules/workflows/lib/definition-payload.js +31 -0
  544. package/dist/modules/workflows/lib/definition-payload.js.map +7 -0
  545. package/dist/modules/workflows/lib/draft-restore.js +49 -0
  546. package/dist/modules/workflows/lib/draft-restore.js.map +7 -0
  547. package/dist/modules/workflows/lib/dry-run.js +106 -0
  548. package/dist/modules/workflows/lib/dry-run.js.map +7 -0
  549. package/dist/modules/workflows/lib/duration.js +66 -17
  550. package/dist/modules/workflows/lib/duration.js.map +2 -2
  551. package/dist/modules/workflows/lib/edge-reattachment.js +79 -0
  552. package/dist/modules/workflows/lib/edge-reattachment.js.map +7 -0
  553. package/dist/modules/workflows/lib/edgeFormTransforms.js +7 -11
  554. package/dist/modules/workflows/lib/edgeFormTransforms.js.map +2 -2
  555. package/dist/modules/workflows/lib/editor-annotations.js +195 -0
  556. package/dist/modules/workflows/lib/editor-annotations.js.map +7 -0
  557. package/dist/modules/workflows/lib/editor-commands.js +103 -0
  558. package/dist/modules/workflows/lib/editor-commands.js.map +7 -0
  559. package/dist/modules/workflows/lib/editor-history.js +51 -0
  560. package/dist/modules/workflows/lib/editor-history.js.map +7 -0
  561. package/dist/modules/workflows/lib/endpoint-catalog.js +181 -0
  562. package/dist/modules/workflows/lib/endpoint-catalog.js.map +7 -0
  563. package/dist/modules/workflows/lib/endpoint-path.js +90 -0
  564. package/dist/modules/workflows/lib/endpoint-path.js.map +7 -0
  565. package/dist/modules/workflows/lib/engine-version.js +42 -0
  566. package/dist/modules/workflows/lib/engine-version.js.map +7 -0
  567. package/dist/modules/workflows/lib/error-handler.js +132 -0
  568. package/dist/modules/workflows/lib/error-handler.js.map +7 -0
  569. package/dist/modules/workflows/lib/error-routing.js +104 -0
  570. package/dist/modules/workflows/lib/error-routing.js.map +7 -0
  571. package/dist/modules/workflows/lib/event-logger.js +23 -0
  572. package/dist/modules/workflows/lib/event-logger.js.map +2 -2
  573. package/dist/modules/workflows/lib/expression-refs.js +168 -0
  574. package/dist/modules/workflows/lib/expression-refs.js.map +7 -0
  575. package/dist/modules/workflows/lib/failure-grouping.js +62 -0
  576. package/dist/modules/workflows/lib/failure-grouping.js.map +7 -0
  577. package/dist/modules/workflows/lib/find-definition.js +1 -0
  578. package/dist/modules/workflows/lib/find-definition.js.map +2 -2
  579. package/dist/modules/workflows/lib/flow-logic-warnings.js +338 -0
  580. package/dist/modules/workflows/lib/flow-logic-warnings.js.map +7 -0
  581. package/dist/modules/workflows/lib/graph-utils.js +328 -77
  582. package/dist/modules/workflows/lib/graph-utils.js.map +2 -2
  583. package/dist/modules/workflows/lib/icon-search.js +32 -0
  584. package/dist/modules/workflows/lib/icon-search.js.map +7 -0
  585. package/dist/modules/workflows/lib/insert-at-cursor.js +26 -0
  586. package/dist/modules/workflows/lib/insert-at-cursor.js.map +7 -0
  587. package/dist/modules/workflows/lib/instance-date-filter.js +28 -0
  588. package/dist/modules/workflows/lib/instance-date-filter.js.map +7 -0
  589. package/dist/modules/workflows/lib/interpolation-pipeline.js +271 -0
  590. package/dist/modules/workflows/lib/interpolation-pipeline.js.map +7 -0
  591. package/dist/modules/workflows/lib/ledger-drag.js +28 -0
  592. package/dist/modules/workflows/lib/ledger-drag.js.map +7 -0
  593. package/dist/modules/workflows/lib/ledger-entry-display.js +66 -0
  594. package/dist/modules/workflows/lib/ledger-entry-display.js.map +7 -0
  595. package/dist/modules/workflows/lib/ledger-schema-flatten.js +82 -0
  596. package/dist/modules/workflows/lib/ledger-schema-flatten.js.map +7 -0
  597. package/dist/modules/workflows/lib/metrics/definition-metrics.js +110 -0
  598. package/dist/modules/workflows/lib/metrics/definition-metrics.js.map +7 -0
  599. package/dist/modules/workflows/lib/metrics/metrics-display.js +26 -0
  600. package/dist/modules/workflows/lib/metrics/metrics-display.js.map +7 -0
  601. package/dist/modules/workflows/lib/metrics/rollup-schedule.js +7 -0
  602. package/dist/modules/workflows/lib/metrics/rollup-schedule.js.map +7 -0
  603. package/dist/modules/workflows/lib/metrics/rollup-service.js +160 -0
  604. package/dist/modules/workflows/lib/metrics/rollup-service.js.map +7 -0
  605. package/dist/modules/workflows/lib/node-config-summary.js +128 -0
  606. package/dist/modules/workflows/lib/node-config-summary.js.map +7 -0
  607. package/dist/modules/workflows/lib/node-geometry.js +53 -0
  608. package/dist/modules/workflows/lib/node-geometry.js.map +7 -0
  609. package/dist/modules/workflows/lib/node-nudge.js +44 -0
  610. package/dist/modules/workflows/lib/node-nudge.js.map +7 -0
  611. package/dist/modules/workflows/lib/node-outcome-rows.js +88 -0
  612. package/dist/modules/workflows/lib/node-outcome-rows.js.map +7 -0
  613. package/dist/modules/workflows/lib/node-placement.js +55 -0
  614. package/dist/modules/workflows/lib/node-placement.js.map +7 -0
  615. package/dist/modules/workflows/lib/node-type-icons.js +54 -13
  616. package/dist/modules/workflows/lib/node-type-icons.js.map +2 -2
  617. package/dist/modules/workflows/lib/nodeFormTransforms.js +329 -19
  618. package/dist/modules/workflows/lib/nodeFormTransforms.js.map +2 -2
  619. package/dist/modules/workflows/lib/outcome-routing.js +158 -0
  620. package/dist/modules/workflows/lib/outcome-routing.js.map +7 -0
  621. package/dist/modules/workflows/lib/owned-definition.js +107 -0
  622. package/dist/modules/workflows/lib/owned-definition.js.map +7 -0
  623. package/dist/modules/workflows/lib/owned-node-changes.js +10 -0
  624. package/dist/modules/workflows/lib/owned-node-changes.js.map +7 -0
  625. package/dist/modules/workflows/lib/palette-drag.js +36 -0
  626. package/dist/modules/workflows/lib/palette-drag.js.map +7 -0
  627. package/dist/modules/workflows/lib/palette-drop.js +45 -0
  628. package/dist/modules/workflows/lib/palette-drop.js.map +7 -0
  629. package/dist/modules/workflows/lib/parallel-handler.js +57 -2
  630. package/dist/modules/workflows/lib/parallel-handler.js.map +2 -2
  631. package/dist/modules/workflows/lib/port-contract.js +54 -0
  632. package/dist/modules/workflows/lib/port-contract.js.map +7 -0
  633. package/dist/modules/workflows/lib/portal-task-access.js +89 -0
  634. package/dist/modules/workflows/lib/portal-task-access.js.map +7 -0
  635. package/dist/modules/workflows/lib/rerun-from-step.js +65 -0
  636. package/dist/modules/workflows/lib/rerun-from-step.js.map +7 -0
  637. package/dist/modules/workflows/lib/route-chip-events.js +23 -0
  638. package/dist/modules/workflows/lib/route-chip-events.js.map +7 -0
  639. package/dist/modules/workflows/lib/route-chips.js +91 -0
  640. package/dist/modules/workflows/lib/route-chips.js.map +7 -0
  641. package/dist/modules/workflows/lib/route-edge.js +17 -0
  642. package/dist/modules/workflows/lib/route-edge.js.map +7 -0
  643. package/dist/modules/workflows/lib/route-kinds.js +67 -0
  644. package/dist/modules/workflows/lib/route-kinds.js.map +7 -0
  645. package/dist/modules/workflows/lib/route-priority.js +104 -0
  646. package/dist/modules/workflows/lib/route-priority.js.map +7 -0
  647. package/dist/modules/workflows/lib/run-duration.js +44 -0
  648. package/dist/modules/workflows/lib/run-duration.js.map +7 -0
  649. package/dist/modules/workflows/lib/run-event-tone.js +25 -0
  650. package/dist/modules/workflows/lib/run-event-tone.js.map +7 -0
  651. package/dist/modules/workflows/lib/run-execution.js +305 -0
  652. package/dist/modules/workflows/lib/run-execution.js.map +7 -0
  653. package/dist/modules/workflows/lib/run-gantt.js +180 -0
  654. package/dist/modules/workflows/lib/run-gantt.js.map +7 -0
  655. package/dist/modules/workflows/lib/run-outcome-evidence.js +33 -0
  656. package/dist/modules/workflows/lib/run-outcome-evidence.js.map +7 -0
  657. package/dist/modules/workflows/lib/run-outcome.js +48 -0
  658. package/dist/modules/workflows/lib/run-outcome.js.map +7 -0
  659. package/dist/modules/workflows/lib/sample-resolver.js +71 -0
  660. package/dist/modules/workflows/lib/sample-resolver.js.map +7 -0
  661. package/dist/modules/workflows/lib/seeds.js +1 -1
  662. package/dist/modules/workflows/lib/seeds.js.map +2 -2
  663. package/dist/modules/workflows/lib/server-output-contract.js +65 -0
  664. package/dist/modules/workflows/lib/server-output-contract.js.map +7 -0
  665. package/dist/modules/workflows/lib/set-variable.js +47 -0
  666. package/dist/modules/workflows/lib/set-variable.js.map +7 -0
  667. package/dist/modules/workflows/lib/signal-handler.js +63 -4
  668. package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
  669. package/dist/modules/workflows/lib/start-fixtures.js +42 -0
  670. package/dist/modules/workflows/lib/start-fixtures.js.map +7 -0
  671. package/dist/modules/workflows/lib/status-colors.js +153 -22
  672. package/dist/modules/workflows/lib/status-colors.js.map +2 -2
  673. package/dist/modules/workflows/lib/step-handler.js +529 -53
  674. package/dist/modules/workflows/lib/step-handler.js.map +3 -3
  675. package/dist/modules/workflows/lib/step-presentation.js +147 -0
  676. package/dist/modules/workflows/lib/step-presentation.js.map +7 -0
  677. package/dist/modules/workflows/lib/step-through.js +26 -0
  678. package/dist/modules/workflows/lib/step-through.js.map +7 -0
  679. package/dist/modules/workflows/lib/step-type-conversion.js +167 -0
  680. package/dist/modules/workflows/lib/step-type-conversion.js.map +7 -0
  681. package/dist/modules/workflows/lib/subgraph-clipboard.js +114 -0
  682. package/dist/modules/workflows/lib/subgraph-clipboard.js.map +7 -0
  683. package/dist/modules/workflows/lib/task-decision-context.js +38 -0
  684. package/dist/modules/workflows/lib/task-decision-context.js.map +7 -0
  685. package/dist/modules/workflows/lib/task-decisions.js +49 -0
  686. package/dist/modules/workflows/lib/task-decisions.js.map +7 -0
  687. package/dist/modules/workflows/lib/task-entity-access.js +62 -0
  688. package/dist/modules/workflows/lib/task-entity-access.js.map +7 -0
  689. package/dist/modules/workflows/lib/task-entity-aliases.js +39 -0
  690. package/dist/modules/workflows/lib/task-entity-aliases.js.map +7 -0
  691. package/dist/modules/workflows/lib/task-entity-types.js +36 -0
  692. package/dist/modules/workflows/lib/task-entity-types.js.map +7 -0
  693. package/dist/modules/workflows/lib/task-form-registry.js +33 -0
  694. package/dist/modules/workflows/lib/task-form-registry.js.map +7 -0
  695. package/dist/modules/workflows/lib/task-form-schema.js +75 -0
  696. package/dist/modules/workflows/lib/task-form-schema.js.map +7 -0
  697. package/dist/modules/workflows/lib/task-handler.js +251 -32
  698. package/dist/modules/workflows/lib/task-handler.js.map +2 -2
  699. package/dist/modules/workflows/lib/task-inspector-config.js +182 -0
  700. package/dist/modules/workflows/lib/task-inspector-config.js.map +7 -0
  701. package/dist/modules/workflows/lib/task-list-query.js +19 -0
  702. package/dist/modules/workflows/lib/task-list-query.js.map +7 -0
  703. package/dist/modules/workflows/lib/task-notifications.js +119 -0
  704. package/dist/modules/workflows/lib/task-notifications.js.map +7 -0
  705. package/dist/modules/workflows/lib/task-permission-settings.js +43 -0
  706. package/dist/modules/workflows/lib/task-permission-settings.js.map +7 -0
  707. package/dist/modules/workflows/lib/task-presets.js +35 -0
  708. package/dist/modules/workflows/lib/task-presets.js.map +7 -0
  709. package/dist/modules/workflows/lib/task-quick-action.js +45 -0
  710. package/dist/modules/workflows/lib/task-quick-action.js.map +7 -0
  711. package/dist/modules/workflows/lib/task-resolution.js +120 -0
  712. package/dist/modules/workflows/lib/task-resolution.js.map +7 -0
  713. package/dist/modules/workflows/lib/task-sla.js +357 -0
  714. package/dist/modules/workflows/lib/task-sla.js.map +7 -0
  715. package/dist/modules/workflows/lib/task-visibility-request.js +266 -0
  716. package/dist/modules/workflows/lib/task-visibility-request.js.map +7 -0
  717. package/dist/modules/workflows/lib/task-visibility.js +194 -0
  718. package/dist/modules/workflows/lib/task-visibility.js.map +7 -0
  719. package/dist/modules/workflows/lib/timer-handler.js +3 -1
  720. package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
  721. package/dist/modules/workflows/lib/transition-handler.js +148 -20
  722. package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
  723. package/dist/modules/workflows/lib/trigger-node.js +121 -0
  724. package/dist/modules/workflows/lib/trigger-node.js.map +7 -0
  725. package/dist/modules/workflows/lib/visual-editor-navigation.js +14 -0
  726. package/dist/modules/workflows/lib/visual-editor-navigation.js.map +7 -0
  727. package/dist/modules/workflows/lib/work-inbox/empty-state.js +52 -0
  728. package/dist/modules/workflows/lib/work-inbox/empty-state.js.map +7 -0
  729. package/dist/modules/workflows/lib/work-inbox/entity-links.js +63 -0
  730. package/dist/modules/workflows/lib/work-inbox/entity-links.js.map +7 -0
  731. package/dist/modules/workflows/lib/work-inbox/navigation.js +11 -0
  732. package/dist/modules/workflows/lib/work-inbox/navigation.js.map +7 -0
  733. package/dist/modules/workflows/lib/work-inbox/presentation.js +90 -0
  734. package/dist/modules/workflows/lib/work-inbox/presentation.js.map +7 -0
  735. package/dist/modules/workflows/lib/work-inbox/provider.js +118 -0
  736. package/dist/modules/workflows/lib/work-inbox/provider.js.map +7 -0
  737. package/dist/modules/workflows/lib/work-inbox/query.js +70 -0
  738. package/dist/modules/workflows/lib/work-inbox/query.js.map +7 -0
  739. package/dist/modules/workflows/lib/work-inbox/service.js +56 -0
  740. package/dist/modules/workflows/lib/work-inbox/service.js.map +7 -0
  741. package/dist/modules/workflows/lib/work-inbox/user-task-source.js +149 -0
  742. package/dist/modules/workflows/lib/work-inbox/user-task-source.js.map +7 -0
  743. package/dist/modules/workflows/lib/workflow-command-enablement.js +57 -0
  744. package/dist/modules/workflows/lib/workflow-command-enablement.js.map +7 -0
  745. package/dist/modules/workflows/lib/workflow-command-settings.js +54 -0
  746. package/dist/modules/workflows/lib/workflow-command-settings.js.map +7 -0
  747. package/dist/modules/workflows/lib/workflow-executor.js +658 -6
  748. package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
  749. package/dist/modules/workflows/lib/workflow-function-registry.js +40 -0
  750. package/dist/modules/workflows/lib/workflow-function-registry.js.map +7 -0
  751. package/dist/modules/workflows/lib/workflow-safe-commands.js +11 -1
  752. package/dist/modules/workflows/lib/workflow-safe-commands.js.map +2 -2
  753. package/dist/modules/workflows/lib/workflow-templates.js +69 -0
  754. package/dist/modules/workflows/lib/workflow-templates.js.map +7 -0
  755. package/dist/modules/workflows/migrations/Migration20260626214855_workflows.js +15 -0
  756. package/dist/modules/workflows/migrations/Migration20260626214855_workflows.js.map +7 -0
  757. package/dist/modules/workflows/migrations/Migration20260626222424_workflows.js +17 -0
  758. package/dist/modules/workflows/migrations/Migration20260626222424_workflows.js.map +7 -0
  759. package/dist/modules/workflows/migrations/Migration20260727074335_workflows.js +15 -0
  760. package/dist/modules/workflows/migrations/Migration20260727074335_workflows.js.map +7 -0
  761. package/dist/modules/workflows/migrations/Migration20260728104038_workflows.js +13 -0
  762. package/dist/modules/workflows/migrations/Migration20260728104038_workflows.js.map +7 -0
  763. package/dist/modules/workflows/migrations/Migration20260728163001_workflows.js +15 -0
  764. package/dist/modules/workflows/migrations/Migration20260728163001_workflows.js.map +7 -0
  765. package/dist/modules/workflows/migrations/Migration20260729061736_workflows.js +13 -0
  766. package/dist/modules/workflows/migrations/Migration20260729061736_workflows.js.map +7 -0
  767. package/dist/modules/workflows/migrations/Migration20260729192652_workflows.js +12 -0
  768. package/dist/modules/workflows/migrations/Migration20260729192652_workflows.js.map +7 -0
  769. package/dist/modules/workflows/migrations/Migration20260730085000_workflows.js +13 -0
  770. package/dist/modules/workflows/migrations/Migration20260730085000_workflows.js.map +7 -0
  771. package/dist/modules/workflows/migrations/Migration20260730092706_workflows.js +13 -0
  772. package/dist/modules/workflows/migrations/Migration20260730092706_workflows.js.map +7 -0
  773. package/dist/modules/workflows/notifications.js +38 -10
  774. package/dist/modules/workflows/notifications.js.map +2 -2
  775. package/dist/modules/workflows/setup.js +81 -1
  776. package/dist/modules/workflows/setup.js.map +2 -2
  777. package/dist/modules/workflows/subscribers/task-assigned-notification.js +19 -27
  778. package/dist/modules/workflows/subscribers/task-assigned-notification.js.map +2 -2
  779. package/dist/modules/workflows/subscribers/task-deadline-breached-notification.js +24 -0
  780. package/dist/modules/workflows/subscribers/task-deadline-breached-notification.js.map +7 -0
  781. package/dist/modules/workflows/subscribers/task-reminder-notification.js +24 -0
  782. package/dist/modules/workflows/subscribers/task-reminder-notification.js.map +7 -0
  783. package/dist/modules/workflows/widgets/injection/pending-work/widget.client.js +73 -0
  784. package/dist/modules/workflows/widgets/injection/pending-work/widget.client.js.map +7 -0
  785. package/dist/modules/workflows/widgets/injection/pending-work/widget.js +17 -0
  786. package/dist/modules/workflows/widgets/injection/pending-work/widget.js.map +7 -0
  787. package/dist/modules/workflows/widgets/injection-table.js +26 -0
  788. package/dist/modules/workflows/widgets/injection-table.js.map +2 -2
  789. package/dist/modules/workflows/workers/workflow-activities.worker.js +61 -39
  790. package/dist/modules/workflows/workers/workflow-activities.worker.js.map +2 -2
  791. package/dist/modules/workflows/workers/workflow-definition-metric-rollup.worker.js +40 -0
  792. package/dist/modules/workflows/workers/workflow-definition-metric-rollup.worker.js.map +7 -0
  793. package/dist/modules/workflows/workers/workflow-instance-bulk-replay.js +43 -0
  794. package/dist/modules/workflows/workers/workflow-instance-bulk-replay.js.map +7 -0
  795. package/dist/modules/workflows/workers/workflow-invoke-agent.worker.js +30 -0
  796. package/dist/modules/workflows/workers/workflow-invoke-agent.worker.js.map +7 -0
  797. package/generated/entities/action_log/index.ts +1 -0
  798. package/generated/entities/user/index.ts +1 -0
  799. package/generated/entities/user_task/index.ts +7 -0
  800. package/generated/entities/workflow_definition/index.ts +3 -0
  801. package/generated/entities/workflow_definition_draft/index.ts +11 -0
  802. package/generated/entities/workflow_definition_metric_rollup/index.ts +10 -0
  803. package/generated/entities/workflow_instance/index.ts +2 -0
  804. package/generated/entities.ids.generated.ts +4 -1
  805. package/generated/entity-fields-registry.ts +39 -0
  806. package/jest.setup.ts +13 -0
  807. package/package.json +8 -7
  808. package/src/bootstrap.ts +13 -3
  809. package/src/helpers/integration/workflowsFixtures.ts +765 -5
  810. package/src/helpers/integration/workflowsUi.ts +318 -0
  811. package/src/modules/attachments/lib/createFromBuffer.ts +120 -0
  812. package/src/modules/audit_logs/data/entities.ts +12 -0
  813. package/src/modules/audit_logs/data/validators.ts +1 -0
  814. package/src/modules/audit_logs/lib/projections.ts +5 -1
  815. package/src/modules/audit_logs/migrations/.snapshot-open-mercato.json +26 -0
  816. package/src/modules/audit_logs/migrations/Migration20260625120000.ts +15 -0
  817. package/src/modules/audit_logs/services/actionLogService.ts +3 -0
  818. package/src/modules/auth/data/entities.ts +21 -0
  819. package/src/modules/auth/i18n/de.json +31 -0
  820. package/src/modules/auth/i18n/en.json +31 -0
  821. package/src/modules/auth/i18n/es.json +31 -0
  822. package/src/modules/auth/i18n/ko.json +31 -0
  823. package/src/modules/auth/i18n/pl.json +31 -0
  824. package/src/modules/auth/lib/executionPrincipal.ts +235 -0
  825. package/src/modules/auth/migrations/.snapshot-open-mercato.json +16 -0
  826. package/src/modules/auth/migrations/Migration20260625050000.ts +21 -0
  827. package/src/modules/business_rules/components/InlineRuleEditor.tsx +231 -0
  828. package/src/modules/business_rules/data/validators.ts +6 -0
  829. package/src/modules/business_rules/i18n/de.json +4 -0
  830. package/src/modules/business_rules/i18n/en.json +4 -0
  831. package/src/modules/business_rules/i18n/es.json +4 -0
  832. package/src/modules/business_rules/i18n/ko.json +4 -0
  833. package/src/modules/business_rules/i18n/pl.json +4 -0
  834. package/src/modules/business_rules/lib/rule-engine.ts +15 -1
  835. package/src/modules/catalog/commands/products.ts +12 -0
  836. package/src/modules/catalog/i18n/de.json +1 -0
  837. package/src/modules/catalog/i18n/en.json +1 -0
  838. package/src/modules/catalog/i18n/es.json +1 -0
  839. package/src/modules/catalog/i18n/ko.json +1 -0
  840. package/src/modules/catalog/i18n/pl.json +1 -0
  841. package/src/modules/catalog/workflows.ts +35 -0
  842. package/src/modules/customer_accounts/AGENTS.md +11 -0
  843. package/src/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.tsx +2 -0
  844. package/src/modules/customer_accounts/cli.ts +96 -0
  845. package/src/modules/customer_accounts/i18n/de.json +5 -0
  846. package/src/modules/customer_accounts/i18n/en.json +5 -0
  847. package/src/modules/customer_accounts/i18n/es.json +5 -0
  848. package/src/modules/customer_accounts/i18n/ko.json +5 -0
  849. package/src/modules/customer_accounts/i18n/pl.json +5 -0
  850. package/src/modules/customer_accounts/lib/customerRoleAclSync.ts +92 -0
  851. package/src/modules/customer_accounts/setup.ts +15 -3
  852. package/src/modules/customers/commands/deals.ts +5 -0
  853. package/src/modules/customers/components/detail/ChangelogEntryRow.tsx +4 -2
  854. package/src/modules/customers/components/detail/utils.ts +2 -0
  855. package/src/modules/customers/events.ts +21 -3
  856. package/src/modules/customers/i18n/de.json +4 -0
  857. package/src/modules/customers/i18n/en.json +4 -0
  858. package/src/modules/customers/i18n/es.json +4 -0
  859. package/src/modules/customers/i18n/ko.json +4 -0
  860. package/src/modules/customers/i18n/pl.json +4 -0
  861. package/src/modules/customers/lib/link-workflow-task-handler.ts +136 -0
  862. package/src/modules/customers/lib/todoCompatibility.ts +4 -1
  863. package/src/modules/customers/lib/workflowTaskLink.ts +23 -0
  864. package/src/modules/customers/subscribers/link-workflow-task.ts +19 -0
  865. package/src/modules/customers/workflows.ts +57 -0
  866. package/src/modules/entities/api/records.ts +18 -62
  867. package/src/modules/entities/lib/entityClassification.ts +102 -0
  868. package/src/modules/sales/commands/documents.ts +46 -0
  869. package/src/modules/sales/events.ts +20 -2
  870. package/src/modules/sales/i18n/de.json +2 -1
  871. package/src/modules/sales/i18n/en.json +2 -1
  872. package/src/modules/sales/i18n/es.json +2 -1
  873. package/src/modules/sales/i18n/ko.json +2 -1
  874. package/src/modules/sales/i18n/pl.json +2 -1
  875. package/src/modules/sales/workflows.ts +12 -1
  876. package/src/modules/seeds/README.md +86 -0
  877. package/src/modules/seeds/cli.ts +220 -0
  878. package/src/modules/seeds/examples/sample-seed.json +26 -0
  879. package/src/modules/seeds/index.ts +11 -0
  880. package/src/modules/workflows/AGENTS.md +851 -10
  881. package/src/modules/workflows/acl.ts +96 -0
  882. package/src/modules/workflows/ai-agents.ts +80 -0
  883. package/src/modules/workflows/ai-tools/authoring-pack.ts +798 -0
  884. package/src/modules/workflows/ai-tools/types.ts +117 -0
  885. package/src/modules/workflows/ai-tools.ts +20 -0
  886. package/src/modules/workflows/api/command-settings/route.ts +171 -0
  887. package/src/modules/workflows/api/commands/route.ts +109 -0
  888. package/src/modules/workflows/api/definitions/[id]/callers/route.ts +95 -0
  889. package/src/modules/workflows/api/definitions/[id]/context-schema/route.ts +187 -0
  890. package/src/modules/workflows/api/definitions/[id]/customize/route.ts +6 -1
  891. package/src/modules/workflows/api/definitions/[id]/draft/route.ts +395 -0
  892. package/src/modules/workflows/api/definitions/[id]/publish/route.ts +250 -0
  893. package/src/modules/workflows/api/definitions/[id]/reset-to-code/route.ts +5 -0
  894. package/src/modules/workflows/api/definitions/[id]/route.ts +107 -7
  895. package/src/modules/workflows/api/definitions/[id]/test-step/route.ts +288 -0
  896. package/src/modules/workflows/api/definitions/generate/route.ts +335 -0
  897. package/src/modules/workflows/api/definitions/route.ts +88 -113
  898. package/src/modules/workflows/api/definitions/serialize.ts +9 -0
  899. package/src/modules/workflows/api/endpoints/route.ts +88 -0
  900. package/src/modules/workflows/api/functions/route.ts +91 -0
  901. package/src/modules/workflows/api/grantable-features/route.ts +102 -0
  902. package/src/modules/workflows/api/instances/[id]/context/route.ts +214 -0
  903. package/src/modules/workflows/api/instances/[id]/rerun-step/route.ts +226 -0
  904. package/src/modules/workflows/api/instances/[id]/retry/route.ts +18 -2
  905. package/src/modules/workflows/api/instances/[id]/step-through/route.ts +195 -0
  906. package/src/modules/workflows/api/instances/[id]/steps/route.ts +160 -0
  907. package/src/modules/workflows/api/instances/[id]/would-do/route.ts +216 -0
  908. package/src/modules/workflows/api/instances/bulk-replay/route.ts +141 -0
  909. package/src/modules/workflows/api/instances/failure-queue/route.ts +197 -0
  910. package/src/modules/workflows/api/instances/route.ts +135 -3
  911. package/src/modules/workflows/api/metrics/definitions/route.ts +262 -0
  912. package/src/modules/workflows/api/openapi.ts +549 -2
  913. package/src/modules/workflows/api/portal/tasks/[id]/complete/route.ts +160 -0
  914. package/src/modules/workflows/api/portal/tasks/[id]/route.ts +124 -0
  915. package/src/modules/workflows/api/portal/tasks/route.ts +157 -0
  916. package/src/modules/workflows/api/rule-usage/route.ts +94 -0
  917. package/src/modules/workflows/api/task-settings/route.ts +138 -0
  918. package/src/modules/workflows/api/tasks/[id]/claim/route.ts +42 -17
  919. package/src/modules/workflows/api/tasks/[id]/complete/route.ts +47 -15
  920. package/src/modules/workflows/api/tasks/[id]/reassign/route.ts +197 -0
  921. package/src/modules/workflows/api/tasks/[id]/route.ts +57 -6
  922. package/src/modules/workflows/api/tasks/[id]/unclaim/route.ts +132 -0
  923. package/src/modules/workflows/api/tasks/route.ts +60 -5
  924. package/src/modules/workflows/api/tasks/serialize.ts +119 -0
  925. package/src/modules/workflows/api/templates/route.ts +87 -0
  926. package/src/modules/workflows/api/work-inbox/next/route.ts +170 -0
  927. package/src/modules/workflows/api/work-inbox/route.ts +153 -0
  928. package/src/modules/workflows/backend/config/workflows/page.meta.ts +33 -0
  929. package/src/modules/workflows/backend/config/workflows/page.tsx +12 -0
  930. package/src/modules/workflows/backend/definitions/[id]/page.tsx +19 -343
  931. package/src/modules/workflows/backend/definitions/create/page.meta.ts +1 -1
  932. package/src/modules/workflows/backend/definitions/create/page.tsx +19 -59
  933. package/src/modules/workflows/backend/definitions/page.tsx +156 -76
  934. package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +3129 -584
  935. package/src/modules/workflows/backend/instances/[id]/page.meta.ts +1 -1
  936. package/src/modules/workflows/backend/instances/[id]/page.tsx +711 -539
  937. package/src/modules/workflows/backend/instances/failure-queue/page.meta.ts +16 -0
  938. package/src/modules/workflows/backend/instances/failure-queue/page.tsx +311 -0
  939. package/src/modules/workflows/backend/instances/page.meta.ts +1 -1
  940. package/src/modules/workflows/backend/instances/page.tsx +218 -38
  941. package/src/modules/workflows/backend/tasks/[id]/page.tsx +639 -400
  942. package/src/modules/workflows/backend/tasks/page.meta.ts +7 -0
  943. package/src/modules/workflows/backend/tasks/page.tsx +20 -333
  944. package/src/modules/workflows/backend/work-inbox/page.meta.ts +15 -0
  945. package/src/modules/workflows/backend/work-inbox/page.tsx +506 -0
  946. package/src/modules/workflows/cli.ts +1 -1
  947. package/src/modules/workflows/commands/tasks.ts +146 -0
  948. package/src/modules/workflows/components/ActivitiesEditor.tsx +91 -114
  949. package/src/modules/workflows/components/ActivityEditDialog.tsx +244 -0
  950. package/src/modules/workflows/components/AgentSelector.tsx +200 -0
  951. package/src/modules/workflows/components/AnnotationEditDialog.tsx +157 -0
  952. package/src/modules/workflows/components/BusinessRuleUsagePanel.tsx +106 -0
  953. package/src/modules/workflows/components/BusinessRulesSelector.tsx +71 -17
  954. package/src/modules/workflows/components/ConfigJsonTextarea.tsx +111 -0
  955. package/src/modules/workflows/components/ContextSchemaEditor.tsx +165 -0
  956. package/src/modules/workflows/components/DefinitionErrorHandlerField.tsx +133 -0
  957. package/src/modules/workflows/components/DefinitionMetadataDrawer.tsx +456 -0
  958. package/src/modules/workflows/components/DefinitionMetricsCells.tsx +212 -0
  959. package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +196 -95
  960. package/src/modules/workflows/components/EdgeEditDialog.tsx +15 -16
  961. package/src/modules/workflows/components/EdgeEditDialogCrudForm.tsx +130 -80
  962. package/src/modules/workflows/components/InputDataPanel.tsx +177 -0
  963. package/src/modules/workflows/components/InspectorPanel.tsx +250 -0
  964. package/src/modules/workflows/components/NodeEditDialog.tsx +444 -38
  965. package/src/modules/workflows/components/NodeEditDialogCrudForm.tsx +848 -178
  966. package/src/modules/workflows/components/StepsEditor.tsx +9 -2
  967. package/src/modules/workflows/components/TemplateGalleryDialog.tsx +205 -0
  968. package/src/modules/workflows/components/TransitionsEditor.tsx +98 -89
  969. package/src/modules/workflows/components/TriggersDialog.tsx +83 -0
  970. package/src/modules/workflows/components/TriggersEditor.tsx +363 -0
  971. package/src/modules/workflows/components/WorkflowAiDraftDialog.tsx +383 -0
  972. package/src/modules/workflows/components/WorkflowCodeView.tsx +257 -0
  973. package/src/modules/workflows/components/WorkflowCommandPalette.tsx +82 -0
  974. package/src/modules/workflows/components/WorkflowCompensationGhostEdge.tsx +78 -0
  975. package/src/modules/workflows/components/WorkflowDataMappingEdge.tsx +46 -0
  976. package/src/modules/workflows/components/WorkflowGraph.tsx +54 -1
  977. package/src/modules/workflows/components/WorkflowGraphImpl.tsx +463 -37
  978. package/src/modules/workflows/components/WorkflowIconPicker.tsx +144 -0
  979. package/src/modules/workflows/components/WorkflowLegend.tsx +59 -33
  980. package/src/modules/workflows/components/WorkflowNodeCard.tsx +355 -28
  981. package/src/modules/workflows/components/WorkflowRouteChips.tsx +145 -0
  982. package/src/modules/workflows/components/WorkflowSelector.tsx +33 -14
  983. package/src/modules/workflows/components/WorkflowTransitionEdge.tsx +83 -10
  984. package/src/modules/workflows/components/WorkflowTransitionLabel.tsx +13 -2
  985. package/src/modules/workflows/components/fields/ActivityArrayEditor.tsx +120 -30
  986. package/src/modules/workflows/components/fields/ActivityConfigFields.tsx +675 -0
  987. package/src/modules/workflows/components/fields/ActivityTestPanel.tsx +250 -0
  988. package/src/modules/workflows/components/fields/AgentInvokeConfigField.tsx +580 -0
  989. package/src/modules/workflows/components/fields/AgentReviewOnBreachField.tsx +88 -0
  990. package/src/modules/workflows/components/fields/BranchingRoutesEditor.tsx +323 -0
  991. package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +36 -4
  992. package/src/modules/workflows/components/fields/CommandPicker.tsx +158 -0
  993. package/src/modules/workflows/components/fields/EndpointPicker.tsx +330 -0
  994. package/src/modules/workflows/components/fields/FormFieldArrayEditor.tsx +2 -2
  995. package/src/modules/workflows/components/fields/FunctionPicker.tsx +68 -0
  996. package/src/modules/workflows/components/fields/MappingArrayEditor.tsx +46 -12
  997. package/src/modules/workflows/components/fields/PortFieldArrayEditor.tsx +255 -0
  998. package/src/modules/workflows/components/fields/RolesMultiSelect.tsx +68 -0
  999. package/src/modules/workflows/components/fields/RouteOrderEditor.tsx +169 -0
  1000. package/src/modules/workflows/components/fields/SchemaBuilderDialog.tsx +139 -0
  1001. package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +2 -2
  1002. package/src/modules/workflows/components/fields/TaskAssignmentField.tsx +355 -0
  1003. package/src/modules/workflows/components/fields/TaskDeadlineFields.tsx +172 -0
  1004. package/src/modules/workflows/components/fields/TaskDecisionsField.tsx +294 -0
  1005. package/src/modules/workflows/components/fields/TaskEntityBindingsField.tsx +156 -0
  1006. package/src/modules/workflows/components/fields/TemplateTextControl.tsx +85 -0
  1007. package/src/modules/workflows/components/fields/VariablePickerButton.tsx +177 -0
  1008. package/src/modules/workflows/components/fields/ledgerDropTarget.ts +55 -0
  1009. package/src/modules/workflows/components/fields/useActivityTypeOptions.ts +19 -0
  1010. package/src/modules/workflows/components/formConfig.tsx +84 -10
  1011. package/src/modules/workflows/components/mobile/MobileDefinitionDetail.tsx +5 -0
  1012. package/src/modules/workflows/components/mobile/MobileMetadataSheet.tsx +10 -0
  1013. package/src/modules/workflows/components/mobile/MobileTaskForm.tsx +55 -19
  1014. package/src/modules/workflows/components/mobile/MobileVisualEditor.tsx +49 -40
  1015. package/src/modules/workflows/components/nodes/AnnotationGroupNode.tsx +81 -0
  1016. package/src/modules/workflows/components/nodes/AutomatedNode.tsx +34 -17
  1017. package/src/modules/workflows/components/nodes/EndNode.tsx +15 -14
  1018. package/src/modules/workflows/components/nodes/ErrorOutputHandle.tsx +32 -0
  1019. package/src/modules/workflows/components/nodes/IfElseNode.tsx +64 -0
  1020. package/src/modules/workflows/components/nodes/InvokeAgentNode.tsx +180 -0
  1021. package/src/modules/workflows/components/nodes/NodeOutcomeRows.tsx +143 -0
  1022. package/src/modules/workflows/components/nodes/ParallelForkNode.tsx +28 -15
  1023. package/src/modules/workflows/components/nodes/ParallelJoinNode.tsx +28 -15
  1024. package/src/modules/workflows/components/nodes/StartNode.tsx +78 -18
  1025. package/src/modules/workflows/components/nodes/StickyNoteNode.tsx +65 -0
  1026. package/src/modules/workflows/components/nodes/SubWorkflowNode.tsx +124 -23
  1027. package/src/modules/workflows/components/nodes/SwitchNode.tsx +64 -0
  1028. package/src/modules/workflows/components/nodes/TriggerCap.tsx +103 -0
  1029. package/src/modules/workflows/components/nodes/TriggerNode.tsx +151 -0
  1030. package/src/modules/workflows/components/nodes/UserTaskNode.tsx +67 -22
  1031. package/src/modules/workflows/components/nodes/WaitForConditionNode.tsx +74 -0
  1032. package/src/modules/workflows/components/nodes/WaitForSignalNode.tsx +31 -17
  1033. package/src/modules/workflows/components/nodes/WaitForTimerNode.tsx +31 -16
  1034. package/src/modules/workflows/components/nodes/index.ts +17 -0
  1035. package/src/modules/workflows/components/portal/PortalTaskForm.tsx +280 -0
  1036. package/src/modules/workflows/components/run/AgentActivityPanel.tsx +48 -0
  1037. package/src/modules/workflows/components/run/RerunStepDialog.tsx +133 -0
  1038. package/src/modules/workflows/components/run/RunEventBadge.tsx +37 -0
  1039. package/src/modules/workflows/components/run/RunGantt.tsx +180 -0
  1040. package/src/modules/workflows/components/run/RunStatusBadge.tsx +112 -0
  1041. package/src/modules/workflows/components/run/RunStepInspector.tsx +176 -0
  1042. package/src/modules/workflows/components/run/WouldDoReport.tsx +93 -0
  1043. package/src/modules/workflows/components/run/useAgentLabels.ts +42 -0
  1044. package/src/modules/workflows/components/run/useLastRunOverlay.ts +150 -0
  1045. package/src/modules/workflows/components/run/useLiveAgentActions.ts +70 -0
  1046. package/src/modules/workflows/components/run/useLiveRunUpdates.ts +89 -0
  1047. package/src/modules/workflows/components/settings/CommandSettingsPageClient.tsx +228 -0
  1048. package/src/modules/workflows/components/work-inbox/EntityContextPanel.tsx +179 -0
  1049. package/src/modules/workflows/components/work-inbox/ReassignTaskDialog.tsx +203 -0
  1050. package/src/modules/workflows/components/work-inbox/StatusChip.tsx +61 -0
  1051. package/src/modules/workflows/components/work-inbox/TaskActionNotice.tsx +77 -0
  1052. package/src/modules/workflows/components/work-inbox/TaskFormFields.tsx +322 -0
  1053. package/src/modules/workflows/components/work-inbox/WorkInboxEmptyState.tsx +43 -0
  1054. package/src/modules/workflows/data/activity-config-schemas.ts +249 -0
  1055. package/src/modules/workflows/data/activity-config-warnings.ts +71 -0
  1056. package/src/modules/workflows/data/branching-route-warnings.ts +129 -0
  1057. package/src/modules/workflows/data/entities.ts +397 -4
  1058. package/src/modules/workflows/data/metrics-validators.ts +51 -0
  1059. package/src/modules/workflows/data/task-primitives.ts +36 -0
  1060. package/src/modules/workflows/data/types.ts +81 -2
  1061. package/src/modules/workflows/data/validators.ts +729 -60
  1062. package/src/modules/workflows/di.ts +22 -0
  1063. package/src/modules/workflows/events.ts +68 -8
  1064. package/src/modules/workflows/examples/oze-residential-install-60-nodes.json +1545 -0
  1065. package/src/modules/workflows/examples/sales-pipeline-definition.json +35 -35
  1066. package/src/modules/workflows/examples/templates/lead-to-install.json +160 -0
  1067. package/src/modules/workflows/examples/templates/order-approval.json +230 -0
  1068. package/src/modules/workflows/examples/templates/task-escalation.json +110 -0
  1069. package/src/modules/workflows/examples/templates/webhook-integration.json +113 -0
  1070. package/src/modules/workflows/extension-points.ts +1 -1
  1071. package/src/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.meta.ts +21 -0
  1072. package/src/modules/workflows/frontend/[orgSlug]/portal/tasks/[id]/page.tsx +212 -0
  1073. package/src/modules/workflows/frontend/[orgSlug]/portal/tasks/page.meta.ts +25 -0
  1074. package/src/modules/workflows/frontend/[orgSlug]/portal/tasks/page.tsx +185 -0
  1075. package/src/modules/workflows/i18n/de.json +1083 -24
  1076. package/src/modules/workflows/i18n/en.json +1081 -22
  1077. package/src/modules/workflows/i18n/es.json +1083 -24
  1078. package/src/modules/workflows/i18n/ko.json +1072 -13
  1079. package/src/modules/workflows/i18n/pl.json +1082 -23
  1080. package/src/modules/workflows/lib/activity-executor.ts +855 -186
  1081. package/src/modules/workflows/lib/activity-queue-types.ts +120 -1
  1082. package/src/modules/workflows/lib/activity-registry-bootstrap.ts +7 -0
  1083. package/src/modules/workflows/lib/activity-registry.ts +89 -0
  1084. package/src/modules/workflows/lib/activity-types.ts +415 -0
  1085. package/src/modules/workflows/lib/activity-worker-handler.ts +744 -35
  1086. package/src/modules/workflows/lib/advanced-config.ts +41 -0
  1087. package/src/modules/workflows/lib/agent-disposition-task.ts +343 -0
  1088. package/src/modules/workflows/lib/agent-outcome-paths.ts +153 -0
  1089. package/src/modules/workflows/lib/agent-result-mapping.ts +88 -0
  1090. package/src/modules/workflows/lib/agent-review-inspector.ts +125 -0
  1091. package/src/modules/workflows/lib/agent-review.ts +171 -0
  1092. package/src/modules/workflows/lib/ai-authoring.ts +402 -0
  1093. package/src/modules/workflows/lib/ai-draft-runner.ts +105 -0
  1094. package/src/modules/workflows/lib/annotation-events.ts +15 -0
  1095. package/src/modules/workflows/lib/branching-routes.ts +280 -0
  1096. package/src/modules/workflows/lib/breach-routing.ts +142 -0
  1097. package/src/modules/workflows/lib/bulk-replay.ts +185 -0
  1098. package/src/modules/workflows/lib/business-rule-usage.ts +154 -0
  1099. package/src/modules/workflows/lib/caller-graph.ts +104 -0
  1100. package/src/modules/workflows/lib/code-view-apply.ts +178 -0
  1101. package/src/modules/workflows/lib/collect-validation-issues.ts +239 -0
  1102. package/src/modules/workflows/lib/compensation-ghosts.ts +134 -0
  1103. package/src/modules/workflows/lib/component-guard.ts +13 -0
  1104. package/src/modules/workflows/lib/condition-handler.ts +658 -0
  1105. package/src/modules/workflows/lib/context-ledger.ts +814 -0
  1106. package/src/modules/workflows/lib/crud-form-dialogs-flag.ts +5 -0
  1107. package/src/modules/workflows/lib/data-edge-mapping.ts +112 -0
  1108. package/src/modules/workflows/lib/definition-context-schema.ts +103 -0
  1109. package/src/modules/workflows/lib/definition-edit-safety.ts +228 -0
  1110. package/src/modules/workflows/lib/definition-error-body.ts +43 -0
  1111. package/src/modules/workflows/lib/definition-evaluation.ts +156 -0
  1112. package/src/modules/workflows/lib/definition-grant.ts +211 -0
  1113. package/src/modules/workflows/lib/definition-json-locations.ts +226 -0
  1114. package/src/modules/workflows/lib/definition-payload.ts +81 -0
  1115. package/src/modules/workflows/lib/draft-restore.ts +72 -0
  1116. package/src/modules/workflows/lib/dry-run.ts +203 -0
  1117. package/src/modules/workflows/lib/duration.ts +138 -24
  1118. package/src/modules/workflows/lib/edge-reattachment.ts +186 -0
  1119. package/src/modules/workflows/lib/edgeFormTransforms.ts +15 -14
  1120. package/src/modules/workflows/lib/editor-annotations.ts +301 -0
  1121. package/src/modules/workflows/lib/editor-commands.ts +205 -0
  1122. package/src/modules/workflows/lib/editor-history.ts +151 -0
  1123. package/src/modules/workflows/lib/endpoint-catalog.ts +283 -0
  1124. package/src/modules/workflows/lib/endpoint-path.ts +134 -0
  1125. package/src/modules/workflows/lib/engine-version.ts +67 -0
  1126. package/src/modules/workflows/lib/error-handler.ts +192 -0
  1127. package/src/modules/workflows/lib/error-routing.ts +236 -0
  1128. package/src/modules/workflows/lib/event-logger.ts +27 -0
  1129. package/src/modules/workflows/lib/expression-refs.ts +291 -0
  1130. package/src/modules/workflows/lib/failure-grouping.ts +134 -0
  1131. package/src/modules/workflows/lib/find-definition.ts +4 -0
  1132. package/src/modules/workflows/lib/flow-logic-warnings.ts +591 -0
  1133. package/src/modules/workflows/lib/graph-utils.ts +620 -110
  1134. package/src/modules/workflows/lib/icon-search.ts +65 -0
  1135. package/src/modules/workflows/lib/insert-at-cursor.ts +53 -0
  1136. package/src/modules/workflows/lib/instance-date-filter.ts +56 -0
  1137. package/src/modules/workflows/lib/interpolation-pipeline.ts +351 -0
  1138. package/src/modules/workflows/lib/ledger-drag.ts +61 -0
  1139. package/src/modules/workflows/lib/ledger-entry-display.ts +89 -0
  1140. package/src/modules/workflows/lib/ledger-schema-flatten.ts +137 -0
  1141. package/src/modules/workflows/lib/metrics/definition-metrics.ts +268 -0
  1142. package/src/modules/workflows/lib/metrics/metrics-display.ts +57 -0
  1143. package/src/modules/workflows/lib/metrics/rollup-schedule.ts +26 -0
  1144. package/src/modules/workflows/lib/metrics/rollup-service.ts +292 -0
  1145. package/src/modules/workflows/lib/node-config-summary.ts +235 -0
  1146. package/src/modules/workflows/lib/node-geometry.ts +168 -0
  1147. package/src/modules/workflows/lib/node-nudge.ts +63 -0
  1148. package/src/modules/workflows/lib/node-outcome-rows.ts +195 -0
  1149. package/src/modules/workflows/lib/node-placement.ts +104 -0
  1150. package/src/modules/workflows/lib/node-type-icons.ts +71 -10
  1151. package/src/modules/workflows/lib/nodeFormTransforms.ts +519 -28
  1152. package/src/modules/workflows/lib/outcome-routing.ts +346 -0
  1153. package/src/modules/workflows/lib/owned-definition.ts +188 -0
  1154. package/src/modules/workflows/lib/owned-node-changes.ts +29 -0
  1155. package/src/modules/workflows/lib/palette-drag.ts +68 -0
  1156. package/src/modules/workflows/lib/palette-drop.ts +114 -0
  1157. package/src/modules/workflows/lib/parallel-handler.ts +79 -2
  1158. package/src/modules/workflows/lib/port-contract.ts +107 -0
  1159. package/src/modules/workflows/lib/portal-task-access.ts +220 -0
  1160. package/src/modules/workflows/lib/rerun-from-step.ts +140 -0
  1161. package/src/modules/workflows/lib/route-chip-events.ts +45 -0
  1162. package/src/modules/workflows/lib/route-chips.ts +177 -0
  1163. package/src/modules/workflows/lib/route-edge.ts +57 -0
  1164. package/src/modules/workflows/lib/route-kinds.ts +166 -0
  1165. package/src/modules/workflows/lib/route-priority.ts +197 -0
  1166. package/src/modules/workflows/lib/run-duration.ts +70 -0
  1167. package/src/modules/workflows/lib/run-event-tone.ts +46 -0
  1168. package/src/modules/workflows/lib/run-execution.ts +598 -0
  1169. package/src/modules/workflows/lib/run-gantt.ts +311 -0
  1170. package/src/modules/workflows/lib/run-outcome-evidence.ts +60 -0
  1171. package/src/modules/workflows/lib/run-outcome.ts +142 -0
  1172. package/src/modules/workflows/lib/sample-resolver.ts +113 -0
  1173. package/src/modules/workflows/lib/seeds.ts +3 -1
  1174. package/src/modules/workflows/lib/server-output-contract.ts +120 -0
  1175. package/src/modules/workflows/lib/set-variable.ts +94 -0
  1176. package/src/modules/workflows/lib/signal-handler.ts +134 -4
  1177. package/src/modules/workflows/lib/start-fixtures.ts +93 -0
  1178. package/src/modules/workflows/lib/status-colors.ts +220 -21
  1179. package/src/modules/workflows/lib/step-handler.ts +744 -68
  1180. package/src/modules/workflows/lib/step-presentation.ts +295 -0
  1181. package/src/modules/workflows/lib/step-through.ts +71 -0
  1182. package/src/modules/workflows/lib/step-type-conversion.ts +263 -0
  1183. package/src/modules/workflows/lib/subgraph-clipboard.ts +214 -0
  1184. package/src/modules/workflows/lib/task-decision-context.ts +76 -0
  1185. package/src/modules/workflows/lib/task-decisions.ts +117 -0
  1186. package/src/modules/workflows/lib/task-entity-access.ts +181 -0
  1187. package/src/modules/workflows/lib/task-entity-aliases.ts +77 -0
  1188. package/src/modules/workflows/lib/task-entity-types.ts +66 -0
  1189. package/src/modules/workflows/lib/task-form-registry.ts +123 -0
  1190. package/src/modules/workflows/lib/task-form-schema.ts +129 -0
  1191. package/src/modules/workflows/lib/task-handler.ts +492 -51
  1192. package/src/modules/workflows/lib/task-inspector-config.ts +348 -0
  1193. package/src/modules/workflows/lib/task-list-query.ts +46 -0
  1194. package/src/modules/workflows/lib/task-notifications.ts +218 -0
  1195. package/src/modules/workflows/lib/task-permission-settings.ts +117 -0
  1196. package/src/modules/workflows/lib/task-presets.ts +95 -0
  1197. package/src/modules/workflows/lib/task-quick-action.ts +111 -0
  1198. package/src/modules/workflows/lib/task-resolution.ts +270 -0
  1199. package/src/modules/workflows/lib/task-sla.ts +628 -0
  1200. package/src/modules/workflows/lib/task-visibility-request.ts +668 -0
  1201. package/src/modules/workflows/lib/task-visibility.ts +627 -0
  1202. package/src/modules/workflows/lib/timer-handler.ts +8 -1
  1203. package/src/modules/workflows/lib/transition-handler.ts +228 -20
  1204. package/src/modules/workflows/lib/trigger-node.ts +272 -0
  1205. package/src/modules/workflows/lib/visual-editor-navigation.ts +29 -0
  1206. package/src/modules/workflows/lib/work-inbox/empty-state.ts +150 -0
  1207. package/src/modules/workflows/lib/work-inbox/entity-links.ts +99 -0
  1208. package/src/modules/workflows/lib/work-inbox/navigation.ts +28 -0
  1209. package/src/modules/workflows/lib/work-inbox/presentation.ts +163 -0
  1210. package/src/modules/workflows/lib/work-inbox/provider.ts +390 -0
  1211. package/src/modules/workflows/lib/work-inbox/query.ts +103 -0
  1212. package/src/modules/workflows/lib/work-inbox/service.ts +122 -0
  1213. package/src/modules/workflows/lib/work-inbox/user-task-source.ts +240 -0
  1214. package/src/modules/workflows/lib/workflow-command-enablement.ts +188 -0
  1215. package/src/modules/workflows/lib/workflow-command-settings.ts +124 -0
  1216. package/src/modules/workflows/lib/workflow-executor.ts +1036 -10
  1217. package/src/modules/workflows/lib/workflow-function-registry.ts +44 -0
  1218. package/src/modules/workflows/lib/workflow-safe-commands.ts +42 -1
  1219. package/src/modules/workflows/lib/workflow-templates.ts +91 -0
  1220. package/src/modules/workflows/migrations/.snapshot-open-mercato.json +2321 -698
  1221. package/src/modules/workflows/migrations/Migration20260626214855_workflows.ts +15 -0
  1222. package/src/modules/workflows/migrations/Migration20260626222424_workflows.ts +17 -0
  1223. package/src/modules/workflows/migrations/Migration20260727074335_workflows.ts +15 -0
  1224. package/src/modules/workflows/migrations/Migration20260728104038_workflows.ts +13 -0
  1225. package/src/modules/workflows/migrations/Migration20260728163001_workflows.ts +36 -0
  1226. package/src/modules/workflows/migrations/Migration20260729061736_workflows.ts +13 -0
  1227. package/src/modules/workflows/migrations/Migration20260729192652_workflows.ts +11 -0
  1228. package/src/modules/workflows/migrations/Migration20260730085000_workflows.ts +13 -0
  1229. package/src/modules/workflows/migrations/Migration20260730092706_workflows.ts +13 -0
  1230. package/src/modules/workflows/notifications.ts +40 -10
  1231. package/src/modules/workflows/setup.ts +128 -0
  1232. package/src/modules/workflows/subscribers/task-assigned-notification.ts +36 -45
  1233. package/src/modules/workflows/subscribers/task-deadline-breached-notification.ts +31 -0
  1234. package/src/modules/workflows/subscribers/task-reminder-notification.ts +31 -0
  1235. package/src/modules/workflows/widgets/injection/pending-work/widget.client.tsx +119 -0
  1236. package/src/modules/workflows/widgets/injection/pending-work/widget.ts +27 -0
  1237. package/src/modules/workflows/widgets/injection-table.ts +52 -2
  1238. package/src/modules/workflows/workers/workflow-activities.worker.ts +95 -42
  1239. package/src/modules/workflows/workers/workflow-definition-metric-rollup.worker.ts +71 -0
  1240. package/src/modules/workflows/workers/workflow-instance-bulk-replay.ts +51 -0
  1241. package/src/modules/workflows/workers/workflow-invoke-agent.worker.ts +72 -0
@@ -1,69 +1,131 @@
1
1
  {
2
+ "name": "public",
2
3
  "namespaces": [
3
4
  "public"
4
5
  ],
5
- "name": "public",
6
6
  "tables": [
7
7
  {
8
+ "name": "step_instances",
9
+ "schema": "public",
8
10
  "columns": {
9
- "id": {
10
- "name": "id",
11
+ "branch_instance_id": {
12
+ "name": "branch_instance_id",
11
13
  "type": "uuid",
12
14
  "unsigned": false,
13
15
  "autoincrement": false,
14
16
  "primary": false,
15
- "nullable": false,
16
- "default": "gen_random_uuid()",
17
+ "nullable": true,
18
+ "unique": false,
19
+ "length": null,
20
+ "precision": null,
21
+ "scale": null,
22
+ "default": null,
23
+ "comment": null,
24
+ "collation": null,
25
+ "enumItems": [],
17
26
  "mappedType": "uuid"
18
27
  },
19
- "workflow_instance_id": {
20
- "name": "workflow_instance_id",
21
- "type": "uuid",
28
+ "created_at": {
29
+ "name": "created_at",
30
+ "type": "timestamptz(6)",
22
31
  "unsigned": false,
23
32
  "autoincrement": false,
24
33
  "primary": false,
25
34
  "nullable": false,
26
- "mappedType": "uuid"
35
+ "unique": false,
36
+ "length": 6,
37
+ "precision": null,
38
+ "scale": null,
39
+ "default": null,
40
+ "comment": null,
41
+ "collation": null,
42
+ "enumItems": [],
43
+ "mappedType": "datetime"
27
44
  },
28
- "step_id": {
29
- "name": "step_id",
30
- "type": "varchar(100)",
45
+ "entered_at": {
46
+ "name": "entered_at",
47
+ "type": "timestamptz(6)",
31
48
  "unsigned": false,
32
49
  "autoincrement": false,
33
50
  "primary": false,
34
- "nullable": false,
35
- "length": 100,
36
- "mappedType": "string"
51
+ "nullable": true,
52
+ "unique": false,
53
+ "length": 6,
54
+ "precision": null,
55
+ "scale": null,
56
+ "default": null,
57
+ "comment": null,
58
+ "collation": null,
59
+ "enumItems": [],
60
+ "mappedType": "datetime"
37
61
  },
38
- "step_name": {
39
- "name": "step_name",
40
- "type": "varchar(255)",
62
+ "error_data": {
63
+ "name": "error_data",
64
+ "type": "jsonb",
41
65
  "unsigned": false,
42
66
  "autoincrement": false,
43
67
  "primary": false,
44
- "nullable": false,
45
- "length": 255,
46
- "mappedType": "string"
68
+ "nullable": true,
69
+ "unique": false,
70
+ "length": null,
71
+ "precision": null,
72
+ "scale": null,
73
+ "default": null,
74
+ "comment": null,
75
+ "collation": null,
76
+ "enumItems": [],
77
+ "mappedType": "json"
47
78
  },
48
- "step_type": {
49
- "name": "step_type",
50
- "type": "varchar(50)",
79
+ "execution_time_ms": {
80
+ "name": "execution_time_ms",
81
+ "type": "int",
51
82
  "unsigned": false,
52
83
  "autoincrement": false,
53
84
  "primary": false,
54
- "nullable": false,
55
- "length": 50,
56
- "mappedType": "string"
85
+ "nullable": true,
86
+ "unique": false,
87
+ "length": null,
88
+ "precision": null,
89
+ "scale": null,
90
+ "default": null,
91
+ "comment": null,
92
+ "collation": null,
93
+ "enumItems": [],
94
+ "mappedType": "integer"
57
95
  },
58
- "status": {
59
- "name": "status",
60
- "type": "varchar(20)",
96
+ "exited_at": {
97
+ "name": "exited_at",
98
+ "type": "timestamptz(6)",
61
99
  "unsigned": false,
62
100
  "autoincrement": false,
63
101
  "primary": false,
102
+ "nullable": true,
103
+ "unique": false,
104
+ "length": 6,
105
+ "precision": null,
106
+ "scale": null,
107
+ "default": null,
108
+ "comment": null,
109
+ "collation": null,
110
+ "enumItems": [],
111
+ "mappedType": "datetime"
112
+ },
113
+ "id": {
114
+ "name": "id",
115
+ "type": "uuid",
116
+ "unsigned": false,
117
+ "autoincrement": false,
118
+ "primary": true,
64
119
  "nullable": false,
65
- "length": 20,
66
- "mappedType": "string"
120
+ "unique": false,
121
+ "length": null,
122
+ "precision": null,
123
+ "scale": null,
124
+ "default": "gen_random_uuid()",
125
+ "comment": null,
126
+ "collation": null,
127
+ "enumItems": [],
128
+ "mappedType": "uuid"
67
129
  },
68
130
  "input_data": {
69
131
  "name": "input_data",
@@ -72,298 +134,494 @@
72
134
  "autoincrement": false,
73
135
  "primary": false,
74
136
  "nullable": true,
137
+ "unique": false,
138
+ "length": null,
139
+ "precision": null,
140
+ "scale": null,
141
+ "default": null,
142
+ "comment": null,
143
+ "collation": null,
144
+ "enumItems": [],
75
145
  "mappedType": "json"
76
146
  },
77
- "output_data": {
78
- "name": "output_data",
79
- "type": "jsonb",
147
+ "organization_id": {
148
+ "name": "organization_id",
149
+ "type": "uuid",
80
150
  "unsigned": false,
81
151
  "autoincrement": false,
82
152
  "primary": false,
83
- "nullable": true,
84
- "mappedType": "json"
153
+ "nullable": false,
154
+ "unique": false,
155
+ "length": null,
156
+ "precision": null,
157
+ "scale": null,
158
+ "default": null,
159
+ "comment": null,
160
+ "collation": null,
161
+ "enumItems": [],
162
+ "mappedType": "uuid"
85
163
  },
86
- "error_data": {
87
- "name": "error_data",
164
+ "output_data": {
165
+ "name": "output_data",
88
166
  "type": "jsonb",
89
167
  "unsigned": false,
90
168
  "autoincrement": false,
91
169
  "primary": false,
92
170
  "nullable": true,
171
+ "unique": false,
172
+ "length": null,
173
+ "precision": null,
174
+ "scale": null,
175
+ "default": null,
176
+ "comment": null,
177
+ "collation": null,
178
+ "enumItems": [],
93
179
  "mappedType": "json"
94
180
  },
95
- "entered_at": {
96
- "name": "entered_at",
97
- "type": "timestamptz",
181
+ "retry_count": {
182
+ "name": "retry_count",
183
+ "type": "int",
98
184
  "unsigned": false,
99
185
  "autoincrement": false,
100
186
  "primary": false,
101
- "nullable": true,
102
- "length": 6,
103
- "mappedType": "datetime"
187
+ "nullable": false,
188
+ "unique": false,
189
+ "length": null,
190
+ "precision": null,
191
+ "scale": null,
192
+ "default": "0",
193
+ "comment": null,
194
+ "collation": null,
195
+ "enumItems": [],
196
+ "mappedType": "integer"
104
197
  },
105
- "exited_at": {
106
- "name": "exited_at",
107
- "type": "timestamptz",
198
+ "status": {
199
+ "name": "status",
200
+ "type": "varchar(20)",
108
201
  "unsigned": false,
109
202
  "autoincrement": false,
110
203
  "primary": false,
111
- "nullable": true,
112
- "length": 6,
113
- "mappedType": "datetime"
204
+ "nullable": false,
205
+ "unique": false,
206
+ "length": 20,
207
+ "precision": null,
208
+ "scale": null,
209
+ "default": null,
210
+ "comment": null,
211
+ "collation": null,
212
+ "enumItems": [],
213
+ "mappedType": "string"
114
214
  },
115
- "execution_time_ms": {
116
- "name": "execution_time_ms",
117
- "type": "int",
215
+ "step_id": {
216
+ "name": "step_id",
217
+ "type": "varchar(100)",
118
218
  "unsigned": false,
119
219
  "autoincrement": false,
120
220
  "primary": false,
121
- "nullable": true,
122
- "mappedType": "integer"
221
+ "nullable": false,
222
+ "unique": false,
223
+ "length": 100,
224
+ "precision": null,
225
+ "scale": null,
226
+ "default": null,
227
+ "comment": null,
228
+ "collation": null,
229
+ "enumItems": [],
230
+ "mappedType": "string"
123
231
  },
124
- "retry_count": {
125
- "name": "retry_count",
126
- "type": "int",
232
+ "step_name": {
233
+ "name": "step_name",
234
+ "type": "varchar(255)",
127
235
  "unsigned": false,
128
236
  "autoincrement": false,
129
237
  "primary": false,
130
238
  "nullable": false,
131
- "default": "0",
132
- "mappedType": "integer"
239
+ "unique": false,
240
+ "length": 255,
241
+ "precision": null,
242
+ "scale": null,
243
+ "default": null,
244
+ "comment": null,
245
+ "collation": null,
246
+ "enumItems": [],
247
+ "mappedType": "string"
133
248
  },
134
- "tenant_id": {
135
- "name": "tenant_id",
136
- "type": "uuid",
249
+ "step_type": {
250
+ "name": "step_type",
251
+ "type": "varchar(50)",
137
252
  "unsigned": false,
138
253
  "autoincrement": false,
139
254
  "primary": false,
140
255
  "nullable": false,
141
- "mappedType": "uuid"
256
+ "unique": false,
257
+ "length": 50,
258
+ "precision": null,
259
+ "scale": null,
260
+ "default": null,
261
+ "comment": null,
262
+ "collation": null,
263
+ "enumItems": [],
264
+ "mappedType": "string"
142
265
  },
143
- "organization_id": {
144
- "name": "organization_id",
266
+ "tenant_id": {
267
+ "name": "tenant_id",
145
268
  "type": "uuid",
146
269
  "unsigned": false,
147
270
  "autoincrement": false,
148
271
  "primary": false,
149
272
  "nullable": false,
273
+ "unique": false,
274
+ "length": null,
275
+ "precision": null,
276
+ "scale": null,
277
+ "default": null,
278
+ "comment": null,
279
+ "collation": null,
280
+ "enumItems": [],
150
281
  "mappedType": "uuid"
151
282
  },
152
- "created_at": {
153
- "name": "created_at",
154
- "type": "timestamptz",
155
- "unsigned": false,
156
- "autoincrement": false,
157
- "primary": false,
158
- "nullable": false,
159
- "length": 6,
160
- "mappedType": "datetime"
161
- },
162
283
  "updated_at": {
163
284
  "name": "updated_at",
164
- "type": "timestamptz",
285
+ "type": "timestamptz(6)",
165
286
  "unsigned": false,
166
287
  "autoincrement": false,
167
288
  "primary": false,
168
289
  "nullable": false,
290
+ "unique": false,
169
291
  "length": 6,
292
+ "precision": null,
293
+ "scale": null,
294
+ "default": null,
295
+ "comment": null,
296
+ "collation": null,
297
+ "enumItems": [],
170
298
  "mappedType": "datetime"
171
299
  },
172
- "branch_instance_id": {
173
- "name": "branch_instance_id",
300
+ "workflow_instance_id": {
301
+ "name": "workflow_instance_id",
174
302
  "type": "uuid",
175
303
  "unsigned": false,
176
304
  "autoincrement": false,
177
305
  "primary": false,
178
- "nullable": true,
306
+ "nullable": false,
307
+ "unique": false,
308
+ "length": null,
309
+ "precision": null,
310
+ "scale": null,
311
+ "default": null,
312
+ "comment": null,
313
+ "collation": null,
314
+ "enumItems": [],
179
315
  "mappedType": "uuid"
180
316
  }
181
317
  },
182
- "name": "step_instances",
183
- "schema": "public",
184
318
  "indexes": [
185
319
  {
186
- "keyName": "step_instances_tenant_org_idx",
187
320
  "columnNames": [
188
- "tenant_id",
189
- "organization_id"
321
+ "id"
190
322
  ],
191
- "composite": true,
192
- "constraint": false,
193
- "primary": false,
194
- "unique": false
323
+ "composite": false,
324
+ "constraint": true,
325
+ "keyName": "step_instances_pkey",
326
+ "primary": true,
327
+ "unique": true
195
328
  },
196
329
  {
197
- "keyName": "step_instances_step_id_idx",
198
330
  "columnNames": [
199
331
  "step_id",
200
332
  "status"
201
333
  ],
202
334
  "composite": true,
203
335
  "constraint": false,
336
+ "keyName": "step_instances_step_id_idx",
204
337
  "primary": false,
205
338
  "unique": false
206
339
  },
207
340
  {
208
- "keyName": "step_instances_workflow_instance_idx",
209
341
  "columnNames": [
210
- "workflow_instance_id",
211
- "status"
342
+ "tenant_id",
343
+ "organization_id"
212
344
  ],
213
345
  "composite": true,
214
346
  "constraint": false,
347
+ "keyName": "step_instances_tenant_org_idx",
215
348
  "primary": false,
216
349
  "unique": false
217
350
  },
218
351
  {
219
- "keyName": "step_instances_pkey",
220
352
  "columnNames": [
221
- "id"
353
+ "workflow_instance_id",
354
+ "status"
222
355
  ],
223
- "composite": false,
224
- "constraint": true,
225
- "primary": true,
226
- "unique": true
356
+ "composite": true,
357
+ "constraint": false,
358
+ "keyName": "step_instances_workflow_instance_idx",
359
+ "primary": false,
360
+ "unique": false
227
361
  }
228
362
  ],
229
363
  "checks": [],
364
+ "triggers": [],
230
365
  "foreignKeys": {},
231
- "nativeEnums": {}
366
+ "comment": null
232
367
  },
233
368
  {
369
+ "name": "user_tasks",
370
+ "schema": "public",
234
371
  "columns": {
235
- "id": {
236
- "name": "id",
237
- "type": "uuid",
372
+ "assigned_to": {
373
+ "name": "assigned_to",
374
+ "type": "varchar(255)",
238
375
  "unsigned": false,
239
376
  "autoincrement": false,
240
377
  "primary": false,
241
- "nullable": false,
242
- "default": "gen_random_uuid()",
243
- "mappedType": "uuid"
378
+ "nullable": true,
379
+ "unique": false,
380
+ "length": 255,
381
+ "precision": null,
382
+ "scale": null,
383
+ "default": null,
384
+ "comment": null,
385
+ "collation": null,
386
+ "enumItems": [],
387
+ "mappedType": "string"
244
388
  },
245
- "workflow_instance_id": {
246
- "name": "workflow_instance_id",
247
- "type": "uuid",
389
+ "assigned_to_roles": {
390
+ "name": "assigned_to_roles",
391
+ "type": "text[]",
392
+ "unsigned": false,
393
+ "autoincrement": false,
394
+ "primary": false,
395
+ "nullable": true,
396
+ "unique": false,
397
+ "length": null,
398
+ "precision": null,
399
+ "scale": null,
400
+ "default": null,
401
+ "comment": null,
402
+ "collation": null,
403
+ "enumItems": [],
404
+ "mappedType": "array"
405
+ },
406
+ "assignee_kind": {
407
+ "name": "assignee_kind",
408
+ "type": "varchar(20)",
248
409
  "unsigned": false,
249
410
  "autoincrement": false,
250
411
  "primary": false,
251
412
  "nullable": false,
252
- "mappedType": "uuid"
413
+ "unique": false,
414
+ "length": 20,
415
+ "precision": null,
416
+ "scale": null,
417
+ "default": "'user'",
418
+ "comment": null,
419
+ "collation": null,
420
+ "enumItems": [],
421
+ "mappedType": "string"
253
422
  },
254
- "step_instance_id": {
255
- "name": "step_instance_id",
423
+ "branch_instance_id": {
424
+ "name": "branch_instance_id",
256
425
  "type": "uuid",
257
426
  "unsigned": false,
258
427
  "autoincrement": false,
259
428
  "primary": false,
260
- "nullable": false,
429
+ "nullable": true,
430
+ "unique": false,
431
+ "length": null,
432
+ "precision": null,
433
+ "scale": null,
434
+ "default": null,
435
+ "comment": null,
436
+ "collation": null,
437
+ "enumItems": [],
261
438
  "mappedType": "uuid"
262
439
  },
263
- "task_name": {
264
- "name": "task_name",
440
+ "claimed_at": {
441
+ "name": "claimed_at",
442
+ "type": "timestamptz(6)",
443
+ "unsigned": false,
444
+ "autoincrement": false,
445
+ "primary": false,
446
+ "nullable": true,
447
+ "unique": false,
448
+ "length": 6,
449
+ "precision": null,
450
+ "scale": null,
451
+ "default": null,
452
+ "comment": null,
453
+ "collation": null,
454
+ "enumItems": [],
455
+ "mappedType": "datetime"
456
+ },
457
+ "claimed_by": {
458
+ "name": "claimed_by",
265
459
  "type": "varchar(255)",
266
460
  "unsigned": false,
267
461
  "autoincrement": false,
268
462
  "primary": false,
269
- "nullable": false,
463
+ "nullable": true,
464
+ "unique": false,
270
465
  "length": 255,
466
+ "precision": null,
467
+ "scale": null,
468
+ "default": null,
469
+ "comment": null,
470
+ "collation": null,
471
+ "enumItems": [],
271
472
  "mappedType": "string"
272
473
  },
273
- "description": {
274
- "name": "description",
474
+ "comments": {
475
+ "name": "comments",
275
476
  "type": "text",
276
477
  "unsigned": false,
277
478
  "autoincrement": false,
278
479
  "primary": false,
279
480
  "nullable": true,
481
+ "unique": false,
482
+ "length": null,
483
+ "precision": null,
484
+ "scale": null,
485
+ "default": null,
486
+ "comment": null,
487
+ "collation": null,
488
+ "enumItems": [],
280
489
  "mappedType": "text"
281
490
  },
282
- "status": {
283
- "name": "status",
284
- "type": "varchar(20)",
285
- "unsigned": false,
286
- "autoincrement": false,
287
- "primary": false,
288
- "nullable": false,
289
- "length": 20,
290
- "mappedType": "string"
291
- },
292
- "form_schema": {
293
- "name": "form_schema",
294
- "type": "jsonb",
295
- "unsigned": false,
296
- "autoincrement": false,
297
- "primary": false,
298
- "nullable": true,
299
- "mappedType": "json"
300
- },
301
- "form_data": {
302
- "name": "form_data",
303
- "type": "jsonb",
491
+ "completed_at": {
492
+ "name": "completed_at",
493
+ "type": "timestamptz(6)",
304
494
  "unsigned": false,
305
495
  "autoincrement": false,
306
496
  "primary": false,
307
497
  "nullable": true,
308
- "mappedType": "json"
498
+ "unique": false,
499
+ "length": 6,
500
+ "precision": null,
501
+ "scale": null,
502
+ "default": null,
503
+ "comment": null,
504
+ "collation": null,
505
+ "enumItems": [],
506
+ "mappedType": "datetime"
309
507
  },
310
- "assigned_to": {
311
- "name": "assigned_to",
508
+ "completed_by": {
509
+ "name": "completed_by",
312
510
  "type": "varchar(255)",
313
511
  "unsigned": false,
314
512
  "autoincrement": false,
315
513
  "primary": false,
316
514
  "nullable": true,
515
+ "unique": false,
317
516
  "length": 255,
517
+ "precision": null,
518
+ "scale": null,
519
+ "default": null,
520
+ "comment": null,
521
+ "collation": null,
522
+ "enumItems": [],
318
523
  "mappedType": "string"
319
524
  },
320
- "assigned_to_roles": {
321
- "name": "assigned_to_roles",
322
- "type": "text[]",
525
+ "created_at": {
526
+ "name": "created_at",
527
+ "type": "timestamptz(6)",
323
528
  "unsigned": false,
324
529
  "autoincrement": false,
325
530
  "primary": false,
326
- "nullable": true,
327
- "mappedType": "array"
531
+ "nullable": false,
532
+ "unique": false,
533
+ "length": 6,
534
+ "precision": null,
535
+ "scale": null,
536
+ "default": null,
537
+ "comment": null,
538
+ "collation": null,
539
+ "enumItems": [],
540
+ "mappedType": "datetime"
328
541
  },
329
- "claimed_by": {
330
- "name": "claimed_by",
331
- "type": "varchar(255)",
542
+ "description": {
543
+ "name": "description",
544
+ "type": "text",
332
545
  "unsigned": false,
333
546
  "autoincrement": false,
334
547
  "primary": false,
335
548
  "nullable": true,
336
- "length": 255,
337
- "mappedType": "string"
549
+ "unique": false,
550
+ "length": null,
551
+ "precision": null,
552
+ "scale": null,
553
+ "default": null,
554
+ "comment": null,
555
+ "collation": null,
556
+ "enumItems": [],
557
+ "mappedType": "text"
338
558
  },
339
- "claimed_at": {
340
- "name": "claimed_at",
341
- "type": "timestamptz",
559
+ "due_date": {
560
+ "name": "due_date",
561
+ "type": "timestamptz(6)",
342
562
  "unsigned": false,
343
563
  "autoincrement": false,
344
564
  "primary": false,
345
565
  "nullable": true,
566
+ "unique": false,
346
567
  "length": 6,
568
+ "precision": null,
569
+ "scale": null,
570
+ "default": null,
571
+ "comment": null,
572
+ "collation": null,
573
+ "enumItems": [],
347
574
  "mappedType": "datetime"
348
575
  },
349
- "due_date": {
350
- "name": "due_date",
351
- "type": "timestamptz",
576
+ "entity_bindings": {
577
+ "name": "entity_bindings",
578
+ "type": "jsonb",
352
579
  "unsigned": false,
353
580
  "autoincrement": false,
354
581
  "primary": false,
355
582
  "nullable": true,
356
- "length": 6,
357
- "mappedType": "datetime"
583
+ "unique": false,
584
+ "length": null,
585
+ "precision": null,
586
+ "scale": null,
587
+ "default": null,
588
+ "comment": null,
589
+ "collation": null,
590
+ "enumItems": [],
591
+ "mappedType": "json"
592
+ },
593
+ "entity_types": {
594
+ "name": "entity_types",
595
+ "type": "text[]",
596
+ "unsigned": false,
597
+ "autoincrement": false,
598
+ "primary": false,
599
+ "nullable": true,
600
+ "unique": false,
601
+ "length": null,
602
+ "precision": null,
603
+ "scale": null,
604
+ "default": null,
605
+ "comment": null,
606
+ "collation": null,
607
+ "enumItems": [],
608
+ "mappedType": "array"
358
609
  },
359
610
  "escalated_at": {
360
611
  "name": "escalated_at",
361
- "type": "timestamptz",
612
+ "type": "timestamptz(6)",
362
613
  "unsigned": false,
363
614
  "autoincrement": false,
364
615
  "primary": false,
365
616
  "nullable": true,
617
+ "unique": false,
366
618
  "length": 6,
619
+ "precision": null,
620
+ "scale": null,
621
+ "default": null,
622
+ "comment": null,
623
+ "collation": null,
624
+ "enumItems": [],
367
625
  "mappedType": "datetime"
368
626
  },
369
627
  "escalated_to": {
@@ -373,282 +631,584 @@
373
631
  "autoincrement": false,
374
632
  "primary": false,
375
633
  "nullable": true,
634
+ "unique": false,
376
635
  "length": 255,
636
+ "precision": null,
637
+ "scale": null,
638
+ "default": null,
639
+ "comment": null,
640
+ "collation": null,
641
+ "enumItems": [],
377
642
  "mappedType": "string"
378
643
  },
379
- "completed_by": {
380
- "name": "completed_by",
381
- "type": "varchar(255)",
644
+ "form_data": {
645
+ "name": "form_data",
646
+ "type": "jsonb",
382
647
  "unsigned": false,
383
648
  "autoincrement": false,
384
649
  "primary": false,
385
650
  "nullable": true,
386
- "length": 255,
651
+ "unique": false,
652
+ "length": null,
653
+ "precision": null,
654
+ "scale": null,
655
+ "default": null,
656
+ "comment": null,
657
+ "collation": null,
658
+ "enumItems": [],
659
+ "mappedType": "json"
660
+ },
661
+ "form_schema": {
662
+ "name": "form_schema",
663
+ "type": "jsonb",
664
+ "unsigned": false,
665
+ "autoincrement": false,
666
+ "primary": false,
667
+ "nullable": true,
668
+ "unique": false,
669
+ "length": null,
670
+ "precision": null,
671
+ "scale": null,
672
+ "default": null,
673
+ "comment": null,
674
+ "collation": null,
675
+ "enumItems": [],
676
+ "mappedType": "json"
677
+ },
678
+ "id": {
679
+ "name": "id",
680
+ "type": "uuid",
681
+ "unsigned": false,
682
+ "autoincrement": false,
683
+ "primary": true,
684
+ "nullable": false,
685
+ "unique": false,
686
+ "length": null,
687
+ "precision": null,
688
+ "scale": null,
689
+ "default": "gen_random_uuid()",
690
+ "comment": null,
691
+ "collation": null,
692
+ "enumItems": [],
693
+ "mappedType": "uuid"
694
+ },
695
+ "organization_id": {
696
+ "name": "organization_id",
697
+ "type": "uuid",
698
+ "unsigned": false,
699
+ "autoincrement": false,
700
+ "primary": false,
701
+ "nullable": false,
702
+ "unique": false,
703
+ "length": null,
704
+ "precision": null,
705
+ "scale": null,
706
+ "default": null,
707
+ "comment": null,
708
+ "collation": null,
709
+ "enumItems": [],
710
+ "mappedType": "uuid"
711
+ },
712
+ "priority": {
713
+ "name": "priority",
714
+ "type": "varchar(20)",
715
+ "unsigned": false,
716
+ "autoincrement": false,
717
+ "primary": false,
718
+ "nullable": true,
719
+ "unique": false,
720
+ "length": 20,
721
+ "precision": null,
722
+ "scale": null,
723
+ "default": null,
724
+ "comment": null,
725
+ "collation": null,
726
+ "enumItems": [],
387
727
  "mappedType": "string"
388
728
  },
389
- "completed_at": {
390
- "name": "completed_at",
391
- "type": "timestamptz",
729
+ "reassign_reason": {
730
+ "name": "reassign_reason",
731
+ "type": "text",
732
+ "unsigned": false,
733
+ "autoincrement": false,
734
+ "primary": false,
735
+ "nullable": true,
736
+ "unique": false,
737
+ "length": null,
738
+ "precision": null,
739
+ "scale": null,
740
+ "default": null,
741
+ "comment": null,
742
+ "collation": null,
743
+ "enumItems": [],
744
+ "mappedType": "text"
745
+ },
746
+ "reassigned_at": {
747
+ "name": "reassigned_at",
748
+ "type": "timestamptz(6)",
392
749
  "unsigned": false,
393
750
  "autoincrement": false,
394
751
  "primary": false,
395
752
  "nullable": true,
753
+ "unique": false,
396
754
  "length": 6,
755
+ "precision": null,
756
+ "scale": null,
757
+ "default": null,
758
+ "comment": null,
759
+ "collation": null,
760
+ "enumItems": [],
397
761
  "mappedType": "datetime"
398
762
  },
399
- "comments": {
400
- "name": "comments",
401
- "type": "text",
763
+ "reassigned_by": {
764
+ "name": "reassigned_by",
765
+ "type": "varchar(255)",
402
766
  "unsigned": false,
403
767
  "autoincrement": false,
404
768
  "primary": false,
405
769
  "nullable": true,
406
- "mappedType": "text"
770
+ "unique": false,
771
+ "length": 255,
772
+ "precision": null,
773
+ "scale": null,
774
+ "default": null,
775
+ "comment": null,
776
+ "collation": null,
777
+ "enumItems": [],
778
+ "mappedType": "string"
407
779
  },
408
- "tenant_id": {
409
- "name": "tenant_id",
410
- "type": "uuid",
780
+ "status": {
781
+ "name": "status",
782
+ "type": "varchar(20)",
411
783
  "unsigned": false,
412
784
  "autoincrement": false,
413
785
  "primary": false,
414
786
  "nullable": false,
415
- "mappedType": "uuid"
787
+ "unique": false,
788
+ "length": 20,
789
+ "precision": null,
790
+ "scale": null,
791
+ "default": null,
792
+ "comment": null,
793
+ "collation": null,
794
+ "enumItems": [],
795
+ "mappedType": "string"
416
796
  },
417
- "organization_id": {
418
- "name": "organization_id",
797
+ "step_instance_id": {
798
+ "name": "step_instance_id",
419
799
  "type": "uuid",
420
800
  "unsigned": false,
421
801
  "autoincrement": false,
422
802
  "primary": false,
423
803
  "nullable": false,
804
+ "unique": false,
805
+ "length": null,
806
+ "precision": null,
807
+ "scale": null,
808
+ "default": null,
809
+ "comment": null,
810
+ "collation": null,
811
+ "enumItems": [],
424
812
  "mappedType": "uuid"
425
813
  },
426
- "created_at": {
427
- "name": "created_at",
428
- "type": "timestamptz",
814
+ "task_name": {
815
+ "name": "task_name",
816
+ "type": "varchar(255)",
429
817
  "unsigned": false,
430
818
  "autoincrement": false,
431
819
  "primary": false,
432
820
  "nullable": false,
433
- "length": 6,
434
- "mappedType": "datetime"
821
+ "unique": false,
822
+ "length": 255,
823
+ "precision": null,
824
+ "scale": null,
825
+ "default": null,
826
+ "comment": null,
827
+ "collation": null,
828
+ "enumItems": [],
829
+ "mappedType": "string"
830
+ },
831
+ "tenant_id": {
832
+ "name": "tenant_id",
833
+ "type": "uuid",
834
+ "unsigned": false,
835
+ "autoincrement": false,
836
+ "primary": false,
837
+ "nullable": false,
838
+ "unique": false,
839
+ "length": null,
840
+ "precision": null,
841
+ "scale": null,
842
+ "default": null,
843
+ "comment": null,
844
+ "collation": null,
845
+ "enumItems": [],
846
+ "mappedType": "uuid"
435
847
  },
436
848
  "updated_at": {
437
849
  "name": "updated_at",
438
- "type": "timestamptz",
850
+ "type": "timestamptz(6)",
439
851
  "unsigned": false,
440
852
  "autoincrement": false,
441
853
  "primary": false,
442
854
  "nullable": false,
855
+ "unique": false,
443
856
  "length": 6,
857
+ "precision": null,
858
+ "scale": null,
859
+ "default": null,
860
+ "comment": null,
861
+ "collation": null,
862
+ "enumItems": [],
444
863
  "mappedType": "datetime"
445
864
  },
446
- "branch_instance_id": {
447
- "name": "branch_instance_id",
865
+ "workflow_instance_id": {
866
+ "name": "workflow_instance_id",
448
867
  "type": "uuid",
449
868
  "unsigned": false,
450
869
  "autoincrement": false,
451
870
  "primary": false,
452
- "nullable": true,
871
+ "nullable": false,
872
+ "unique": false,
873
+ "length": null,
874
+ "precision": null,
875
+ "scale": null,
876
+ "default": null,
877
+ "comment": null,
878
+ "collation": null,
879
+ "enumItems": [],
453
880
  "mappedType": "uuid"
454
881
  }
455
882
  },
456
- "name": "user_tasks",
457
- "schema": "public",
458
883
  "indexes": [
459
884
  {
460
- "keyName": "user_tasks_tenant_org_idx",
461
885
  "columnNames": [
462
- "tenant_id",
463
- "organization_id"
886
+ "entity_types"
464
887
  ],
465
- "composite": true,
888
+ "composite": false,
466
889
  "constraint": false,
890
+ "keyName": "user_tasks_entity_types_gin_idx",
467
891
  "primary": false,
468
- "unique": false
892
+ "unique": false,
893
+ "type": "gin"
894
+ },
895
+ {
896
+ "columnNames": [
897
+ "id"
898
+ ],
899
+ "composite": false,
900
+ "constraint": true,
901
+ "keyName": "user_tasks_pkey",
902
+ "primary": true,
903
+ "unique": true
469
904
  },
470
905
  {
471
- "keyName": "user_tasks_status_due_date_idx",
472
906
  "columnNames": [
473
907
  "status",
474
- "due_date"
908
+ "assigned_to"
475
909
  ],
476
910
  "composite": true,
477
911
  "constraint": false,
912
+ "keyName": "user_tasks_status_assigned_idx",
478
913
  "primary": false,
479
914
  "unique": false
480
915
  },
481
916
  {
482
- "keyName": "user_tasks_status_assigned_idx",
483
917
  "columnNames": [
484
918
  "status",
485
- "assigned_to"
919
+ "due_date"
486
920
  ],
487
921
  "composite": true,
488
922
  "constraint": false,
923
+ "keyName": "user_tasks_status_due_date_idx",
489
924
  "primary": false,
490
925
  "unique": false
491
926
  },
492
927
  {
493
- "keyName": "user_tasks_workflow_instance_idx",
494
928
  "columnNames": [
495
- "workflow_instance_id"
929
+ "tenant_id",
930
+ "organization_id"
496
931
  ],
497
- "composite": false,
932
+ "composite": true,
498
933
  "constraint": false,
934
+ "keyName": "user_tasks_tenant_org_idx",
499
935
  "primary": false,
500
936
  "unique": false
501
937
  },
502
938
  {
503
- "keyName": "user_tasks_pkey",
504
939
  "columnNames": [
505
- "id"
940
+ "workflow_instance_id"
506
941
  ],
507
942
  "composite": false,
508
- "constraint": true,
509
- "primary": true,
510
- "unique": true
943
+ "constraint": false,
944
+ "keyName": "user_tasks_workflow_instance_idx",
945
+ "primary": false,
946
+ "unique": false
511
947
  }
512
948
  ],
513
949
  "checks": [],
950
+ "triggers": [],
514
951
  "foreignKeys": {},
515
- "nativeEnums": {}
952
+ "comment": null
516
953
  },
517
954
  {
955
+ "name": "workflow_branch_instances",
956
+ "schema": "public",
518
957
  "columns": {
519
- "id": {
520
- "name": "id",
521
- "type": "uuid",
958
+ "branch_key": {
959
+ "name": "branch_key",
960
+ "type": "varchar(100)",
522
961
  "unsigned": false,
523
962
  "autoincrement": false,
524
963
  "primary": false,
525
964
  "nullable": false,
526
- "default": "gen_random_uuid()",
527
- "mappedType": "uuid"
965
+ "unique": false,
966
+ "length": 100,
967
+ "precision": null,
968
+ "scale": null,
969
+ "default": null,
970
+ "comment": null,
971
+ "collation": null,
972
+ "enumItems": [],
973
+ "mappedType": "string"
528
974
  },
529
- "workflow_instance_id": {
530
- "name": "workflow_instance_id",
531
- "type": "uuid",
975
+ "completed_at": {
976
+ "name": "completed_at",
977
+ "type": "timestamptz(6)",
532
978
  "unsigned": false,
533
979
  "autoincrement": false,
534
980
  "primary": false,
535
- "nullable": false,
536
- "mappedType": "uuid"
981
+ "nullable": true,
982
+ "unique": false,
983
+ "length": 6,
984
+ "precision": null,
985
+ "scale": null,
986
+ "default": null,
987
+ "comment": null,
988
+ "collation": null,
989
+ "enumItems": [],
990
+ "mappedType": "datetime"
537
991
  },
538
- "fork_step_id": {
539
- "name": "fork_step_id",
540
- "type": "varchar(100)",
992
+ "context_namespace": {
993
+ "name": "context_namespace",
994
+ "type": "jsonb",
541
995
  "unsigned": false,
542
996
  "autoincrement": false,
543
997
  "primary": false,
544
998
  "nullable": false,
545
- "length": 100,
546
- "mappedType": "string"
999
+ "unique": false,
1000
+ "length": null,
1001
+ "precision": null,
1002
+ "scale": null,
1003
+ "default": null,
1004
+ "comment": null,
1005
+ "collation": null,
1006
+ "enumItems": [],
1007
+ "mappedType": "json"
547
1008
  },
548
- "join_step_id": {
549
- "name": "join_step_id",
550
- "type": "varchar(100)",
1009
+ "created_at": {
1010
+ "name": "created_at",
1011
+ "type": "timestamptz(6)",
551
1012
  "unsigned": false,
552
1013
  "autoincrement": false,
553
1014
  "primary": false,
554
1015
  "nullable": false,
555
- "length": 100,
556
- "mappedType": "string"
1016
+ "unique": false,
1017
+ "length": 6,
1018
+ "precision": null,
1019
+ "scale": null,
1020
+ "default": null,
1021
+ "comment": null,
1022
+ "collation": null,
1023
+ "enumItems": [],
1024
+ "mappedType": "datetime"
557
1025
  },
558
- "branch_key": {
559
- "name": "branch_key",
1026
+ "current_step_id": {
1027
+ "name": "current_step_id",
560
1028
  "type": "varchar(100)",
561
1029
  "unsigned": false,
562
1030
  "autoincrement": false,
563
1031
  "primary": false,
564
1032
  "nullable": false,
1033
+ "unique": false,
565
1034
  "length": 100,
1035
+ "precision": null,
1036
+ "scale": null,
1037
+ "default": null,
1038
+ "comment": null,
1039
+ "collation": null,
1040
+ "enumItems": [],
566
1041
  "mappedType": "string"
567
1042
  },
568
- "parent_branch_id": {
569
- "name": "parent_branch_id",
570
- "type": "uuid",
1043
+ "error_details": {
1044
+ "name": "error_details",
1045
+ "type": "jsonb",
571
1046
  "unsigned": false,
572
1047
  "autoincrement": false,
573
1048
  "primary": false,
574
1049
  "nullable": true,
575
- "mappedType": "uuid"
1050
+ "unique": false,
1051
+ "length": null,
1052
+ "precision": null,
1053
+ "scale": null,
1054
+ "default": null,
1055
+ "comment": null,
1056
+ "collation": null,
1057
+ "enumItems": [],
1058
+ "mappedType": "json"
576
1059
  },
577
- "current_step_id": {
578
- "name": "current_step_id",
579
- "type": "varchar(100)",
580
- "unsigned": false,
581
- "autoincrement": false,
1060
+ "error_message": {
1061
+ "name": "error_message",
1062
+ "type": "text",
1063
+ "unsigned": false,
1064
+ "autoincrement": false,
1065
+ "primary": false,
1066
+ "nullable": true,
1067
+ "unique": false,
1068
+ "length": null,
1069
+ "precision": null,
1070
+ "scale": null,
1071
+ "default": null,
1072
+ "comment": null,
1073
+ "collation": null,
1074
+ "enumItems": [],
1075
+ "mappedType": "text"
1076
+ },
1077
+ "fork_step_id": {
1078
+ "name": "fork_step_id",
1079
+ "type": "varchar(100)",
1080
+ "unsigned": false,
1081
+ "autoincrement": false,
582
1082
  "primary": false,
583
1083
  "nullable": false,
1084
+ "unique": false,
584
1085
  "length": 100,
1086
+ "precision": null,
1087
+ "scale": null,
1088
+ "default": null,
1089
+ "comment": null,
1090
+ "collation": null,
1091
+ "enumItems": [],
585
1092
  "mappedType": "string"
586
1093
  },
587
- "status": {
588
- "name": "status",
589
- "type": "varchar(30)",
1094
+ "id": {
1095
+ "name": "id",
1096
+ "type": "uuid",
590
1097
  "unsigned": false,
591
1098
  "autoincrement": false,
592
- "primary": false,
1099
+ "primary": true,
593
1100
  "nullable": false,
594
- "length": 30,
595
- "mappedType": "string"
1101
+ "unique": false,
1102
+ "length": null,
1103
+ "precision": null,
1104
+ "scale": null,
1105
+ "default": "gen_random_uuid()",
1106
+ "comment": null,
1107
+ "collation": null,
1108
+ "enumItems": [],
1109
+ "mappedType": "uuid"
596
1110
  },
597
- "context_namespace": {
598
- "name": "context_namespace",
599
- "type": "jsonb",
1111
+ "join_step_id": {
1112
+ "name": "join_step_id",
1113
+ "type": "varchar(100)",
600
1114
  "unsigned": false,
601
1115
  "autoincrement": false,
602
1116
  "primary": false,
603
1117
  "nullable": false,
604
- "mappedType": "json"
1118
+ "unique": false,
1119
+ "length": 100,
1120
+ "precision": null,
1121
+ "scale": null,
1122
+ "default": null,
1123
+ "comment": null,
1124
+ "collation": null,
1125
+ "enumItems": [],
1126
+ "mappedType": "string"
605
1127
  },
606
- "pending_transition": {
607
- "name": "pending_transition",
608
- "type": "jsonb",
1128
+ "organization_id": {
1129
+ "name": "organization_id",
1130
+ "type": "uuid",
609
1131
  "unsigned": false,
610
1132
  "autoincrement": false,
611
1133
  "primary": false,
612
- "nullable": true,
613
- "mappedType": "json"
1134
+ "nullable": false,
1135
+ "unique": false,
1136
+ "length": null,
1137
+ "precision": null,
1138
+ "scale": null,
1139
+ "default": null,
1140
+ "comment": null,
1141
+ "collation": null,
1142
+ "enumItems": [],
1143
+ "mappedType": "uuid"
614
1144
  },
615
- "error_message": {
616
- "name": "error_message",
617
- "type": "text",
1145
+ "parent_branch_id": {
1146
+ "name": "parent_branch_id",
1147
+ "type": "uuid",
618
1148
  "unsigned": false,
619
1149
  "autoincrement": false,
620
1150
  "primary": false,
621
1151
  "nullable": true,
622
- "mappedType": "text"
1152
+ "unique": false,
1153
+ "length": null,
1154
+ "precision": null,
1155
+ "scale": null,
1156
+ "default": null,
1157
+ "comment": null,
1158
+ "collation": null,
1159
+ "enumItems": [],
1160
+ "mappedType": "uuid"
623
1161
  },
624
- "error_details": {
625
- "name": "error_details",
1162
+ "pending_transition": {
1163
+ "name": "pending_transition",
626
1164
  "type": "jsonb",
627
1165
  "unsigned": false,
628
1166
  "autoincrement": false,
629
1167
  "primary": false,
630
1168
  "nullable": true,
1169
+ "unique": false,
1170
+ "length": null,
1171
+ "precision": null,
1172
+ "scale": null,
1173
+ "default": null,
1174
+ "comment": null,
1175
+ "collation": null,
1176
+ "enumItems": [],
631
1177
  "mappedType": "json"
632
1178
  },
633
1179
  "started_at": {
634
1180
  "name": "started_at",
635
- "type": "timestamptz",
1181
+ "type": "timestamptz(6)",
636
1182
  "unsigned": false,
637
1183
  "autoincrement": false,
638
1184
  "primary": false,
639
1185
  "nullable": true,
1186
+ "unique": false,
640
1187
  "length": 6,
1188
+ "precision": null,
1189
+ "scale": null,
1190
+ "default": null,
1191
+ "comment": null,
1192
+ "collation": null,
1193
+ "enumItems": [],
641
1194
  "mappedType": "datetime"
642
1195
  },
643
- "completed_at": {
644
- "name": "completed_at",
645
- "type": "timestamptz",
1196
+ "status": {
1197
+ "name": "status",
1198
+ "type": "varchar(30)",
646
1199
  "unsigned": false,
647
1200
  "autoincrement": false,
648
1201
  "primary": false,
649
- "nullable": true,
650
- "length": 6,
651
- "mappedType": "datetime"
1202
+ "nullable": false,
1203
+ "unique": false,
1204
+ "length": 30,
1205
+ "precision": null,
1206
+ "scale": null,
1207
+ "default": null,
1208
+ "comment": null,
1209
+ "collation": null,
1210
+ "enumItems": [],
1211
+ "mappedType": "string"
652
1212
  },
653
1213
  "tenant_id": {
654
1214
  "name": "tenant_id",
@@ -657,149 +1217,138 @@
657
1217
  "autoincrement": false,
658
1218
  "primary": false,
659
1219
  "nullable": false,
1220
+ "unique": false,
1221
+ "length": null,
1222
+ "precision": null,
1223
+ "scale": null,
1224
+ "default": null,
1225
+ "comment": null,
1226
+ "collation": null,
1227
+ "enumItems": [],
660
1228
  "mappedType": "uuid"
661
1229
  },
662
- "organization_id": {
663
- "name": "organization_id",
664
- "type": "uuid",
665
- "unsigned": false,
666
- "autoincrement": false,
667
- "primary": false,
668
- "nullable": false,
669
- "mappedType": "uuid"
670
- },
671
- "created_at": {
672
- "name": "created_at",
673
- "type": "timestamptz",
1230
+ "updated_at": {
1231
+ "name": "updated_at",
1232
+ "type": "timestamptz(6)",
674
1233
  "unsigned": false,
675
1234
  "autoincrement": false,
676
1235
  "primary": false,
677
1236
  "nullable": false,
1237
+ "unique": false,
678
1238
  "length": 6,
1239
+ "precision": null,
1240
+ "scale": null,
1241
+ "default": null,
1242
+ "comment": null,
1243
+ "collation": null,
1244
+ "enumItems": [],
679
1245
  "mappedType": "datetime"
680
1246
  },
681
- "updated_at": {
682
- "name": "updated_at",
683
- "type": "timestamptz",
1247
+ "workflow_instance_id": {
1248
+ "name": "workflow_instance_id",
1249
+ "type": "uuid",
684
1250
  "unsigned": false,
685
1251
  "autoincrement": false,
686
1252
  "primary": false,
687
1253
  "nullable": false,
688
- "length": 6,
689
- "mappedType": "datetime"
1254
+ "unique": false,
1255
+ "length": null,
1256
+ "precision": null,
1257
+ "scale": null,
1258
+ "default": null,
1259
+ "comment": null,
1260
+ "collation": null,
1261
+ "enumItems": [],
1262
+ "mappedType": "uuid"
690
1263
  }
691
1264
  },
692
- "name": "workflow_branch_instances",
693
- "schema": "public",
694
1265
  "indexes": [
695
1266
  {
696
- "keyName": "workflow_branch_instances_tenant_org_idx",
697
- "columnNames": [
698
- "tenant_id",
699
- "organization_id"
700
- ],
701
- "composite": true,
702
- "constraint": false,
703
- "primary": false,
704
- "unique": false
705
- },
706
- {
707
- "keyName": "workflow_branch_instances_instance_fork_idx",
708
1267
  "columnNames": [
709
1268
  "workflow_instance_id",
710
1269
  "fork_step_id"
711
1270
  ],
712
1271
  "composite": true,
713
1272
  "constraint": false,
1273
+ "keyName": "workflow_branch_instances_instance_fork_idx",
714
1274
  "primary": false,
715
1275
  "unique": false
716
1276
  },
717
1277
  {
718
- "keyName": "workflow_branch_instances_instance_status_idx",
719
1278
  "columnNames": [
720
1279
  "workflow_instance_id",
721
1280
  "status"
722
1281
  ],
723
1282
  "composite": true,
724
1283
  "constraint": false,
1284
+ "keyName": "workflow_branch_instances_instance_status_idx",
725
1285
  "primary": false,
726
1286
  "unique": false
727
1287
  },
728
1288
  {
729
- "keyName": "workflow_branch_instances_pkey",
730
1289
  "columnNames": [
731
1290
  "id"
732
1291
  ],
733
1292
  "composite": false,
734
1293
  "constraint": true,
1294
+ "keyName": "workflow_branch_instances_pkey",
735
1295
  "primary": true,
736
1296
  "unique": true
1297
+ },
1298
+ {
1299
+ "columnNames": [
1300
+ "tenant_id",
1301
+ "organization_id"
1302
+ ],
1303
+ "composite": true,
1304
+ "constraint": false,
1305
+ "keyName": "workflow_branch_instances_tenant_org_idx",
1306
+ "primary": false,
1307
+ "unique": false
737
1308
  }
738
1309
  ],
739
1310
  "checks": [],
1311
+ "triggers": [],
740
1312
  "foreignKeys": {},
741
- "nativeEnums": {}
1313
+ "comment": null
742
1314
  },
743
1315
  {
1316
+ "name": "workflow_definition_drafts",
1317
+ "schema": "public",
744
1318
  "columns": {
745
- "id": {
746
- "name": "id",
747
- "type": "uuid",
748
- "unsigned": false,
749
- "autoincrement": false,
750
- "primary": false,
751
- "nullable": false,
752
- "default": "gen_random_uuid()",
753
- "mappedType": "uuid"
754
- },
755
- "workflow_id": {
756
- "name": "workflow_id",
757
- "type": "varchar(100)",
758
- "unsigned": false,
759
- "autoincrement": false,
760
- "primary": false,
761
- "nullable": false,
762
- "length": 100,
763
- "mappedType": "string"
764
- },
765
- "code_workflow_id": {
766
- "name": "code_workflow_id",
767
- "type": "varchar(100)",
768
- "unsigned": false,
769
- "autoincrement": false,
770
- "primary": false,
771
- "nullable": true,
772
- "length": 100,
773
- "mappedType": "string"
774
- },
775
- "workflow_name": {
776
- "name": "workflow_name",
777
- "type": "varchar(255)",
778
- "unsigned": false,
779
- "autoincrement": false,
780
- "primary": false,
781
- "nullable": false,
782
- "length": 255,
783
- "mappedType": "string"
784
- },
785
- "description": {
786
- "name": "description",
787
- "type": "text",
1319
+ "base_updated_at": {
1320
+ "name": "base_updated_at",
1321
+ "type": "timestamptz(6)",
788
1322
  "unsigned": false,
789
1323
  "autoincrement": false,
790
1324
  "primary": false,
791
1325
  "nullable": true,
792
- "mappedType": "text"
1326
+ "unique": false,
1327
+ "length": 6,
1328
+ "precision": null,
1329
+ "scale": null,
1330
+ "default": null,
1331
+ "comment": null,
1332
+ "collation": null,
1333
+ "enumItems": [],
1334
+ "mappedType": "datetime"
793
1335
  },
794
- "version": {
795
- "name": "version",
796
- "type": "int",
1336
+ "created_at": {
1337
+ "name": "created_at",
1338
+ "type": "timestamptz(6)",
797
1339
  "unsigned": false,
798
1340
  "autoincrement": false,
799
1341
  "primary": false,
800
1342
  "nullable": false,
801
- "default": "1",
802
- "mappedType": "integer"
1343
+ "unique": false,
1344
+ "length": 6,
1345
+ "precision": null,
1346
+ "scale": null,
1347
+ "default": null,
1348
+ "comment": null,
1349
+ "collation": null,
1350
+ "enumItems": [],
1351
+ "mappedType": "datetime"
803
1352
  },
804
1353
  "definition": {
805
1354
  "name": "definition",
@@ -808,55 +1357,83 @@
808
1357
  "autoincrement": false,
809
1358
  "primary": false,
810
1359
  "nullable": false,
1360
+ "unique": false,
1361
+ "length": null,
1362
+ "precision": null,
1363
+ "scale": null,
1364
+ "default": null,
1365
+ "comment": null,
1366
+ "collation": null,
1367
+ "enumItems": [],
811
1368
  "mappedType": "json"
812
1369
  },
813
- "metadata": {
814
- "name": "metadata",
815
- "type": "jsonb",
1370
+ "definition_id": {
1371
+ "name": "definition_id",
1372
+ "type": "uuid",
816
1373
  "unsigned": false,
817
1374
  "autoincrement": false,
818
1375
  "primary": false,
819
1376
  "nullable": true,
820
- "mappedType": "json"
821
- },
822
- "enabled": {
823
- "name": "enabled",
824
- "type": "boolean",
825
- "unsigned": false,
826
- "autoincrement": false,
827
- "primary": false,
828
- "nullable": false,
829
- "default": "true",
830
- "mappedType": "boolean"
1377
+ "unique": true,
1378
+ "length": null,
1379
+ "precision": null,
1380
+ "scale": null,
1381
+ "default": null,
1382
+ "comment": null,
1383
+ "collation": null,
1384
+ "enumItems": [],
1385
+ "mappedType": "uuid"
831
1386
  },
832
- "effective_from": {
833
- "name": "effective_from",
834
- "type": "timestamptz",
1387
+ "deleted_at": {
1388
+ "name": "deleted_at",
1389
+ "type": "timestamptz(6)",
835
1390
  "unsigned": false,
836
1391
  "autoincrement": false,
837
1392
  "primary": false,
838
1393
  "nullable": true,
1394
+ "unique": false,
839
1395
  "length": 6,
1396
+ "precision": null,
1397
+ "scale": null,
1398
+ "default": null,
1399
+ "comment": null,
1400
+ "collation": null,
1401
+ "enumItems": [],
840
1402
  "mappedType": "datetime"
841
1403
  },
842
- "effective_to": {
843
- "name": "effective_to",
844
- "type": "timestamptz",
1404
+ "id": {
1405
+ "name": "id",
1406
+ "type": "uuid",
845
1407
  "unsigned": false,
846
1408
  "autoincrement": false,
847
- "primary": false,
848
- "nullable": true,
849
- "length": 6,
850
- "mappedType": "datetime"
1409
+ "primary": true,
1410
+ "nullable": false,
1411
+ "unique": false,
1412
+ "length": null,
1413
+ "precision": null,
1414
+ "scale": null,
1415
+ "default": "gen_random_uuid()",
1416
+ "comment": null,
1417
+ "collation": null,
1418
+ "enumItems": [],
1419
+ "mappedType": "uuid"
851
1420
  },
852
- "tenant_id": {
853
- "name": "tenant_id",
854
- "type": "uuid",
1421
+ "metadata": {
1422
+ "name": "metadata",
1423
+ "type": "jsonb",
855
1424
  "unsigned": false,
856
1425
  "autoincrement": false,
857
1426
  "primary": false,
858
- "nullable": false,
859
- "mappedType": "uuid"
1427
+ "nullable": true,
1428
+ "unique": false,
1429
+ "length": null,
1430
+ "precision": null,
1431
+ "scale": null,
1432
+ "default": null,
1433
+ "comment": null,
1434
+ "collation": null,
1435
+ "enumItems": [],
1436
+ "mappedType": "json"
860
1437
  },
861
1438
  "organization_id": {
862
1439
  "name": "organization_id",
@@ -865,324 +1442,466 @@
865
1442
  "autoincrement": false,
866
1443
  "primary": false,
867
1444
  "nullable": false,
1445
+ "unique": false,
1446
+ "length": null,
1447
+ "precision": null,
1448
+ "scale": null,
1449
+ "default": null,
1450
+ "comment": null,
1451
+ "collation": null,
1452
+ "enumItems": [],
868
1453
  "mappedType": "uuid"
869
1454
  },
870
- "created_by": {
871
- "name": "created_by",
872
- "type": "varchar(255)",
873
- "unsigned": false,
874
- "autoincrement": false,
875
- "primary": false,
876
- "nullable": true,
877
- "length": 255,
878
- "mappedType": "string"
879
- },
880
- "updated_by": {
881
- "name": "updated_by",
882
- "type": "varchar(255)",
883
- "unsigned": false,
884
- "autoincrement": false,
885
- "primary": false,
886
- "nullable": true,
887
- "length": 255,
888
- "mappedType": "string"
889
- },
890
- "created_at": {
891
- "name": "created_at",
892
- "type": "timestamptz",
1455
+ "tenant_id": {
1456
+ "name": "tenant_id",
1457
+ "type": "uuid",
893
1458
  "unsigned": false,
894
1459
  "autoincrement": false,
895
1460
  "primary": false,
896
1461
  "nullable": false,
897
- "length": 6,
898
- "mappedType": "datetime"
1462
+ "unique": false,
1463
+ "length": null,
1464
+ "precision": null,
1465
+ "scale": null,
1466
+ "default": null,
1467
+ "comment": null,
1468
+ "collation": null,
1469
+ "enumItems": [],
1470
+ "mappedType": "uuid"
899
1471
  },
900
1472
  "updated_at": {
901
1473
  "name": "updated_at",
902
- "type": "timestamptz",
1474
+ "type": "timestamptz(6)",
903
1475
  "unsigned": false,
904
1476
  "autoincrement": false,
905
1477
  "primary": false,
906
1478
  "nullable": false,
1479
+ "unique": false,
907
1480
  "length": 6,
1481
+ "precision": null,
1482
+ "scale": null,
1483
+ "default": null,
1484
+ "comment": null,
1485
+ "collation": null,
1486
+ "enumItems": [],
908
1487
  "mappedType": "datetime"
909
1488
  },
910
- "deleted_at": {
911
- "name": "deleted_at",
912
- "type": "timestamptz",
1489
+ "user_id": {
1490
+ "name": "user_id",
1491
+ "type": "uuid",
913
1492
  "unsigned": false,
914
1493
  "autoincrement": false,
915
1494
  "primary": false,
916
- "nullable": true,
917
- "length": 6,
918
- "mappedType": "datetime"
1495
+ "nullable": false,
1496
+ "unique": false,
1497
+ "length": null,
1498
+ "precision": null,
1499
+ "scale": null,
1500
+ "default": null,
1501
+ "comment": null,
1502
+ "collation": null,
1503
+ "enumItems": [],
1504
+ "mappedType": "uuid"
919
1505
  }
920
1506
  },
921
- "name": "workflow_definitions",
922
- "schema": "public",
923
1507
  "indexes": [
924
1508
  {
925
- "keyName": "workflow_definitions_workflow_id_idx",
926
- "columnNames": [
927
- "workflow_id"
928
- ],
929
- "composite": false,
930
- "constraint": false,
931
- "primary": false,
932
- "unique": false
933
- },
934
- {
935
- "keyName": "workflow_definitions_tenant_org_idx",
936
- "columnNames": [
937
- "tenant_id",
938
- "organization_id"
939
- ],
940
- "composite": true,
941
- "constraint": false,
942
- "primary": false,
943
- "unique": false
944
- },
945
- {
946
- "keyName": "workflow_definitions_enabled_idx",
947
- "columnNames": [
948
- "enabled"
949
- ],
950
- "composite": false,
951
- "constraint": false,
952
- "primary": false,
953
- "unique": false
954
- },
955
- {
956
- "keyName": "workflow_definitions_workflow_id_tenant_id_unique",
957
1509
  "columnNames": [
958
- "workflow_id",
1510
+ "definition_id",
1511
+ "user_id",
959
1512
  "tenant_id"
960
1513
  ],
961
1514
  "composite": true,
962
1515
  "constraint": true,
1516
+ "keyName": "workflow_definition_drafts_definition_id_user_id__e3189_unique",
963
1517
  "primary": false,
964
1518
  "unique": true
965
1519
  },
966
1520
  {
967
- "keyName": "workflow_definitions_pkey",
968
1521
  "columnNames": [
969
1522
  "id"
970
1523
  ],
971
1524
  "composite": false,
972
1525
  "constraint": true,
1526
+ "keyName": "workflow_definition_drafts_pkey",
973
1527
  "primary": true,
974
1528
  "unique": true
1529
+ },
1530
+ {
1531
+ "columnNames": [
1532
+ "tenant_id",
1533
+ "organization_id"
1534
+ ],
1535
+ "composite": true,
1536
+ "constraint": false,
1537
+ "keyName": "workflow_definition_drafts_tenant_org_idx",
1538
+ "primary": false,
1539
+ "unique": false
975
1540
  }
976
1541
  ],
977
1542
  "checks": [],
1543
+ "triggers": [],
978
1544
  "foreignKeys": {},
979
- "nativeEnums": {}
1545
+ "comment": null
980
1546
  },
981
1547
  {
1548
+ "name": "workflow_definition_metric_rollups",
1549
+ "schema": "public",
982
1550
  "columns": {
983
- "id": {
984
- "name": "id",
985
- "type": "bigserial",
1551
+ "computed_at": {
1552
+ "name": "computed_at",
1553
+ "type": "timestamptz(6)",
986
1554
  "unsigned": false,
987
- "autoincrement": true,
988
- "primary": true,
1555
+ "autoincrement": false,
1556
+ "primary": false,
989
1557
  "nullable": false,
990
- "mappedType": "bigint"
1558
+ "unique": false,
1559
+ "length": 6,
1560
+ "precision": null,
1561
+ "scale": null,
1562
+ "default": null,
1563
+ "comment": null,
1564
+ "collation": null,
1565
+ "enumItems": [],
1566
+ "mappedType": "datetime"
991
1567
  },
992
- "workflow_instance_id": {
993
- "name": "workflow_instance_id",
994
- "type": "uuid",
1568
+ "created_at": {
1569
+ "name": "created_at",
1570
+ "type": "timestamptz(6)",
995
1571
  "unsigned": false,
996
1572
  "autoincrement": false,
997
1573
  "primary": false,
998
1574
  "nullable": false,
999
- "mappedType": "uuid"
1575
+ "unique": false,
1576
+ "length": 6,
1577
+ "precision": null,
1578
+ "scale": null,
1579
+ "default": null,
1580
+ "comment": null,
1581
+ "collation": null,
1582
+ "enumItems": [],
1583
+ "mappedType": "datetime"
1000
1584
  },
1001
- "step_instance_id": {
1002
- "name": "step_instance_id",
1585
+ "id": {
1586
+ "name": "id",
1003
1587
  "type": "uuid",
1004
1588
  "unsigned": false,
1005
1589
  "autoincrement": false,
1006
- "primary": false,
1007
- "nullable": true,
1590
+ "primary": true,
1591
+ "nullable": false,
1592
+ "unique": false,
1593
+ "length": null,
1594
+ "precision": null,
1595
+ "scale": null,
1596
+ "default": "gen_random_uuid()",
1597
+ "comment": null,
1598
+ "collation": null,
1599
+ "enumItems": [],
1008
1600
  "mappedType": "uuid"
1009
1601
  },
1010
- "event_type": {
1011
- "name": "event_type",
1012
- "type": "varchar(50)",
1602
+ "metrics": {
1603
+ "name": "metrics",
1604
+ "type": "jsonb",
1013
1605
  "unsigned": false,
1014
1606
  "autoincrement": false,
1015
1607
  "primary": false,
1016
1608
  "nullable": false,
1017
- "length": 50,
1018
- "mappedType": "string"
1609
+ "unique": false,
1610
+ "length": null,
1611
+ "precision": null,
1612
+ "scale": null,
1613
+ "default": null,
1614
+ "comment": null,
1615
+ "collation": null,
1616
+ "enumItems": [],
1617
+ "mappedType": "json"
1019
1618
  },
1020
- "event_data": {
1021
- "name": "event_data",
1022
- "type": "jsonb",
1619
+ "organization_id": {
1620
+ "name": "organization_id",
1621
+ "type": "uuid",
1023
1622
  "unsigned": false,
1024
1623
  "autoincrement": false,
1025
1624
  "primary": false,
1026
1625
  "nullable": false,
1027
- "mappedType": "json"
1626
+ "unique": false,
1627
+ "length": null,
1628
+ "precision": null,
1629
+ "scale": null,
1630
+ "default": null,
1631
+ "comment": null,
1632
+ "collation": null,
1633
+ "enumItems": [],
1634
+ "mappedType": "uuid"
1028
1635
  },
1029
- "occurred_at": {
1030
- "name": "occurred_at",
1031
- "type": "timestamptz",
1636
+ "tenant_id": {
1637
+ "name": "tenant_id",
1638
+ "type": "uuid",
1032
1639
  "unsigned": false,
1033
1640
  "autoincrement": false,
1034
1641
  "primary": false,
1035
1642
  "nullable": false,
1036
- "length": 6,
1037
- "mappedType": "datetime"
1643
+ "unique": true,
1644
+ "length": null,
1645
+ "precision": null,
1646
+ "scale": null,
1647
+ "default": null,
1648
+ "comment": null,
1649
+ "collation": null,
1650
+ "enumItems": [],
1651
+ "mappedType": "uuid"
1038
1652
  },
1039
- "user_id": {
1040
- "name": "user_id",
1041
- "type": "varchar(255)",
1653
+ "window_end": {
1654
+ "name": "window_end",
1655
+ "type": "timestamptz(6)",
1042
1656
  "unsigned": false,
1043
1657
  "autoincrement": false,
1044
1658
  "primary": false,
1045
- "nullable": true,
1046
- "length": 255,
1047
- "mappedType": "string"
1659
+ "nullable": false,
1660
+ "unique": false,
1661
+ "length": 6,
1662
+ "precision": null,
1663
+ "scale": null,
1664
+ "default": null,
1665
+ "comment": null,
1666
+ "collation": null,
1667
+ "enumItems": [],
1668
+ "mappedType": "datetime"
1048
1669
  },
1049
- "tenant_id": {
1050
- "name": "tenant_id",
1051
- "type": "uuid",
1670
+ "window_key": {
1671
+ "name": "window_key",
1672
+ "type": "varchar(10)",
1052
1673
  "unsigned": false,
1053
1674
  "autoincrement": false,
1054
1675
  "primary": false,
1055
1676
  "nullable": false,
1056
- "mappedType": "uuid"
1677
+ "unique": false,
1678
+ "length": 10,
1679
+ "precision": null,
1680
+ "scale": null,
1681
+ "default": null,
1682
+ "comment": null,
1683
+ "collation": null,
1684
+ "enumItems": [],
1685
+ "mappedType": "string"
1057
1686
  },
1058
- "organization_id": {
1059
- "name": "organization_id",
1060
- "type": "uuid",
1687
+ "window_start": {
1688
+ "name": "window_start",
1689
+ "type": "timestamptz(6)",
1061
1690
  "unsigned": false,
1062
1691
  "autoincrement": false,
1063
1692
  "primary": false,
1064
1693
  "nullable": false,
1065
- "mappedType": "uuid"
1694
+ "unique": false,
1695
+ "length": 6,
1696
+ "precision": null,
1697
+ "scale": null,
1698
+ "default": null,
1699
+ "comment": null,
1700
+ "collation": null,
1701
+ "enumItems": [],
1702
+ "mappedType": "datetime"
1066
1703
  },
1067
- "branch_instance_id": {
1068
- "name": "branch_instance_id",
1069
- "type": "uuid",
1704
+ "workflow_id": {
1705
+ "name": "workflow_id",
1706
+ "type": "varchar(100)",
1070
1707
  "unsigned": false,
1071
1708
  "autoincrement": false,
1072
1709
  "primary": false,
1073
- "nullable": true,
1074
- "mappedType": "uuid"
1710
+ "nullable": false,
1711
+ "unique": false,
1712
+ "length": 100,
1713
+ "precision": null,
1714
+ "scale": null,
1715
+ "default": null,
1716
+ "comment": null,
1717
+ "collation": null,
1718
+ "enumItems": [],
1719
+ "mappedType": "string"
1075
1720
  }
1076
1721
  },
1077
- "name": "workflow_events",
1078
- "schema": "public",
1079
1722
  "indexes": [
1080
1723
  {
1081
- "keyName": "workflow_events_tenant_org_idx",
1082
1724
  "columnNames": [
1083
1725
  "tenant_id",
1084
- "organization_id"
1085
- ],
1086
- "composite": true,
1087
- "constraint": false,
1088
- "primary": false,
1089
- "unique": false
1090
- },
1091
- {
1092
- "keyName": "workflow_events_event_type_idx",
1093
- "columnNames": [
1094
- "event_type",
1095
- "occurred_at"
1726
+ "organization_id",
1727
+ "workflow_id",
1728
+ "window_key",
1729
+ "window_start"
1096
1730
  ],
1097
1731
  "composite": true,
1098
- "constraint": false,
1732
+ "constraint": true,
1733
+ "keyName": "workflow_definition_metric_rollups_bucket_uq",
1099
1734
  "primary": false,
1100
- "unique": false
1735
+ "unique": true
1101
1736
  },
1102
1737
  {
1103
- "keyName": "workflow_events_instance_occurred_idx",
1104
1738
  "columnNames": [
1105
- "workflow_instance_id",
1106
- "occurred_at"
1739
+ "tenant_id",
1740
+ "organization_id",
1741
+ "workflow_id",
1742
+ "window_key"
1107
1743
  ],
1108
1744
  "composite": true,
1109
1745
  "constraint": false,
1746
+ "keyName": "workflow_definition_metric_rollups_lookup_idx",
1110
1747
  "primary": false,
1111
1748
  "unique": false
1112
1749
  },
1113
1750
  {
1114
- "keyName": "workflow_events_pkey",
1115
1751
  "columnNames": [
1116
1752
  "id"
1117
1753
  ],
1118
1754
  "composite": false,
1119
1755
  "constraint": true,
1756
+ "keyName": "workflow_definition_metric_rollups_pkey",
1120
1757
  "primary": true,
1121
1758
  "unique": true
1122
1759
  }
1123
1760
  ],
1124
1761
  "checks": [],
1762
+ "triggers": [],
1125
1763
  "foreignKeys": {},
1126
- "nativeEnums": {}
1764
+ "comment": null
1127
1765
  },
1128
1766
  {
1767
+ "name": "workflow_definitions",
1768
+ "schema": "public",
1129
1769
  "columns": {
1130
- "id": {
1131
- "name": "id",
1132
- "type": "uuid",
1770
+ "code_workflow_id": {
1771
+ "name": "code_workflow_id",
1772
+ "type": "varchar(100)",
1773
+ "unsigned": false,
1774
+ "autoincrement": false,
1775
+ "primary": false,
1776
+ "nullable": true,
1777
+ "unique": false,
1778
+ "length": 100,
1779
+ "precision": null,
1780
+ "scale": null,
1781
+ "default": null,
1782
+ "comment": null,
1783
+ "collation": null,
1784
+ "enumItems": [],
1785
+ "mappedType": "string"
1786
+ },
1787
+ "created_at": {
1788
+ "name": "created_at",
1789
+ "type": "timestamptz(6)",
1133
1790
  "unsigned": false,
1134
1791
  "autoincrement": false,
1135
1792
  "primary": false,
1136
1793
  "nullable": false,
1137
- "default": "gen_random_uuid()",
1138
- "mappedType": "uuid"
1794
+ "unique": false,
1795
+ "length": 6,
1796
+ "precision": null,
1797
+ "scale": null,
1798
+ "default": null,
1799
+ "comment": null,
1800
+ "collation": null,
1801
+ "enumItems": [],
1802
+ "mappedType": "datetime"
1139
1803
  },
1140
- "name": {
1141
- "name": "name",
1804
+ "created_by": {
1805
+ "name": "created_by",
1142
1806
  "type": "varchar(255)",
1143
1807
  "unsigned": false,
1144
1808
  "autoincrement": false,
1145
1809
  "primary": false,
1146
- "nullable": false,
1810
+ "nullable": true,
1811
+ "unique": false,
1147
1812
  "length": 255,
1813
+ "precision": null,
1814
+ "scale": null,
1815
+ "default": null,
1816
+ "comment": null,
1817
+ "collation": null,
1818
+ "enumItems": [],
1148
1819
  "mappedType": "string"
1149
1820
  },
1150
- "description": {
1151
- "name": "description",
1152
- "type": "text",
1821
+ "definition": {
1822
+ "name": "definition",
1823
+ "type": "jsonb",
1824
+ "unsigned": false,
1825
+ "autoincrement": false,
1826
+ "primary": false,
1827
+ "nullable": false,
1828
+ "unique": false,
1829
+ "length": null,
1830
+ "precision": null,
1831
+ "scale": null,
1832
+ "default": null,
1833
+ "comment": null,
1834
+ "collation": null,
1835
+ "enumItems": [],
1836
+ "mappedType": "json"
1837
+ },
1838
+ "deleted_at": {
1839
+ "name": "deleted_at",
1840
+ "type": "timestamptz(6)",
1153
1841
  "unsigned": false,
1154
1842
  "autoincrement": false,
1155
1843
  "primary": false,
1156
1844
  "nullable": true,
1157
- "mappedType": "text"
1845
+ "unique": false,
1846
+ "length": 6,
1847
+ "precision": null,
1848
+ "scale": null,
1849
+ "default": null,
1850
+ "comment": null,
1851
+ "collation": null,
1852
+ "enumItems": [],
1853
+ "mappedType": "datetime"
1158
1854
  },
1159
- "workflow_definition_id": {
1160
- "name": "workflow_definition_id",
1161
- "type": "uuid",
1855
+ "description": {
1856
+ "name": "description",
1857
+ "type": "text",
1162
1858
  "unsigned": false,
1163
1859
  "autoincrement": false,
1164
1860
  "primary": false,
1165
- "nullable": false,
1166
- "mappedType": "uuid"
1861
+ "nullable": true,
1862
+ "unique": false,
1863
+ "length": null,
1864
+ "precision": null,
1865
+ "scale": null,
1866
+ "default": null,
1867
+ "comment": null,
1868
+ "collation": null,
1869
+ "enumItems": [],
1870
+ "mappedType": "text"
1167
1871
  },
1168
- "event_pattern": {
1169
- "name": "event_pattern",
1170
- "type": "varchar(255)",
1872
+ "effective_from": {
1873
+ "name": "effective_from",
1874
+ "type": "timestamptz(6)",
1171
1875
  "unsigned": false,
1172
1876
  "autoincrement": false,
1173
1877
  "primary": false,
1174
- "nullable": false,
1175
- "length": 255,
1176
- "mappedType": "string"
1878
+ "nullable": true,
1879
+ "unique": false,
1880
+ "length": 6,
1881
+ "precision": null,
1882
+ "scale": null,
1883
+ "default": null,
1884
+ "comment": null,
1885
+ "collation": null,
1886
+ "enumItems": [],
1887
+ "mappedType": "datetime"
1177
1888
  },
1178
- "config": {
1179
- "name": "config",
1180
- "type": "jsonb",
1889
+ "effective_to": {
1890
+ "name": "effective_to",
1891
+ "type": "timestamptz(6)",
1181
1892
  "unsigned": false,
1182
1893
  "autoincrement": false,
1183
1894
  "primary": false,
1184
1895
  "nullable": true,
1185
- "mappedType": "json"
1896
+ "unique": false,
1897
+ "length": 6,
1898
+ "precision": null,
1899
+ "scale": null,
1900
+ "default": null,
1901
+ "comment": null,
1902
+ "collation": null,
1903
+ "enumItems": [],
1904
+ "mappedType": "datetime"
1186
1905
  },
1187
1906
  "enabled": {
1188
1907
  "name": "enabled",
@@ -1191,47 +1910,152 @@
1191
1910
  "autoincrement": false,
1192
1911
  "primary": false,
1193
1912
  "nullable": false,
1913
+ "unique": false,
1914
+ "length": null,
1915
+ "precision": null,
1916
+ "scale": null,
1194
1917
  "default": "true",
1918
+ "comment": null,
1919
+ "collation": null,
1920
+ "enumItems": [],
1195
1921
  "mappedType": "boolean"
1196
1922
  },
1197
- "priority": {
1198
- "name": "priority",
1199
- "type": "int",
1923
+ "granted_features": {
1924
+ "name": "granted_features",
1925
+ "type": "jsonb",
1200
1926
  "unsigned": false,
1201
1927
  "autoincrement": false,
1202
1928
  "primary": false,
1203
- "nullable": false,
1204
- "default": "0",
1205
- "mappedType": "integer"
1929
+ "nullable": true,
1930
+ "unique": false,
1931
+ "length": null,
1932
+ "precision": null,
1933
+ "scale": null,
1934
+ "default": null,
1935
+ "comment": null,
1936
+ "collation": null,
1937
+ "enumItems": [],
1938
+ "mappedType": "json"
1206
1939
  },
1207
- "tenant_id": {
1208
- "name": "tenant_id",
1940
+ "id": {
1941
+ "name": "id",
1209
1942
  "type": "uuid",
1210
1943
  "unsigned": false,
1211
1944
  "autoincrement": false,
1212
- "primary": false,
1945
+ "primary": true,
1213
1946
  "nullable": false,
1947
+ "unique": false,
1948
+ "length": null,
1949
+ "precision": null,
1950
+ "scale": null,
1951
+ "default": "gen_random_uuid()",
1952
+ "comment": null,
1953
+ "collation": null,
1954
+ "enumItems": [],
1214
1955
  "mappedType": "uuid"
1215
1956
  },
1216
- "organization_id": {
1217
- "name": "organization_id",
1218
- "type": "uuid",
1957
+ "kind": {
1958
+ "name": "kind",
1959
+ "type": "varchar(20)",
1219
1960
  "unsigned": false,
1220
1961
  "autoincrement": false,
1221
1962
  "primary": false,
1222
1963
  "nullable": false,
1223
- "mappedType": "uuid"
1964
+ "unique": false,
1965
+ "length": 20,
1966
+ "precision": null,
1967
+ "scale": null,
1968
+ "default": "'workflow'",
1969
+ "comment": null,
1970
+ "collation": null,
1971
+ "enumItems": [],
1972
+ "mappedType": "string"
1224
1973
  },
1225
- "created_by": {
1226
- "name": "created_by",
1227
- "type": "varchar(255)",
1974
+ "lifecycle": {
1975
+ "name": "lifecycle",
1976
+ "type": "varchar(20)",
1228
1977
  "unsigned": false,
1229
1978
  "autoincrement": false,
1230
1979
  "primary": false,
1231
- "nullable": true,
1232
- "length": 255,
1980
+ "nullable": false,
1981
+ "unique": false,
1982
+ "length": 20,
1983
+ "precision": null,
1984
+ "scale": null,
1985
+ "default": "'published'",
1986
+ "comment": null,
1987
+ "collation": null,
1988
+ "enumItems": [],
1233
1989
  "mappedType": "string"
1234
1990
  },
1991
+ "metadata": {
1992
+ "name": "metadata",
1993
+ "type": "jsonb",
1994
+ "unsigned": false,
1995
+ "autoincrement": false,
1996
+ "primary": false,
1997
+ "nullable": true,
1998
+ "unique": false,
1999
+ "length": null,
2000
+ "precision": null,
2001
+ "scale": null,
2002
+ "default": null,
2003
+ "comment": null,
2004
+ "collation": null,
2005
+ "enumItems": [],
2006
+ "mappedType": "json"
2007
+ },
2008
+ "organization_id": {
2009
+ "name": "organization_id",
2010
+ "type": "uuid",
2011
+ "unsigned": false,
2012
+ "autoincrement": false,
2013
+ "primary": false,
2014
+ "nullable": false,
2015
+ "unique": false,
2016
+ "length": null,
2017
+ "precision": null,
2018
+ "scale": null,
2019
+ "default": null,
2020
+ "comment": null,
2021
+ "collation": null,
2022
+ "enumItems": [],
2023
+ "mappedType": "uuid"
2024
+ },
2025
+ "tenant_id": {
2026
+ "name": "tenant_id",
2027
+ "type": "uuid",
2028
+ "unsigned": false,
2029
+ "autoincrement": false,
2030
+ "primary": false,
2031
+ "nullable": false,
2032
+ "unique": false,
2033
+ "length": null,
2034
+ "precision": null,
2035
+ "scale": null,
2036
+ "default": null,
2037
+ "comment": null,
2038
+ "collation": null,
2039
+ "enumItems": [],
2040
+ "mappedType": "uuid"
2041
+ },
2042
+ "updated_at": {
2043
+ "name": "updated_at",
2044
+ "type": "timestamptz(6)",
2045
+ "unsigned": false,
2046
+ "autoincrement": false,
2047
+ "primary": false,
2048
+ "nullable": false,
2049
+ "unique": false,
2050
+ "length": 6,
2051
+ "precision": null,
2052
+ "scale": null,
2053
+ "default": null,
2054
+ "comment": null,
2055
+ "collation": null,
2056
+ "enumItems": [],
2057
+ "mappedType": "datetime"
2058
+ },
1235
2059
  "updated_by": {
1236
2060
  "name": "updated_by",
1237
2061
  "type": "varchar(255)",
@@ -1239,151 +2063,800 @@
1239
2063
  "autoincrement": false,
1240
2064
  "primary": false,
1241
2065
  "nullable": true,
2066
+ "unique": false,
2067
+ "length": 255,
2068
+ "precision": null,
2069
+ "scale": null,
2070
+ "default": null,
2071
+ "comment": null,
2072
+ "collation": null,
2073
+ "enumItems": [],
2074
+ "mappedType": "string"
2075
+ },
2076
+ "version": {
2077
+ "name": "version",
2078
+ "type": "int",
2079
+ "unsigned": false,
2080
+ "autoincrement": false,
2081
+ "primary": false,
2082
+ "nullable": false,
2083
+ "unique": false,
2084
+ "length": null,
2085
+ "precision": null,
2086
+ "scale": null,
2087
+ "default": "1",
2088
+ "comment": null,
2089
+ "collation": null,
2090
+ "enumItems": [],
2091
+ "mappedType": "integer"
2092
+ },
2093
+ "workflow_id": {
2094
+ "name": "workflow_id",
2095
+ "type": "varchar(100)",
2096
+ "unsigned": false,
2097
+ "autoincrement": false,
2098
+ "primary": false,
2099
+ "nullable": false,
2100
+ "unique": true,
2101
+ "length": 100,
2102
+ "precision": null,
2103
+ "scale": null,
2104
+ "default": null,
2105
+ "comment": null,
2106
+ "collation": null,
2107
+ "enumItems": [],
2108
+ "mappedType": "string"
2109
+ },
2110
+ "workflow_name": {
2111
+ "name": "workflow_name",
2112
+ "type": "varchar(255)",
2113
+ "unsigned": false,
2114
+ "autoincrement": false,
2115
+ "primary": false,
2116
+ "nullable": false,
2117
+ "unique": false,
1242
2118
  "length": 255,
2119
+ "precision": null,
2120
+ "scale": null,
2121
+ "default": null,
2122
+ "comment": null,
2123
+ "collation": null,
2124
+ "enumItems": [],
1243
2125
  "mappedType": "string"
2126
+ }
2127
+ },
2128
+ "indexes": [
2129
+ {
2130
+ "columnNames": [
2131
+ "definition"
2132
+ ],
2133
+ "composite": false,
2134
+ "constraint": false,
2135
+ "keyName": "workflow_definitions_definition_gin_idx",
2136
+ "primary": false,
2137
+ "unique": false,
2138
+ "type": "gin"
2139
+ },
2140
+ {
2141
+ "columnNames": [
2142
+ "enabled"
2143
+ ],
2144
+ "composite": false,
2145
+ "constraint": false,
2146
+ "keyName": "workflow_definitions_enabled_idx",
2147
+ "primary": false,
2148
+ "unique": false
2149
+ },
2150
+ {
2151
+ "columnNames": [
2152
+ "kind"
2153
+ ],
2154
+ "composite": false,
2155
+ "constraint": false,
2156
+ "keyName": "workflow_definitions_kind_idx",
2157
+ "primary": false,
2158
+ "unique": false
2159
+ },
2160
+ {
2161
+ "columnNames": [
2162
+ "id"
2163
+ ],
2164
+ "composite": false,
2165
+ "constraint": true,
2166
+ "keyName": "workflow_definitions_pkey",
2167
+ "primary": true,
2168
+ "unique": true
2169
+ },
2170
+ {
2171
+ "columnNames": [
2172
+ "tenant_id",
2173
+ "organization_id"
2174
+ ],
2175
+ "composite": true,
2176
+ "constraint": false,
2177
+ "keyName": "workflow_definitions_tenant_org_idx",
2178
+ "primary": false,
2179
+ "unique": false
2180
+ },
2181
+ {
2182
+ "columnNames": [
2183
+ "workflow_id"
2184
+ ],
2185
+ "composite": false,
2186
+ "constraint": false,
2187
+ "keyName": "workflow_definitions_workflow_id_idx",
2188
+ "primary": false,
2189
+ "unique": false
2190
+ },
2191
+ {
2192
+ "columnNames": [
2193
+ "workflow_id",
2194
+ "version",
2195
+ "tenant_id"
2196
+ ],
2197
+ "composite": true,
2198
+ "constraint": true,
2199
+ "keyName": "workflow_definitions_workflow_id_version_tenant_id_unique",
2200
+ "primary": false,
2201
+ "unique": true
2202
+ }
2203
+ ],
2204
+ "checks": [],
2205
+ "triggers": [],
2206
+ "foreignKeys": {},
2207
+ "comment": null
2208
+ },
2209
+ {
2210
+ "name": "workflow_event_triggers",
2211
+ "schema": "public",
2212
+ "columns": {
2213
+ "config": {
2214
+ "name": "config",
2215
+ "type": "jsonb",
2216
+ "unsigned": false,
2217
+ "autoincrement": false,
2218
+ "primary": false,
2219
+ "nullable": true,
2220
+ "unique": false,
2221
+ "length": null,
2222
+ "precision": null,
2223
+ "scale": null,
2224
+ "default": null,
2225
+ "comment": null,
2226
+ "collation": null,
2227
+ "enumItems": [],
2228
+ "mappedType": "json"
1244
2229
  },
1245
2230
  "created_at": {
1246
2231
  "name": "created_at",
1247
- "type": "timestamptz",
2232
+ "type": "timestamptz(6)",
1248
2233
  "unsigned": false,
1249
2234
  "autoincrement": false,
1250
2235
  "primary": false,
1251
2236
  "nullable": false,
2237
+ "unique": false,
1252
2238
  "length": 6,
2239
+ "precision": null,
2240
+ "scale": null,
2241
+ "default": null,
2242
+ "comment": null,
2243
+ "collation": null,
2244
+ "enumItems": [],
1253
2245
  "mappedType": "datetime"
1254
2246
  },
2247
+ "created_by": {
2248
+ "name": "created_by",
2249
+ "type": "varchar(255)",
2250
+ "unsigned": false,
2251
+ "autoincrement": false,
2252
+ "primary": false,
2253
+ "nullable": true,
2254
+ "unique": false,
2255
+ "length": 255,
2256
+ "precision": null,
2257
+ "scale": null,
2258
+ "default": null,
2259
+ "comment": null,
2260
+ "collation": null,
2261
+ "enumItems": [],
2262
+ "mappedType": "string"
2263
+ },
2264
+ "deleted_at": {
2265
+ "name": "deleted_at",
2266
+ "type": "timestamptz(6)",
2267
+ "unsigned": false,
2268
+ "autoincrement": false,
2269
+ "primary": false,
2270
+ "nullable": true,
2271
+ "unique": false,
2272
+ "length": 6,
2273
+ "precision": null,
2274
+ "scale": null,
2275
+ "default": null,
2276
+ "comment": null,
2277
+ "collation": null,
2278
+ "enumItems": [],
2279
+ "mappedType": "datetime"
2280
+ },
2281
+ "description": {
2282
+ "name": "description",
2283
+ "type": "text",
2284
+ "unsigned": false,
2285
+ "autoincrement": false,
2286
+ "primary": false,
2287
+ "nullable": true,
2288
+ "unique": false,
2289
+ "length": null,
2290
+ "precision": null,
2291
+ "scale": null,
2292
+ "default": null,
2293
+ "comment": null,
2294
+ "collation": null,
2295
+ "enumItems": [],
2296
+ "mappedType": "text"
2297
+ },
2298
+ "enabled": {
2299
+ "name": "enabled",
2300
+ "type": "boolean",
2301
+ "unsigned": false,
2302
+ "autoincrement": false,
2303
+ "primary": false,
2304
+ "nullable": false,
2305
+ "unique": false,
2306
+ "length": null,
2307
+ "precision": null,
2308
+ "scale": null,
2309
+ "default": "true",
2310
+ "comment": null,
2311
+ "collation": null,
2312
+ "enumItems": [],
2313
+ "mappedType": "boolean"
2314
+ },
2315
+ "event_pattern": {
2316
+ "name": "event_pattern",
2317
+ "type": "varchar(255)",
2318
+ "unsigned": false,
2319
+ "autoincrement": false,
2320
+ "primary": false,
2321
+ "nullable": false,
2322
+ "unique": false,
2323
+ "length": 255,
2324
+ "precision": null,
2325
+ "scale": null,
2326
+ "default": null,
2327
+ "comment": null,
2328
+ "collation": null,
2329
+ "enumItems": [],
2330
+ "mappedType": "string"
2331
+ },
2332
+ "id": {
2333
+ "name": "id",
2334
+ "type": "uuid",
2335
+ "unsigned": false,
2336
+ "autoincrement": false,
2337
+ "primary": true,
2338
+ "nullable": false,
2339
+ "unique": false,
2340
+ "length": null,
2341
+ "precision": null,
2342
+ "scale": null,
2343
+ "default": "gen_random_uuid()",
2344
+ "comment": null,
2345
+ "collation": null,
2346
+ "enumItems": [],
2347
+ "mappedType": "uuid"
2348
+ },
2349
+ "name": {
2350
+ "name": "name",
2351
+ "type": "varchar(255)",
2352
+ "unsigned": false,
2353
+ "autoincrement": false,
2354
+ "primary": false,
2355
+ "nullable": false,
2356
+ "unique": false,
2357
+ "length": 255,
2358
+ "precision": null,
2359
+ "scale": null,
2360
+ "default": null,
2361
+ "comment": null,
2362
+ "collation": null,
2363
+ "enumItems": [],
2364
+ "mappedType": "string"
2365
+ },
2366
+ "organization_id": {
2367
+ "name": "organization_id",
2368
+ "type": "uuid",
2369
+ "unsigned": false,
2370
+ "autoincrement": false,
2371
+ "primary": false,
2372
+ "nullable": false,
2373
+ "unique": false,
2374
+ "length": null,
2375
+ "precision": null,
2376
+ "scale": null,
2377
+ "default": null,
2378
+ "comment": null,
2379
+ "collation": null,
2380
+ "enumItems": [],
2381
+ "mappedType": "uuid"
2382
+ },
2383
+ "priority": {
2384
+ "name": "priority",
2385
+ "type": "int",
2386
+ "unsigned": false,
2387
+ "autoincrement": false,
2388
+ "primary": false,
2389
+ "nullable": false,
2390
+ "unique": false,
2391
+ "length": null,
2392
+ "precision": null,
2393
+ "scale": null,
2394
+ "default": "0",
2395
+ "comment": null,
2396
+ "collation": null,
2397
+ "enumItems": [],
2398
+ "mappedType": "integer"
2399
+ },
2400
+ "tenant_id": {
2401
+ "name": "tenant_id",
2402
+ "type": "uuid",
2403
+ "unsigned": false,
2404
+ "autoincrement": false,
2405
+ "primary": false,
2406
+ "nullable": false,
2407
+ "unique": false,
2408
+ "length": null,
2409
+ "precision": null,
2410
+ "scale": null,
2411
+ "default": null,
2412
+ "comment": null,
2413
+ "collation": null,
2414
+ "enumItems": [],
2415
+ "mappedType": "uuid"
2416
+ },
1255
2417
  "updated_at": {
1256
2418
  "name": "updated_at",
1257
- "type": "timestamptz",
2419
+ "type": "timestamptz(6)",
1258
2420
  "unsigned": false,
1259
2421
  "autoincrement": false,
1260
2422
  "primary": false,
1261
2423
  "nullable": false,
2424
+ "unique": false,
1262
2425
  "length": 6,
2426
+ "precision": null,
2427
+ "scale": null,
2428
+ "default": null,
2429
+ "comment": null,
2430
+ "collation": null,
2431
+ "enumItems": [],
1263
2432
  "mappedType": "datetime"
1264
2433
  },
1265
- "deleted_at": {
1266
- "name": "deleted_at",
1267
- "type": "timestamptz",
2434
+ "updated_by": {
2435
+ "name": "updated_by",
2436
+ "type": "varchar(255)",
1268
2437
  "unsigned": false,
1269
2438
  "autoincrement": false,
1270
2439
  "primary": false,
1271
2440
  "nullable": true,
1272
- "length": 6,
1273
- "mappedType": "datetime"
2441
+ "unique": false,
2442
+ "length": 255,
2443
+ "precision": null,
2444
+ "scale": null,
2445
+ "default": null,
2446
+ "comment": null,
2447
+ "collation": null,
2448
+ "enumItems": [],
2449
+ "mappedType": "string"
2450
+ },
2451
+ "workflow_definition_id": {
2452
+ "name": "workflow_definition_id",
2453
+ "type": "uuid",
2454
+ "unsigned": false,
2455
+ "autoincrement": false,
2456
+ "primary": false,
2457
+ "nullable": false,
2458
+ "unique": false,
2459
+ "length": null,
2460
+ "precision": null,
2461
+ "scale": null,
2462
+ "default": null,
2463
+ "comment": null,
2464
+ "collation": null,
2465
+ "enumItems": [],
2466
+ "mappedType": "uuid"
1274
2467
  }
1275
2468
  },
1276
- "name": "workflow_event_triggers",
1277
- "schema": "public",
1278
2469
  "indexes": [
1279
2470
  {
1280
- "keyName": "workflow_event_triggers_enabled_priority_idx",
2471
+ "columnNames": [
2472
+ "workflow_definition_id"
2473
+ ],
2474
+ "composite": false,
2475
+ "constraint": false,
2476
+ "keyName": "workflow_event_triggers_definition_idx",
2477
+ "primary": false,
2478
+ "unique": false
2479
+ },
2480
+ {
1281
2481
  "columnNames": [
1282
2482
  "enabled",
1283
2483
  "priority"
1284
2484
  ],
1285
2485
  "composite": true,
1286
2486
  "constraint": false,
2487
+ "keyName": "workflow_event_triggers_enabled_priority_idx",
1287
2488
  "primary": false,
1288
2489
  "unique": false
1289
2490
  },
1290
2491
  {
1291
- "keyName": "workflow_event_triggers_tenant_org_idx",
2492
+ "columnNames": [
2493
+ "event_pattern",
2494
+ "enabled"
2495
+ ],
2496
+ "composite": true,
2497
+ "constraint": false,
2498
+ "keyName": "workflow_event_triggers_event_pattern_idx",
2499
+ "primary": false,
2500
+ "unique": false
2501
+ },
2502
+ {
2503
+ "columnNames": [
2504
+ "id"
2505
+ ],
2506
+ "composite": false,
2507
+ "constraint": true,
2508
+ "keyName": "workflow_event_triggers_pkey",
2509
+ "primary": true,
2510
+ "unique": true
2511
+ },
2512
+ {
1292
2513
  "columnNames": [
1293
2514
  "tenant_id",
1294
2515
  "organization_id"
1295
2516
  ],
1296
2517
  "composite": true,
1297
2518
  "constraint": false,
2519
+ "keyName": "workflow_event_triggers_tenant_org_idx",
1298
2520
  "primary": false,
1299
2521
  "unique": false
2522
+ }
2523
+ ],
2524
+ "checks": [],
2525
+ "triggers": [],
2526
+ "foreignKeys": {},
2527
+ "comment": null
2528
+ },
2529
+ {
2530
+ "name": "workflow_events",
2531
+ "schema": "public",
2532
+ "columns": {
2533
+ "branch_instance_id": {
2534
+ "name": "branch_instance_id",
2535
+ "type": "uuid",
2536
+ "unsigned": false,
2537
+ "autoincrement": false,
2538
+ "primary": false,
2539
+ "nullable": true,
2540
+ "unique": false,
2541
+ "length": null,
2542
+ "precision": null,
2543
+ "scale": null,
2544
+ "default": null,
2545
+ "comment": null,
2546
+ "collation": null,
2547
+ "enumItems": [],
2548
+ "mappedType": "uuid"
1300
2549
  },
2550
+ "event_data": {
2551
+ "name": "event_data",
2552
+ "type": "jsonb",
2553
+ "unsigned": false,
2554
+ "autoincrement": false,
2555
+ "primary": false,
2556
+ "nullable": false,
2557
+ "unique": false,
2558
+ "length": null,
2559
+ "precision": null,
2560
+ "scale": null,
2561
+ "default": null,
2562
+ "comment": null,
2563
+ "collation": null,
2564
+ "enumItems": [],
2565
+ "mappedType": "json"
2566
+ },
2567
+ "event_type": {
2568
+ "name": "event_type",
2569
+ "type": "varchar(50)",
2570
+ "unsigned": false,
2571
+ "autoincrement": false,
2572
+ "primary": false,
2573
+ "nullable": false,
2574
+ "unique": false,
2575
+ "length": 50,
2576
+ "precision": null,
2577
+ "scale": null,
2578
+ "default": null,
2579
+ "comment": null,
2580
+ "collation": null,
2581
+ "enumItems": [],
2582
+ "mappedType": "string"
2583
+ },
2584
+ "id": {
2585
+ "name": "id",
2586
+ "type": "bigint",
2587
+ "unsigned": false,
2588
+ "autoincrement": true,
2589
+ "primary": true,
2590
+ "nullable": false,
2591
+ "unique": false,
2592
+ "length": null,
2593
+ "precision": null,
2594
+ "scale": null,
2595
+ "default": null,
2596
+ "comment": null,
2597
+ "collation": null,
2598
+ "enumItems": [],
2599
+ "mappedType": "bigint"
2600
+ },
2601
+ "occurred_at": {
2602
+ "name": "occurred_at",
2603
+ "type": "timestamptz(6)",
2604
+ "unsigned": false,
2605
+ "autoincrement": false,
2606
+ "primary": false,
2607
+ "nullable": false,
2608
+ "unique": false,
2609
+ "length": 6,
2610
+ "precision": null,
2611
+ "scale": null,
2612
+ "default": null,
2613
+ "comment": null,
2614
+ "collation": null,
2615
+ "enumItems": [],
2616
+ "mappedType": "datetime"
2617
+ },
2618
+ "organization_id": {
2619
+ "name": "organization_id",
2620
+ "type": "uuid",
2621
+ "unsigned": false,
2622
+ "autoincrement": false,
2623
+ "primary": false,
2624
+ "nullable": false,
2625
+ "unique": false,
2626
+ "length": null,
2627
+ "precision": null,
2628
+ "scale": null,
2629
+ "default": null,
2630
+ "comment": null,
2631
+ "collation": null,
2632
+ "enumItems": [],
2633
+ "mappedType": "uuid"
2634
+ },
2635
+ "step_instance_id": {
2636
+ "name": "step_instance_id",
2637
+ "type": "uuid",
2638
+ "unsigned": false,
2639
+ "autoincrement": false,
2640
+ "primary": false,
2641
+ "nullable": true,
2642
+ "unique": false,
2643
+ "length": null,
2644
+ "precision": null,
2645
+ "scale": null,
2646
+ "default": null,
2647
+ "comment": null,
2648
+ "collation": null,
2649
+ "enumItems": [],
2650
+ "mappedType": "uuid"
2651
+ },
2652
+ "tenant_id": {
2653
+ "name": "tenant_id",
2654
+ "type": "uuid",
2655
+ "unsigned": false,
2656
+ "autoincrement": false,
2657
+ "primary": false,
2658
+ "nullable": false,
2659
+ "unique": false,
2660
+ "length": null,
2661
+ "precision": null,
2662
+ "scale": null,
2663
+ "default": null,
2664
+ "comment": null,
2665
+ "collation": null,
2666
+ "enumItems": [],
2667
+ "mappedType": "uuid"
2668
+ },
2669
+ "user_id": {
2670
+ "name": "user_id",
2671
+ "type": "varchar(255)",
2672
+ "unsigned": false,
2673
+ "autoincrement": false,
2674
+ "primary": false,
2675
+ "nullable": true,
2676
+ "unique": false,
2677
+ "length": 255,
2678
+ "precision": null,
2679
+ "scale": null,
2680
+ "default": null,
2681
+ "comment": null,
2682
+ "collation": null,
2683
+ "enumItems": [],
2684
+ "mappedType": "string"
2685
+ },
2686
+ "workflow_instance_id": {
2687
+ "name": "workflow_instance_id",
2688
+ "type": "uuid",
2689
+ "unsigned": false,
2690
+ "autoincrement": false,
2691
+ "primary": false,
2692
+ "nullable": false,
2693
+ "unique": false,
2694
+ "length": null,
2695
+ "precision": null,
2696
+ "scale": null,
2697
+ "default": null,
2698
+ "comment": null,
2699
+ "collation": null,
2700
+ "enumItems": [],
2701
+ "mappedType": "uuid"
2702
+ }
2703
+ },
2704
+ "indexes": [
1301
2705
  {
1302
- "keyName": "workflow_event_triggers_definition_idx",
1303
2706
  "columnNames": [
1304
- "workflow_definition_id"
2707
+ "event_type",
2708
+ "occurred_at"
1305
2709
  ],
1306
- "composite": false,
2710
+ "composite": true,
1307
2711
  "constraint": false,
2712
+ "keyName": "workflow_events_event_type_idx",
1308
2713
  "primary": false,
1309
2714
  "unique": false
1310
2715
  },
1311
2716
  {
1312
- "keyName": "workflow_event_triggers_event_pattern_idx",
1313
2717
  "columnNames": [
1314
- "event_pattern",
1315
- "enabled"
2718
+ "workflow_instance_id",
2719
+ "occurred_at"
1316
2720
  ],
1317
2721
  "composite": true,
1318
2722
  "constraint": false,
2723
+ "keyName": "workflow_events_instance_occurred_idx",
1319
2724
  "primary": false,
1320
2725
  "unique": false
1321
2726
  },
1322
2727
  {
1323
- "keyName": "workflow_event_triggers_pkey",
1324
2728
  "columnNames": [
1325
2729
  "id"
1326
2730
  ],
1327
2731
  "composite": false,
1328
2732
  "constraint": true,
2733
+ "keyName": "workflow_events_pkey",
1329
2734
  "primary": true,
1330
2735
  "unique": true
2736
+ },
2737
+ {
2738
+ "columnNames": [
2739
+ "tenant_id",
2740
+ "organization_id"
2741
+ ],
2742
+ "composite": true,
2743
+ "constraint": false,
2744
+ "keyName": "workflow_events_tenant_org_idx",
2745
+ "primary": false,
2746
+ "unique": false
1331
2747
  }
1332
2748
  ],
1333
2749
  "checks": [],
2750
+ "triggers": [],
1334
2751
  "foreignKeys": {},
1335
- "nativeEnums": {}
2752
+ "comment": null
1336
2753
  },
1337
2754
  {
2755
+ "name": "workflow_instances",
2756
+ "schema": "public",
1338
2757
  "columns": {
1339
- "id": {
1340
- "name": "id",
1341
- "type": "uuid",
2758
+ "active_fork_step_id": {
2759
+ "name": "active_fork_step_id",
2760
+ "type": "varchar(100)",
1342
2761
  "unsigned": false,
1343
2762
  "autoincrement": false,
1344
2763
  "primary": false,
1345
- "nullable": false,
1346
- "default": "gen_random_uuid()",
1347
- "mappedType": "uuid"
2764
+ "nullable": true,
2765
+ "unique": false,
2766
+ "length": 100,
2767
+ "precision": null,
2768
+ "scale": null,
2769
+ "default": null,
2770
+ "comment": null,
2771
+ "collation": null,
2772
+ "enumItems": [],
2773
+ "mappedType": "string"
1348
2774
  },
1349
- "definition_id": {
1350
- "name": "definition_id",
1351
- "type": "uuid",
2775
+ "cancelled_at": {
2776
+ "name": "cancelled_at",
2777
+ "type": "timestamptz(6)",
1352
2778
  "unsigned": false,
1353
2779
  "autoincrement": false,
1354
2780
  "primary": false,
1355
- "nullable": false,
1356
- "mappedType": "uuid"
2781
+ "nullable": true,
2782
+ "unique": false,
2783
+ "length": 6,
2784
+ "precision": null,
2785
+ "scale": null,
2786
+ "default": null,
2787
+ "comment": null,
2788
+ "collation": null,
2789
+ "enumItems": [],
2790
+ "mappedType": "datetime"
1357
2791
  },
1358
- "workflow_id": {
1359
- "name": "workflow_id",
1360
- "type": "varchar(100)",
2792
+ "completed_at": {
2793
+ "name": "completed_at",
2794
+ "type": "timestamptz(6)",
1361
2795
  "unsigned": false,
1362
2796
  "autoincrement": false,
1363
2797
  "primary": false,
1364
- "nullable": false,
1365
- "length": 100,
1366
- "mappedType": "string"
2798
+ "nullable": true,
2799
+ "unique": false,
2800
+ "length": 6,
2801
+ "precision": null,
2802
+ "scale": null,
2803
+ "default": null,
2804
+ "comment": null,
2805
+ "collation": null,
2806
+ "enumItems": [],
2807
+ "mappedType": "datetime"
1367
2808
  },
1368
- "version": {
1369
- "name": "version",
1370
- "type": "int",
2809
+ "context": {
2810
+ "name": "context",
2811
+ "type": "jsonb",
1371
2812
  "unsigned": false,
1372
2813
  "autoincrement": false,
1373
2814
  "primary": false,
1374
2815
  "nullable": false,
1375
- "mappedType": "integer"
2816
+ "unique": false,
2817
+ "length": null,
2818
+ "precision": null,
2819
+ "scale": null,
2820
+ "default": null,
2821
+ "comment": null,
2822
+ "collation": null,
2823
+ "enumItems": [],
2824
+ "mappedType": "json"
1376
2825
  },
1377
- "status": {
1378
- "name": "status",
1379
- "type": "varchar(30)",
2826
+ "correlation_key": {
2827
+ "name": "correlation_key",
2828
+ "type": "varchar(255)",
1380
2829
  "unsigned": false,
1381
2830
  "autoincrement": false,
1382
2831
  "primary": false,
1383
- "nullable": false,
1384
- "length": 30,
2832
+ "nullable": true,
2833
+ "unique": false,
2834
+ "length": 255,
2835
+ "precision": null,
2836
+ "scale": null,
2837
+ "default": null,
2838
+ "comment": null,
2839
+ "collation": null,
2840
+ "enumItems": [],
1385
2841
  "mappedType": "string"
1386
2842
  },
2843
+ "created_at": {
2844
+ "name": "created_at",
2845
+ "type": "timestamptz(6)",
2846
+ "unsigned": false,
2847
+ "autoincrement": false,
2848
+ "primary": false,
2849
+ "nullable": false,
2850
+ "unique": false,
2851
+ "length": 6,
2852
+ "precision": null,
2853
+ "scale": null,
2854
+ "default": null,
2855
+ "comment": null,
2856
+ "collation": null,
2857
+ "enumItems": [],
2858
+ "mappedType": "datetime"
2859
+ },
1387
2860
  "current_step_id": {
1388
2861
  "name": "current_step_id",
1389
2862
  "type": "varchar(100)",
@@ -1391,94 +2864,185 @@
1391
2864
  "autoincrement": false,
1392
2865
  "primary": false,
1393
2866
  "nullable": false,
2867
+ "unique": false,
1394
2868
  "length": 100,
2869
+ "precision": null,
2870
+ "scale": null,
2871
+ "default": null,
2872
+ "comment": null,
2873
+ "collation": null,
2874
+ "enumItems": [],
1395
2875
  "mappedType": "string"
1396
2876
  },
1397
- "context": {
1398
- "name": "context",
1399
- "type": "jsonb",
2877
+ "definition_id": {
2878
+ "name": "definition_id",
2879
+ "type": "uuid",
1400
2880
  "unsigned": false,
1401
2881
  "autoincrement": false,
1402
2882
  "primary": false,
1403
2883
  "nullable": false,
1404
- "mappedType": "json"
2884
+ "unique": false,
2885
+ "length": null,
2886
+ "precision": null,
2887
+ "scale": null,
2888
+ "default": null,
2889
+ "comment": null,
2890
+ "collation": null,
2891
+ "enumItems": [],
2892
+ "mappedType": "uuid"
1405
2893
  },
1406
- "correlation_key": {
1407
- "name": "correlation_key",
1408
- "type": "varchar(255)",
2894
+ "deleted_at": {
2895
+ "name": "deleted_at",
2896
+ "type": "timestamptz(6)",
1409
2897
  "unsigned": false,
1410
2898
  "autoincrement": false,
1411
2899
  "primary": false,
1412
2900
  "nullable": true,
1413
- "length": 255,
1414
- "mappedType": "string"
2901
+ "unique": false,
2902
+ "length": 6,
2903
+ "precision": null,
2904
+ "scale": null,
2905
+ "default": null,
2906
+ "comment": null,
2907
+ "collation": null,
2908
+ "enumItems": [],
2909
+ "mappedType": "datetime"
1415
2910
  },
1416
- "metadata": {
1417
- "name": "metadata",
2911
+ "error_details": {
2912
+ "name": "error_details",
1418
2913
  "type": "jsonb",
1419
2914
  "unsigned": false,
1420
2915
  "autoincrement": false,
1421
2916
  "primary": false,
1422
2917
  "nullable": true,
2918
+ "unique": false,
2919
+ "length": null,
2920
+ "precision": null,
2921
+ "scale": null,
2922
+ "default": null,
2923
+ "comment": null,
2924
+ "collation": null,
2925
+ "enumItems": [],
1423
2926
  "mappedType": "json"
1424
2927
  },
1425
- "started_at": {
1426
- "name": "started_at",
1427
- "type": "timestamptz",
2928
+ "error_message": {
2929
+ "name": "error_message",
2930
+ "type": "text",
1428
2931
  "unsigned": false,
1429
2932
  "autoincrement": false,
1430
2933
  "primary": false,
2934
+ "nullable": true,
2935
+ "unique": false,
2936
+ "length": null,
2937
+ "precision": null,
2938
+ "scale": null,
2939
+ "default": null,
2940
+ "comment": null,
2941
+ "collation": null,
2942
+ "enumItems": [],
2943
+ "mappedType": "text"
2944
+ },
2945
+ "id": {
2946
+ "name": "id",
2947
+ "type": "uuid",
2948
+ "unsigned": false,
2949
+ "autoincrement": false,
2950
+ "primary": true,
1431
2951
  "nullable": false,
1432
- "length": 6,
1433
- "mappedType": "datetime"
2952
+ "unique": false,
2953
+ "length": null,
2954
+ "precision": null,
2955
+ "scale": null,
2956
+ "default": "gen_random_uuid()",
2957
+ "comment": null,
2958
+ "collation": null,
2959
+ "enumItems": [],
2960
+ "mappedType": "uuid"
1434
2961
  },
1435
- "completed_at": {
1436
- "name": "completed_at",
1437
- "type": "timestamptz",
2962
+ "is_dry_run": {
2963
+ "name": "is_dry_run",
2964
+ "type": "boolean",
1438
2965
  "unsigned": false,
1439
2966
  "autoincrement": false,
1440
2967
  "primary": false,
1441
- "nullable": true,
1442
- "length": 6,
1443
- "mappedType": "datetime"
2968
+ "nullable": false,
2969
+ "unique": false,
2970
+ "length": null,
2971
+ "precision": null,
2972
+ "scale": null,
2973
+ "default": "false",
2974
+ "comment": null,
2975
+ "collation": null,
2976
+ "enumItems": [],
2977
+ "mappedType": "boolean"
1444
2978
  },
1445
- "paused_at": {
1446
- "name": "paused_at",
1447
- "type": "timestamptz",
2979
+ "metadata": {
2980
+ "name": "metadata",
2981
+ "type": "jsonb",
1448
2982
  "unsigned": false,
1449
2983
  "autoincrement": false,
1450
2984
  "primary": false,
1451
2985
  "nullable": true,
1452
- "length": 6,
1453
- "mappedType": "datetime"
2986
+ "unique": false,
2987
+ "length": null,
2988
+ "precision": null,
2989
+ "scale": null,
2990
+ "default": null,
2991
+ "comment": null,
2992
+ "collation": null,
2993
+ "enumItems": [],
2994
+ "mappedType": "json"
1454
2995
  },
1455
- "cancelled_at": {
1456
- "name": "cancelled_at",
1457
- "type": "timestamptz",
2996
+ "organization_id": {
2997
+ "name": "organization_id",
2998
+ "type": "uuid",
1458
2999
  "unsigned": false,
1459
3000
  "autoincrement": false,
1460
3001
  "primary": false,
1461
- "nullable": true,
1462
- "length": 6,
1463
- "mappedType": "datetime"
3002
+ "nullable": false,
3003
+ "unique": false,
3004
+ "length": null,
3005
+ "precision": null,
3006
+ "scale": null,
3007
+ "default": null,
3008
+ "comment": null,
3009
+ "collation": null,
3010
+ "enumItems": [],
3011
+ "mappedType": "uuid"
1464
3012
  },
1465
- "error_message": {
1466
- "name": "error_message",
1467
- "type": "text",
3013
+ "outcome": {
3014
+ "name": "outcome",
3015
+ "type": "varchar(30)",
1468
3016
  "unsigned": false,
1469
3017
  "autoincrement": false,
1470
3018
  "primary": false,
1471
3019
  "nullable": true,
1472
- "mappedType": "text"
3020
+ "unique": false,
3021
+ "length": 30,
3022
+ "precision": null,
3023
+ "scale": null,
3024
+ "default": null,
3025
+ "comment": null,
3026
+ "collation": null,
3027
+ "enumItems": [],
3028
+ "mappedType": "string"
1473
3029
  },
1474
- "error_details": {
1475
- "name": "error_details",
1476
- "type": "jsonb",
3030
+ "paused_at": {
3031
+ "name": "paused_at",
3032
+ "type": "timestamptz(6)",
1477
3033
  "unsigned": false,
1478
3034
  "autoincrement": false,
1479
3035
  "primary": false,
1480
3036
  "nullable": true,
1481
- "mappedType": "json"
3037
+ "unique": false,
3038
+ "length": 6,
3039
+ "precision": null,
3040
+ "scale": null,
3041
+ "default": null,
3042
+ "comment": null,
3043
+ "collation": null,
3044
+ "enumItems": [],
3045
+ "mappedType": "datetime"
1482
3046
  },
1483
3047
  "pending_transition": {
1484
3048
  "name": "pending_transition",
@@ -1487,6 +3051,14 @@
1487
3051
  "autoincrement": false,
1488
3052
  "primary": false,
1489
3053
  "nullable": true,
3054
+ "unique": false,
3055
+ "length": null,
3056
+ "precision": null,
3057
+ "scale": null,
3058
+ "default": null,
3059
+ "comment": null,
3060
+ "collation": null,
3061
+ "enumItems": [],
1490
3062
  "mappedType": "json"
1491
3063
  },
1492
3064
  "retry_count": {
@@ -1496,140 +3068,191 @@
1496
3068
  "autoincrement": false,
1497
3069
  "primary": false,
1498
3070
  "nullable": false,
3071
+ "unique": false,
3072
+ "length": null,
3073
+ "precision": null,
3074
+ "scale": null,
1499
3075
  "default": "0",
3076
+ "comment": null,
3077
+ "collation": null,
3078
+ "enumItems": [],
1500
3079
  "mappedType": "integer"
1501
3080
  },
1502
- "tenant_id": {
1503
- "name": "tenant_id",
1504
- "type": "uuid",
3081
+ "started_at": {
3082
+ "name": "started_at",
3083
+ "type": "timestamptz(6)",
1505
3084
  "unsigned": false,
1506
3085
  "autoincrement": false,
1507
3086
  "primary": false,
1508
3087
  "nullable": false,
1509
- "mappedType": "uuid"
3088
+ "unique": false,
3089
+ "length": 6,
3090
+ "precision": null,
3091
+ "scale": null,
3092
+ "default": null,
3093
+ "comment": null,
3094
+ "collation": null,
3095
+ "enumItems": [],
3096
+ "mappedType": "datetime"
1510
3097
  },
1511
- "organization_id": {
1512
- "name": "organization_id",
1513
- "type": "uuid",
3098
+ "status": {
3099
+ "name": "status",
3100
+ "type": "varchar(30)",
1514
3101
  "unsigned": false,
1515
3102
  "autoincrement": false,
1516
3103
  "primary": false,
1517
3104
  "nullable": false,
1518
- "mappedType": "uuid"
3105
+ "unique": false,
3106
+ "length": 30,
3107
+ "precision": null,
3108
+ "scale": null,
3109
+ "default": null,
3110
+ "comment": null,
3111
+ "collation": null,
3112
+ "enumItems": [],
3113
+ "mappedType": "string"
1519
3114
  },
1520
- "created_at": {
1521
- "name": "created_at",
1522
- "type": "timestamptz",
3115
+ "tenant_id": {
3116
+ "name": "tenant_id",
3117
+ "type": "uuid",
1523
3118
  "unsigned": false,
1524
3119
  "autoincrement": false,
1525
3120
  "primary": false,
1526
3121
  "nullable": false,
1527
- "length": 6,
1528
- "mappedType": "datetime"
3122
+ "unique": false,
3123
+ "length": null,
3124
+ "precision": null,
3125
+ "scale": null,
3126
+ "default": null,
3127
+ "comment": null,
3128
+ "collation": null,
3129
+ "enumItems": [],
3130
+ "mappedType": "uuid"
1529
3131
  },
1530
3132
  "updated_at": {
1531
3133
  "name": "updated_at",
1532
- "type": "timestamptz",
3134
+ "type": "timestamptz(6)",
1533
3135
  "unsigned": false,
1534
3136
  "autoincrement": false,
1535
3137
  "primary": false,
1536
3138
  "nullable": false,
3139
+ "unique": false,
1537
3140
  "length": 6,
3141
+ "precision": null,
3142
+ "scale": null,
3143
+ "default": null,
3144
+ "comment": null,
3145
+ "collation": null,
3146
+ "enumItems": [],
1538
3147
  "mappedType": "datetime"
1539
3148
  },
1540
- "deleted_at": {
1541
- "name": "deleted_at",
1542
- "type": "timestamptz",
3149
+ "version": {
3150
+ "name": "version",
3151
+ "type": "int",
1543
3152
  "unsigned": false,
1544
3153
  "autoincrement": false,
1545
3154
  "primary": false,
1546
- "nullable": true,
1547
- "length": 6,
1548
- "mappedType": "datetime"
3155
+ "nullable": false,
3156
+ "unique": false,
3157
+ "length": null,
3158
+ "precision": null,
3159
+ "scale": null,
3160
+ "default": null,
3161
+ "comment": null,
3162
+ "collation": null,
3163
+ "enumItems": [],
3164
+ "mappedType": "integer"
1549
3165
  },
1550
- "active_fork_step_id": {
1551
- "name": "active_fork_step_id",
3166
+ "workflow_id": {
3167
+ "name": "workflow_id",
1552
3168
  "type": "varchar(100)",
1553
3169
  "unsigned": false,
1554
3170
  "autoincrement": false,
1555
3171
  "primary": false,
1556
- "nullable": true,
3172
+ "nullable": false,
3173
+ "unique": false,
1557
3174
  "length": 100,
3175
+ "precision": null,
3176
+ "scale": null,
3177
+ "default": null,
3178
+ "comment": null,
3179
+ "collation": null,
3180
+ "enumItems": [],
1558
3181
  "mappedType": "string"
1559
3182
  }
1560
3183
  },
1561
- "name": "workflow_instances",
1562
- "schema": "public",
1563
3184
  "indexes": [
1564
3185
  {
1565
- "keyName": "workflow_instances_tenant_org_idx",
1566
3186
  "columnNames": [
1567
- "tenant_id",
1568
- "organization_id"
3187
+ "correlation_key"
1569
3188
  ],
1570
- "composite": true,
3189
+ "composite": false,
1571
3190
  "constraint": false,
3191
+ "keyName": "workflow_instances_correlation_key_idx",
1572
3192
  "primary": false,
1573
3193
  "unique": false
1574
3194
  },
1575
3195
  {
1576
- "keyName": "workflow_instances_current_step_idx",
1577
3196
  "columnNames": [
1578
3197
  "current_step_id",
1579
3198
  "status"
1580
3199
  ],
1581
3200
  "composite": true,
1582
3201
  "constraint": false,
3202
+ "keyName": "workflow_instances_current_step_idx",
1583
3203
  "primary": false,
1584
3204
  "unique": false
1585
3205
  },
1586
3206
  {
1587
- "keyName": "workflow_instances_status_tenant_idx",
1588
3207
  "columnNames": [
1589
- "status",
1590
- "tenant_id"
3208
+ "definition_id",
3209
+ "status"
1591
3210
  ],
1592
3211
  "composite": true,
1593
3212
  "constraint": false,
3213
+ "keyName": "workflow_instances_definition_status_idx",
1594
3214
  "primary": false,
1595
3215
  "unique": false
1596
3216
  },
1597
3217
  {
1598
- "keyName": "workflow_instances_correlation_key_idx",
1599
3218
  "columnNames": [
1600
- "correlation_key"
3219
+ "id"
1601
3220
  ],
1602
3221
  "composite": false,
1603
- "constraint": false,
1604
- "primary": false,
1605
- "unique": false
3222
+ "constraint": true,
3223
+ "keyName": "workflow_instances_pkey",
3224
+ "primary": true,
3225
+ "unique": true
1606
3226
  },
1607
3227
  {
1608
- "keyName": "workflow_instances_definition_status_idx",
1609
3228
  "columnNames": [
1610
- "definition_id",
1611
- "status"
3229
+ "status",
3230
+ "tenant_id"
1612
3231
  ],
1613
3232
  "composite": true,
1614
3233
  "constraint": false,
3234
+ "keyName": "workflow_instances_status_tenant_idx",
1615
3235
  "primary": false,
1616
3236
  "unique": false
1617
3237
  },
1618
3238
  {
1619
- "keyName": "workflow_instances_pkey",
1620
3239
  "columnNames": [
1621
- "id"
3240
+ "tenant_id",
3241
+ "organization_id"
1622
3242
  ],
1623
- "composite": false,
1624
- "constraint": true,
1625
- "primary": true,
1626
- "unique": true
3243
+ "composite": true,
3244
+ "constraint": false,
3245
+ "keyName": "workflow_instances_tenant_org_idx",
3246
+ "primary": false,
3247
+ "unique": false
1627
3248
  }
1628
3249
  ],
1629
3250
  "checks": [],
3251
+ "triggers": [],
1630
3252
  "foreignKeys": {},
1631
- "nativeEnums": {}
3253
+ "comment": null
1632
3254
  }
1633
3255
  ],
3256
+ "views": [],
1634
3257
  "nativeEnums": {}
1635
- }
3258
+ }