@open-mercato/core 0.6.6-develop.6460.1.f94c74174c → 0.6.6-develop.6471.1.9ab5bdd79a

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 (1256) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/bootstrap.js +13 -11
  3. package/dist/bootstrap.js.map +2 -2
  4. package/dist/helpers/integration/auth.js +148 -82
  5. package/dist/helpers/integration/auth.js.map +2 -2
  6. package/dist/helpers/integration/queue-runner.js +4 -2
  7. package/dist/helpers/integration/queue-runner.js.map +2 -2
  8. package/dist/modules/api_keys/services/apiKeyService.js +5 -3
  9. package/dist/modules/api_keys/services/apiKeyService.js.map +2 -2
  10. package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js +4 -2
  11. package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js.map +2 -2
  12. package/dist/modules/attachments/api/library/[id]/route.js +3 -1
  13. package/dist/modules/attachments/api/library/[id]/route.js.map +2 -2
  14. package/dist/modules/attachments/api/route.js +8 -6
  15. package/dist/modules/attachments/api/route.js.map +2 -2
  16. package/dist/modules/attachments/components/AttachmentPartitionSettings.js +5 -3
  17. package/dist/modules/attachments/components/AttachmentPartitionSettings.js.map +2 -2
  18. package/dist/modules/attachments/lib/assignmentDetails.js +3 -1
  19. package/dist/modules/attachments/lib/assignmentDetails.js.map +2 -2
  20. package/dist/modules/attachments/lib/drivers/driverFactory.js +3 -1
  21. package/dist/modules/attachments/lib/drivers/driverFactory.js.map +2 -2
  22. package/dist/modules/attachments/lib/ocrQueue.js +10 -11
  23. package/dist/modules/attachments/lib/ocrQueue.js.map +2 -2
  24. package/dist/modules/attachments/lib/ocrService.js +6 -4
  25. package/dist/modules/attachments/lib/ocrService.js.map +2 -2
  26. package/dist/modules/audit_logs/api/audit-logs/actions/redo/route.js +3 -1
  27. package/dist/modules/audit_logs/api/audit-logs/actions/redo/route.js.map +2 -2
  28. package/dist/modules/audit_logs/api/audit-logs/actions/undo/route.js +3 -1
  29. package/dist/modules/audit_logs/api/audit-logs/actions/undo/route.js.map +2 -2
  30. package/dist/modules/audit_logs/backend/audit-logs/page.js +3 -1
  31. package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
  32. package/dist/modules/audit_logs/components/AuditLogsActions.js +4 -2
  33. package/dist/modules/audit_logs/components/AuditLogsActions.js.map +2 -2
  34. package/dist/modules/audit_logs/services/accessLogService.js +4 -2
  35. package/dist/modules/audit_logs/services/accessLogService.js.map +2 -2
  36. package/dist/modules/audit_logs/services/actionLogService.js +7 -5
  37. package/dist/modules/audit_logs/services/actionLogService.js.map +3 -3
  38. package/dist/modules/auth/api/profile/route.js +4 -2
  39. package/dist/modules/auth/api/profile/route.js.map +2 -2
  40. package/dist/modules/auth/api/reset/confirm.js +3 -1
  41. package/dist/modules/auth/api/reset/confirm.js.map +2 -2
  42. package/dist/modules/auth/api/reset.js +4 -2
  43. package/dist/modules/auth/api/reset.js.map +2 -2
  44. package/dist/modules/auth/api/roles/route.js +3 -1
  45. package/dist/modules/auth/api/roles/route.js.map +2 -2
  46. package/dist/modules/auth/api/sidebar/variants/route.js +3 -1
  47. package/dist/modules/auth/api/sidebar/variants/route.js.map +2 -2
  48. package/dist/modules/auth/api/users/resend-invite/route.js +4 -2
  49. package/dist/modules/auth/api/users/resend-invite/route.js.map +2 -2
  50. package/dist/modules/auth/api/users/route.js +3 -1
  51. package/dist/modules/auth/api/users/route.js.map +2 -2
  52. package/dist/modules/auth/backend/auth/profile/page.js +3 -1
  53. package/dist/modules/auth/backend/auth/profile/page.js.map +2 -2
  54. package/dist/modules/auth/backend/profile/change-password/page.js +3 -1
  55. package/dist/modules/auth/backend/profile/change-password/page.js.map +2 -2
  56. package/dist/modules/auth/backend/users/[id]/edit/page.js +5 -3
  57. package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
  58. package/dist/modules/auth/backend/users/create/page.js +4 -2
  59. package/dist/modules/auth/backend/users/create/page.js.map +2 -2
  60. package/dist/modules/auth/cli.js +10 -0
  61. package/dist/modules/auth/cli.js.map +2 -2
  62. package/dist/modules/auth/commands/users.js +4 -2
  63. package/dist/modules/auth/commands/users.js.map +2 -2
  64. package/dist/modules/auth/lib/consentIntegrity.js +3 -3
  65. package/dist/modules/auth/lib/consentIntegrity.js.map +2 -2
  66. package/dist/modules/auth/lib/setup-app.js +9 -10
  67. package/dist/modules/auth/lib/setup-app.js.map +2 -2
  68. package/dist/modules/auth/lib/tenantAccess.js +3 -1
  69. package/dist/modules/auth/lib/tenantAccess.js.map +2 -2
  70. package/dist/modules/auth/lib/tokenHash.js +3 -3
  71. package/dist/modules/auth/lib/tokenHash.js.map +2 -2
  72. package/dist/modules/business_rules/api/rules/route.js +4 -2
  73. package/dist/modules/business_rules/api/rules/route.js.map +2 -2
  74. package/dist/modules/business_rules/lib/expression-evaluator.js +7 -5
  75. package/dist/modules/business_rules/lib/expression-evaluator.js.map +2 -2
  76. package/dist/modules/business_rules/lib/rule-engine.js +5 -3
  77. package/dist/modules/business_rules/lib/rule-engine.js.map +2 -2
  78. package/dist/modules/business_rules/lib/rule-evaluator.js +11 -12
  79. package/dist/modules/business_rules/lib/rule-evaluator.js.map +2 -2
  80. package/dist/modules/business_rules/subscribers/crud-rule-trigger.js +3 -1
  81. package/dist/modules/business_rules/subscribers/crud-rule-trigger.js.map +2 -2
  82. package/dist/modules/business_rules/subscribers/rule-execution-failed-notification.js +3 -1
  83. package/dist/modules/business_rules/subscribers/rule-execution-failed-notification.js.map +2 -2
  84. package/dist/modules/catalog/ai-agents-context.js +4 -5
  85. package/dist/modules/catalog/ai-agents-context.js.map +2 -2
  86. package/dist/modules/catalog/ai-tools/_shared.js +3 -1
  87. package/dist/modules/catalog/ai-tools/_shared.js.map +2 -2
  88. package/dist/modules/catalog/ai-tools/authoring-pack.js +3 -1
  89. package/dist/modules/catalog/ai-tools/authoring-pack.js.map +2 -2
  90. package/dist/modules/catalog/ai-tools/merchandising-pack.js +3 -1
  91. package/dist/modules/catalog/ai-tools/merchandising-pack.js.map +2 -2
  92. package/dist/modules/catalog/api/dictionaries/[key]/route.js +3 -1
  93. package/dist/modules/catalog/api/dictionaries/[key]/route.js.map +2 -2
  94. package/dist/modules/catalog/api/prices/route.js +3 -1
  95. package/dist/modules/catalog/api/prices/route.js.map +2 -2
  96. package/dist/modules/catalog/api/products/route.js +5 -3
  97. package/dist/modules/catalog/api/products/route.js.map +2 -2
  98. package/dist/modules/catalog/api/settings/route.js +4 -2
  99. package/dist/modules/catalog/api/settings/route.js.map +2 -2
  100. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +14 -12
  101. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  102. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +8 -6
  103. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
  104. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js +5 -3
  105. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js.map +2 -2
  106. package/dist/modules/catalog/backend/catalog/products/create/page.js +5 -6
  107. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  108. package/dist/modules/catalog/backend/catalog/products/optionSchemaClient.js +3 -1
  109. package/dist/modules/catalog/backend/catalog/products/optionSchemaClient.js.map +2 -2
  110. package/dist/modules/catalog/components/PriceKindSettings.js +5 -3
  111. package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
  112. package/dist/modules/catalog/components/UnitPriceDisplaySettings.js +4 -2
  113. package/dist/modules/catalog/components/UnitPriceDisplaySettings.js.map +2 -2
  114. package/dist/modules/catalog/inbox-actions.js +4 -2
  115. package/dist/modules/catalog/inbox-actions.js.map +2 -2
  116. package/dist/modules/catalog/seed/examples.js +4 -5
  117. package/dist/modules/catalog/seed/examples.js.map +2 -2
  118. package/dist/modules/catalog/subscribers/low-stock-notification.js +3 -1
  119. package/dist/modules/catalog/subscribers/low-stock-notification.js.map +2 -2
  120. package/dist/modules/catalog/widgets/injection/product-seo/state.js +3 -1
  121. package/dist/modules/catalog/widgets/injection/product-seo/state.js.map +2 -2
  122. package/dist/modules/communication_channels/api/get/oauth/[provider]/callback/route.js +12 -11
  123. package/dist/modules/communication_channels/api/get/oauth/[provider]/callback/route.js.map +2 -2
  124. package/dist/modules/communication_channels/api/post/channels/[id]/import-history/route.js +3 -1
  125. package/dist/modules/communication_channels/api/post/channels/[id]/import-history/route.js.map +2 -2
  126. package/dist/modules/communication_channels/api/post/channels/[id]/push/register/route.js +3 -1
  127. package/dist/modules/communication_channels/api/post/channels/[id]/push/register/route.js.map +2 -2
  128. package/dist/modules/communication_channels/api/post/webhook/[provider]/route.js +5 -3
  129. package/dist/modules/communication_channels/api/post/webhook/[provider]/route.js.map +2 -2
  130. package/dist/modules/communication_channels/api/post/webhooks/gmail/route.js +6 -6
  131. package/dist/modules/communication_channels/api/post/webhooks/gmail/route.js.map +2 -2
  132. package/dist/modules/communication_channels/commands/connect-credential-channel.js +4 -6
  133. package/dist/modules/communication_channels/commands/connect-credential-channel.js.map +2 -2
  134. package/dist/modules/communication_channels/commands/delete-channel.js +3 -3
  135. package/dist/modules/communication_channels/commands/delete-channel.js.map +2 -2
  136. package/dist/modules/communication_channels/commands/deliver-outbound-message.js +4 -5
  137. package/dist/modules/communication_channels/commands/deliver-outbound-message.js.map +2 -2
  138. package/dist/modules/communication_channels/commands/disconnect-channel.js +3 -3
  139. package/dist/modules/communication_channels/commands/disconnect-channel.js.map +2 -2
  140. package/dist/modules/communication_channels/commands/ingest-inbound-message.js +5 -12
  141. package/dist/modules/communication_channels/commands/ingest-inbound-message.js.map +2 -2
  142. package/dist/modules/communication_channels/commands/push-unregister.js +3 -3
  143. package/dist/modules/communication_channels/commands/push-unregister.js.map +2 -2
  144. package/dist/modules/communication_channels/commands/reassign-conversation.js +5 -3
  145. package/dist/modules/communication_channels/commands/reassign-conversation.js.map +2 -2
  146. package/dist/modules/communication_channels/lib/dead-letter.js +3 -3
  147. package/dist/modules/communication_channels/lib/dead-letter.js.map +2 -2
  148. package/dist/modules/communication_channels/lib/email-mime.js +4 -6
  149. package/dist/modules/communication_channels/lib/email-mime.js.map +2 -2
  150. package/dist/modules/communication_channels/lib/oauth-client-config.js +5 -3
  151. package/dist/modules/communication_channels/lib/oauth-client-config.js.map +2 -2
  152. package/dist/modules/communication_channels/lib/send-as-user.js +3 -1
  153. package/dist/modules/communication_channels/lib/send-as-user.js.map +2 -2
  154. package/dist/modules/communication_channels/lib/thread-token.js +4 -2
  155. package/dist/modules/communication_channels/lib/thread-token.js.map +2 -2
  156. package/dist/modules/communication_channels/setup.js +3 -4
  157. package/dist/modules/communication_channels/setup.js.map +2 -2
  158. package/dist/modules/communication_channels/workers/channel-import-history.js +4 -6
  159. package/dist/modules/communication_channels/workers/channel-import-history.js.map +2 -2
  160. package/dist/modules/communication_channels/workers/gmail-history-sync.js +8 -16
  161. package/dist/modules/communication_channels/workers/gmail-history-sync.js.map +2 -2
  162. package/dist/modules/communication_channels/workers/gmail-renew-watch.js +5 -7
  163. package/dist/modules/communication_channels/workers/gmail-renew-watch.js.map +2 -2
  164. package/dist/modules/communication_channels/workers/outbound-delivery.js +6 -12
  165. package/dist/modules/communication_channels/workers/outbound-delivery.js.map +2 -2
  166. package/dist/modules/communication_channels/workers/poll-channel.js +7 -15
  167. package/dist/modules/communication_channels/workers/poll-channel.js.map +2 -2
  168. package/dist/modules/communication_channels/workers/poll-tick.js +5 -6
  169. package/dist/modules/communication_channels/workers/poll-tick.js.map +2 -2
  170. package/dist/modules/communication_channels/workers/reaction-processor.js +5 -9
  171. package/dist/modules/communication_channels/workers/reaction-processor.js.map +2 -2
  172. package/dist/modules/configs/api/cache/route.js +4 -2
  173. package/dist/modules/configs/api/cache/route.js.map +2 -2
  174. package/dist/modules/configs/api/system-status/route.js +4 -2
  175. package/dist/modules/configs/api/system-status/route.js.map +2 -2
  176. package/dist/modules/configs/api/upgrade-actions/route.js +4 -2
  177. package/dist/modules/configs/api/upgrade-actions/route.js.map +2 -2
  178. package/dist/modules/configs/components/ModuleTelemetryPanel.js +3 -1
  179. package/dist/modules/configs/components/ModuleTelemetryPanel.js.map +2 -2
  180. package/dist/modules/configs/lib/touchGeneratedBarrels.js +2 -1
  181. package/dist/modules/configs/lib/touchGeneratedBarrels.js.map +2 -2
  182. package/dist/modules/configs/services/upgradeActionsService.js +6 -3
  183. package/dist/modules/configs/services/upgradeActionsService.js.map +2 -2
  184. package/dist/modules/currencies/components/CurrencyFetchingConfig.js +3 -1
  185. package/dist/modules/currencies/components/CurrencyFetchingConfig.js.map +2 -2
  186. package/dist/modules/currencies/lib/exchangeRateFormConfig.js +3 -1
  187. package/dist/modules/currencies/lib/exchangeRateFormConfig.js.map +2 -2
  188. package/dist/modules/currencies/services/providers/nbp.js +6 -4
  189. package/dist/modules/currencies/services/providers/nbp.js.map +2 -2
  190. package/dist/modules/currencies/services/providers/raiffeisen.js +7 -7
  191. package/dist/modules/currencies/services/providers/raiffeisen.js.map +2 -2
  192. package/dist/modules/customer_accounts/api/domain-resolve/all.js +6 -5
  193. package/dist/modules/customer_accounts/api/domain-resolve/all.js.map +2 -2
  194. package/dist/modules/customer_accounts/api/signup.js +4 -2
  195. package/dist/modules/customer_accounts/api/signup.js.map +2 -2
  196. package/dist/modules/customer_accounts/lib/customerAuthServer.js +3 -1
  197. package/dist/modules/customer_accounts/lib/customerAuthServer.js.map +2 -2
  198. package/dist/modules/customer_accounts/subscribers/autoLinkCrm.js +3 -1
  199. package/dist/modules/customer_accounts/subscribers/autoLinkCrm.js.map +2 -2
  200. package/dist/modules/customer_accounts/subscribers/autoLinkCrmReverse.js +3 -1
  201. package/dist/modules/customer_accounts/subscribers/autoLinkCrmReverse.js.map +2 -2
  202. package/dist/modules/customer_accounts/subscribers/unlinkOnCompanyDelete.js +3 -1
  203. package/dist/modules/customer_accounts/subscribers/unlinkOnCompanyDelete.js.map +2 -2
  204. package/dist/modules/customer_accounts/subscribers/unlinkOnPersonDelete.js +3 -1
  205. package/dist/modules/customer_accounts/subscribers/unlinkOnPersonDelete.js.map +2 -2
  206. package/dist/modules/customers/ai-agents-context.js +4 -5
  207. package/dist/modules/customers/ai-agents-context.js.map +2 -2
  208. package/dist/modules/customers/api/activities/route.js +6 -4
  209. package/dist/modules/customers/api/activities/route.js.map +2 -2
  210. package/dist/modules/customers/api/comments/route.js +3 -1
  211. package/dist/modules/customers/api/comments/route.js.map +2 -2
  212. package/dist/modules/customers/api/companies/[id]/people/route.js +3 -1
  213. package/dist/modules/customers/api/companies/[id]/people/route.js.map +2 -2
  214. package/dist/modules/customers/api/companies/[id]/route.js +5 -3
  215. package/dist/modules/customers/api/companies/[id]/route.js.map +2 -2
  216. package/dist/modules/customers/api/companies/route.js +5 -3
  217. package/dist/modules/customers/api/companies/route.js.map +2 -2
  218. package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js +3 -1
  219. package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js.map +2 -2
  220. package/dist/modules/customers/api/dashboard/widgets/new-customers/route.js +3 -1
  221. package/dist/modules/customers/api/dashboard/widgets/new-customers/route.js.map +2 -2
  222. package/dist/modules/customers/api/dashboard/widgets/new-deals/route.js +3 -1
  223. package/dist/modules/customers/api/dashboard/widgets/new-deals/route.js.map +2 -2
  224. package/dist/modules/customers/api/dashboard/widgets/next-interactions/route.js +3 -1
  225. package/dist/modules/customers/api/dashboard/widgets/next-interactions/route.js.map +2 -2
  226. package/dist/modules/customers/api/deals/[id]/companies/route.js +3 -1
  227. package/dist/modules/customers/api/deals/[id]/companies/route.js.map +2 -2
  228. package/dist/modules/customers/api/deals/[id]/people/route.js +3 -1
  229. package/dist/modules/customers/api/deals/[id]/people/route.js.map +2 -2
  230. package/dist/modules/customers/api/deals/aggregate/route.js +3 -1
  231. package/dist/modules/customers/api/deals/aggregate/route.js.map +2 -2
  232. package/dist/modules/customers/api/deals/bulk-update-owner/route.js +7 -5
  233. package/dist/modules/customers/api/deals/bulk-update-owner/route.js.map +2 -2
  234. package/dist/modules/customers/api/deals/bulk-update-stage/route.js +7 -5
  235. package/dist/modules/customers/api/deals/bulk-update-stage/route.js.map +2 -2
  236. package/dist/modules/customers/api/deals/route.js +3 -1
  237. package/dist/modules/customers/api/deals/route.js.map +2 -2
  238. package/dist/modules/customers/api/deals/summary/route.js +3 -1
  239. package/dist/modules/customers/api/deals/summary/route.js.map +2 -2
  240. package/dist/modules/customers/api/dictionaries/[kind]/[id]/route.js +4 -2
  241. package/dist/modules/customers/api/dictionaries/[kind]/[id]/route.js.map +2 -2
  242. package/dist/modules/customers/api/dictionaries/[kind]/route.js +5 -3
  243. package/dist/modules/customers/api/dictionaries/[kind]/route.js.map +2 -2
  244. package/dist/modules/customers/api/dictionaries/cache.js +3 -1
  245. package/dist/modules/customers/api/dictionaries/cache.js.map +2 -2
  246. package/dist/modules/customers/api/dictionaries/context.js +3 -1
  247. package/dist/modules/customers/api/dictionaries/context.js.map +2 -2
  248. package/dist/modules/customers/api/dictionaries/currency/route.js +3 -1
  249. package/dist/modules/customers/api/dictionaries/currency/route.js.map +2 -2
  250. package/dist/modules/customers/api/dictionaries/kind-settings/route.js +4 -2
  251. package/dist/modules/customers/api/dictionaries/kind-settings/route.js.map +2 -2
  252. package/dist/modules/customers/api/entity-roles-factory.js +7 -5
  253. package/dist/modules/customers/api/entity-roles-factory.js.map +2 -2
  254. package/dist/modules/customers/api/interactions/cancel/route.js +3 -1
  255. package/dist/modules/customers/api/interactions/cancel/route.js.map +2 -2
  256. package/dist/modules/customers/api/interactions/complete/route.js +3 -1
  257. package/dist/modules/customers/api/interactions/complete/route.js.map +2 -2
  258. package/dist/modules/customers/api/interactions/conflicts/route.js +3 -1
  259. package/dist/modules/customers/api/interactions/conflicts/route.js.map +2 -2
  260. package/dist/modules/customers/api/interactions/counts/route.js +3 -1
  261. package/dist/modules/customers/api/interactions/counts/route.js.map +2 -2
  262. package/dist/modules/customers/api/interactions/route.js +7 -4
  263. package/dist/modules/customers/api/interactions/route.js.map +2 -2
  264. package/dist/modules/customers/api/interactions/tasks/route.js +3 -1
  265. package/dist/modules/customers/api/interactions/tasks/route.js.map +2 -2
  266. package/dist/modules/customers/api/labels/assign/route.js +3 -1
  267. package/dist/modules/customers/api/labels/assign/route.js.map +2 -2
  268. package/dist/modules/customers/api/labels/route.js +6 -3
  269. package/dist/modules/customers/api/labels/route.js.map +2 -2
  270. package/dist/modules/customers/api/labels/unassign/route.js +3 -1
  271. package/dist/modules/customers/api/labels/unassign/route.js.map +2 -2
  272. package/dist/modules/customers/api/people/[id]/companies/enriched/route.js +3 -1
  273. package/dist/modules/customers/api/people/[id]/companies/enriched/route.js.map +2 -2
  274. package/dist/modules/customers/api/people/[id]/route.js +5 -3
  275. package/dist/modules/customers/api/people/[id]/route.js.map +2 -2
  276. package/dist/modules/customers/api/people/route.js +5 -3
  277. package/dist/modules/customers/api/people/route.js.map +2 -2
  278. package/dist/modules/customers/api/pipeline-stages/reorder/route.js +3 -1
  279. package/dist/modules/customers/api/pipeline-stages/reorder/route.js.map +2 -2
  280. package/dist/modules/customers/api/pipeline-stages/route.js +6 -4
  281. package/dist/modules/customers/api/pipeline-stages/route.js.map +2 -2
  282. package/dist/modules/customers/api/pipelines/route.js +6 -4
  283. package/dist/modules/customers/api/pipelines/route.js.map +2 -2
  284. package/dist/modules/customers/api/settings/address-format/route.js +4 -2
  285. package/dist/modules/customers/api/settings/address-format/route.js.map +2 -2
  286. package/dist/modules/customers/api/settings/dictionary-sort-modes/route.js +4 -2
  287. package/dist/modules/customers/api/settings/dictionary-sort-modes/route.js.map +2 -2
  288. package/dist/modules/customers/api/settings/stuck-threshold/route.js +4 -2
  289. package/dist/modules/customers/api/settings/stuck-threshold/route.js.map +2 -2
  290. package/dist/modules/customers/api/tags/assign/route.js +3 -1
  291. package/dist/modules/customers/api/tags/assign/route.js.map +2 -2
  292. package/dist/modules/customers/api/tags/unassign/route.js +3 -1
  293. package/dist/modules/customers/api/tags/unassign/route.js.map +2 -2
  294. package/dist/modules/customers/api/todos/route.js +6 -4
  295. package/dist/modules/customers/api/todos/route.js.map +2 -2
  296. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +5 -3
  297. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
  298. package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.js +3 -1
  299. package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.js.map +2 -2
  300. package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.js +3 -1
  301. package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.js.map +2 -2
  302. package/dist/modules/customers/backend/customers/deals/map/components/DealsMapCanvasImpl.js +4 -2
  303. package/dist/modules/customers/backend/customers/deals/map/components/DealsMapCanvasImpl.js.map +2 -2
  304. package/dist/modules/customers/backend/customers/deals/page.js +4 -2
  305. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  306. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +5 -3
  307. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
  308. package/dist/modules/customers/commands/deals.js +3 -1
  309. package/dist/modules/customers/commands/deals.js.map +2 -2
  310. package/dist/modules/customers/commands/dictionaries.js +3 -1
  311. package/dist/modules/customers/commands/dictionaries.js.map +2 -2
  312. package/dist/modules/customers/commands/interactions.js +4 -2
  313. package/dist/modules/customers/commands/interactions.js.map +2 -2
  314. package/dist/modules/customers/commands/shared.js +4 -2
  315. package/dist/modules/customers/commands/shared.js.map +2 -2
  316. package/dist/modules/customers/commands/todos.js +3 -1
  317. package/dist/modules/customers/commands/todos.js.map +2 -2
  318. package/dist/modules/customers/components/DictionarySettings.js +5 -3
  319. package/dist/modules/customers/components/DictionarySettings.js.map +2 -2
  320. package/dist/modules/customers/components/DictionarySortSettings.js +3 -1
  321. package/dist/modules/customers/components/DictionarySortSettings.js.map +2 -2
  322. package/dist/modules/customers/components/detail/ActivitiesCard.js +3 -1
  323. package/dist/modules/customers/components/detail/ActivitiesCard.js.map +2 -2
  324. package/dist/modules/customers/components/detail/ActivitiesDayStrip.js +3 -1
  325. package/dist/modules/customers/components/detail/ActivitiesDayStrip.js.map +2 -2
  326. package/dist/modules/customers/components/detail/ActivitiesSection.js +6 -4
  327. package/dist/modules/customers/components/detail/ActivitiesSection.js.map +2 -2
  328. package/dist/modules/customers/components/detail/ActivityCard.js +3 -1
  329. package/dist/modules/customers/components/detail/ActivityCard.js.map +2 -2
  330. package/dist/modules/customers/components/detail/ChangelogTab.js +3 -1
  331. package/dist/modules/customers/components/detail/ChangelogTab.js.map +2 -2
  332. package/dist/modules/customers/components/detail/CompanyCard.js +3 -1
  333. package/dist/modules/customers/components/detail/CompanyCard.js.map +2 -2
  334. package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js +3 -1
  335. package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js.map +2 -2
  336. package/dist/modules/customers/components/detail/EntityTagsDialog.js +3 -1
  337. package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
  338. package/dist/modules/customers/components/detail/InlineActivityComposer.js +3 -1
  339. package/dist/modules/customers/components/detail/InlineActivityComposer.js.map +2 -2
  340. package/dist/modules/customers/components/detail/ManageTagsDialog.js +3 -1
  341. package/dist/modules/customers/components/detail/ManageTagsDialog.js.map +2 -2
  342. package/dist/modules/customers/components/detail/RoleAssignmentRow.js +5 -3
  343. package/dist/modules/customers/components/detail/RoleAssignmentRow.js.map +2 -2
  344. package/dist/modules/customers/components/detail/RolesSection.js +4 -2
  345. package/dist/modules/customers/components/detail/RolesSection.js.map +2 -2
  346. package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js +5 -3
  347. package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js.map +2 -2
  348. package/dist/modules/customers/components/linking/LinkEntityDialog.js +4 -2
  349. package/dist/modules/customers/components/linking/LinkEntityDialog.js.map +2 -2
  350. package/dist/modules/customers/inbox-actions.js +3 -1
  351. package/dist/modules/customers/inbox-actions.js.map +2 -2
  352. package/dist/modules/customers/lib/bulkDeals.js +3 -1
  353. package/dist/modules/customers/lib/bulkDeals.js.map +2 -2
  354. package/dist/modules/customers/lib/dealClosureNotification.js +4 -2
  355. package/dist/modules/customers/lib/dealClosureNotification.js.map +2 -2
  356. package/dist/modules/customers/lib/dealStageTransitionTable.js +3 -1
  357. package/dist/modules/customers/lib/dealStageTransitionTable.js.map +2 -2
  358. package/dist/modules/customers/lib/interactionFeatureFlags.js +3 -1
  359. package/dist/modules/customers/lib/interactionFeatureFlags.js.map +2 -2
  360. package/dist/modules/customers/lib/todoCompatibility.js +3 -1
  361. package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
  362. package/dist/modules/customers/search.js +14 -7
  363. package/dist/modules/customers/search.js.map +2 -2
  364. package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js +3 -1
  365. package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js.map +2 -2
  366. package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js +3 -1
  367. package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js.map +2 -2
  368. package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js +3 -1
  369. package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js.map +2 -2
  370. package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js +3 -1
  371. package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js.map +2 -2
  372. package/dist/modules/dashboards/api/widgets/data/batch/route.js +3 -1
  373. package/dist/modules/dashboards/api/widgets/data/batch/route.js.map +2 -2
  374. package/dist/modules/dashboards/api/widgets/data/route.js +3 -1
  375. package/dist/modules/dashboards/api/widgets/data/route.js.map +2 -2
  376. package/dist/modules/dashboards/components/WidgetVisibilityEditor.js +5 -3
  377. package/dist/modules/dashboards/components/WidgetVisibilityEditor.js.map +2 -2
  378. package/dist/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.js +3 -1
  379. package/dist/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.js.map +2 -2
  380. package/dist/modules/dashboards/widgets/dashboard/new-customers-kpi/widget.client.js +3 -1
  381. package/dist/modules/dashboards/widgets/dashboard/new-customers-kpi/widget.client.js.map +2 -2
  382. package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js +3 -1
  383. package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js.map +2 -2
  384. package/dist/modules/dashboards/widgets/dashboard/orders-kpi/widget.client.js +3 -1
  385. package/dist/modules/dashboards/widgets/dashboard/orders-kpi/widget.client.js.map +2 -2
  386. package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.js +3 -1
  387. package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.js.map +2 -2
  388. package/dist/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.js +3 -1
  389. package/dist/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.js.map +2 -2
  390. package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js +3 -1
  391. package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js.map +2 -2
  392. package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js +3 -1
  393. package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js.map +2 -2
  394. package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js +3 -1
  395. package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js.map +2 -2
  396. package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js +3 -1
  397. package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js.map +2 -2
  398. package/dist/modules/data_sync/api/run.js +3 -1
  399. package/dist/modules/data_sync/api/run.js.map +2 -2
  400. package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js +1 -1
  401. package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js.map +2 -2
  402. package/dist/modules/data_sync/lib/adapter-registry.js +11 -4
  403. package/dist/modules/data_sync/lib/adapter-registry.js.map +2 -2
  404. package/dist/modules/data_sync/lib/sync-engine.js +23 -2
  405. package/dist/modules/data_sync/lib/sync-engine.js.map +2 -2
  406. package/dist/modules/data_sync/workers/sync-export.js +3 -1
  407. package/dist/modules/data_sync/workers/sync-export.js.map +2 -2
  408. package/dist/modules/data_sync/workers/sync-import.js +3 -1
  409. package/dist/modules/data_sync/workers/sync-import.js.map +2 -2
  410. package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js +4 -2
  411. package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js.map +2 -2
  412. package/dist/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.js +3 -1
  413. package/dist/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.js.map +2 -2
  414. package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js +4 -2
  415. package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js.map +2 -2
  416. package/dist/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.js +3 -1
  417. package/dist/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.js.map +2 -2
  418. package/dist/modules/dictionaries/api/[dictionaryId]/route.js +5 -3
  419. package/dist/modules/dictionaries/api/[dictionaryId]/route.js.map +2 -2
  420. package/dist/modules/dictionaries/api/context.js +3 -1
  421. package/dist/modules/dictionaries/api/context.js.map +2 -2
  422. package/dist/modules/dictionaries/api/route.js +4 -2
  423. package/dist/modules/dictionaries/api/route.js.map +2 -2
  424. package/dist/modules/dictionaries/components/DictionariesManager.js +5 -3
  425. package/dist/modules/dictionaries/components/DictionariesManager.js.map +2 -2
  426. package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js +4 -2
  427. package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js.map +2 -2
  428. package/dist/modules/dictionaries/components/DictionaryEntrySelect.js +4 -2
  429. package/dist/modules/dictionaries/components/DictionaryEntrySelect.js.map +2 -2
  430. package/dist/modules/dictionaries/components/DictionarySelectControl.js +3 -1
  431. package/dist/modules/dictionaries/components/DictionarySelectControl.js.map +2 -2
  432. package/dist/modules/dictionaries/fields/dictionary.js +3 -1
  433. package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
  434. package/dist/modules/directory/api/organization-branding/route.js +3 -1
  435. package/dist/modules/directory/api/organization-branding/route.js.map +2 -2
  436. package/dist/modules/directory/api/organization-switcher/route.js +3 -1
  437. package/dist/modules/directory/api/organization-switcher/route.js.map +2 -2
  438. package/dist/modules/directory/commands/tenants.js +5 -3
  439. package/dist/modules/directory/commands/tenants.js.map +2 -2
  440. package/dist/modules/directory/utils/organizationScope.js +6 -4
  441. package/dist/modules/directory/utils/organizationScope.js.map +2 -2
  442. package/dist/modules/entities/api/definitions.cache.js +3 -1
  443. package/dist/modules/entities/api/definitions.cache.js.map +2 -2
  444. package/dist/modules/entities/api/definitions.js +7 -5
  445. package/dist/modules/entities/api/definitions.js.map +2 -2
  446. package/dist/modules/entities/api/records.js +4 -8
  447. package/dist/modules/entities/api/records.js.map +2 -2
  448. package/dist/modules/entities/components/EncryptionManager.js +3 -1
  449. package/dist/modules/entities/components/EncryptionManager.js.map +2 -2
  450. package/dist/modules/entities/lib/makeActivityRoute.js +3 -1
  451. package/dist/modules/entities/lib/makeActivityRoute.js.map +2 -2
  452. package/dist/modules/feature_toggles/api/overrides/route.js +3 -1
  453. package/dist/modules/feature_toggles/api/overrides/route.js.map +2 -2
  454. package/dist/modules/feature_toggles/lib/feature-flag-check.js +5 -9
  455. package/dist/modules/feature_toggles/lib/feature-flag-check.js.map +2 -2
  456. package/dist/modules/inbox_ops/api/emails/[id]/reprocess/route.js +4 -2
  457. package/dist/modules/inbox_ops/api/emails/[id]/reprocess/route.js.map +2 -2
  458. package/dist/modules/inbox_ops/api/emails/[id]/route.js +4 -2
  459. package/dist/modules/inbox_ops/api/emails/[id]/route.js.map +2 -2
  460. package/dist/modules/inbox_ops/api/emails/route.js +3 -1
  461. package/dist/modules/inbox_ops/api/emails/route.js.map +2 -2
  462. package/dist/modules/inbox_ops/api/extract/route.js +3 -1
  463. package/dist/modules/inbox_ops/api/extract/route.js.map +2 -2
  464. package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js +3 -1
  465. package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js.map +2 -2
  466. package/dist/modules/inbox_ops/api/proposals/[id]/replies/[replyId]/send/route.js +4 -2
  467. package/dist/modules/inbox_ops/api/proposals/[id]/replies/[replyId]/send/route.js.map +2 -2
  468. package/dist/modules/inbox_ops/api/proposals/counts/route.js +4 -2
  469. package/dist/modules/inbox_ops/api/proposals/counts/route.js.map +2 -2
  470. package/dist/modules/inbox_ops/api/proposals/route.js +3 -1
  471. package/dist/modules/inbox_ops/api/proposals/route.js.map +2 -2
  472. package/dist/modules/inbox_ops/api/routeHelpers.js +3 -1
  473. package/dist/modules/inbox_ops/api/routeHelpers.js.map +2 -2
  474. package/dist/modules/inbox_ops/api/settings/route.js +3 -1
  475. package/dist/modules/inbox_ops/api/settings/route.js.map +2 -2
  476. package/dist/modules/inbox_ops/api/webhook/inbound.js +7 -5
  477. package/dist/modules/inbox_ops/api/webhook/inbound.js.map +2 -2
  478. package/dist/modules/inbox_ops/lib/cache.js +4 -2
  479. package/dist/modules/inbox_ops/lib/cache.js.map +2 -2
  480. package/dist/modules/inbox_ops/lib/catalogLookup.js +3 -1
  481. package/dist/modules/inbox_ops/lib/catalogLookup.js.map +2 -2
  482. package/dist/modules/inbox_ops/lib/eventBus.js +3 -4
  483. package/dist/modules/inbox_ops/lib/eventBus.js.map +2 -2
  484. package/dist/modules/inbox_ops/lib/messagesIntegration.js +4 -8
  485. package/dist/modules/inbox_ops/lib/messagesIntegration.js.map +2 -2
  486. package/dist/modules/inbox_ops/subscribers/executionAuditor.js +3 -1
  487. package/dist/modules/inbox_ops/subscribers/executionAuditor.js.map +2 -2
  488. package/dist/modules/inbox_ops/subscribers/extractionWorker.js +10 -8
  489. package/dist/modules/inbox_ops/subscribers/extractionWorker.js.map +2 -2
  490. package/dist/modules/inbox_ops/subscribers/proposalNotifier.js +3 -1
  491. package/dist/modules/inbox_ops/subscribers/proposalNotifier.js.map +2 -2
  492. package/dist/modules/messages/api/[id]/route.js +3 -4
  493. package/dist/modules/messages/api/[id]/route.js.map +2 -2
  494. package/dist/modules/messages/commands/actions.js +3 -1
  495. package/dist/modules/messages/commands/actions.js.map +2 -2
  496. package/dist/modules/messages/components/MessagesInboxPageClient.js +3 -1
  497. package/dist/modules/messages/components/MessagesInboxPageClient.js.map +2 -2
  498. package/dist/modules/messages/lib/email-sender.js +3 -7
  499. package/dist/modules/messages/lib/email-sender.js.map +2 -2
  500. package/dist/modules/messages/lib/message-objects-registry.js +3 -1
  501. package/dist/modules/messages/lib/message-objects-registry.js.map +2 -2
  502. package/dist/modules/messages/lib/message-types-registry.js +3 -1
  503. package/dist/modules/messages/lib/message-types-registry.js.map +2 -2
  504. package/dist/modules/messages/workers/send-email.worker.js +6 -4
  505. package/dist/modules/messages/workers/send-email.worker.js.map +2 -2
  506. package/dist/modules/notifications/lib/notificationMapper.js +3 -4
  507. package/dist/modules/notifications/lib/notificationMapper.js.map +2 -2
  508. package/dist/modules/notifications/lib/notificationService.js +4 -5
  509. package/dist/modules/notifications/lib/notificationService.js.map +2 -2
  510. package/dist/modules/notifications/subscribers/deliver-notification.js +8 -13
  511. package/dist/modules/notifications/subscribers/deliver-notification.js.map +2 -2
  512. package/dist/modules/payment_gateways/api/webhook/[provider]/route.js +3 -1
  513. package/dist/modules/payment_gateways/api/webhook/[provider]/route.js.map +2 -2
  514. package/dist/modules/perspectives/services/perspectiveService.js +3 -3
  515. package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
  516. package/dist/modules/planner/api/access.js +3 -3
  517. package/dist/modules/planner/api/access.js.map +2 -2
  518. package/dist/modules/planner/api/availability-date-specific.js +3 -1
  519. package/dist/modules/planner/api/availability-date-specific.js.map +2 -2
  520. package/dist/modules/planner/api/availability-weekly.js +3 -1
  521. package/dist/modules/planner/api/availability-weekly.js.map +2 -2
  522. package/dist/modules/planner/backend/planner/availability-rulesets/page.js +4 -2
  523. package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
  524. package/dist/modules/planner/components/AvailabilityRulesEditor.js +3 -1
  525. package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
  526. package/dist/modules/progress/api/jobs/route.js +3 -1
  527. package/dist/modules/progress/api/jobs/route.js.map +2 -2
  528. package/dist/modules/query_index/components/QueryIndexesTable.js +5 -3
  529. package/dist/modules/query_index/components/QueryIndexesTable.js.map +2 -2
  530. package/dist/modules/query_index/lib/batch.js +4 -2
  531. package/dist/modules/query_index/lib/batch.js.map +2 -2
  532. package/dist/modules/query_index/lib/coverage.js +3 -1
  533. package/dist/modules/query_index/lib/coverage.js.map +2 -2
  534. package/dist/modules/query_index/lib/engine.js +13 -18
  535. package/dist/modules/query_index/lib/engine.js.map +2 -2
  536. package/dist/modules/query_index/lib/reindexer.js +8 -6
  537. package/dist/modules/query_index/lib/reindexer.js.map +2 -2
  538. package/dist/modules/query_index/lib/search-tokens.js +3 -1
  539. package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
  540. package/dist/modules/query_index/subscribers/coverage_refresh.js +3 -1
  541. package/dist/modules/query_index/subscribers/coverage_refresh.js.map +2 -2
  542. package/dist/modules/resources/api/comments.js +3 -1
  543. package/dist/modules/resources/api/comments.js.map +2 -2
  544. package/dist/modules/resources/api/resources/tags/assign/route.js +3 -1
  545. package/dist/modules/resources/api/resources/tags/assign/route.js.map +2 -2
  546. package/dist/modules/resources/api/resources/tags/unassign/route.js +3 -1
  547. package/dist/modules/resources/api/resources/tags/unassign/route.js.map +2 -2
  548. package/dist/modules/resources/backend/resources/resource-types/[id]/edit/page.js +3 -1
  549. package/dist/modules/resources/backend/resources/resource-types/[id]/edit/page.js.map +2 -2
  550. package/dist/modules/resources/backend/resources/resource-types/page.js +4 -2
  551. package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
  552. package/dist/modules/resources/commands/activities.js +6 -5
  553. package/dist/modules/resources/commands/activities.js.map +2 -2
  554. package/dist/modules/resources/commands/comments.js +6 -4
  555. package/dist/modules/resources/commands/comments.js.map +2 -2
  556. package/dist/modules/resources/commands/shared.js +24 -1
  557. package/dist/modules/resources/commands/shared.js.map +2 -2
  558. package/dist/modules/sales/api/channels/route.js +3 -1
  559. package/dist/modules/sales/api/channels/route.js.map +2 -2
  560. package/dist/modules/sales/api/document-addresses/route.js +96 -6
  561. package/dist/modules/sales/api/document-addresses/route.js.map +2 -2
  562. package/dist/modules/sales/api/document-history/route.js +3 -1
  563. package/dist/modules/sales/api/document-history/route.js.map +2 -2
  564. package/dist/modules/sales/api/document-numbers/route.js +3 -1
  565. package/dist/modules/sales/api/document-numbers/route.js.map +2 -2
  566. package/dist/modules/sales/api/quotes/accept/route.js +4 -2
  567. package/dist/modules/sales/api/quotes/accept/route.js.map +2 -2
  568. package/dist/modules/sales/api/quotes/convert/route.js +3 -1
  569. package/dist/modules/sales/api/quotes/convert/route.js.map +2 -2
  570. package/dist/modules/sales/api/quotes/public/[token]/route.js +3 -1
  571. package/dist/modules/sales/api/quotes/public/[token]/route.js.map +2 -2
  572. package/dist/modules/sales/api/quotes/send/route.js +3 -1
  573. package/dist/modules/sales/api/quotes/send/route.js.map +2 -2
  574. package/dist/modules/sales/api/returns/[id]/route.js +3 -1
  575. package/dist/modules/sales/api/returns/[id]/route.js.map +2 -2
  576. package/dist/modules/sales/api/settings/document-numbers/route.js +4 -2
  577. package/dist/modules/sales/api/settings/document-numbers/route.js.map +2 -2
  578. package/dist/modules/sales/api/settings/order-editing/route.js +4 -2
  579. package/dist/modules/sales/api/settings/order-editing/route.js.map +2 -2
  580. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js +3 -1
  581. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js.map +2 -2
  582. package/dist/modules/sales/backend/sales/channels/offers/page.js +6 -4
  583. package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
  584. package/dist/modules/sales/backend/sales/channels/page.js +4 -2
  585. package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
  586. package/dist/modules/sales/backend/sales/documents/[id]/page.js +20 -18
  587. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  588. package/dist/modules/sales/commands/documentAddresses.js +7 -0
  589. package/dist/modules/sales/commands/documentAddresses.js.map +2 -2
  590. package/dist/modules/sales/commands/documents.js +4 -8
  591. package/dist/modules/sales/commands/documents.js.map +2 -2
  592. package/dist/modules/sales/commands/payments.js +3 -1
  593. package/dist/modules/sales/commands/payments.js.map +2 -2
  594. package/dist/modules/sales/commands/shipments.js +3 -1
  595. package/dist/modules/sales/commands/shipments.js.map +2 -2
  596. package/dist/modules/sales/components/AdjustmentKindSettings.js +5 -3
  597. package/dist/modules/sales/components/AdjustmentKindSettings.js.map +2 -2
  598. package/dist/modules/sales/components/DocumentNumberSettings.js +4 -2
  599. package/dist/modules/sales/components/DocumentNumberSettings.js.map +2 -2
  600. package/dist/modules/sales/components/OrderEditingSettings.js +4 -2
  601. package/dist/modules/sales/components/OrderEditingSettings.js.map +2 -2
  602. package/dist/modules/sales/components/PaymentMethodsSettings.js +5 -3
  603. package/dist/modules/sales/components/PaymentMethodsSettings.js.map +2 -2
  604. package/dist/modules/sales/components/ShippingMethodsSettings.js +5 -3
  605. package/dist/modules/sales/components/ShippingMethodsSettings.js.map +2 -2
  606. package/dist/modules/sales/components/StatusSettings.js +5 -3
  607. package/dist/modules/sales/components/StatusSettings.js.map +2 -2
  608. package/dist/modules/sales/components/TaxRatesSettings.js +5 -3
  609. package/dist/modules/sales/components/TaxRatesSettings.js.map +2 -2
  610. package/dist/modules/sales/components/channels/ChannelOfferForm.js +16 -14
  611. package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
  612. package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js +4 -2
  613. package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js.map +2 -2
  614. package/dist/modules/sales/components/documents/AddressesSection.js +5 -3
  615. package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
  616. package/dist/modules/sales/components/documents/AdjustmentDialog.js +3 -1
  617. package/dist/modules/sales/components/documents/AdjustmentDialog.js.map +2 -2
  618. package/dist/modules/sales/components/documents/AdjustmentsSection.js +5 -3
  619. package/dist/modules/sales/components/documents/AdjustmentsSection.js.map +2 -2
  620. package/dist/modules/sales/components/documents/ItemsSection.js +6 -4
  621. package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
  622. package/dist/modules/sales/components/documents/LineItemDialog.js +8 -6
  623. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  624. package/dist/modules/sales/components/documents/PaymentDialog.js +5 -3
  625. package/dist/modules/sales/components/documents/PaymentDialog.js.map +2 -2
  626. package/dist/modules/sales/components/documents/PaymentsSection.js +4 -2
  627. package/dist/modules/sales/components/documents/PaymentsSection.js.map +2 -2
  628. package/dist/modules/sales/components/documents/SalesDocumentForm.js +14 -12
  629. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  630. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +5 -3
  631. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  632. package/dist/modules/sales/components/documents/ShipmentDialog.js +9 -7
  633. package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
  634. package/dist/modules/sales/components/documents/ShipmentsSection.js +4 -2
  635. package/dist/modules/sales/components/documents/ShipmentsSection.js.map +2 -2
  636. package/dist/modules/sales/frontend/quote/[token]/page.js +4 -2
  637. package/dist/modules/sales/frontend/quote/[token]/page.js.map +2 -2
  638. package/dist/modules/sales/seed/examples.js +7 -9
  639. package/dist/modules/sales/seed/examples.js.map +2 -2
  640. package/dist/modules/sales/subscribers/quote-expiring-notification.js +3 -1
  641. package/dist/modules/sales/subscribers/quote-expiring-notification.js.map +2 -2
  642. package/dist/modules/sales/subscribers/reconcileOnAddressDelete.js +3 -1
  643. package/dist/modules/sales/subscribers/reconcileOnAddressDelete.js.map +2 -2
  644. package/dist/modules/sales/subscribers/reconcileOnCompanyDelete.js +3 -1
  645. package/dist/modules/sales/subscribers/reconcileOnCompanyDelete.js.map +2 -2
  646. package/dist/modules/sales/subscribers/reconcileOnCustomerDelete.js +3 -1
  647. package/dist/modules/sales/subscribers/reconcileOnCustomerDelete.js.map +2 -2
  648. package/dist/modules/sales/widgets/dashboard/makeDashboardWidgetRoute.js +5 -3
  649. package/dist/modules/sales/widgets/dashboard/makeDashboardWidgetRoute.js.map +2 -2
  650. package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js +3 -1
  651. package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js.map +2 -2
  652. package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js +3 -1
  653. package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js.map +2 -2
  654. package/dist/modules/shipping_carriers/api/tracking/route.js +5 -0
  655. package/dist/modules/shipping_carriers/api/tracking/route.js.map +2 -2
  656. package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js +3 -1
  657. package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js.map +2 -2
  658. package/dist/modules/shipping_carriers/lib/shipping-service.js +41 -19
  659. package/dist/modules/shipping_carriers/lib/shipping-service.js.map +2 -2
  660. package/dist/modules/shipping_carriers/lib/upstream-error-response.js +3 -1
  661. package/dist/modules/shipping_carriers/lib/upstream-error-response.js.map +2 -2
  662. package/dist/modules/shipping_carriers/workers/webhook-processor.js +3 -5
  663. package/dist/modules/shipping_carriers/workers/webhook-processor.js.map +2 -2
  664. package/dist/modules/staff/api/comments.js +3 -1
  665. package/dist/modules/staff/api/comments.js.map +2 -2
  666. package/dist/modules/staff/api/leave-requests/accept/route.js +3 -1
  667. package/dist/modules/staff/api/leave-requests/accept/route.js.map +2 -2
  668. package/dist/modules/staff/api/leave-requests/reject/route.js +3 -1
  669. package/dist/modules/staff/api/leave-requests/reject/route.js.map +2 -2
  670. package/dist/modules/staff/api/team-members/assignable/route.js +3 -1
  671. package/dist/modules/staff/api/team-members/assignable/route.js.map +2 -2
  672. package/dist/modules/staff/api/team-members/self/route.js +4 -2
  673. package/dist/modules/staff/api/team-members/self/route.js.map +2 -2
  674. package/dist/modules/staff/api/team-members/tags/assign/route.js +3 -1
  675. package/dist/modules/staff/api/team-members/tags/assign/route.js.map +2 -2
  676. package/dist/modules/staff/api/team-members/tags/unassign/route.js +3 -1
  677. package/dist/modules/staff/api/team-members/tags/unassign/route.js.map +2 -2
  678. package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js +3 -1
  679. package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js.map +2 -2
  680. package/dist/modules/staff/api/timesheets/my-projects/route.js +3 -1
  681. package/dist/modules/staff/api/timesheets/my-projects/route.js.map +2 -2
  682. package/dist/modules/staff/api/timesheets/projects/kpis/route.js +3 -1
  683. package/dist/modules/staff/api/timesheets/projects/kpis/route.js.map +2 -2
  684. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js +3 -1
  685. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js.map +2 -2
  686. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js +4 -2
  687. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js.map +2 -2
  688. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js +4 -2
  689. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js.map +2 -2
  690. package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js +3 -1
  691. package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js.map +2 -2
  692. package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js +3 -1
  693. package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js.map +2 -2
  694. package/dist/modules/staff/backend/staff/team-members/page.js +4 -2
  695. package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
  696. package/dist/modules/staff/backend/staff/team-roles/page.js +4 -2
  697. package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
  698. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +4 -2
  699. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
  700. package/dist/modules/staff/backend/staff/teams/page.js +4 -2
  701. package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
  702. package/dist/modules/staff/backend/staff/timesheets/page.js +7 -5
  703. package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
  704. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js +3 -1
  705. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js.map +2 -2
  706. package/dist/modules/staff/backend/staff/timesheets/projects/page.js +4 -2
  707. package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
  708. package/dist/modules/staff/commands/activities.js +23 -12
  709. package/dist/modules/staff/commands/activities.js.map +2 -2
  710. package/dist/modules/staff/commands/addresses.js +20 -12
  711. package/dist/modules/staff/commands/addresses.js.map +2 -2
  712. package/dist/modules/staff/commands/comments.js +18 -11
  713. package/dist/modules/staff/commands/comments.js.map +2 -2
  714. package/dist/modules/staff/commands/job-histories.js +23 -12
  715. package/dist/modules/staff/commands/job-histories.js.map +2 -2
  716. package/dist/modules/staff/commands/leave-requests.js +37 -19
  717. package/dist/modules/staff/commands/leave-requests.js.map +2 -2
  718. package/dist/modules/staff/commands/shared.js +28 -1
  719. package/dist/modules/staff/commands/shared.js.map +2 -2
  720. package/dist/modules/staff/commands/tag-assignments.js +20 -3
  721. package/dist/modules/staff/commands/tag-assignments.js.map +2 -2
  722. package/dist/modules/staff/commands/team-members.js +21 -11
  723. package/dist/modules/staff/commands/team-members.js.map +2 -2
  724. package/dist/modules/staff/commands/team-roles.js +21 -11
  725. package/dist/modules/staff/commands/team-roles.js.map +2 -2
  726. package/dist/modules/staff/commands/teams.js +21 -11
  727. package/dist/modules/staff/commands/teams.js.map +2 -2
  728. package/dist/modules/staff/commands/timesheets-entries.js +27 -15
  729. package/dist/modules/staff/commands/timesheets-entries.js.map +2 -2
  730. package/dist/modules/staff/commands/timesheets-projects.js +34 -18
  731. package/dist/modules/staff/commands/timesheets-projects.js.map +2 -2
  732. package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.js +3 -1
  733. package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.js.map +2 -2
  734. package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.js +5 -3
  735. package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.js.map +2 -2
  736. package/dist/modules/sync_excel/api/import/route.js +3 -1
  737. package/dist/modules/sync_excel/api/import/route.js.map +2 -2
  738. package/dist/modules/translations/api/[entityType]/[entityId]/route.js +5 -3
  739. package/dist/modules/translations/api/[entityType]/[entityId]/route.js.map +2 -2
  740. package/dist/modules/translations/api/get/locales.js +3 -1
  741. package/dist/modules/translations/api/get/locales.js.map +2 -2
  742. package/dist/modules/translations/api/put/locales.js +3 -1
  743. package/dist/modules/translations/api/put/locales.js.map +2 -2
  744. package/dist/modules/translations/components/TranslationManager.js +3 -1
  745. package/dist/modules/translations/components/TranslationManager.js.map +2 -2
  746. package/dist/modules/translations/subscribers/cleanup.js +3 -1
  747. package/dist/modules/translations/subscribers/cleanup.js.map +2 -2
  748. package/dist/modules/workflows/api/definitions/[id]/customize/route.js +4 -2
  749. package/dist/modules/workflows/api/definitions/[id]/customize/route.js.map +2 -2
  750. package/dist/modules/workflows/api/definitions/[id]/reset-to-code/route.js +4 -2
  751. package/dist/modules/workflows/api/definitions/[id]/reset-to-code/route.js.map +2 -2
  752. package/dist/modules/workflows/api/definitions/[id]/route.js +6 -4
  753. package/dist/modules/workflows/api/definitions/[id]/route.js.map +2 -2
  754. package/dist/modules/workflows/api/definitions/route.js +4 -2
  755. package/dist/modules/workflows/api/definitions/route.js.map +2 -2
  756. package/dist/modules/workflows/api/events/[id]/route.js +3 -1
  757. package/dist/modules/workflows/api/events/[id]/route.js.map +2 -2
  758. package/dist/modules/workflows/api/events/route.js +3 -1
  759. package/dist/modules/workflows/api/events/route.js.map +2 -2
  760. package/dist/modules/workflows/api/instances/[id]/advance/route.js +3 -1
  761. package/dist/modules/workflows/api/instances/[id]/advance/route.js.map +2 -2
  762. package/dist/modules/workflows/api/instances/[id]/cancel/route.js +3 -1
  763. package/dist/modules/workflows/api/instances/[id]/cancel/route.js.map +2 -2
  764. package/dist/modules/workflows/api/instances/[id]/events/route.js +3 -1
  765. package/dist/modules/workflows/api/instances/[id]/events/route.js.map +2 -2
  766. package/dist/modules/workflows/api/instances/[id]/retry/route.js +3 -1
  767. package/dist/modules/workflows/api/instances/[id]/retry/route.js.map +2 -2
  768. package/dist/modules/workflows/api/instances/[id]/route.js +3 -1
  769. package/dist/modules/workflows/api/instances/[id]/route.js.map +2 -2
  770. package/dist/modules/workflows/api/instances/[id]/signal/route.js +5 -7
  771. package/dist/modules/workflows/api/instances/[id]/signal/route.js.map +2 -2
  772. package/dist/modules/workflows/api/instances/route.js +6 -4
  773. package/dist/modules/workflows/api/instances/route.js.map +2 -2
  774. package/dist/modules/workflows/api/instances/validate-start/route.js +3 -1
  775. package/dist/modules/workflows/api/instances/validate-start/route.js.map +2 -2
  776. package/dist/modules/workflows/api/signals/route.js +3 -1
  777. package/dist/modules/workflows/api/signals/route.js.map +2 -2
  778. package/dist/modules/workflows/api/tasks/[id]/claim/route.js +3 -1
  779. package/dist/modules/workflows/api/tasks/[id]/claim/route.js.map +2 -2
  780. package/dist/modules/workflows/api/tasks/[id]/complete/route.js +3 -1
  781. package/dist/modules/workflows/api/tasks/[id]/complete/route.js.map +2 -2
  782. package/dist/modules/workflows/api/tasks/[id]/route.js +3 -1
  783. package/dist/modules/workflows/api/tasks/[id]/route.js.map +2 -2
  784. package/dist/modules/workflows/api/tasks/route.js +3 -1
  785. package/dist/modules/workflows/api/tasks/route.js.map +2 -2
  786. package/dist/modules/workflows/backend/definitions/visual-editor/page.js +4 -2
  787. package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
  788. package/dist/modules/workflows/backend/instances/[id]/page.js +5 -3
  789. package/dist/modules/workflows/backend/instances/[id]/page.js.map +2 -2
  790. package/dist/modules/workflows/backend/tasks/[id]/page.js +3 -1
  791. package/dist/modules/workflows/backend/tasks/[id]/page.js.map +2 -2
  792. package/dist/modules/workflows/components/BusinessRulesSelector.js +5 -3
  793. package/dist/modules/workflows/components/BusinessRulesSelector.js.map +2 -2
  794. package/dist/modules/workflows/components/WorkflowSelector.js +5 -3
  795. package/dist/modules/workflows/components/WorkflowSelector.js.map +2 -2
  796. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +3 -1
  797. package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
  798. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +3 -1
  799. package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
  800. package/dist/modules/workflows/components/fields/WorkflowSelectorField.js +3 -1
  801. package/dist/modules/workflows/components/fields/WorkflowSelectorField.js.map +2 -2
  802. package/dist/modules/workflows/frontend/checkout-demo/page.js +8 -7
  803. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  804. package/dist/modules/workflows/lib/activity-executor.js +25 -21
  805. package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
  806. package/dist/modules/workflows/lib/activity-worker-handler.js +8 -15
  807. package/dist/modules/workflows/lib/activity-worker-handler.js.map +2 -2
  808. package/dist/modules/workflows/lib/code-registry.js +7 -7
  809. package/dist/modules/workflows/lib/code-registry.js.map +2 -2
  810. package/dist/modules/workflows/lib/compensation-handler.js +4 -2
  811. package/dist/modules/workflows/lib/compensation-handler.js.map +2 -2
  812. package/dist/modules/workflows/lib/edgeFormTransforms.js +3 -1
  813. package/dist/modules/workflows/lib/edgeFormTransforms.js.map +2 -2
  814. package/dist/modules/workflows/lib/event-trigger-service.js +5 -3
  815. package/dist/modules/workflows/lib/event-trigger-service.js.map +2 -2
  816. package/dist/modules/workflows/lib/nodeFormTransforms.js +3 -1
  817. package/dist/modules/workflows/lib/nodeFormTransforms.js.map +2 -2
  818. package/dist/modules/workflows/lib/seeds.js +16 -2
  819. package/dist/modules/workflows/lib/seeds.js.map +2 -2
  820. package/dist/modules/workflows/lib/signal-handler.js +3 -1
  821. package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
  822. package/dist/modules/workflows/lib/start-validator.js +9 -3
  823. package/dist/modules/workflows/lib/start-validator.js.map +2 -2
  824. package/dist/modules/workflows/lib/step-handler.js +3 -1
  825. package/dist/modules/workflows/lib/step-handler.js.map +2 -2
  826. package/dist/modules/workflows/lib/task-handler.js +3 -1
  827. package/dist/modules/workflows/lib/task-handler.js.map +2 -2
  828. package/dist/modules/workflows/lib/transition-handler.js +5 -3
  829. package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
  830. package/dist/modules/workflows/lib/workflow-executor.js +27 -15
  831. package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
  832. package/dist/modules/workflows/subscribers/event-trigger.js +21 -18
  833. package/dist/modules/workflows/subscribers/event-trigger.js.map +2 -2
  834. package/dist/modules/workflows/subscribers/task-assigned-notification.js +3 -1
  835. package/dist/modules/workflows/subscribers/task-assigned-notification.js.map +2 -2
  836. package/dist/modules/workflows/workers/workflow-activities.worker.js +30 -20
  837. package/dist/modules/workflows/workers/workflow-activities.worker.js.map +2 -2
  838. package/package.json +7 -7
  839. package/src/bootstrap.ts +14 -11
  840. package/src/helpers/integration/auth.ts +178 -86
  841. package/src/helpers/integration/queue-runner.ts +2 -2
  842. package/src/modules/api_keys/services/apiKeyService.ts +6 -3
  843. package/src/modules/attachments/api/image/[id]/[[...slug]]/route.ts +5 -2
  844. package/src/modules/attachments/api/library/[id]/route.ts +4 -1
  845. package/src/modules/attachments/api/route.ts +9 -6
  846. package/src/modules/attachments/components/AttachmentPartitionSettings.tsx +6 -3
  847. package/src/modules/attachments/lib/assignmentDetails.ts +4 -1
  848. package/src/modules/attachments/lib/drivers/driverFactory.ts +4 -1
  849. package/src/modules/attachments/lib/ocrQueue.ts +11 -11
  850. package/src/modules/attachments/lib/ocrService.ts +7 -4
  851. package/src/modules/audit_logs/api/audit-logs/actions/redo/route.ts +4 -1
  852. package/src/modules/audit_logs/api/audit-logs/actions/undo/route.ts +4 -1
  853. package/src/modules/audit_logs/backend/audit-logs/page.tsx +4 -1
  854. package/src/modules/audit_logs/components/AuditLogsActions.tsx +5 -2
  855. package/src/modules/audit_logs/services/accessLogService.ts +5 -4
  856. package/src/modules/audit_logs/services/actionLogService.ts +5 -2
  857. package/src/modules/auth/api/profile/route.ts +5 -2
  858. package/src/modules/auth/api/reset/confirm.ts +4 -1
  859. package/src/modules/auth/api/reset.ts +5 -2
  860. package/src/modules/auth/api/roles/route.ts +4 -1
  861. package/src/modules/auth/api/sidebar/variants/route.ts +4 -2
  862. package/src/modules/auth/api/users/resend-invite/route.ts +5 -2
  863. package/src/modules/auth/api/users/route.ts +4 -1
  864. package/src/modules/auth/backend/auth/profile/page.tsx +4 -1
  865. package/src/modules/auth/backend/profile/change-password/page.tsx +4 -1
  866. package/src/modules/auth/backend/users/[id]/edit/page.tsx +6 -3
  867. package/src/modules/auth/backend/users/create/page.tsx +5 -2
  868. package/src/modules/auth/cli.ts +10 -0
  869. package/src/modules/auth/commands/users.ts +5 -2
  870. package/src/modules/auth/lib/consentIntegrity.ts +4 -4
  871. package/src/modules/auth/lib/setup-app.ts +10 -10
  872. package/src/modules/auth/lib/tenantAccess.ts +4 -1
  873. package/src/modules/auth/lib/tokenHash.ts +4 -4
  874. package/src/modules/business_rules/api/rules/route.ts +5 -2
  875. package/src/modules/business_rules/lib/expression-evaluator.ts +8 -6
  876. package/src/modules/business_rules/lib/rule-engine.ts +6 -3
  877. package/src/modules/business_rules/lib/rule-evaluator.ts +11 -11
  878. package/src/modules/business_rules/subscribers/crud-rule-trigger.ts +4 -1
  879. package/src/modules/business_rules/subscribers/rule-execution-failed-notification.ts +4 -1
  880. package/src/modules/catalog/ai-agents-context.ts +5 -5
  881. package/src/modules/catalog/ai-tools/_shared.ts +4 -1
  882. package/src/modules/catalog/ai-tools/authoring-pack.ts +4 -1
  883. package/src/modules/catalog/ai-tools/merchandising-pack.ts +4 -1
  884. package/src/modules/catalog/api/dictionaries/[key]/route.ts +4 -1
  885. package/src/modules/catalog/api/prices/route.ts +4 -1
  886. package/src/modules/catalog/api/products/route.ts +6 -3
  887. package/src/modules/catalog/api/settings/route.ts +5 -2
  888. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +15 -12
  889. package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +9 -6
  890. package/src/modules/catalog/backend/catalog/products/[productId]/variants/create/page.tsx +6 -3
  891. package/src/modules/catalog/backend/catalog/products/create/page.tsx +6 -6
  892. package/src/modules/catalog/backend/catalog/products/optionSchemaClient.ts +4 -1
  893. package/src/modules/catalog/components/PriceKindSettings.tsx +6 -3
  894. package/src/modules/catalog/components/UnitPriceDisplaySettings.tsx +5 -2
  895. package/src/modules/catalog/inbox-actions.ts +5 -2
  896. package/src/modules/catalog/seed/examples.ts +5 -5
  897. package/src/modules/catalog/subscribers/low-stock-notification.ts +4 -1
  898. package/src/modules/catalog/widgets/injection/product-seo/state.ts +4 -1
  899. package/src/modules/communication_channels/api/get/oauth/[provider]/callback/route.ts +13 -13
  900. package/src/modules/communication_channels/api/post/channels/[id]/import-history/route.ts +4 -1
  901. package/src/modules/communication_channels/api/post/channels/[id]/push/register/route.ts +4 -1
  902. package/src/modules/communication_channels/api/post/webhook/[provider]/route.ts +6 -3
  903. package/src/modules/communication_channels/api/post/webhooks/gmail/route.ts +7 -6
  904. package/src/modules/communication_channels/commands/connect-credential-channel.ts +5 -10
  905. package/src/modules/communication_channels/commands/delete-channel.ts +4 -5
  906. package/src/modules/communication_channels/commands/deliver-outbound-message.ts +5 -5
  907. package/src/modules/communication_channels/commands/disconnect-channel.ts +4 -5
  908. package/src/modules/communication_channels/commands/ingest-inbound-message.ts +6 -12
  909. package/src/modules/communication_channels/commands/push-unregister.ts +4 -3
  910. package/src/modules/communication_channels/commands/reassign-conversation.ts +6 -3
  911. package/src/modules/communication_channels/lib/dead-letter.ts +4 -5
  912. package/src/modules/communication_channels/lib/email-mime.ts +5 -6
  913. package/src/modules/communication_channels/lib/oauth-client-config.ts +7 -3
  914. package/src/modules/communication_channels/lib/send-as-user.ts +4 -1
  915. package/src/modules/communication_channels/lib/thread-token.ts +5 -2
  916. package/src/modules/communication_channels/setup.ts +4 -4
  917. package/src/modules/communication_channels/workers/channel-import-history.ts +5 -8
  918. package/src/modules/communication_channels/workers/gmail-history-sync.ts +9 -18
  919. package/src/modules/communication_channels/workers/gmail-renew-watch.ts +6 -9
  920. package/src/modules/communication_channels/workers/outbound-delivery.ts +7 -12
  921. package/src/modules/communication_channels/workers/poll-channel.ts +8 -15
  922. package/src/modules/communication_channels/workers/poll-tick.ts +6 -6
  923. package/src/modules/communication_channels/workers/reaction-processor.ts +6 -9
  924. package/src/modules/configs/api/cache/route.ts +5 -2
  925. package/src/modules/configs/api/system-status/route.ts +5 -2
  926. package/src/modules/configs/api/upgrade-actions/route.ts +5 -2
  927. package/src/modules/configs/components/ModuleTelemetryPanel.tsx +4 -1
  928. package/src/modules/configs/lib/touchGeneratedBarrels.ts +1 -1
  929. package/src/modules/configs/services/upgradeActionsService.ts +7 -3
  930. package/src/modules/currencies/components/CurrencyFetchingConfig.tsx +4 -1
  931. package/src/modules/currencies/lib/exchangeRateFormConfig.ts +4 -1
  932. package/src/modules/currencies/services/providers/nbp.ts +7 -4
  933. package/src/modules/currencies/services/providers/raiffeisen.ts +8 -7
  934. package/src/modules/customer_accounts/api/domain-resolve/all.ts +7 -5
  935. package/src/modules/customer_accounts/api/signup.ts +5 -2
  936. package/src/modules/customer_accounts/lib/customerAuthServer.ts +4 -1
  937. package/src/modules/customer_accounts/subscribers/autoLinkCrm.ts +4 -1
  938. package/src/modules/customer_accounts/subscribers/autoLinkCrmReverse.ts +4 -1
  939. package/src/modules/customer_accounts/subscribers/unlinkOnCompanyDelete.ts +4 -1
  940. package/src/modules/customer_accounts/subscribers/unlinkOnPersonDelete.ts +4 -1
  941. package/src/modules/customers/ai-agents-context.ts +5 -5
  942. package/src/modules/customers/api/activities/route.ts +7 -4
  943. package/src/modules/customers/api/comments/route.ts +4 -1
  944. package/src/modules/customers/api/companies/[id]/people/route.ts +4 -1
  945. package/src/modules/customers/api/companies/[id]/route.ts +6 -3
  946. package/src/modules/customers/api/companies/route.ts +6 -3
  947. package/src/modules/customers/api/dashboard/widgets/customer-todos/route.ts +4 -1
  948. package/src/modules/customers/api/dashboard/widgets/new-customers/route.ts +4 -1
  949. package/src/modules/customers/api/dashboard/widgets/new-deals/route.ts +4 -1
  950. package/src/modules/customers/api/dashboard/widgets/next-interactions/route.ts +4 -1
  951. package/src/modules/customers/api/deals/[id]/companies/route.ts +4 -1
  952. package/src/modules/customers/api/deals/[id]/people/route.ts +4 -1
  953. package/src/modules/customers/api/deals/aggregate/route.ts +4 -1
  954. package/src/modules/customers/api/deals/bulk-update-owner/route.ts +8 -5
  955. package/src/modules/customers/api/deals/bulk-update-stage/route.ts +8 -5
  956. package/src/modules/customers/api/deals/route.ts +4 -1
  957. package/src/modules/customers/api/deals/summary/route.ts +4 -1
  958. package/src/modules/customers/api/dictionaries/[kind]/[id]/route.ts +5 -2
  959. package/src/modules/customers/api/dictionaries/[kind]/route.ts +6 -3
  960. package/src/modules/customers/api/dictionaries/cache.ts +4 -1
  961. package/src/modules/customers/api/dictionaries/context.ts +4 -1
  962. package/src/modules/customers/api/dictionaries/currency/route.ts +4 -1
  963. package/src/modules/customers/api/dictionaries/kind-settings/route.ts +5 -2
  964. package/src/modules/customers/api/entity-roles-factory.ts +8 -5
  965. package/src/modules/customers/api/interactions/cancel/route.ts +4 -1
  966. package/src/modules/customers/api/interactions/complete/route.ts +4 -1
  967. package/src/modules/customers/api/interactions/conflicts/route.ts +4 -1
  968. package/src/modules/customers/api/interactions/counts/route.ts +4 -1
  969. package/src/modules/customers/api/interactions/route.ts +8 -4
  970. package/src/modules/customers/api/interactions/tasks/route.ts +4 -1
  971. package/src/modules/customers/api/labels/assign/route.ts +4 -1
  972. package/src/modules/customers/api/labels/route.ts +7 -3
  973. package/src/modules/customers/api/labels/unassign/route.ts +4 -1
  974. package/src/modules/customers/api/people/[id]/companies/enriched/route.ts +4 -1
  975. package/src/modules/customers/api/people/[id]/route.ts +6 -3
  976. package/src/modules/customers/api/people/route.ts +6 -3
  977. package/src/modules/customers/api/pipeline-stages/reorder/route.ts +4 -1
  978. package/src/modules/customers/api/pipeline-stages/route.ts +7 -4
  979. package/src/modules/customers/api/pipelines/route.ts +7 -4
  980. package/src/modules/customers/api/settings/address-format/route.ts +5 -2
  981. package/src/modules/customers/api/settings/dictionary-sort-modes/route.ts +5 -2
  982. package/src/modules/customers/api/settings/stuck-threshold/route.ts +5 -2
  983. package/src/modules/customers/api/tags/assign/route.ts +4 -1
  984. package/src/modules/customers/api/tags/unassign/route.ts +4 -1
  985. package/src/modules/customers/api/todos/route.ts +7 -4
  986. package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +6 -3
  987. package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.ts +4 -1
  988. package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.ts +4 -1
  989. package/src/modules/customers/backend/customers/deals/map/components/DealsMapCanvasImpl.tsx +5 -3
  990. package/src/modules/customers/backend/customers/deals/page.tsx +5 -2
  991. package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +6 -3
  992. package/src/modules/customers/commands/deals.ts +4 -1
  993. package/src/modules/customers/commands/dictionaries.ts +4 -1
  994. package/src/modules/customers/commands/interactions.ts +5 -2
  995. package/src/modules/customers/commands/shared.ts +5 -2
  996. package/src/modules/customers/commands/todos.ts +4 -1
  997. package/src/modules/customers/components/DictionarySettings.tsx +6 -3
  998. package/src/modules/customers/components/DictionarySortSettings.tsx +4 -1
  999. package/src/modules/customers/components/detail/ActivitiesCard.tsx +4 -1
  1000. package/src/modules/customers/components/detail/ActivitiesDayStrip.tsx +4 -1
  1001. package/src/modules/customers/components/detail/ActivitiesSection.tsx +7 -4
  1002. package/src/modules/customers/components/detail/ActivityCard.tsx +4 -1
  1003. package/src/modules/customers/components/detail/ChangelogTab.tsx +4 -1
  1004. package/src/modules/customers/components/detail/CompanyCard.tsx +4 -1
  1005. package/src/modules/customers/components/detail/ConfirmDealLostDialog.tsx +4 -1
  1006. package/src/modules/customers/components/detail/EntityTagsDialog.tsx +4 -1
  1007. package/src/modules/customers/components/detail/InlineActivityComposer.tsx +4 -1
  1008. package/src/modules/customers/components/detail/ManageTagsDialog.tsx +4 -1
  1009. package/src/modules/customers/components/detail/RoleAssignmentRow.tsx +6 -3
  1010. package/src/modules/customers/components/detail/RolesSection.tsx +5 -2
  1011. package/src/modules/customers/components/detail/hooks/useInteractionMutations.ts +6 -3
  1012. package/src/modules/customers/components/linking/LinkEntityDialog.tsx +5 -2
  1013. package/src/modules/customers/inbox-actions.ts +4 -1
  1014. package/src/modules/customers/lib/bulkDeals.ts +4 -1
  1015. package/src/modules/customers/lib/dealClosureNotification.ts +5 -2
  1016. package/src/modules/customers/lib/dealStageTransitionTable.ts +4 -1
  1017. package/src/modules/customers/lib/interactionFeatureFlags.ts +5 -1
  1018. package/src/modules/customers/lib/todoCompatibility.ts +4 -1
  1019. package/src/modules/customers/search.ts +15 -7
  1020. package/src/modules/customers/widgets/dashboard/customer-todos/widget.client.tsx +4 -1
  1021. package/src/modules/customers/widgets/dashboard/new-customers/widget.client.tsx +4 -1
  1022. package/src/modules/customers/widgets/dashboard/new-deals/widget.client.tsx +4 -1
  1023. package/src/modules/customers/widgets/dashboard/next-interactions/widget.client.tsx +4 -1
  1024. package/src/modules/dashboards/api/widgets/data/batch/route.ts +4 -1
  1025. package/src/modules/dashboards/api/widgets/data/route.ts +4 -1
  1026. package/src/modules/dashboards/components/WidgetVisibilityEditor.tsx +6 -3
  1027. package/src/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.tsx +4 -1
  1028. package/src/modules/dashboards/widgets/dashboard/new-customers-kpi/widget.client.tsx +4 -1
  1029. package/src/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.tsx +4 -1
  1030. package/src/modules/dashboards/widgets/dashboard/orders-kpi/widget.client.tsx +4 -1
  1031. package/src/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.tsx +4 -1
  1032. package/src/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.tsx +4 -1
  1033. package/src/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.tsx +4 -1
  1034. package/src/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.tsx +4 -1
  1035. package/src/modules/dashboards/widgets/dashboard/top-customers/widget.client.tsx +4 -1
  1036. package/src/modules/dashboards/widgets/dashboard/top-products/widget.client.tsx +4 -1
  1037. package/src/modules/data_sync/api/run.ts +4 -1
  1038. package/src/modules/data_sync/backend/data-sync/runs/[id]/page.tsx +3 -1
  1039. package/src/modules/data_sync/lib/adapter-registry.ts +16 -4
  1040. package/src/modules/data_sync/lib/sync-engine.ts +31 -2
  1041. package/src/modules/data_sync/workers/sync-export.ts +4 -1
  1042. package/src/modules/data_sync/workers/sync-import.ts +4 -1
  1043. package/src/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.ts +5 -2
  1044. package/src/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.ts +4 -1
  1045. package/src/modules/dictionaries/api/[dictionaryId]/entries/route.ts +5 -2
  1046. package/src/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.ts +4 -1
  1047. package/src/modules/dictionaries/api/[dictionaryId]/route.ts +6 -3
  1048. package/src/modules/dictionaries/api/context.ts +4 -1
  1049. package/src/modules/dictionaries/api/route.ts +5 -2
  1050. package/src/modules/dictionaries/components/DictionariesManager.tsx +6 -3
  1051. package/src/modules/dictionaries/components/DictionaryEntriesEditor.tsx +5 -2
  1052. package/src/modules/dictionaries/components/DictionaryEntrySelect.tsx +5 -2
  1053. package/src/modules/dictionaries/components/DictionarySelectControl.tsx +4 -1
  1054. package/src/modules/dictionaries/fields/dictionary.tsx +4 -1
  1055. package/src/modules/directory/api/organization-branding/route.ts +4 -1
  1056. package/src/modules/directory/api/organization-switcher/route.ts +4 -1
  1057. package/src/modules/directory/commands/tenants.ts +6 -3
  1058. package/src/modules/directory/utils/organizationScope.ts +7 -4
  1059. package/src/modules/entities/api/definitions.cache.ts +4 -1
  1060. package/src/modules/entities/api/definitions.ts +8 -5
  1061. package/src/modules/entities/api/records.ts +5 -2
  1062. package/src/modules/entities/components/EncryptionManager.tsx +4 -1
  1063. package/src/modules/entities/lib/makeActivityRoute.ts +4 -1
  1064. package/src/modules/feature_toggles/api/overrides/route.ts +4 -1
  1065. package/src/modules/feature_toggles/lib/feature-flag-check.ts +6 -9
  1066. package/src/modules/inbox_ops/api/emails/[id]/reprocess/route.ts +5 -2
  1067. package/src/modules/inbox_ops/api/emails/[id]/route.ts +5 -2
  1068. package/src/modules/inbox_ops/api/emails/route.ts +4 -1
  1069. package/src/modules/inbox_ops/api/extract/route.ts +4 -1
  1070. package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.ts +4 -1
  1071. package/src/modules/inbox_ops/api/proposals/[id]/replies/[replyId]/send/route.ts +5 -2
  1072. package/src/modules/inbox_ops/api/proposals/counts/route.ts +5 -2
  1073. package/src/modules/inbox_ops/api/proposals/route.ts +4 -1
  1074. package/src/modules/inbox_ops/api/routeHelpers.ts +4 -1
  1075. package/src/modules/inbox_ops/api/settings/route.ts +4 -1
  1076. package/src/modules/inbox_ops/api/webhook/inbound.ts +8 -5
  1077. package/src/modules/inbox_ops/lib/cache.ts +5 -2
  1078. package/src/modules/inbox_ops/lib/catalogLookup.ts +4 -1
  1079. package/src/modules/inbox_ops/lib/eventBus.ts +4 -4
  1080. package/src/modules/inbox_ops/lib/messagesIntegration.ts +5 -8
  1081. package/src/modules/inbox_ops/subscribers/executionAuditor.ts +5 -1
  1082. package/src/modules/inbox_ops/subscribers/extractionWorker.ts +11 -8
  1083. package/src/modules/inbox_ops/subscribers/proposalNotifier.ts +4 -1
  1084. package/src/modules/messages/api/[id]/route.ts +4 -4
  1085. package/src/modules/messages/commands/actions.ts +4 -1
  1086. package/src/modules/messages/components/MessagesInboxPageClient.tsx +4 -1
  1087. package/src/modules/messages/lib/email-sender.ts +4 -7
  1088. package/src/modules/messages/lib/message-objects-registry.ts +4 -1
  1089. package/src/modules/messages/lib/message-types-registry.ts +4 -1
  1090. package/src/modules/messages/workers/send-email.worker.ts +7 -4
  1091. package/src/modules/notifications/lib/notificationMapper.ts +4 -4
  1092. package/src/modules/notifications/lib/notificationService.ts +4 -5
  1093. package/src/modules/notifications/subscribers/deliver-notification.ts +9 -14
  1094. package/src/modules/payment_gateways/api/webhook/[provider]/route.ts +4 -1
  1095. package/src/modules/perspectives/services/perspectiveService.ts +4 -3
  1096. package/src/modules/planner/api/access.ts +4 -3
  1097. package/src/modules/planner/api/availability-date-specific.ts +4 -1
  1098. package/src/modules/planner/api/availability-weekly.ts +4 -1
  1099. package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +5 -2
  1100. package/src/modules/planner/components/AvailabilityRulesEditor.tsx +4 -1
  1101. package/src/modules/progress/api/jobs/route.ts +4 -1
  1102. package/src/modules/query_index/components/QueryIndexesTable.tsx +6 -3
  1103. package/src/modules/query_index/lib/batch.ts +5 -2
  1104. package/src/modules/query_index/lib/coverage.ts +4 -1
  1105. package/src/modules/query_index/lib/engine.ts +14 -17
  1106. package/src/modules/query_index/lib/reindexer.ts +9 -6
  1107. package/src/modules/query_index/lib/search-tokens.ts +4 -2
  1108. package/src/modules/query_index/subscribers/coverage_refresh.ts +4 -1
  1109. package/src/modules/resources/api/comments.ts +4 -1
  1110. package/src/modules/resources/api/resources/tags/assign/route.ts +4 -1
  1111. package/src/modules/resources/api/resources/tags/unassign/route.ts +4 -1
  1112. package/src/modules/resources/backend/resources/resource-types/[id]/edit/page.tsx +4 -1
  1113. package/src/modules/resources/backend/resources/resource-types/page.tsx +5 -2
  1114. package/src/modules/resources/commands/activities.ts +5 -4
  1115. package/src/modules/resources/commands/comments.ts +6 -4
  1116. package/src/modules/resources/commands/shared.ts +36 -0
  1117. package/src/modules/sales/api/channels/route.ts +4 -1
  1118. package/src/modules/sales/api/document-addresses/route.ts +140 -7
  1119. package/src/modules/sales/api/document-history/route.ts +4 -1
  1120. package/src/modules/sales/api/document-numbers/route.ts +4 -1
  1121. package/src/modules/sales/api/quotes/accept/route.ts +5 -2
  1122. package/src/modules/sales/api/quotes/convert/route.ts +4 -1
  1123. package/src/modules/sales/api/quotes/public/[token]/route.ts +4 -1
  1124. package/src/modules/sales/api/quotes/send/route.ts +4 -1
  1125. package/src/modules/sales/api/returns/[id]/route.ts +4 -1
  1126. package/src/modules/sales/api/settings/document-numbers/route.ts +5 -2
  1127. package/src/modules/sales/api/settings/order-editing/route.ts +5 -2
  1128. package/src/modules/sales/backend/sales/channels/[channelId]/edit/page.tsx +4 -1
  1129. package/src/modules/sales/backend/sales/channels/offers/page.tsx +7 -4
  1130. package/src/modules/sales/backend/sales/channels/page.tsx +5 -2
  1131. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +21 -18
  1132. package/src/modules/sales/commands/documentAddresses.ts +8 -0
  1133. package/src/modules/sales/commands/documents.ts +5 -8
  1134. package/src/modules/sales/commands/payments.ts +4 -1
  1135. package/src/modules/sales/commands/shipments.ts +4 -2
  1136. package/src/modules/sales/components/AdjustmentKindSettings.tsx +6 -3
  1137. package/src/modules/sales/components/DocumentNumberSettings.tsx +5 -2
  1138. package/src/modules/sales/components/OrderEditingSettings.tsx +5 -2
  1139. package/src/modules/sales/components/PaymentMethodsSettings.tsx +6 -3
  1140. package/src/modules/sales/components/ShippingMethodsSettings.tsx +6 -3
  1141. package/src/modules/sales/components/StatusSettings.tsx +6 -3
  1142. package/src/modules/sales/components/TaxRatesSettings.tsx +6 -3
  1143. package/src/modules/sales/components/channels/ChannelOfferForm.tsx +17 -14
  1144. package/src/modules/sales/components/channels/SalesChannelOffersPanel.tsx +5 -2
  1145. package/src/modules/sales/components/documents/AddressesSection.tsx +6 -3
  1146. package/src/modules/sales/components/documents/AdjustmentDialog.tsx +4 -1
  1147. package/src/modules/sales/components/documents/AdjustmentsSection.tsx +6 -3
  1148. package/src/modules/sales/components/documents/ItemsSection.tsx +7 -4
  1149. package/src/modules/sales/components/documents/LineItemDialog.tsx +9 -6
  1150. package/src/modules/sales/components/documents/PaymentDialog.tsx +6 -3
  1151. package/src/modules/sales/components/documents/PaymentsSection.tsx +5 -2
  1152. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +15 -12
  1153. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +6 -3
  1154. package/src/modules/sales/components/documents/ShipmentDialog.tsx +10 -7
  1155. package/src/modules/sales/components/documents/ShipmentsSection.tsx +5 -2
  1156. package/src/modules/sales/frontend/quote/[token]/page.tsx +5 -2
  1157. package/src/modules/sales/seed/examples.ts +8 -9
  1158. package/src/modules/sales/subscribers/quote-expiring-notification.ts +4 -1
  1159. package/src/modules/sales/subscribers/reconcileOnAddressDelete.ts +4 -1
  1160. package/src/modules/sales/subscribers/reconcileOnCompanyDelete.ts +4 -1
  1161. package/src/modules/sales/subscribers/reconcileOnCustomerDelete.ts +4 -1
  1162. package/src/modules/sales/widgets/dashboard/makeDashboardWidgetRoute.ts +6 -3
  1163. package/src/modules/sales/widgets/dashboard/new-orders/widget.client.tsx +274 -271
  1164. package/src/modules/sales/widgets/dashboard/new-quotes/widget.client.tsx +280 -277
  1165. package/src/modules/shipping_carriers/api/tracking/route.ts +5 -1
  1166. package/src/modules/shipping_carriers/api/webhook/[provider]/route.ts +4 -1
  1167. package/src/modules/shipping_carriers/lib/shipping-service.ts +47 -22
  1168. package/src/modules/shipping_carriers/lib/upstream-error-response.ts +4 -1
  1169. package/src/modules/shipping_carriers/workers/webhook-processor.ts +4 -5
  1170. package/src/modules/staff/api/comments.ts +4 -1
  1171. package/src/modules/staff/api/leave-requests/accept/route.ts +4 -1
  1172. package/src/modules/staff/api/leave-requests/reject/route.ts +4 -1
  1173. package/src/modules/staff/api/team-members/assignable/route.ts +4 -1
  1174. package/src/modules/staff/api/team-members/self/route.ts +5 -2
  1175. package/src/modules/staff/api/team-members/tags/assign/route.ts +4 -1
  1176. package/src/modules/staff/api/team-members/tags/unassign/route.ts +4 -1
  1177. package/src/modules/staff/api/timesheets/my-projects/[projectId]/route.ts +4 -1
  1178. package/src/modules/staff/api/timesheets/my-projects/route.ts +4 -1
  1179. package/src/modules/staff/api/timesheets/projects/kpis/route.ts +4 -1
  1180. package/src/modules/staff/api/timesheets/time-entries/[id]/segments/route.ts +4 -1
  1181. package/src/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.ts +5 -2
  1182. package/src/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.ts +5 -2
  1183. package/src/modules/staff/api/timesheets/time-entries/bulk/route.ts +4 -1
  1184. package/src/modules/staff/api/timesheets/time-entries/start-timer/route.ts +4 -1
  1185. package/src/modules/staff/backend/staff/team-members/page.tsx +5 -2
  1186. package/src/modules/staff/backend/staff/team-roles/page.tsx +5 -2
  1187. package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +5 -2
  1188. package/src/modules/staff/backend/staff/teams/page.tsx +5 -2
  1189. package/src/modules/staff/backend/staff/timesheets/page.tsx +8 -5
  1190. package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.tsx +4 -1
  1191. package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +5 -2
  1192. package/src/modules/staff/commands/activities.ts +23 -11
  1193. package/src/modules/staff/commands/addresses.ts +20 -11
  1194. package/src/modules/staff/commands/comments.ts +18 -10
  1195. package/src/modules/staff/commands/job-histories.ts +27 -11
  1196. package/src/modules/staff/commands/leave-requests.ts +38 -19
  1197. package/src/modules/staff/commands/shared.ts +38 -0
  1198. package/src/modules/staff/commands/tag-assignments.ts +19 -2
  1199. package/src/modules/staff/commands/team-members.ts +21 -10
  1200. package/src/modules/staff/commands/team-roles.ts +21 -10
  1201. package/src/modules/staff/commands/teams.ts +21 -10
  1202. package/src/modules/staff/commands/timesheets-entries.ts +28 -14
  1203. package/src/modules/staff/commands/timesheets-projects.ts +34 -17
  1204. package/src/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.tsx +4 -1
  1205. package/src/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.tsx +6 -3
  1206. package/src/modules/sync_excel/api/import/route.ts +4 -1
  1207. package/src/modules/translations/api/[entityType]/[entityId]/route.ts +6 -3
  1208. package/src/modules/translations/api/get/locales.ts +4 -1
  1209. package/src/modules/translations/api/put/locales.ts +4 -1
  1210. package/src/modules/translations/components/TranslationManager.tsx +4 -1
  1211. package/src/modules/translations/subscribers/cleanup.ts +4 -1
  1212. package/src/modules/workflows/api/definitions/[id]/customize/route.ts +5 -2
  1213. package/src/modules/workflows/api/definitions/[id]/reset-to-code/route.ts +5 -2
  1214. package/src/modules/workflows/api/definitions/[id]/route.ts +7 -4
  1215. package/src/modules/workflows/api/definitions/route.ts +5 -2
  1216. package/src/modules/workflows/api/events/[id]/route.ts +4 -1
  1217. package/src/modules/workflows/api/events/route.ts +4 -1
  1218. package/src/modules/workflows/api/instances/[id]/advance/route.ts +4 -1
  1219. package/src/modules/workflows/api/instances/[id]/cancel/route.ts +4 -1
  1220. package/src/modules/workflows/api/instances/[id]/events/route.ts +4 -1
  1221. package/src/modules/workflows/api/instances/[id]/retry/route.ts +4 -1
  1222. package/src/modules/workflows/api/instances/[id]/route.ts +4 -1
  1223. package/src/modules/workflows/api/instances/[id]/signal/route.ts +6 -7
  1224. package/src/modules/workflows/api/instances/route.ts +8 -5
  1225. package/src/modules/workflows/api/instances/validate-start/route.ts +4 -1
  1226. package/src/modules/workflows/api/signals/route.ts +4 -1
  1227. package/src/modules/workflows/api/tasks/[id]/claim/route.ts +4 -1
  1228. package/src/modules/workflows/api/tasks/[id]/complete/route.ts +4 -1
  1229. package/src/modules/workflows/api/tasks/[id]/route.ts +4 -1
  1230. package/src/modules/workflows/api/tasks/route.ts +4 -1
  1231. package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +5 -2
  1232. package/src/modules/workflows/backend/instances/[id]/page.tsx +6 -3
  1233. package/src/modules/workflows/backend/tasks/[id]/page.tsx +4 -1
  1234. package/src/modules/workflows/components/BusinessRulesSelector.tsx +6 -3
  1235. package/src/modules/workflows/components/WorkflowSelector.tsx +6 -3
  1236. package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +4 -1
  1237. package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +4 -1
  1238. package/src/modules/workflows/components/fields/WorkflowSelectorField.tsx +4 -1
  1239. package/src/modules/workflows/frontend/checkout-demo/page.tsx +9 -7
  1240. package/src/modules/workflows/lib/activity-executor.ts +26 -21
  1241. package/src/modules/workflows/lib/activity-worker-handler.ts +9 -15
  1242. package/src/modules/workflows/lib/code-registry.ts +8 -7
  1243. package/src/modules/workflows/lib/compensation-handler.ts +5 -2
  1244. package/src/modules/workflows/lib/edgeFormTransforms.ts +4 -1
  1245. package/src/modules/workflows/lib/event-trigger-service.ts +6 -3
  1246. package/src/modules/workflows/lib/nodeFormTransforms.ts +4 -1
  1247. package/src/modules/workflows/lib/seeds.ts +17 -2
  1248. package/src/modules/workflows/lib/signal-handler.ts +4 -1
  1249. package/src/modules/workflows/lib/start-validator.ts +10 -3
  1250. package/src/modules/workflows/lib/step-handler.ts +4 -1
  1251. package/src/modules/workflows/lib/task-handler.ts +4 -1
  1252. package/src/modules/workflows/lib/transition-handler.ts +6 -3
  1253. package/src/modules/workflows/lib/workflow-executor.ts +28 -15
  1254. package/src/modules/workflows/subscribers/event-trigger.ts +22 -24
  1255. package/src/modules/workflows/subscribers/task-assigned-notification.ts +4 -1
  1256. package/src/modules/workflows/workers/workflow-activities.worker.ts +31 -20
@@ -35,6 +35,11 @@ import {
35
35
  ensureTenantScope,
36
36
  extractUndoPayload,
37
37
  scopeForDecryption,
38
+ scopedStaffSnapshotWhere,
39
+ staffSnapshotDecryptionScope,
40
+ staffSnapshotScopeFromContext,
41
+ staffSnapshotScopeFromSnapshot,
42
+ type StaffSnapshotScope,
38
43
  } from './shared'
39
44
 
40
45
  function isUniqueViolation(error: unknown): boolean {
@@ -87,8 +92,14 @@ type TimeProjectMemberUndoPayload = {
87
92
  after?: TimeProjectMemberSnapshot | null
88
93
  }
89
94
 
90
- async function loadTimeProjectSnapshot(em: EntityManager, id: string): Promise<TimeProjectSnapshot | null> {
91
- const project = await findOneWithDecryption(em, StaffTimeProject, { id }, undefined, { tenantId: null, organizationId: null })
95
+ async function loadTimeProjectSnapshot(em: EntityManager, id: string, scope?: StaffSnapshotScope | null): Promise<TimeProjectSnapshot | null> {
96
+ const project = await findOneWithDecryption(
97
+ em,
98
+ StaffTimeProject,
99
+ scopedStaffSnapshotWhere(id, scope),
100
+ undefined,
101
+ staffSnapshotDecryptionScope(scope),
102
+ )
92
103
  if (!project) return null
93
104
  return {
94
105
  id: project.id,
@@ -108,8 +119,14 @@ async function loadTimeProjectSnapshot(em: EntityManager, id: string): Promise<T
108
119
  }
109
120
  }
110
121
 
111
- async function loadTimeProjectMemberSnapshot(em: EntityManager, id: string): Promise<TimeProjectMemberSnapshot | null> {
112
- const member = await findOneWithDecryption(em, StaffTimeProjectMember, { id }, undefined, { tenantId: null, organizationId: null })
122
+ async function loadTimeProjectMemberSnapshot(em: EntityManager, id: string, scope?: StaffSnapshotScope | null): Promise<TimeProjectMemberSnapshot | null> {
123
+ const member = await findOneWithDecryption(
124
+ em,
125
+ StaffTimeProjectMember,
126
+ scopedStaffSnapshotWhere(id, scope),
127
+ undefined,
128
+ staffSnapshotDecryptionScope(scope),
129
+ )
113
130
  if (!member) return null
114
131
  return {
115
132
  id: member.id,
@@ -223,13 +240,13 @@ const createTimeProjectCommand: CommandHandler<StaffTimeProjectCreateInput, { ti
223
240
  },
224
241
  captureAfter: async (_input, result, ctx) => {
225
242
  const em = (ctx.container.resolve('em') as EntityManager).fork()
226
- const snapshot = await loadTimeProjectSnapshot(em, result.timeProjectId)
243
+ const snapshot = await loadTimeProjectSnapshot(em, result.timeProjectId, staffSnapshotScopeFromContext(ctx))
227
244
  if (!snapshot) return null
228
245
  return { snapshot }
229
246
  },
230
247
  buildLog: async ({ result, ctx }) => {
231
248
  const em = (ctx.container.resolve('em') as EntityManager).fork()
232
- const snapshot = await loadTimeProjectSnapshot(em, result.timeProjectId)
249
+ const snapshot = await loadTimeProjectSnapshot(em, result.timeProjectId, staffSnapshotScopeFromContext(ctx))
233
250
  if (!snapshot) return null
234
251
  const { translate } = await resolveTranslations()
235
252
  return {
@@ -251,7 +268,7 @@ const createTimeProjectCommand: CommandHandler<StaffTimeProjectCreateInput, { ti
251
268
  const after = payload?.after
252
269
  if (!after) return
253
270
  const em = (ctx.container.resolve('em') as EntityManager).fork()
254
- const project = await em.findOne(StaffTimeProject, { id: after.id })
271
+ const project = await em.findOne(StaffTimeProject, scopedStaffSnapshotWhere(after.id, staffSnapshotScopeFromSnapshot(after)))
255
272
  if (project) {
256
273
  project.deletedAt = new Date()
257
274
  await em.flush()
@@ -284,7 +301,7 @@ const updateTimeProjectCommand: CommandHandler<StaffTimeProjectUpdateInput, { ti
284
301
  async prepare(rawInput, ctx) {
285
302
  const parsed = staffTimeProjectUpdateSchema.parse(rawInput)
286
303
  const em = (ctx.container.resolve('em') as EntityManager)
287
- const snapshot = await loadTimeProjectSnapshot(em, parsed.id)
304
+ const snapshot = await loadTimeProjectSnapshot(em, parsed.id, staffSnapshotScopeFromContext(ctx))
288
305
  if (!snapshot) return {}
289
306
  return { before: snapshot }
290
307
  },
@@ -346,7 +363,7 @@ const updateTimeProjectCommand: CommandHandler<StaffTimeProjectUpdateInput, { ti
346
363
  const before = snapshots.before as TimeProjectSnapshot | undefined
347
364
  if (!before) return null
348
365
  const em = (ctx.container.resolve('em') as EntityManager).fork()
349
- const after = await loadTimeProjectSnapshot(em, before.id)
366
+ const after = await loadTimeProjectSnapshot(em, before.id, staffSnapshotScopeFromSnapshot(before))
350
367
  if (!after) return null
351
368
  const changes = buildChanges(before as unknown as Record<string, unknown>, after as unknown as Record<string, unknown>, [
352
369
  'name',
@@ -384,7 +401,7 @@ const updateTimeProjectCommand: CommandHandler<StaffTimeProjectUpdateInput, { ti
384
401
  const before = payload?.before
385
402
  if (!before) return
386
403
  const em = (ctx.container.resolve('em') as EntityManager).fork()
387
- const project = await em.findOne(StaffTimeProject, { id: before.id })
404
+ const project = await em.findOne(StaffTimeProject, scopedStaffSnapshotWhere(before.id, staffSnapshotScopeFromSnapshot(before)))
388
405
  if (!project) return
389
406
  project.name = before.name
390
407
  project.customerId = before.customerId ?? null
@@ -421,7 +438,7 @@ const deleteTimeProjectCommand: CommandHandler<{ id?: string }, { timeProjectId:
421
438
  const id = input?.id
422
439
  if (!id) throw new CrudHttpError(400, { error: 'Time project id is required.' })
423
440
  const em = (ctx.container.resolve('em') as EntityManager)
424
- const snapshot = await loadTimeProjectSnapshot(em, id)
441
+ const snapshot = await loadTimeProjectSnapshot(em, id, staffSnapshotScopeFromContext(ctx))
425
442
  if (!snapshot) return {}
426
443
  return { before: snapshot }
427
444
  },
@@ -482,7 +499,7 @@ const deleteTimeProjectCommand: CommandHandler<{ id?: string }, { timeProjectId:
482
499
  const before = payload?.before
483
500
  if (!before) return
484
501
  const em = (ctx.container.resolve('em') as EntityManager).fork()
485
- let project = await em.findOne(StaffTimeProject, { id: before.id })
502
+ let project = await em.findOne(StaffTimeProject, scopedStaffSnapshotWhere(before.id, staffSnapshotScopeFromSnapshot(before)))
486
503
  if (!project) {
487
504
  project = em.create(StaffTimeProject, {
488
505
  id: before.id,
@@ -604,13 +621,13 @@ const assignTimeProjectMemberCommand: CommandHandler<StaffTimeProjectMemberAssig
604
621
  },
605
622
  captureAfter: async (_input, result, ctx) => {
606
623
  const em = (ctx.container.resolve('em') as EntityManager).fork()
607
- const snapshot = await loadTimeProjectMemberSnapshot(em, result.timeProjectMemberId)
624
+ const snapshot = await loadTimeProjectMemberSnapshot(em, result.timeProjectMemberId, staffSnapshotScopeFromContext(ctx))
608
625
  if (!snapshot) return null
609
626
  return { snapshot }
610
627
  },
611
628
  buildLog: async ({ result, ctx }) => {
612
629
  const em = (ctx.container.resolve('em') as EntityManager).fork()
613
- const snapshot = await loadTimeProjectMemberSnapshot(em, result.timeProjectMemberId)
630
+ const snapshot = await loadTimeProjectMemberSnapshot(em, result.timeProjectMemberId, staffSnapshotScopeFromContext(ctx))
614
631
  if (!snapshot) return null
615
632
  const { translate } = await resolveTranslations()
616
633
  return {
@@ -632,7 +649,7 @@ const assignTimeProjectMemberCommand: CommandHandler<StaffTimeProjectMemberAssig
632
649
  const after = payload?.after
633
650
  if (!after) return
634
651
  const em = (ctx.container.resolve('em') as EntityManager).fork()
635
- const member = await em.findOne(StaffTimeProjectMember, { id: after.id })
652
+ const member = await em.findOne(StaffTimeProjectMember, scopedStaffSnapshotWhere(after.id, staffSnapshotScopeFromSnapshot(after)))
636
653
  if (member) {
637
654
  member.deletedAt = new Date()
638
655
  await em.flush()
@@ -662,7 +679,7 @@ const unassignTimeProjectMemberCommand: CommandHandler<{ id?: string }, { timePr
662
679
  const id = input?.id
663
680
  if (!id) throw new CrudHttpError(400, { error: 'Time project member id is required.' })
664
681
  const em = (ctx.container.resolve('em') as EntityManager)
665
- const snapshot = await loadTimeProjectMemberSnapshot(em, id)
682
+ const snapshot = await loadTimeProjectMemberSnapshot(em, id, staffSnapshotScopeFromContext(ctx))
666
683
  if (!snapshot) return {}
667
684
  return { before: snapshot }
668
685
  },
@@ -720,7 +737,7 @@ const unassignTimeProjectMemberCommand: CommandHandler<{ id?: string }, { timePr
720
737
  const before = payload?.before
721
738
  if (!before) return
722
739
  const em = (ctx.container.resolve('em') as EntityManager).fork()
723
- let member = await em.findOne(StaffTimeProjectMember, { id: before.id })
740
+ let member = await em.findOne(StaffTimeProjectMember, scopedStaffSnapshotWhere(before.id, staffSnapshotScopeFromSnapshot(before)))
724
741
  if (!member) {
725
742
  member = em.create(StaffTimeProjectMember, {
726
743
  id: before.id,
@@ -10,6 +10,9 @@ import {
10
10
  type DateRangePreset,
11
11
  } from '@open-mercato/ui/backend/date-range'
12
12
  import { DEFAULT_SETTINGS, hydrateSettings, type HoursByProjectSettings } from './config'
13
+ import { createLogger } from '@open-mercato/shared/lib/logger'
14
+
15
+ const logger = createLogger('staff')
13
16
 
14
17
  type WidgetDataItem = { groupKey: string; groupLabel?: string; value: number | null }
15
18
  type WidgetDataResponse = {
@@ -69,7 +72,7 @@ const HoursByProjectWidget: React.FC<DashboardWidgetComponentProps<HoursByProjec
69
72
  setData(sorted)
70
73
  setTotalMinutes(sorted.reduce((sum, item) => sum + (item.value ?? 0), 0))
71
74
  } catch (err) {
72
- console.error('staff.timesheets.hoursByProject', err)
75
+ logger.error('staff.timesheets.hoursByProject', { err })
73
76
  setError(t('staff.timesheets.widgets.hoursByProject.error', 'Failed to load data'))
74
77
  } finally {
75
78
  setLoading(false)
@@ -11,6 +11,9 @@ import { useGuardedMutation } from '@open-mercato/ui/backend/injection/useGuarde
11
11
  import { startTimerEntry } from '../../../lib/timesheets-ui/startTimer'
12
12
  import { resolveTimerActionError } from '../../../lib/timesheets-ui/timerErrors'
13
13
  import { DEFAULT_SETTINGS, hydrateSettings, type TimeReportingSettings } from './config'
14
+ import { createLogger } from '@open-mercato/shared/lib/logger'
15
+
16
+ const logger = createLogger('staff')
14
17
 
15
18
  type ProjectOption = { id: string; name: string; code: string | null }
16
19
 
@@ -102,7 +105,7 @@ const TimeReportingWidget: React.FC<DashboardWidgetComponentProps<TimeReportingS
102
105
  }
103
106
 
104
107
  } catch (err) {
105
- console.error('staff.timesheets.timeReporting.load', err)
108
+ logger.error('staff.timesheets.timeReporting.load', { err })
106
109
  setError(t('staff.timesheets.widgets.timeReporting.error', 'Failed to load timer state'))
107
110
  } finally {
108
111
  setLoading(false)
@@ -164,7 +167,7 @@ const TimeReportingWidget: React.FC<DashboardWidgetComponentProps<TimeReportingS
164
167
  onSettingsChange({ ...hydrated, lastProjectId: selectedProjectId })
165
168
  await refreshActiveTimer()
166
169
  } catch (err) {
167
- console.error('staff.timesheets.timeReporting.start', err)
170
+ logger.error('staff.timesheets.timeReporting.start', { err })
168
171
  setError(resolveTimerActionError(err, t('staff.timesheets.widgets.timeReporting.startError', 'Failed to start timer')))
169
172
  } finally {
170
173
  setActionLoading(false)
@@ -195,7 +198,7 @@ const TimeReportingWidget: React.FC<DashboardWidgetComponentProps<TimeReportingS
195
198
  })
196
199
  await refreshActiveTimer()
197
200
  } catch (err) {
198
- console.error('staff.timesheets.timeReporting.stop', err)
201
+ logger.error('staff.timesheets.timeReporting.stop', { err })
199
202
  setError(resolveTimerActionError(err, t('staff.timesheets.widgets.timeReporting.stopError', 'Failed to stop timer')))
200
203
  } finally {
201
204
  setActionLoading(false)
@@ -19,6 +19,9 @@ import {
19
19
  syncExcelImportResponseSchema,
20
20
  } from '../../data/validators'
21
21
  import { resolveSyncExcelConcreteScope } from '../../lib/scope'
22
+ import { createLogger } from '@open-mercato/shared/lib/logger'
23
+
24
+ const logger = createLogger('sync_excel').child({ component: 'import' })
22
25
 
23
26
  export const metadata = {
24
27
  POST: { requireAuth: true, requireFeatures: ['sync_excel.run'] },
@@ -188,7 +191,7 @@ export async function POST(request: Request) {
188
191
  } catch (error) {
189
192
  const message = error instanceof Error ? error.message : String(error)
190
193
  const stack = error instanceof Error ? error.stack : undefined
191
- console.error('[sync_excel.import] unhandled error', { message, stack })
194
+ logger.error('Unhandled error starting import', { message, stack })
192
195
  return NextResponse.json(
193
196
  { error: 'Failed to start sync_excel import.' },
194
197
  { status: 500 },
@@ -12,6 +12,9 @@ import { CommandBus } from '@open-mercato/shared/lib/commands'
12
12
  import { serializeOperationMetadata } from '@open-mercato/shared/lib/commands/operationMetadata'
13
13
  import { enforceCommandOptimisticLockWithGuards } from '@open-mercato/shared/lib/crud/optimistic-lock-command'
14
14
  import type { OpenApiMethodDoc, OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'
15
+ import { createLogger } from '@open-mercato/shared/lib/logger'
16
+
17
+ const logger = createLogger('translations').child({ component: 'entity-translations' })
15
18
 
16
19
  const TRANSLATION_RESOURCE_KIND = 'translations.translation'
17
20
 
@@ -95,7 +98,7 @@ export async function GET(req: Request, ctx: { params?: { entityType?: string; e
95
98
  if (err instanceof z.ZodError) {
96
99
  return NextResponse.json({ error: 'Invalid parameters', details: err.issues }, { status: 400 })
97
100
  }
98
- console.error('[translations/:entityType/:entityId.GET] Unexpected error', err)
101
+ logger.error('Failed to load translations', { err })
99
102
  return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
100
103
  }
101
104
  }
@@ -226,7 +229,7 @@ export async function PUT(req: Request, ctx: { params?: { entityType?: string; e
226
229
  if (err instanceof z.ZodError) {
227
230
  return NextResponse.json({ error: 'Validation failed', details: err.issues }, { status: 400 })
228
231
  }
229
- console.error('[translations/:entityType/:entityId.PUT] Unexpected error', err)
232
+ logger.error('Failed to save translations', { err })
230
233
  return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
231
234
  }
232
235
  }
@@ -331,7 +334,7 @@ export async function DELETE(req: Request, ctx: { params?: { entityType?: string
331
334
  if (err instanceof z.ZodError) {
332
335
  return NextResponse.json({ error: 'Invalid parameters', details: err.issues }, { status: 400 })
333
336
  }
334
- console.error('[translations/:entityType/:entityId.DELETE] Unexpected error', err)
337
+ logger.error('Failed to delete translations', { err })
335
338
  return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
336
339
  }
337
340
  }
@@ -5,6 +5,9 @@ import { CrudHttpError, isCrudHttpError } from '@open-mercato/shared/lib/crud/er
5
5
  import { locales as defaultLocales } from '@open-mercato/shared/lib/i18n/config'
6
6
  import type { ModuleConfigService } from '@open-mercato/core/modules/configs/lib/module-config-service'
7
7
  import type { OpenApiMethodDoc, OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'
8
+ import { createLogger } from '@open-mercato/shared/lib/logger'
9
+
10
+ const logger = createLogger('translations').child({ component: 'locales' })
8
11
 
9
12
  export const metadata = {
10
13
  path: '/translations/locales',
@@ -26,7 +29,7 @@ async function GET(req: Request) {
26
29
  if (isCrudHttpError(err)) {
27
30
  return NextResponse.json(err.body, { status: err.status })
28
31
  }
29
- console.error('[translations/locales.GET] Unexpected error', err)
32
+ logger.error('Failed to load locales', { err })
30
33
  return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
31
34
  }
32
35
  }
@@ -9,6 +9,9 @@ import {
9
9
  import { isValidIso639 } from '@open-mercato/shared/lib/i18n/iso639'
10
10
  import type { ModuleConfigService } from '@open-mercato/core/modules/configs/lib/module-config-service'
11
11
  import type { OpenApiMethodDoc, OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'
12
+ import { createLogger } from '@open-mercato/shared/lib/logger'
13
+
14
+ const logger = createLogger('translations').child({ component: 'locales' })
12
15
 
13
16
  const bodySchema = z.object({
14
17
  locales: z.array(
@@ -68,7 +71,7 @@ async function PUT(req: Request) {
68
71
  if (err instanceof z.ZodError) {
69
72
  return NextResponse.json({ error: 'Invalid request', details: err.issues }, { status: 400 })
70
73
  }
71
- console.error('[translations/locales.PUT] Unexpected error', err)
74
+ logger.error('Failed to update locales', { err })
72
75
  return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
73
76
  }
74
77
  }
@@ -22,6 +22,9 @@ import { ISO_639_1, isValidIso639, getIso639Label } from '@open-mercato/shared/l
22
22
  import { formatEntityLabel, buildEntityListUrl, getRecordLabel, resolveBaseValue } from '../lib/helpers'
23
23
  import { resolveFieldList } from '../lib/resolve-field-list'
24
24
  import type { ResolvedField } from '../lib/resolve-field-list'
25
+ import { createLogger } from '@open-mercato/shared/lib/logger'
26
+
27
+ const logger = createLogger('translations').child({ component: 'TranslationManager' })
25
28
 
26
29
  const TRANSLATION_MUTATION_CONTEXT_ID = 'translations.entity-translations'
27
30
  const SUPPORTED_LOCALES_MUTATION_CONTEXT_ID = 'translations.supported-locales'
@@ -264,7 +267,7 @@ export function TranslationManager({
264
267
  if (hasValues) body[locale] = localeFields
265
268
  }
266
269
  if (Object.keys(body).length === 0) {
267
- console.warn('[translations] Save skipped: payload is empty — no locale contains any non-empty field')
270
+ logger.warn('Save skipped: payload is empty — no locale contains any non-empty field')
268
271
  throw new Error(t('translations.manager.errors.nothingToSave', 'Nothing to save — enter a translation first'))
269
272
  }
270
273
  return runMutation({
@@ -1,4 +1,7 @@
1
1
  import { type Kysely, sql } from 'kysely'
2
+ import { createLogger } from '@open-mercato/shared/lib/logger'
3
+
4
+ const logger = createLogger('translations').child({ component: 'cleanup' })
2
5
 
3
6
  export const metadata = { event: 'query_index.delete_one', persistent: false }
4
7
 
@@ -24,6 +27,6 @@ export default async function handle(
24
27
  .where(sql<boolean>`organization_id is not distinct from ${organizationId}`)
25
28
  .execute()
26
29
  } catch (err) {
27
- console.warn('[translations/cleanup] Failed to delete translations:', err instanceof Error ? err.message : 'unknown')
30
+ logger.warn('Failed to delete translations', { err })
28
31
  }
29
32
  }
@@ -17,6 +17,9 @@ import { validateCrudMutationGuard, runCrudMutationGuardAfterSuccess } from '@op
17
17
  import { WorkflowDefinition } from '../../../../data/entities'
18
18
  import { serializeWorkflowDefinition } from '../../serialize'
19
19
  import { getCodeWorkflow } from '../../../../lib/code-registry'
20
+ import { createLogger } from '@open-mercato/shared/lib/logger'
21
+
22
+ const logger = createLogger('workflows')
20
23
 
21
24
  export const metadata = {
22
25
  requireAuth: true,
@@ -145,7 +148,7 @@ export async function POST(request: NextRequest, context: RouteContext) {
145
148
  )
146
149
  }
147
150
  } catch (eventError) {
148
- console.error('Failed to emit workflows.definition.customized event:', eventError)
151
+ logger.error('Failed to emit workflows.definition.customized event', { err: eventError })
149
152
  }
150
153
 
151
154
  return NextResponse.json({
@@ -153,7 +156,7 @@ export async function POST(request: NextRequest, context: RouteContext) {
153
156
  message: 'Workflow definition customized successfully',
154
157
  })
155
158
  } catch (error) {
156
- console.error('Error customizing workflow definition:', error)
159
+ logger.error('Error customizing workflow definition', { err: error })
157
160
  return NextResponse.json({ error: 'Failed to customize workflow definition' }, { status: 500 })
158
161
  }
159
162
  }
@@ -16,6 +16,9 @@ import { validateCrudMutationGuard, runCrudMutationGuardAfterSuccess } from '@op
16
16
  import { WorkflowDefinition, WorkflowInstance } from '../../../../data/entities'
17
17
  import { serializeCodeWorkflowDefinition } from '../../serialize'
18
18
  import { getCodeWorkflow } from '../../../../lib/code-registry'
19
+ import { createLogger } from '@open-mercato/shared/lib/logger'
20
+
21
+ const logger = createLogger('workflows')
19
22
 
20
23
  export const metadata = {
21
24
  requireAuth: true,
@@ -174,7 +177,7 @@ export async function POST(
174
177
  )
175
178
  }
176
179
  } catch (eventError) {
177
- console.error('Failed to emit workflows.definition.reset_to_code event:', eventError)
180
+ logger.error('Failed to emit workflows.definition.reset_to_code event', { err: eventError })
178
181
  }
179
182
 
180
183
  if (!codeDef) {
@@ -191,7 +194,7 @@ export async function POST(
191
194
  message: 'Workflow definition reset to code version',
192
195
  })
193
196
  } catch (error) {
194
- console.error('Error resetting workflow definition to code:', error)
197
+ logger.error('Error resetting workflow definition to code', { err: error })
195
198
  return NextResponse.json(
196
199
  { error: 'Failed to reset workflow definition to code' },
197
200
  { status: 500 }
@@ -26,6 +26,9 @@ import { registerOptimisticLockReaderIfAbsent } from '@open-mercato/shared/lib/c
26
26
  import { validateCrudMutationGuard, runCrudMutationGuardAfterSuccess } from '@open-mercato/shared/lib/crud/mutation-guard'
27
27
  import { enforceCommandOptimisticLockWithGuards } from '@open-mercato/shared/lib/crud/optimistic-lock-command'
28
28
  import { isCrudHttpError } from '@open-mercato/shared/lib/crud/errors'
29
+ import { createLogger } from '@open-mercato/shared/lib/logger'
30
+
31
+ const logger = createLogger('workflows')
29
32
 
30
33
  registerOptimisticLockReaderIfAbsent({
31
34
  'workflows.definition': createGenericOptimisticLockReader({
@@ -102,7 +105,7 @@ export async function GET(
102
105
 
103
106
  return NextResponse.json({ data: serializeWorkflowDefinition(definition) })
104
107
  } catch (error) {
105
- console.error('Error getting workflow definition:', error)
108
+ logger.error('Error getting workflow definition', { err: error })
106
109
  return NextResponse.json(
107
110
  { error: 'Failed to get workflow definition' },
108
111
  { status: 500 }
@@ -269,7 +272,7 @@ export async function PUT(
269
272
  )
270
273
  }
271
274
  } catch (eventError) {
272
- console.error('Failed to emit workflows.definition.customized event:', eventError)
275
+ logger.error('Failed to emit workflows.definition.customized event', { err: eventError })
273
276
  }
274
277
 
275
278
  if (guardResult?.shouldRunAfterSuccess) {
@@ -376,7 +379,7 @@ export async function PUT(
376
379
  message: 'Workflow definition updated successfully',
377
380
  })
378
381
  } catch (error) {
379
- console.error('Error updating workflow definition:', error)
382
+ logger.error('Error updating workflow definition', { err: error })
380
383
  return NextResponse.json(
381
384
  { error: 'Failed to update workflow definition' },
382
385
  { status: 500 }
@@ -496,7 +499,7 @@ export async function DELETE(
496
499
  message: 'Workflow definition deleted successfully',
497
500
  })
498
501
  } catch (error) {
499
- console.error('Error deleting workflow definition:', error)
502
+ logger.error('Error deleting workflow definition', { err: error })
500
503
  return NextResponse.json(
501
504
  { error: 'Failed to delete workflow definition' },
502
505
  { status: 500 }
@@ -21,6 +21,9 @@ import {
21
21
  import { serializeWorkflowDefinition, serializeCodeWorkflowDefinition } from './serialize'
22
22
  import { invalidateTriggerCache } from '../../lib/event-trigger-service'
23
23
  import { getAllCodeWorkflows } from '../../lib/code-registry'
24
+ import { createLogger } from '@open-mercato/shared/lib/logger'
25
+
26
+ const logger = createLogger('workflows')
24
27
 
25
28
  export const metadata = {
26
29
  requireAuth: true,
@@ -162,7 +165,7 @@ export async function GET(request: NextRequest) {
162
165
  },
163
166
  })
164
167
  } catch (error) {
165
- console.error('Error listing workflow definitions:', error)
168
+ logger.error('Error listing workflow definitions', { err: error })
166
169
  return NextResponse.json(
167
170
  { error: 'Failed to list workflow definitions' },
168
171
  { status: 500 }
@@ -275,7 +278,7 @@ export async function POST(request: NextRequest) {
275
278
  )
276
279
  }
277
280
 
278
- console.error('Error creating workflow definition:', error)
281
+ logger.error('Error creating workflow definition', { err: error })
279
282
  return NextResponse.json(
280
283
  { error: 'Failed to create workflow definition' },
281
284
  { status: 500 }
@@ -14,6 +14,9 @@ import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/direc
14
14
  import type { EntityManager } from '@mikro-orm/postgresql'
15
15
  import { WorkflowEvent, WorkflowInstance } from '../../../data/entities'
16
16
  import { workflowEventDetailSchema } from '../../openapi'
17
+ import { createLogger } from '@open-mercato/shared/lib/logger'
18
+
19
+ const logger = createLogger('workflows')
17
20
 
18
21
  export const metadata = {
19
22
  requireAuth: true,
@@ -118,7 +121,7 @@ export async function GET(request: NextRequest, context: RouteContext) {
118
121
 
119
122
  return NextResponse.json(response)
120
123
  } catch (error) {
121
- console.error('Error getting workflow event:', error)
124
+ logger.error('Error getting workflow event', { err: error })
122
125
  return NextResponse.json(
123
126
  { error: 'Failed to get workflow event' },
124
127
  { status: 500 }
@@ -14,6 +14,9 @@ import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/direc
14
14
  import type { EntityManager } from '@mikro-orm/postgresql'
15
15
  import { WorkflowEvent, WorkflowInstance } from '../../data/entities'
16
16
  import { workflowEventListItemSchema } from '../openapi'
17
+ import { createLogger } from '@open-mercato/shared/lib/logger'
18
+
19
+ const logger = createLogger('workflows')
17
20
 
18
21
  export const metadata = {
19
22
  requireAuth: true,
@@ -155,7 +158,7 @@ export async function GET(request: NextRequest) {
155
158
  totalPages,
156
159
  })
157
160
  } catch (error) {
158
- console.error('Error getting workflow events:', error)
161
+ logger.error('Error getting workflow events', { err: error })
159
162
  return NextResponse.json(
160
163
  { error: 'Failed to get workflow events' },
161
164
  { status: 500 }
@@ -26,6 +26,9 @@ import {
26
26
  advanceWorkflowResponseSchema,
27
27
  workflowErrorSchema,
28
28
  } from '../../../openapi'
29
+ import { createLogger } from '@open-mercato/shared/lib/logger'
30
+
31
+ const logger = createLogger('workflows')
29
32
 
30
33
  // Validation schema
31
34
  const advanceWorkflowSchema = z.object({
@@ -261,7 +264,7 @@ export async function POST(request: NextRequest, context: RouteContext) {
261
264
  { status: 200 }
262
265
  )
263
266
  } catch (error) {
264
- console.error('Error advancing workflow:', error)
267
+ logger.error('Error advancing workflow', { err: error })
265
268
 
266
269
  if (error instanceof Error) {
267
270
  return NextResponse.json(
@@ -13,6 +13,9 @@ import { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/d
13
13
  import { WorkflowInstance } from '../../../../data/entities'
14
14
  import * as workflowExecutor from '../../../../lib/workflow-executor'
15
15
  import { workflowInstanceResponseSchema } from '../../../openapi'
16
+ import { createLogger } from '@open-mercato/shared/lib/logger'
17
+
18
+ const logger = createLogger('workflows')
16
19
 
17
20
  export const metadata = {
18
21
  requireAuth: true,
@@ -107,7 +110,7 @@ export async function POST(
107
110
  message: 'Workflow cancelled successfully',
108
111
  })
109
112
  } catch (error) {
110
- console.error('Error cancelling workflow instance:', error)
113
+ logger.error('Error cancelling workflow instance', { err: error })
111
114
  return NextResponse.json(
112
115
  { error: 'Failed to cancel workflow instance' },
113
116
  { status: 500 }
@@ -13,6 +13,9 @@ import { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/d
13
13
  import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/directory/utils/organizationScopeFilter'
14
14
  import { WorkflowInstance, WorkflowEvent } from '../../../../data/entities'
15
15
  import { workflowEventRowSchema, paginationSchema } from '../../../openapi'
16
+ import { createLogger } from '@open-mercato/shared/lib/logger'
17
+
18
+ const logger = createLogger('workflows')
16
19
 
17
20
  export const metadata = {
18
21
  requireAuth: true,
@@ -105,7 +108,7 @@ export async function GET(
105
108
  },
106
109
  })
107
110
  } catch (error) {
108
- console.error('Error getting workflow events:', error)
111
+ logger.error('Error getting workflow events', { err: error })
109
112
  return NextResponse.json(
110
113
  { error: 'Failed to get workflow events' },
111
114
  { status: 500 }
@@ -14,6 +14,9 @@ import { findOneWithDecryption } from '@open-mercato/shared/lib/encryption/find'
14
14
  import { WorkflowInstance } from '../../../../data/entities'
15
15
  import * as workflowExecutor from '../../../../lib/workflow-executor'
16
16
  import { workflowInstanceResponseSchema, workflowExecutionResultSchema } from '../../../openapi'
17
+ import { createLogger } from '@open-mercato/shared/lib/logger'
18
+
19
+ const logger = createLogger('workflows')
17
20
 
18
21
  export const metadata = {
19
22
  requireAuth: true,
@@ -130,7 +133,7 @@ export async function POST(
130
133
  message: 'Workflow retry initiated successfully',
131
134
  })
132
135
  } catch (error) {
133
- console.error('Error retrying workflow instance:', error)
136
+ logger.error('Error retrying workflow instance', { err: error })
134
137
 
135
138
  // Handle specific errors
136
139
  if (error instanceof workflowExecutor.WorkflowExecutionError) {
@@ -16,6 +16,9 @@ import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/direc
16
16
  import { WorkflowInstance } from '../../../data/entities'
17
17
  import * as workflowExecutor from '../../../lib/workflow-executor'
18
18
  import { workflowInstanceResponseSchema } from '../../openapi'
19
+ import { createLogger } from '@open-mercato/shared/lib/logger'
20
+
21
+ const logger = createLogger('workflows')
19
22
 
20
23
  export const metadata = {
21
24
  requireAuth: true,
@@ -73,7 +76,7 @@ export async function GET(
73
76
 
74
77
  return NextResponse.json({ data: instance })
75
78
  } catch (error) {
76
- console.error('Error getting workflow instance:', error)
79
+ logger.error('Error getting workflow instance', { err: error })
77
80
  return NextResponse.json(
78
81
  { error: 'Failed to get workflow instance' },
79
82
  { status: 500 }
@@ -11,6 +11,9 @@ import {
11
11
  sendSignalResponseSchema,
12
12
  workflowErrorSchema,
13
13
  } from '../../../openapi'
14
+ import { createLogger } from '@open-mercato/shared/lib/logger'
15
+
16
+ const logger = createLogger('workflows')
14
17
 
15
18
  export const metadata = {
16
19
  requireAuth: true,
@@ -56,7 +59,8 @@ export async function POST(request: NextRequest, context: RouteContext) {
56
59
  )
57
60
  }
58
61
 
59
- console.log('[Signal API] Auth context:', {
62
+ logger.debug('Signal auth context resolved', {
63
+ component: 'signal',
60
64
  userId: auth.sub,
61
65
  tenantId,
62
66
  organizationId,
@@ -92,12 +96,7 @@ export async function POST(request: NextRequest, context: RouteContext) {
92
96
  message: 'Signal sent successfully',
93
97
  })
94
98
  } catch (error: any) {
95
- console.error('[Signal API] Error occurred:', {
96
- name: error.name,
97
- message: error.message,
98
- code: error.code,
99
- stack: error.stack,
100
- })
99
+ logger.error('Signal request failed', { component: 'signal', err: error })
101
100
 
102
101
  // Handle Zod validation errors
103
102
  if (error.name === 'ZodError') {