@open-mercato/core 0.6.8-develop.6984.1.f0cf23f0f6 → 0.6.8-develop.6985.1.fb93574faa

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 (597) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/dist/generated/entities/notification/index.js +6 -0
  3. package/dist/generated/entities/notification/index.js.map +2 -2
  4. package/dist/generated/entities/notification_preference/index.js +19 -0
  5. package/dist/generated/entities/notification_preference/index.js.map +7 -0
  6. package/dist/generated/entities/notification_type/index.js +21 -0
  7. package/dist/generated/entities/notification_type/index.js.map +7 -0
  8. package/dist/generated/entities/notification_type_override/index.js +17 -0
  9. package/dist/generated/entities/notification_type_override/index.js.map +7 -0
  10. package/dist/generated/entities/push_notification_delivery/index.js +41 -0
  11. package/dist/generated/entities/push_notification_delivery/index.js.map +7 -0
  12. package/dist/generated/entities/user_device/index.js +35 -0
  13. package/dist/generated/entities/user_device/index.js.map +7 -0
  14. package/dist/generated/entities.ids.generated.js +12 -1
  15. package/dist/generated/entities.ids.generated.js.map +2 -2
  16. package/dist/generated/entity-fields-registry.js +72 -0
  17. package/dist/generated/entity-fields-registry.js.map +2 -2
  18. package/dist/helpers/integration/api.js +2 -1
  19. package/dist/helpers/integration/api.js.map +2 -2
  20. package/dist/helpers/integration/appRoot.js +9 -0
  21. package/dist/helpers/integration/appRoot.js.map +7 -0
  22. package/dist/helpers/integration/dbFixtures.js +1 -4
  23. package/dist/helpers/integration/dbFixtures.js.map +2 -2
  24. package/dist/helpers/integration/pushFake.js +126 -0
  25. package/dist/helpers/integration/pushFake.js.map +7 -0
  26. package/dist/modules/auth/notifications.js +16 -0
  27. package/dist/modules/auth/notifications.js.map +2 -2
  28. package/dist/modules/business_rules/notifications.js +2 -0
  29. package/dist/modules/business_rules/notifications.js.map +2 -2
  30. package/dist/modules/catalog/notifications.js +2 -0
  31. package/dist/modules/catalog/notifications.js.map +2 -2
  32. package/dist/modules/communication_channels/acl.js +9 -0
  33. package/dist/modules/communication_channels/acl.js.map +2 -2
  34. package/dist/modules/communication_channels/api/delete/admin/channels/[id]/route.js +133 -0
  35. package/dist/modules/communication_channels/api/delete/admin/channels/[id]/route.js.map +7 -0
  36. package/dist/modules/communication_channels/api/get/channels/[id]/health/route.js +6 -2
  37. package/dist/modules/communication_channels/api/get/channels/[id]/health/route.js.map +2 -2
  38. package/dist/modules/communication_channels/api/get/channels/[id]/route.js +6 -2
  39. package/dist/modules/communication_channels/api/get/channels/[id]/route.js.map +2 -2
  40. package/dist/modules/communication_channels/api/get/channels/route.js +2 -1
  41. package/dist/modules/communication_channels/api/get/channels/route.js.map +2 -2
  42. package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js +10 -5
  43. package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js.map +2 -2
  44. package/dist/modules/communication_channels/api/post/channels/connect/credentials/route.js +29 -1
  45. package/dist/modules/communication_channels/api/post/channels/connect/credentials/route.js.map +2 -2
  46. package/dist/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.js +157 -0
  47. package/dist/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.js.map +7 -0
  48. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +8 -1
  49. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
  50. package/dist/modules/communication_channels/commands/admin-delete-channel.js +141 -0
  51. package/dist/modules/communication_channels/commands/admin-delete-channel.js.map +7 -0
  52. package/dist/modules/communication_channels/commands/connect-credential-channel.js +25 -8
  53. package/dist/modules/communication_channels/commands/connect-credential-channel.js.map +2 -2
  54. package/dist/modules/communication_channels/commands/deliver-outbound-message.js +2 -2
  55. package/dist/modules/communication_channels/commands/deliver-outbound-message.js.map +2 -2
  56. package/dist/modules/communication_channels/commands/push-register.js +1 -1
  57. package/dist/modules/communication_channels/commands/push-register.js.map +2 -2
  58. package/dist/modules/communication_channels/commands/push-unregister.js +4 -3
  59. package/dist/modules/communication_channels/commands/push-unregister.js.map +2 -2
  60. package/dist/modules/communication_channels/data/entities.js +4 -0
  61. package/dist/modules/communication_channels/data/entities.js.map +2 -2
  62. package/dist/modules/communication_channels/data/validators.js +2 -1
  63. package/dist/modules/communication_channels/data/validators.js.map +2 -2
  64. package/dist/modules/communication_channels/lib/access-control.js +11 -1
  65. package/dist/modules/communication_channels/lib/access-control.js.map +2 -2
  66. package/dist/modules/communication_channels/lib/connect-channel.js +20 -12
  67. package/dist/modules/communication_channels/lib/connect-channel.js.map +2 -2
  68. package/dist/modules/communication_channels/lib/push-adapter.js +68 -0
  69. package/dist/modules/communication_channels/lib/push-adapter.js.map +7 -0
  70. package/dist/modules/communication_channels/lib/push-capabilities.js +31 -0
  71. package/dist/modules/communication_channels/lib/push-capabilities.js.map +7 -0
  72. package/dist/modules/communication_channels/lib/push-connect-error.js +20 -0
  73. package/dist/modules/communication_channels/lib/push-connect-error.js.map +7 -0
  74. package/dist/modules/communication_channels/lib/push-credential-errors.js +41 -0
  75. package/dist/modules/communication_channels/lib/push-credential-errors.js.map +7 -0
  76. package/dist/modules/communication_channels/lib/push-envelope.js +46 -0
  77. package/dist/modules/communication_channels/lib/push-envelope.js.map +7 -0
  78. package/dist/modules/communication_channels/lib/refcounted-client-cache.js +64 -0
  79. package/dist/modules/communication_channels/lib/refcounted-client-cache.js.map +7 -0
  80. package/dist/modules/communication_channels/migrations/Migration20260703123630_communication_channels.js +13 -0
  81. package/dist/modules/communication_channels/migrations/Migration20260703123630_communication_channels.js.map +7 -0
  82. package/dist/modules/communication_channels/notifications.js +4 -0
  83. package/dist/modules/communication_channels/notifications.js.map +2 -2
  84. package/dist/modules/communication_channels/setup.js +2 -0
  85. package/dist/modules/communication_channels/setup.js.map +2 -2
  86. package/dist/modules/configs/lib/upgrade-actions.js +21 -0
  87. package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
  88. package/dist/modules/customer_accounts/notifications.js +12 -0
  89. package/dist/modules/customer_accounts/notifications.js.map +2 -2
  90. package/dist/modules/customers/notifications.js +4 -0
  91. package/dist/modules/customers/notifications.js.map +2 -2
  92. package/dist/modules/devices/acl.js +11 -0
  93. package/dist/modules/devices/acl.js.map +7 -0
  94. package/dist/modules/devices/api/[id]/route.js +167 -0
  95. package/dist/modules/devices/api/[id]/route.js.map +7 -0
  96. package/dist/modules/devices/api/admin/devices/[id]/route.js +219 -0
  97. package/dist/modules/devices/api/admin/devices/[id]/route.js.map +7 -0
  98. package/dist/modules/devices/api/admin/devices/route.js +140 -0
  99. package/dist/modules/devices/api/admin/devices/route.js.map +7 -0
  100. package/dist/modules/devices/api/auth.js +9 -0
  101. package/dist/modules/devices/api/auth.js.map +7 -0
  102. package/dist/modules/devices/api/deviceList.js +53 -0
  103. package/dist/modules/devices/api/deviceList.js.map +7 -0
  104. package/dist/modules/devices/api/deviceOps.js +118 -0
  105. package/dist/modules/devices/api/deviceOps.js.map +7 -0
  106. package/dist/modules/devices/api/openapi.js +19 -0
  107. package/dist/modules/devices/api/openapi.js.map +7 -0
  108. package/dist/modules/devices/api/route.js +143 -0
  109. package/dist/modules/devices/api/route.js.map +7 -0
  110. package/dist/modules/devices/backend/devices/[id]/page.js +135 -0
  111. package/dist/modules/devices/backend/devices/[id]/page.js.map +7 -0
  112. package/dist/modules/devices/backend/devices/[id]/page.meta.js +16 -0
  113. package/dist/modules/devices/backend/devices/[id]/page.meta.js.map +7 -0
  114. package/dist/modules/devices/backend/devices/create/page.js +68 -0
  115. package/dist/modules/devices/backend/devices/create/page.js.map +7 -0
  116. package/dist/modules/devices/backend/devices/create/page.meta.js +16 -0
  117. package/dist/modules/devices/backend/devices/create/page.meta.js.map +7 -0
  118. package/dist/modules/devices/backend/devices/page.js +235 -0
  119. package/dist/modules/devices/backend/devices/page.js.map +7 -0
  120. package/dist/modules/devices/backend/devices/page.meta.js +23 -0
  121. package/dist/modules/devices/backend/devices/page.meta.js.map +7 -0
  122. package/dist/modules/devices/commands/deactivate.js +107 -0
  123. package/dist/modules/devices/commands/deactivate.js.map +7 -0
  124. package/dist/modules/devices/commands/index.js +4 -0
  125. package/dist/modules/devices/commands/index.js.map +7 -0
  126. package/dist/modules/devices/commands/register.js +183 -0
  127. package/dist/modules/devices/commands/register.js.map +7 -0
  128. package/dist/modules/devices/commands/shared.js +74 -0
  129. package/dist/modules/devices/commands/shared.js.map +7 -0
  130. package/dist/modules/devices/commands/update.js +126 -0
  131. package/dist/modules/devices/commands/update.js.map +7 -0
  132. package/dist/modules/devices/data/entities.js +83 -0
  133. package/dist/modules/devices/data/entities.js.map +7 -0
  134. package/dist/modules/devices/data/validators.js +49 -0
  135. package/dist/modules/devices/data/validators.js.map +7 -0
  136. package/dist/modules/devices/di.js +11 -0
  137. package/dist/modules/devices/di.js.map +7 -0
  138. package/dist/modules/devices/encryption.js +12 -0
  139. package/dist/modules/devices/encryption.js.map +7 -0
  140. package/dist/modules/devices/events.js +19 -0
  141. package/dist/modules/devices/events.js.map +7 -0
  142. package/dist/modules/devices/index.js +17 -0
  143. package/dist/modules/devices/index.js.map +7 -0
  144. package/dist/modules/devices/lib/operationMetadata.js +20 -0
  145. package/dist/modules/devices/lib/operationMetadata.js.map +7 -0
  146. package/dist/modules/devices/migrations/Migration20260602120000.js +15 -0
  147. package/dist/modules/devices/migrations/Migration20260602120000.js.map +7 -0
  148. package/dist/modules/devices/migrations/Migration20260630120000.js +15 -0
  149. package/dist/modules/devices/migrations/Migration20260630120000.js.map +7 -0
  150. package/dist/modules/devices/migrations/Migration20260701120000.js +13 -0
  151. package/dist/modules/devices/migrations/Migration20260701120000.js.map +7 -0
  152. package/dist/modules/devices/migrations/Migration20260721120000.js +15 -0
  153. package/dist/modules/devices/migrations/Migration20260721120000.js.map +7 -0
  154. package/dist/modules/devices/setup.js +13 -0
  155. package/dist/modules/devices/setup.js.map +7 -0
  156. package/dist/modules/entities/cli.js +8 -3
  157. package/dist/modules/entities/cli.js.map +2 -2
  158. package/dist/modules/entities/migrations/Migration20260722120000.js +28 -0
  159. package/dist/modules/entities/migrations/Migration20260722120000.js.map +7 -0
  160. package/dist/modules/inbox_ops/notifications.js +2 -0
  161. package/dist/modules/inbox_ops/notifications.js.map +2 -2
  162. package/dist/modules/messages/notifications.js +2 -0
  163. package/dist/modules/messages/notifications.js.map +2 -2
  164. package/dist/modules/notifications/acl.js +3 -1
  165. package/dist/modules/notifications/acl.js.map +2 -2
  166. package/dist/modules/notifications/api/admin/preferences/route.js +167 -0
  167. package/dist/modules/notifications/api/admin/preferences/route.js.map +7 -0
  168. package/dist/modules/notifications/api/channels/route.js +54 -0
  169. package/dist/modules/notifications/api/channels/route.js.map +7 -0
  170. package/dist/modules/notifications/api/preferences/route.js +126 -0
  171. package/dist/modules/notifications/api/preferences/route.js.map +7 -0
  172. package/dist/modules/notifications/api/route.js +8 -1
  173. package/dist/modules/notifications/api/route.js.map +2 -2
  174. package/dist/modules/notifications/api/types/[id]/channels/[channel]/route.js +187 -0
  175. package/dist/modules/notifications/api/types/[id]/channels/[channel]/route.js.map +7 -0
  176. package/dist/modules/notifications/api/types/route.js +225 -0
  177. package/dist/modules/notifications/api/types/route.js.map +7 -0
  178. package/dist/modules/notifications/api/unread-count/route.js +5 -1
  179. package/dist/modules/notifications/api/unread-count/route.js.map +2 -2
  180. package/dist/modules/notifications/backend/notifications/user-preferences/page.js +10 -0
  181. package/dist/modules/notifications/backend/notifications/user-preferences/page.js.map +7 -0
  182. package/dist/modules/notifications/backend/notifications/user-preferences/page.meta.js +28 -0
  183. package/dist/modules/notifications/backend/notifications/user-preferences/page.meta.js.map +7 -0
  184. package/dist/modules/notifications/backend/profile/notification-preferences/page.js +10 -0
  185. package/dist/modules/notifications/backend/profile/notification-preferences/page.js.map +7 -0
  186. package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js +33 -0
  187. package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js.map +7 -0
  188. package/dist/modules/notifications/data/entities.js +128 -1
  189. package/dist/modules/notifications/data/entities.js.map +2 -2
  190. package/dist/modules/notifications/data/validators.js +95 -2
  191. package/dist/modules/notifications/data/validators.js.map +2 -2
  192. package/dist/modules/notifications/di.js +7 -0
  193. package/dist/modules/notifications/di.js.map +2 -2
  194. package/dist/modules/notifications/events.js +17 -0
  195. package/dist/modules/notifications/events.js.map +2 -2
  196. package/dist/modules/notifications/frontend/NotificationPreferenceMatrix.js +190 -0
  197. package/dist/modules/notifications/frontend/NotificationPreferenceMatrix.js.map +7 -0
  198. package/dist/modules/notifications/frontend/NotificationPreferencesPageClient.js +124 -0
  199. package/dist/modules/notifications/frontend/NotificationPreferencesPageClient.js.map +7 -0
  200. package/dist/modules/notifications/frontend/NotificationSettingsPageClient.js +166 -1
  201. package/dist/modules/notifications/frontend/NotificationSettingsPageClient.js.map +2 -2
  202. package/dist/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.js +172 -0
  203. package/dist/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.js.map +7 -0
  204. package/dist/modules/notifications/generators.js +63 -0
  205. package/dist/modules/notifications/generators.js.map +7 -0
  206. package/dist/modules/notifications/lib/delivery-strategies-registry.js +19 -0
  207. package/dist/modules/notifications/lib/delivery-strategies-registry.js.map +7 -0
  208. package/dist/modules/notifications/lib/deliveryStrategies.js.map +2 -2
  209. package/dist/modules/notifications/lib/derive-category.js +8 -0
  210. package/dist/modules/notifications/lib/derive-category.js.map +7 -0
  211. package/dist/modules/notifications/lib/notification-channel-registry.js +35 -0
  212. package/dist/modules/notifications/lib/notification-channel-registry.js.map +7 -0
  213. package/dist/modules/notifications/lib/notification-type-registry.js +87 -0
  214. package/dist/modules/notifications/lib/notification-type-registry.js.map +7 -0
  215. package/dist/modules/notifications/lib/notificationCopy.js +14 -0
  216. package/dist/modules/notifications/lib/notificationCopy.js.map +7 -0
  217. package/dist/modules/notifications/lib/notificationFactory.js +4 -1
  218. package/dist/modules/notifications/lib/notificationFactory.js.map +2 -2
  219. package/dist/modules/notifications/lib/notificationMapper.js +2 -0
  220. package/dist/modules/notifications/lib/notificationMapper.js.map +2 -2
  221. package/dist/modules/notifications/lib/notificationPreferenceService.js +83 -0
  222. package/dist/modules/notifications/lib/notificationPreferenceService.js.map +7 -0
  223. package/dist/modules/notifications/lib/notificationService.js +83 -28
  224. package/dist/modules/notifications/lib/notificationService.js.map +2 -2
  225. package/dist/modules/notifications/lib/notificationVisibility.js +24 -0
  226. package/dist/modules/notifications/lib/notificationVisibility.js.map +7 -0
  227. package/dist/modules/notifications/lib/routeHelpers.js +11 -1
  228. package/dist/modules/notifications/lib/routeHelpers.js.map +2 -2
  229. package/dist/modules/notifications/lib/shouldDeliver.js +46 -0
  230. package/dist/modules/notifications/lib/shouldDeliver.js.map +7 -0
  231. package/dist/modules/notifications/lib/strategies/email-delivery-strategy.js +54 -0
  232. package/dist/modules/notifications/lib/strategies/email-delivery-strategy.js.map +7 -0
  233. package/dist/modules/notifications/lib/strategies/in-app-delivery-strategy.js +12 -0
  234. package/dist/modules/notifications/lib/strategies/in-app-delivery-strategy.js.map +7 -0
  235. package/dist/modules/notifications/lib/typeCatalogue.js +71 -0
  236. package/dist/modules/notifications/lib/typeCatalogue.js.map +7 -0
  237. package/dist/modules/notifications/lib/typeChannelSettings.js +12 -0
  238. package/dist/modules/notifications/lib/typeChannelSettings.js.map +7 -0
  239. package/dist/modules/notifications/lib/typeOverrides.js +19 -0
  240. package/dist/modules/notifications/lib/typeOverrides.js.map +7 -0
  241. package/dist/modules/notifications/migrations/Migration20260625122947_notifications.js +14 -0
  242. package/dist/modules/notifications/migrations/Migration20260625122947_notifications.js.map +7 -0
  243. package/dist/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.js +15 -0
  244. package/dist/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.js.map +7 -0
  245. package/dist/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.js +13 -0
  246. package/dist/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.js.map +7 -0
  247. package/dist/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.js +15 -0
  248. package/dist/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.js.map +7 -0
  249. package/dist/modules/notifications/migrations/Migration20260706120000_notifications_channels.js +13 -0
  250. package/dist/modules/notifications/migrations/Migration20260706120000_notifications_channels.js.map +7 -0
  251. package/dist/modules/notifications/migrations/Migration20260716123121_notifications.js +14 -0
  252. package/dist/modules/notifications/migrations/Migration20260716123121_notifications.js.map +7 -0
  253. package/dist/modules/notifications/notification-channels.js +26 -0
  254. package/dist/modules/notifications/notification-channels.js.map +7 -0
  255. package/dist/modules/notifications/notifications.delivery-strategies.js +12 -0
  256. package/dist/modules/notifications/notifications.delivery-strategies.js.map +7 -0
  257. package/dist/modules/notifications/setup.js +16 -1
  258. package/dist/modules/notifications/setup.js.map +2 -2
  259. package/dist/modules/notifications/subscribers/deliver-notification.js +66 -57
  260. package/dist/modules/notifications/subscribers/deliver-notification.js.map +2 -2
  261. package/dist/modules/notifications/subscribers/sync-notification-types.js +16 -0
  262. package/dist/modules/notifications/subscribers/sync-notification-types.js.map +7 -0
  263. package/dist/modules/notifications/widgets/injection/profile-preferences-menu/widget.js +23 -0
  264. package/dist/modules/notifications/widgets/injection/profile-preferences-menu/widget.js.map +7 -0
  265. package/dist/modules/notifications/widgets/injection-table.js +14 -0
  266. package/dist/modules/notifications/widgets/injection-table.js.map +7 -0
  267. package/dist/modules/push_notifications/acl.js +13 -0
  268. package/dist/modules/push_notifications/acl.js.map +7 -0
  269. package/dist/modules/push_notifications/api/custom-send/route.js +141 -0
  270. package/dist/modules/push_notifications/api/custom-send/route.js.map +7 -0
  271. package/dist/modules/push_notifications/api/deliveries/[id]/route.js +110 -0
  272. package/dist/modules/push_notifications/api/deliveries/[id]/route.js.map +7 -0
  273. package/dist/modules/push_notifications/api/deliveries/route.js +56 -0
  274. package/dist/modules/push_notifications/api/deliveries/route.js.map +7 -0
  275. package/dist/modules/push_notifications/api/openapi.js +19 -0
  276. package/dist/modules/push_notifications/api/openapi.js.map +7 -0
  277. package/dist/modules/push_notifications/backend/push_notifications/[id]/page.js +103 -0
  278. package/dist/modules/push_notifications/backend/push_notifications/[id]/page.js.map +7 -0
  279. package/dist/modules/push_notifications/backend/push_notifications/[id]/page.meta.js +13 -0
  280. package/dist/modules/push_notifications/backend/push_notifications/[id]/page.meta.js.map +7 -0
  281. package/dist/modules/push_notifications/backend/push_notifications/page.js +213 -0
  282. package/dist/modules/push_notifications/backend/push_notifications/page.js.map +7 -0
  283. package/dist/modules/push_notifications/backend/push_notifications/page.meta.js +23 -0
  284. package/dist/modules/push_notifications/backend/push_notifications/page.meta.js.map +7 -0
  285. package/dist/modules/push_notifications/backend/push_notifications/send/page.js +245 -0
  286. package/dist/modules/push_notifications/backend/push_notifications/send/page.js.map +7 -0
  287. package/dist/modules/push_notifications/backend/push_notifications/send/page.meta.js +26 -0
  288. package/dist/modules/push_notifications/backend/push_notifications/send/page.meta.js.map +7 -0
  289. package/dist/modules/push_notifications/data/entities.js +92 -0
  290. package/dist/modules/push_notifications/data/entities.js.map +7 -0
  291. package/dist/modules/push_notifications/data/extensions.js +23 -0
  292. package/dist/modules/push_notifications/data/extensions.js.map +7 -0
  293. package/dist/modules/push_notifications/data/validators.js +89 -0
  294. package/dist/modules/push_notifications/data/validators.js.map +7 -0
  295. package/dist/modules/push_notifications/di.js +17 -0
  296. package/dist/modules/push_notifications/di.js.map +7 -0
  297. package/dist/modules/push_notifications/events.js +24 -0
  298. package/dist/modules/push_notifications/events.js.map +7 -0
  299. package/dist/modules/push_notifications/index.js +16 -0
  300. package/dist/modules/push_notifications/index.js.map +7 -0
  301. package/dist/modules/push_notifications/lib/fake-provider-recorder.js +80 -0
  302. package/dist/modules/push_notifications/lib/fake-provider-recorder.js.map +7 -0
  303. package/dist/modules/push_notifications/lib/push-delivery-strategy.js +54 -0
  304. package/dist/modules/push_notifications/lib/push-delivery-strategy.js.map +7 -0
  305. package/dist/modules/push_notifications/lib/push-delivery.js +297 -0
  306. package/dist/modules/push_notifications/lib/push-delivery.js.map +7 -0
  307. package/dist/modules/push_notifications/lib/push-fanout.js +138 -0
  308. package/dist/modules/push_notifications/lib/push-fanout.js.map +7 -0
  309. package/dist/modules/push_notifications/lib/push-health.js +32 -0
  310. package/dist/modules/push_notifications/lib/push-health.js.map +7 -0
  311. package/dist/modules/push_notifications/lib/push-reaper.js +87 -0
  312. package/dist/modules/push_notifications/lib/push-reaper.js.map +7 -0
  313. package/dist/modules/push_notifications/lib/push-receipt-reaper.js +136 -0
  314. package/dist/modules/push_notifications/lib/push-receipt-reaper.js.map +7 -0
  315. package/dist/modules/push_notifications/lib/push-stub-adapter.js +63 -0
  316. package/dist/modules/push_notifications/lib/push-stub-adapter.js.map +7 -0
  317. package/dist/modules/push_notifications/lib/queue.js +53 -0
  318. package/dist/modules/push_notifications/lib/queue.js.map +7 -0
  319. package/dist/modules/push_notifications/lib/reclaim-window.js +13 -0
  320. package/dist/modules/push_notifications/lib/reclaim-window.js.map +7 -0
  321. package/dist/modules/push_notifications/lib/send-custom-push.js +48 -0
  322. package/dist/modules/push_notifications/lib/send-custom-push.js.map +7 -0
  323. package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js +16 -0
  324. package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js.map +7 -0
  325. package/dist/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.js +13 -0
  326. package/dist/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.js.map +7 -0
  327. package/dist/modules/push_notifications/notifications.delivery-strategies.js +8 -0
  328. package/dist/modules/push_notifications/notifications.delivery-strategies.js.map +7 -0
  329. package/dist/modules/push_notifications/notifications.js +40 -0
  330. package/dist/modules/push_notifications/notifications.js.map +7 -0
  331. package/dist/modules/push_notifications/setup.js +52 -0
  332. package/dist/modules/push_notifications/setup.js.map +7 -0
  333. package/dist/modules/push_notifications/workers/reclaim-stuck.worker.js +57 -0
  334. package/dist/modules/push_notifications/workers/reclaim-stuck.worker.js.map +7 -0
  335. package/dist/modules/push_notifications/workers/send-push.worker.js +27 -0
  336. package/dist/modules/push_notifications/workers/send-push.worker.js.map +7 -0
  337. package/dist/modules/sales/notifications.js +8 -0
  338. package/dist/modules/sales/notifications.js.map +2 -2
  339. package/dist/modules/staff/notifications.js +6 -0
  340. package/dist/modules/staff/notifications.js.map +2 -2
  341. package/dist/modules/workflows/notifications.js +2 -0
  342. package/dist/modules/workflows/notifications.js.map +2 -2
  343. package/generated/entities/notification/index.ts +3 -0
  344. package/generated/entities/notification_preference/index.ts +8 -0
  345. package/generated/entities/notification_type/index.ts +9 -0
  346. package/generated/entities/notification_type_override/index.ts +7 -0
  347. package/generated/entities/push_notification_delivery/index.ts +19 -0
  348. package/generated/entities/user_device/index.ts +16 -0
  349. package/generated/entities.ids.generated.ts +12 -1
  350. package/generated/entity-fields-registry.ts +72 -0
  351. package/package.json +7 -7
  352. package/src/helpers/integration/api.ts +2 -1
  353. package/src/helpers/integration/appRoot.ts +13 -0
  354. package/src/helpers/integration/dbFixtures.ts +1 -5
  355. package/src/helpers/integration/pushFake.ts +219 -0
  356. package/src/modules/auth/i18n/de.json +1 -0
  357. package/src/modules/auth/i18n/en.json +1 -0
  358. package/src/modules/auth/i18n/es.json +1 -0
  359. package/src/modules/auth/i18n/ko.json +1 -0
  360. package/src/modules/auth/i18n/pl.json +1 -0
  361. package/src/modules/auth/notifications.ts +16 -0
  362. package/src/modules/business_rules/i18n/de.json +2 -1
  363. package/src/modules/business_rules/i18n/en.json +2 -1
  364. package/src/modules/business_rules/i18n/es.json +2 -1
  365. package/src/modules/business_rules/i18n/ko.json +2 -1
  366. package/src/modules/business_rules/i18n/pl.json +2 -1
  367. package/src/modules/business_rules/notifications.ts +2 -0
  368. package/src/modules/catalog/i18n/de.json +2 -1
  369. package/src/modules/catalog/i18n/en.json +2 -1
  370. package/src/modules/catalog/i18n/es.json +2 -1
  371. package/src/modules/catalog/i18n/ko.json +2 -1
  372. package/src/modules/catalog/i18n/pl.json +2 -1
  373. package/src/modules/catalog/notifications.ts +2 -0
  374. package/src/modules/communication_channels/acl.ts +9 -0
  375. package/src/modules/communication_channels/api/delete/admin/channels/[id]/route.ts +168 -0
  376. package/src/modules/communication_channels/api/get/channels/[id]/health/route.ts +6 -2
  377. package/src/modules/communication_channels/api/get/channels/[id]/route.ts +6 -2
  378. package/src/modules/communication_channels/api/get/channels/route.ts +2 -1
  379. package/src/modules/communication_channels/api/post/channels/[id]/test-send/route.ts +16 -5
  380. package/src/modules/communication_channels/api/post/channels/connect/credentials/route.ts +37 -1
  381. package/src/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.ts +175 -0
  382. package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +11 -1
  383. package/src/modules/communication_channels/commands/admin-delete-channel.ts +203 -0
  384. package/src/modules/communication_channels/commands/connect-credential-channel.ts +63 -15
  385. package/src/modules/communication_channels/commands/deliver-outbound-message.ts +10 -2
  386. package/src/modules/communication_channels/commands/push-register.ts +7 -1
  387. package/src/modules/communication_channels/commands/push-unregister.ts +14 -3
  388. package/src/modules/communication_channels/data/entities.ts +10 -0
  389. package/src/modules/communication_channels/data/validators.ts +1 -0
  390. package/src/modules/communication_channels/i18n/de.json +35 -1
  391. package/src/modules/communication_channels/i18n/en.json +35 -1
  392. package/src/modules/communication_channels/i18n/es.json +35 -1
  393. package/src/modules/communication_channels/i18n/ko.json +35 -1
  394. package/src/modules/communication_channels/i18n/pl.json +35 -1
  395. package/src/modules/communication_channels/lib/access-control.ts +42 -0
  396. package/src/modules/communication_channels/lib/adapter.ts +25 -0
  397. package/src/modules/communication_channels/lib/connect-channel.ts +61 -26
  398. package/src/modules/communication_channels/lib/push-adapter.ts +139 -0
  399. package/src/modules/communication_channels/lib/push-capabilities.ts +42 -0
  400. package/src/modules/communication_channels/lib/push-connect-error.ts +52 -0
  401. package/src/modules/communication_channels/lib/push-credential-errors.ts +58 -0
  402. package/src/modules/communication_channels/lib/push-envelope.ts +104 -0
  403. package/src/modules/communication_channels/lib/refcounted-client-cache.ts +123 -0
  404. package/src/modules/communication_channels/migrations/.snapshot-open-mercato.json +9 -0
  405. package/src/modules/communication_channels/migrations/Migration20260703123630_communication_channels.ts +20 -0
  406. package/src/modules/communication_channels/notifications.ts +4 -0
  407. package/src/modules/communication_channels/setup.ts +2 -0
  408. package/src/modules/configs/i18n/de.json +5 -1
  409. package/src/modules/configs/i18n/en.json +5 -1
  410. package/src/modules/configs/i18n/es.json +5 -1
  411. package/src/modules/configs/i18n/ko.json +5 -1
  412. package/src/modules/configs/i18n/pl.json +5 -1
  413. package/src/modules/configs/lib/upgrade-actions.ts +21 -0
  414. package/src/modules/customer_accounts/i18n/de.json +2 -1
  415. package/src/modules/customer_accounts/i18n/en.json +2 -1
  416. package/src/modules/customer_accounts/i18n/es.json +2 -1
  417. package/src/modules/customer_accounts/i18n/ko.json +2 -1
  418. package/src/modules/customer_accounts/i18n/pl.json +2 -1
  419. package/src/modules/customer_accounts/notifications.ts +12 -0
  420. package/src/modules/customers/i18n/de.json +2 -1
  421. package/src/modules/customers/i18n/en.json +2 -1
  422. package/src/modules/customers/i18n/es.json +2 -1
  423. package/src/modules/customers/i18n/ko.json +2 -1
  424. package/src/modules/customers/i18n/pl.json +2 -1
  425. package/src/modules/customers/notifications.ts +4 -0
  426. package/src/modules/devices/AGENTS.md +101 -0
  427. package/src/modules/devices/acl.ts +7 -0
  428. package/src/modules/devices/api/[id]/route.ts +180 -0
  429. package/src/modules/devices/api/admin/devices/[id]/route.ts +235 -0
  430. package/src/modules/devices/api/admin/devices/route.ts +160 -0
  431. package/src/modules/devices/api/auth.ts +13 -0
  432. package/src/modules/devices/api/deviceList.ts +54 -0
  433. package/src/modules/devices/api/deviceOps.ts +186 -0
  434. package/src/modules/devices/api/openapi.ts +23 -0
  435. package/src/modules/devices/api/route.ts +165 -0
  436. package/src/modules/devices/backend/devices/[id]/page.meta.ts +12 -0
  437. package/src/modules/devices/backend/devices/[id]/page.tsx +164 -0
  438. package/src/modules/devices/backend/devices/create/page.meta.ts +12 -0
  439. package/src/modules/devices/backend/devices/create/page.tsx +81 -0
  440. package/src/modules/devices/backend/devices/page.meta.ts +21 -0
  441. package/src/modules/devices/backend/devices/page.tsx +259 -0
  442. package/src/modules/devices/commands/deactivate.ts +126 -0
  443. package/src/modules/devices/commands/index.ts +3 -0
  444. package/src/modules/devices/commands/register.ts +199 -0
  445. package/src/modules/devices/commands/shared.ts +119 -0
  446. package/src/modules/devices/commands/update.ts +142 -0
  447. package/src/modules/devices/data/entities.ts +79 -0
  448. package/src/modules/devices/data/validators.ts +65 -0
  449. package/src/modules/devices/di.ts +9 -0
  450. package/src/modules/devices/encryption.ts +15 -0
  451. package/src/modules/devices/events.ts +16 -0
  452. package/src/modules/devices/i18n/de.json +45 -0
  453. package/src/modules/devices/i18n/en.json +45 -0
  454. package/src/modules/devices/i18n/es.json +45 -0
  455. package/src/modules/devices/i18n/ko.json +45 -0
  456. package/src/modules/devices/i18n/pl.json +45 -0
  457. package/src/modules/devices/index.ts +15 -0
  458. package/src/modules/devices/lib/operationMetadata.ts +35 -0
  459. package/src/modules/devices/migrations/.snapshot-open-mercato.json +200 -0
  460. package/src/modules/devices/migrations/Migration20260602120000.ts +15 -0
  461. package/src/modules/devices/migrations/Migration20260630120000.ts +20 -0
  462. package/src/modules/devices/migrations/Migration20260701120000.ts +13 -0
  463. package/src/modules/devices/migrations/Migration20260721120000.ts +18 -0
  464. package/src/modules/devices/setup.ts +11 -0
  465. package/src/modules/entities/cli.ts +16 -2
  466. package/src/modules/entities/migrations/Migration20260722120000.ts +38 -0
  467. package/src/modules/inbox_ops/i18n/de.json +2 -1
  468. package/src/modules/inbox_ops/i18n/en.json +2 -1
  469. package/src/modules/inbox_ops/i18n/es.json +2 -1
  470. package/src/modules/inbox_ops/i18n/ko.json +2 -1
  471. package/src/modules/inbox_ops/i18n/pl.json +2 -1
  472. package/src/modules/inbox_ops/notifications.ts +2 -0
  473. package/src/modules/messages/i18n/de.json +2 -1
  474. package/src/modules/messages/i18n/en.json +2 -1
  475. package/src/modules/messages/i18n/es.json +2 -1
  476. package/src/modules/messages/i18n/ko.json +2 -1
  477. package/src/modules/messages/i18n/pl.json +2 -1
  478. package/src/modules/messages/notifications.ts +2 -0
  479. package/src/modules/notifications/AGENTS.md +54 -0
  480. package/src/modules/notifications/acl.ts +2 -0
  481. package/src/modules/notifications/api/admin/preferences/route.ts +193 -0
  482. package/src/modules/notifications/api/channels/route.ts +54 -0
  483. package/src/modules/notifications/api/preferences/route.ts +131 -0
  484. package/src/modules/notifications/api/route.ts +8 -1
  485. package/src/modules/notifications/api/types/[id]/channels/[channel]/route.ts +226 -0
  486. package/src/modules/notifications/api/types/route.ts +239 -0
  487. package/src/modules/notifications/api/unread-count/route.ts +5 -1
  488. package/src/modules/notifications/backend/notifications/user-preferences/page.meta.ts +26 -0
  489. package/src/modules/notifications/backend/notifications/user-preferences/page.tsx +12 -0
  490. package/src/modules/notifications/backend/profile/notification-preferences/page.meta.ts +31 -0
  491. package/src/modules/notifications/backend/profile/notification-preferences/page.tsx +12 -0
  492. package/src/modules/notifications/data/entities.ts +144 -0
  493. package/src/modules/notifications/data/validators.ts +116 -0
  494. package/src/modules/notifications/di.ts +7 -0
  495. package/src/modules/notifications/events.ts +23 -0
  496. package/src/modules/notifications/frontend/NotificationPreferenceMatrix.tsx +287 -0
  497. package/src/modules/notifications/frontend/NotificationPreferencesPageClient.tsx +155 -0
  498. package/src/modules/notifications/frontend/NotificationSettingsPageClient.tsx +273 -2
  499. package/src/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.tsx +214 -0
  500. package/src/modules/notifications/generators.ts +82 -0
  501. package/src/modules/notifications/i18n/de.json +43 -0
  502. package/src/modules/notifications/i18n/en.json +43 -0
  503. package/src/modules/notifications/i18n/es.json +43 -0
  504. package/src/modules/notifications/i18n/ko.json +43 -0
  505. package/src/modules/notifications/i18n/pl.json +44 -1
  506. package/src/modules/notifications/lib/delivery-strategies-registry.ts +30 -0
  507. package/src/modules/notifications/lib/deliveryStrategies.ts +40 -4
  508. package/src/modules/notifications/lib/derive-category.ts +15 -0
  509. package/src/modules/notifications/lib/notification-channel-registry.ts +59 -0
  510. package/src/modules/notifications/lib/notification-type-registry.ts +182 -0
  511. package/src/modules/notifications/lib/notificationCopy.ts +34 -0
  512. package/src/modules/notifications/lib/notificationFactory.ts +5 -1
  513. package/src/modules/notifications/lib/notificationMapper.ts +2 -0
  514. package/src/modules/notifications/lib/notificationPreferenceService.ts +138 -0
  515. package/src/modules/notifications/lib/notificationService.ts +129 -25
  516. package/src/modules/notifications/lib/notificationVisibility.ts +48 -0
  517. package/src/modules/notifications/lib/routeHelpers.ts +14 -1
  518. package/src/modules/notifications/lib/shouldDeliver.ts +112 -0
  519. package/src/modules/notifications/lib/strategies/email-delivery-strategy.ts +63 -0
  520. package/src/modules/notifications/lib/strategies/in-app-delivery-strategy.ts +21 -0
  521. package/src/modules/notifications/lib/typeCatalogue.ts +141 -0
  522. package/src/modules/notifications/lib/typeChannelSettings.ts +29 -0
  523. package/src/modules/notifications/lib/typeOverrides.ts +46 -0
  524. package/src/modules/notifications/migrations/.snapshot-open-mercato.json +874 -100
  525. package/src/modules/notifications/migrations/Migration20260625122947_notifications.ts +14 -0
  526. package/src/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.ts +15 -0
  527. package/src/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.ts +13 -0
  528. package/src/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.ts +15 -0
  529. package/src/modules/notifications/migrations/Migration20260706120000_notifications_channels.ts +13 -0
  530. package/src/modules/notifications/migrations/Migration20260716123121_notifications.ts +14 -0
  531. package/src/modules/notifications/notification-channels.ts +30 -0
  532. package/src/modules/notifications/notifications.delivery-strategies.ts +15 -0
  533. package/src/modules/notifications/setup.ts +23 -1
  534. package/src/modules/notifications/subscribers/deliver-notification.ts +105 -71
  535. package/src/modules/notifications/subscribers/sync-notification-types.ts +18 -0
  536. package/src/modules/notifications/widgets/injection/profile-preferences-menu/widget.ts +35 -0
  537. package/src/modules/notifications/widgets/injection-table.ts +18 -0
  538. package/src/modules/push_notifications/AGENTS.md +92 -0
  539. package/src/modules/push_notifications/acl.ts +9 -0
  540. package/src/modules/push_notifications/api/custom-send/route.ts +175 -0
  541. package/src/modules/push_notifications/api/deliveries/[id]/route.ts +122 -0
  542. package/src/modules/push_notifications/api/deliveries/route.ts +58 -0
  543. package/src/modules/push_notifications/api/openapi.ts +22 -0
  544. package/src/modules/push_notifications/backend/push_notifications/[id]/page.meta.ts +9 -0
  545. package/src/modules/push_notifications/backend/push_notifications/[id]/page.tsx +149 -0
  546. package/src/modules/push_notifications/backend/push_notifications/page.meta.ts +21 -0
  547. package/src/modules/push_notifications/backend/push_notifications/page.tsx +239 -0
  548. package/src/modules/push_notifications/backend/push_notifications/send/page.meta.ts +24 -0
  549. package/src/modules/push_notifications/backend/push_notifications/send/page.tsx +327 -0
  550. package/src/modules/push_notifications/data/entities.ts +111 -0
  551. package/src/modules/push_notifications/data/extensions.ts +29 -0
  552. package/src/modules/push_notifications/data/validators.ts +102 -0
  553. package/src/modules/push_notifications/di.ts +20 -0
  554. package/src/modules/push_notifications/events.ts +21 -0
  555. package/src/modules/push_notifications/i18n/de.json +79 -0
  556. package/src/modules/push_notifications/i18n/en.json +79 -0
  557. package/src/modules/push_notifications/i18n/es.json +79 -0
  558. package/src/modules/push_notifications/i18n/ko.json +79 -0
  559. package/src/modules/push_notifications/i18n/pl.json +79 -0
  560. package/src/modules/push_notifications/index.ts +15 -0
  561. package/src/modules/push_notifications/lib/fake-provider-recorder.ts +154 -0
  562. package/src/modules/push_notifications/lib/push-delivery-strategy.ts +90 -0
  563. package/src/modules/push_notifications/lib/push-delivery.ts +455 -0
  564. package/src/modules/push_notifications/lib/push-fanout.ts +237 -0
  565. package/src/modules/push_notifications/lib/push-health.ts +47 -0
  566. package/src/modules/push_notifications/lib/push-reaper.ts +140 -0
  567. package/src/modules/push_notifications/lib/push-receipt-reaper.ts +210 -0
  568. package/src/modules/push_notifications/lib/push-stub-adapter.ts +80 -0
  569. package/src/modules/push_notifications/lib/queue.ts +74 -0
  570. package/src/modules/push_notifications/lib/reclaim-window.ts +16 -0
  571. package/src/modules/push_notifications/lib/send-custom-push.ts +100 -0
  572. package/src/modules/push_notifications/migrations/.snapshot-open-mercato.json +386 -0
  573. package/src/modules/push_notifications/migrations/Migration20260625150049_push_notifications.ts +16 -0
  574. package/src/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.ts +13 -0
  575. package/src/modules/push_notifications/notifications.delivery-strategies.ts +8 -0
  576. package/src/modules/push_notifications/notifications.ts +50 -0
  577. package/src/modules/push_notifications/setup.ts +92 -0
  578. package/src/modules/push_notifications/workers/reclaim-stuck.worker.ts +78 -0
  579. package/src/modules/push_notifications/workers/send-push.worker.ts +34 -0
  580. package/src/modules/sales/i18n/de.json +1 -0
  581. package/src/modules/sales/i18n/en.json +1 -0
  582. package/src/modules/sales/i18n/es.json +1 -0
  583. package/src/modules/sales/i18n/ko.json +1 -0
  584. package/src/modules/sales/i18n/pl.json +1 -0
  585. package/src/modules/sales/notifications.ts +8 -0
  586. package/src/modules/staff/i18n/de.json +1 -0
  587. package/src/modules/staff/i18n/en.json +1 -0
  588. package/src/modules/staff/i18n/es.json +1 -0
  589. package/src/modules/staff/i18n/ko.json +1 -0
  590. package/src/modules/staff/i18n/pl.json +1 -0
  591. package/src/modules/staff/notifications.ts +6 -0
  592. package/src/modules/workflows/i18n/de.json +1 -0
  593. package/src/modules/workflows/i18n/en.json +1 -0
  594. package/src/modules/workflows/i18n/es.json +1 -0
  595. package/src/modules/workflows/i18n/ko.json +1 -0
  596. package/src/modules/workflows/i18n/pl.json +1 -0
  597. package/src/modules/workflows/notifications.ts +2 -0
@@ -0,0 +1,19 @@
1
+ export const id = "id";
2
+ export const tenant_id = "tenant_id";
3
+ export const organization_id = "organization_id";
4
+ export const notification_id = "notification_id";
5
+ export const notification_type_id = "notification_type_id";
6
+ export const user_device_id = "user_device_id";
7
+ export const user_id = "user_id";
8
+ export const provider = "provider";
9
+ export const token_snapshot = "token_snapshot";
10
+ export const silent = "silent";
11
+ export const status = "status";
12
+ export const attempts = "attempts";
13
+ export const last_error = "last_error";
14
+ export const payload = "payload";
15
+ export const provider_response = "provider_response";
16
+ export const created_at = "created_at";
17
+ export const sent_at = "sent_at";
18
+ export const next_retry_at = "next_retry_at";
19
+ export const updated_at = "updated_at";
@@ -0,0 +1,16 @@
1
+ export const id = "id";
2
+ export const tenant_id = "tenant_id";
3
+ export const organization_id = "organization_id";
4
+ export const user_id = "user_id";
5
+ export const device_id = "device_id";
6
+ export const platform = "platform";
7
+ export const client_app_version = "client_app_version";
8
+ export const os_version = "os_version";
9
+ export const locale = "locale";
10
+ export const push_token = "push_token";
11
+ export const push_provider = "push_provider";
12
+ export const push_token_updated_at = "push_token_updated_at";
13
+ export const last_seen_at = "last_seen_at";
14
+ export const created_at = "created_at";
15
+ export const updated_at = "updated_at";
16
+ export const deleted_at = "deleted_at";
@@ -14,6 +14,7 @@ export const M = {
14
14
  "sales": "sales",
15
15
  "wms": "wms",
16
16
  "api_keys": "api_keys",
17
+ "devices": "devices",
17
18
  "dictionaries": "dictionaries",
18
19
  "api_docs": "api_docs",
19
20
  "design_system": "design_system",
@@ -31,6 +32,7 @@ export const M = {
31
32
  "sync_excel": "sync_excel",
32
33
  "messages": "messages",
33
34
  "communication_channels": "communication_channels",
35
+ "push_notifications": "push_notifications",
34
36
  "translations": "translations",
35
37
  "inbox_ops": "inbox_ops",
36
38
  "payment_gateways": "payment_gateways",
@@ -178,6 +180,9 @@ export const M = {
178
180
  "api_keys": {
179
181
  "api_key": "api_keys:api_key"
180
182
  },
183
+ "devices": {
184
+ "user_device": "devices:user_device"
185
+ },
181
186
  "dictionaries": {
182
187
  "dictionary": "dictionaries:dictionary",
183
188
  "dictionary_entry": "dictionaries:dictionary_entry"
@@ -233,7 +238,10 @@ export const M = {
233
238
  "staff_time_project_member": "staff:staff_time_project_member"
234
239
  },
235
240
  "notifications": {
236
- "notification": "notifications:notification"
241
+ "notification": "notifications:notification",
242
+ "notification_type": "notifications:notification_type",
243
+ "notification_type_override": "notifications:notification_type_override",
244
+ "notification_preference": "notifications:notification_preference"
237
245
  },
238
246
  "progress": {
239
247
  "progress_job": "progress:progress_job"
@@ -270,6 +278,9 @@ export const M = {
270
278
  "channel_thread_token": "communication_channels:channel_thread_token",
271
279
  "channel_ingest_dead_letter": "communication_channels:channel_ingest_dead_letter"
272
280
  },
281
+ "push_notifications": {
282
+ "push_notification_delivery": "push_notifications:push_notification_delivery"
283
+ },
273
284
  "translations": {
274
285
  "entity_translation": "translations:entity_translation"
275
286
  },
@@ -1790,6 +1790,9 @@ export const entityFieldsRegistry: Record<string, Record<string, string>> = {
1790
1790
  "source_entity_id": "source_entity_id",
1791
1791
  "link_href": "link_href",
1792
1792
  "group_key": "group_key",
1793
+ "data": "data",
1794
+ "push_options": "push_options",
1795
+ "channels": "channels",
1793
1796
  "created_at": "created_at",
1794
1797
  "read_at": "read_at",
1795
1798
  "actioned_at": "actioned_at",
@@ -1798,6 +1801,36 @@ export const entityFieldsRegistry: Record<string, Record<string, string>> = {
1798
1801
  "tenant_id": "tenant_id",
1799
1802
  "organization_id": "organization_id"
1800
1803
  },
1804
+ "notification_preference": {
1805
+ "id": "id",
1806
+ "tenant_id": "tenant_id",
1807
+ "user_id": "user_id",
1808
+ "notification_type_id": "notification_type_id",
1809
+ "channel": "channel",
1810
+ "enabled": "enabled",
1811
+ "created_at": "created_at",
1812
+ "updated_at": "updated_at"
1813
+ },
1814
+ "notification_type": {
1815
+ "id": "id",
1816
+ "tenant_id": "tenant_id",
1817
+ "label_key": "label_key",
1818
+ "description_key": "description_key",
1819
+ "category": "category",
1820
+ "silent": "silent",
1821
+ "non_opt_out": "non_opt_out",
1822
+ "created_at": "created_at",
1823
+ "updated_at": "updated_at"
1824
+ },
1825
+ "notification_type_override": {
1826
+ "id": "id",
1827
+ "tenant_id": "tenant_id",
1828
+ "notification_type_id": "notification_type_id",
1829
+ "channels": "channels",
1830
+ "non_opt_out": "non_opt_out",
1831
+ "created_at": "created_at",
1832
+ "updated_at": "updated_at"
1833
+ },
1801
1834
  "organization": {
1802
1835
  "id": "id",
1803
1836
  "tenant": "tenant",
@@ -1907,6 +1940,27 @@ export const entityFieldsRegistry: Record<string, Record<string, string>> = {
1907
1940
  "created_at": "created_at",
1908
1941
  "updated_at": "updated_at"
1909
1942
  },
1943
+ "push_notification_delivery": {
1944
+ "id": "id",
1945
+ "tenant_id": "tenant_id",
1946
+ "organization_id": "organization_id",
1947
+ "notification_id": "notification_id",
1948
+ "notification_type_id": "notification_type_id",
1949
+ "user_device_id": "user_device_id",
1950
+ "user_id": "user_id",
1951
+ "provider": "provider",
1952
+ "token_snapshot": "token_snapshot",
1953
+ "silent": "silent",
1954
+ "status": "status",
1955
+ "attempts": "attempts",
1956
+ "last_error": "last_error",
1957
+ "payload": "payload",
1958
+ "provider_response": "provider_response",
1959
+ "created_at": "created_at",
1960
+ "sent_at": "sent_at",
1961
+ "next_retry_at": "next_retry_at",
1962
+ "updated_at": "updated_at"
1963
+ },
1910
1964
  "resources_resource": {
1911
1965
  "id": "id",
1912
1966
  "tenant_id": "tenant_id",
@@ -3125,6 +3179,24 @@ export const entityFieldsRegistry: Record<string, Record<string, string>> = {
3125
3179
  "updated_at": "updated_at",
3126
3180
  "deleted_at": "deleted_at"
3127
3181
  },
3182
+ "user_device": {
3183
+ "id": "id",
3184
+ "tenant_id": "tenant_id",
3185
+ "organization_id": "organization_id",
3186
+ "user_id": "user_id",
3187
+ "device_id": "device_id",
3188
+ "platform": "platform",
3189
+ "client_app_version": "client_app_version",
3190
+ "os_version": "os_version",
3191
+ "locale": "locale",
3192
+ "push_token": "push_token",
3193
+ "push_provider": "push_provider",
3194
+ "push_token_updated_at": "push_token_updated_at",
3195
+ "last_seen_at": "last_seen_at",
3196
+ "created_at": "created_at",
3197
+ "updated_at": "updated_at",
3198
+ "deleted_at": "deleted_at"
3199
+ },
3128
3200
  "user_role": {
3129
3201
  "id": "id",
3130
3202
  "user": "user",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/core",
3
- "version": "0.6.8-develop.6984.1.f0cf23f0f6",
3
+ "version": "0.6.8-develop.6985.1.fb93574faa",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -254,16 +254,16 @@
254
254
  "zod": "^4.4.3"
255
255
  },
256
256
  "peerDependencies": {
257
- "@open-mercato/ai-assistant": "0.6.8-develop.6984.1.f0cf23f0f6",
258
- "@open-mercato/shared": "0.6.8-develop.6984.1.f0cf23f0f6",
259
- "@open-mercato/ui": "0.6.8-develop.6984.1.f0cf23f0f6",
257
+ "@open-mercato/ai-assistant": "0.6.8-develop.6985.1.fb93574faa",
258
+ "@open-mercato/shared": "0.6.8-develop.6985.1.fb93574faa",
259
+ "@open-mercato/ui": "0.6.8-develop.6985.1.fb93574faa",
260
260
  "react": "^19.0.0",
261
261
  "react-dom": "^19.0.0"
262
262
  },
263
263
  "devDependencies": {
264
- "@open-mercato/ai-assistant": "0.6.8-develop.6984.1.f0cf23f0f6",
265
- "@open-mercato/shared": "0.6.8-develop.6984.1.f0cf23f0f6",
266
- "@open-mercato/ui": "0.6.8-develop.6984.1.f0cf23f0f6",
264
+ "@open-mercato/ai-assistant": "0.6.8-develop.6985.1.fb93574faa",
265
+ "@open-mercato/shared": "0.6.8-develop.6985.1.fb93574faa",
266
+ "@open-mercato/ui": "0.6.8-develop.6985.1.fb93574faa",
267
267
  "@testing-library/dom": "^10.4.1",
268
268
  "@testing-library/jest-dom": "^7.0.0",
269
269
  "@testing-library/react": "^16.3.1",
@@ -95,11 +95,12 @@ export async function apiRequest(
95
95
  request: APIRequestContext,
96
96
  method: string,
97
97
  path: string,
98
- options: { token: string; data?: unknown; timeout?: number },
98
+ options: { token: string; data?: unknown; timeout?: number; headers?: Record<string, string> },
99
99
  ) {
100
100
  const headers = {
101
101
  Authorization: `Bearer ${options.token}`,
102
102
  'Content-Type': 'application/json',
103
+ ...(options.headers ?? {}),
103
104
  };
104
105
  const timeout = options.timeout ?? 30_000;
105
106
  let lastError: unknown = null;
@@ -0,0 +1,13 @@
1
+ import path from 'node:path'
2
+
3
+ /**
4
+ * The app root an integration test targets: `OM_TEST_APP_ROOT` when a standalone app is under test,
5
+ * else the monorepo's `apps/mercato` (the Playwright process runs from the repo root, so its `cwd` is
6
+ * not the app root).
7
+ *
8
+ * Single source for what was previously re-derived in `queue.ts`, `dbFixtures.ts`, and `pushFake.ts`.
9
+ */
10
+ export function resolveAppRoot(input?: string): string {
11
+ const explicit = input?.trim() || process.env.OM_TEST_APP_ROOT?.trim()
12
+ return explicit ? path.resolve(explicit) : path.resolve(process.cwd(), 'apps/mercato')
13
+ }
@@ -1,6 +1,7 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { Client } from 'pg';
4
+ import { resolveAppRoot } from './appRoot';
4
5
 
5
6
  /**
6
7
  * Database fixtures for the org-scope fail-open hardening tests.
@@ -14,11 +15,6 @@ import { Client } from 'pg';
14
15
  * `dist/` output for an in-process MikroORM bootstrap.
15
16
  */
16
17
 
17
- function resolveAppRoot(): string {
18
- const fromEnv = process.env.OM_TEST_APP_ROOT?.trim();
19
- return fromEnv ? path.resolve(fromEnv) : path.resolve(process.cwd(), 'apps/mercato');
20
- }
21
-
22
18
  function readEnvValue(key: string): string | undefined {
23
19
  if (process.env[key]) return process.env[key];
24
20
  const candidatePaths = [
@@ -0,0 +1,219 @@
1
+ import { generateKeyPairSync } from 'node:crypto'
2
+ import path from 'node:path'
3
+ import { expect, type APIRequestContext } from '@playwright/test'
4
+ import {
5
+ findFakePush,
6
+ resolveQueueBaseDir,
7
+ uniquePushTokenTail,
8
+ type FakePushEntry,
9
+ type FakePushProvider,
10
+ } from '../../modules/push_notifications/lib/fake-provider-recorder'
11
+ import { apiRequest } from './api'
12
+ import { resolveAppRoot } from './appRoot'
13
+ import { deleteEntityByPathIfExists, expectId, readJsonSafe } from './generalFixtures'
14
+ import { withClient } from './dbFixtures'
15
+
16
+ /**
17
+ * Harness for the `OM_PUSH_FAKE_PROVIDERS` integration specs (TC-PUSH-004+, TC-CHANNEL-PUSH-005+).
18
+ *
19
+ * The fake replaces each provider's SDK client, so the REAL adapter runs and records the
20
+ * provider-native message it built. The worker does that in a different process than the spec, so the
21
+ * message travels through a JSONL sink under the queue's own base dir rather than the delivery row —
22
+ * no adapter returns `metadata` on success, and APNs deliberately reports an empty `externalMessageId`.
23
+ */
24
+ /**
25
+ * The Playwright process runs from the repo root, so its `cwd` is not the app root. Pin `QUEUE_BASE_DIR`
26
+ * once, before anything resolves it, so the spec, the worker, and the drain child all agree on the queue
27
+ * dir and the sink inside it. Never overrides a dir the harness already chose (the ephemeral runner
28
+ * sets its own).
29
+ */
30
+ if (!process.env.QUEUE_BASE_DIR?.trim()) {
31
+ process.env.QUEUE_BASE_DIR = path.resolve(resolveAppRoot(), '.mercato/queue')
32
+ }
33
+
34
+ /** Re-exported so specs never hand-roll a second, divergent fallback (see TC-PUSH-008). */
35
+ export { resolveQueueBaseDir, uniquePushTokenTail }
36
+
37
+ /** The canonical channel teardown — API-based, not raw SQL. Re-exported so specs import one module. */
38
+ export { deleteChannelIfExists } from './communicationChannelsFixtures'
39
+
40
+ export const TENANT_CONNECT_PATH = '/api/communication_channels/channels/connect/tenant-credentials'
41
+ export const DEVICES_PATH = '/api/devices'
42
+ export const NOTIFICATIONS_PATH = '/api/notifications'
43
+
44
+ /** A push token whose last 8 chars are unique to this run — the sink and delivery row are keyed on them. */
45
+ export function makeFakePushToken(provider: FakePushProvider): { pushToken: string; tokenTail: string } {
46
+ const tokenTail = uniquePushTokenTail()
47
+ return { pushToken: `qa-${provider}-token-${tokenTail}`, tokenTail }
48
+ }
49
+
50
+ /** A push token that drives the given branch, keeping the run-unique tail. */
51
+ export function makeFakePushTokenFor(
52
+ provider: FakePushProvider,
53
+ sentinel: 'unregistered' | 'fail',
54
+ ): { pushToken: string; tokenTail: string } {
55
+ const tokenTail = uniquePushTokenTail()
56
+ return { pushToken: `qa-${provider}-${sentinel}-token-${tokenTail}`, tokenTail }
57
+ }
58
+
59
+ export type PushDeliveryRow = {
60
+ status: string
61
+ token_snapshot: string
62
+ organization_id: string | null
63
+ provider: string
64
+ attempts: number
65
+ silent: boolean
66
+ sent_at: string | null
67
+ last_error: string | null
68
+ provider_response: Record<string, unknown> | null
69
+ }
70
+
71
+ /**
72
+ * A throwaway ES256 (P-256) key in PKCS#8 PEM — the curve Apple's `.p8` signing
73
+ * keys use. `apnsCredentialsSchema` structurally parses `p8Key`, so the fixture
74
+ * must be a genuinely parseable key; generating it per process keeps a private
75
+ * key out of the repository.
76
+ */
77
+ const FAKE_APNS_P8_KEY = generateKeyPairSync('ec', {
78
+ namedCurve: 'P-256',
79
+ privateKeyEncoding: { type: 'pkcs8', format: 'pem' },
80
+ publicKeyEncoding: { type: 'spki', format: 'pem' },
81
+ }).privateKey
82
+
83
+ /**
84
+ * Valid-*shaped* fake credentials. `validateCredentials` is schema-only — it checks
85
+ * structure (APNs additionally parses the `.p8` and pins Apple's identifier formats),
86
+ * never that the provider accepts them; real parsing lives in the faked SDK client.
87
+ */
88
+ export const FAKE_PUSH_CREDENTIALS: Record<FakePushProvider, Record<string, unknown>> = {
89
+ fcm: {
90
+ serviceAccountJson: JSON.stringify({
91
+ project_id: 'om-fake-project',
92
+ client_email: 'fake@om-fake-project.iam.gserviceaccount.com',
93
+ private_key: '-----BEGIN PRIVATE KEY-----\nom-fake-key\n-----END PRIVATE KEY-----\n',
94
+ }),
95
+ },
96
+ apns: {
97
+ p8Key: FAKE_APNS_P8_KEY,
98
+ keyId: 'FAKEKEYID1',
99
+ teamId: 'FAKETEAMID',
100
+ bundleId: 'com.openmercato.fake',
101
+ production: false,
102
+ },
103
+ expo: {
104
+ accessToken: 'om-fake-expo-token',
105
+ },
106
+ }
107
+
108
+ /**
109
+ * Connect a tenant-wide push channel through the real credential-connect route.
110
+ *
111
+ * Not `seedConnectedChannel` from `communicationChannelsFixtures`: that seeds the `__test_seed__`
112
+ * provider, whereas these specs must drive the real `fcm`/`apns`/`expo` connect path so the adapter's own
113
+ * `validateCredentials` runs. Tear down with `deleteChannelIfExists` from that same module.
114
+ */
115
+ export async function connectFakePushChannel(
116
+ request: APIRequestContext,
117
+ token: string,
118
+ provider: FakePushProvider,
119
+ displayName: string,
120
+ ): Promise<string> {
121
+ const response = await apiRequest(request, 'POST', TENANT_CONNECT_PATH, {
122
+ token,
123
+ data: { providerKey: provider, displayName, credentials: FAKE_PUSH_CREDENTIALS[provider] },
124
+ })
125
+ expect(response.status(), `connect ${provider} channel`).toBe(201)
126
+ const body = await readJsonSafe<{ channelId?: string }>(response)
127
+ return expectId(body?.channelId, `connect ${provider} response should include channelId`)
128
+ }
129
+
130
+ /**
131
+ * Register a device routed to `provider`. The token tail keys both the delivery row's
132
+ * `token_snapshot` and the recorded native message, isolating concurrent specs.
133
+ */
134
+ export async function registerFakePushDevice(
135
+ request: APIRequestContext,
136
+ token: string,
137
+ provider: FakePushProvider,
138
+ pushToken: string,
139
+ deviceId: string,
140
+ ): Promise<string> {
141
+ const response = await apiRequest(request, 'POST', DEVICES_PATH, {
142
+ token,
143
+ data: { deviceId, platform: provider === 'apns' ? 'ios' : 'android', pushToken, pushProvider: provider },
144
+ })
145
+ expect(response.status(), `register ${provider} device`).toBe(201)
146
+ const body = await readJsonSafe<{ id?: string }>(response)
147
+ return expectId(body?.id, `register ${provider} device response should include id`)
148
+ }
149
+
150
+ /** Teardown counterpart to {@link registerFakePushDevice}. */
151
+ export async function deleteFakePushDevice(
152
+ request: APIRequestContext,
153
+ token: string | null,
154
+ userDeviceId: string | null,
155
+ ): Promise<void> {
156
+ if (!userDeviceId) return
157
+ await deleteEntityByPathIfExists(request, token, `${DEVICES_PATH}/${userDeviceId}`)
158
+ }
159
+
160
+ export async function deleteDeliveriesForDevice(userDeviceId: string | null): Promise<void> {
161
+ if (!userDeviceId) return
162
+ await withClient(async (client) => {
163
+ await client.query('delete from push_notification_deliveries where user_device_id = $1', [userDeviceId])
164
+ }).catch(() => undefined)
165
+ }
166
+
167
+ export async function readLatestDelivery(tenantId: string, userDeviceId: string): Promise<PushDeliveryRow | null> {
168
+ return withClient(async (client) => {
169
+ const res = await client.query(
170
+ `select status, token_snapshot, organization_id, provider, attempts, silent, sent_at, last_error, provider_response
171
+ from push_notification_deliveries
172
+ where tenant_id = $1 and user_device_id = $2
173
+ order by created_at desc
174
+ limit 1`,
175
+ [tenantId, userDeviceId],
176
+ )
177
+ return (res.rows[0] as PushDeliveryRow | undefined) ?? null
178
+ })
179
+ }
180
+
181
+ /**
182
+ * True once the device has been soft-deleted (the `device_unregistered` contract).
183
+ *
184
+ * A MISSING row returns `false`, not `true`: soft-delete keeps the row, so an absent one means the
185
+ * device was never created or a neighbouring teardown hard-deleted it. Returning `true` there would let
186
+ * the central assertion of TC-PUSH-004/008 pass vacuously.
187
+ */
188
+ export async function isDeviceSoftDeleted(userDeviceId: string): Promise<boolean> {
189
+ return withClient(async (client) => {
190
+ const res = await client.query('select deleted_at from user_devices where id = $1', [userDeviceId])
191
+ if (res.rows.length === 0) return false
192
+ return res.rows[0].deleted_at != null
193
+ })
194
+ }
195
+
196
+ /** The provider-native message the REAL adapter handed the faked SDK client. */
197
+ export function readNativeMessage(
198
+ provider: FakePushProvider,
199
+ tokenTail: string,
200
+ sinceIso?: string,
201
+ ): FakePushEntry | undefined {
202
+ return findFakePush(provider, tokenTail, sinceIso)
203
+ }
204
+
205
+ /**
206
+ * Wait for the message this run's worker recorded. Pass `sinceIso` to reject entries from an earlier
207
+ * run — the sink is append-only and the reused-environment path never truncates it. The default
208
+ * (epoch) accepts every recorded entry.
209
+ */
210
+ export async function expectNativeMessage(
211
+ provider: FakePushProvider,
212
+ tokenTail: string,
213
+ sinceIso: string = new Date(0).toISOString(),
214
+ ): Promise<Record<string, unknown>> {
215
+ await expect
216
+ .poll(() => readNativeMessage(provider, tokenTail, sinceIso)?.native ?? null, { timeout: 30_000 })
217
+ .not.toBeNull()
218
+ return readNativeMessage(provider, tokenTail, sinceIso)!.native
219
+ }
@@ -227,6 +227,7 @@
227
227
  "backend.nav.externalSystems": "Externe Systeme",
228
228
  "backend.nav.settings": "Einstellungen",
229
229
  "backend.nav.settingsAdmin": "Administration",
230
+ "notifications.categories.auth": "Sicherheit",
230
231
  "profile.page.description": "Verwalte deine Kontoeinstellungen",
231
232
  "profile.page.selectItem": "Wähle ein Element aus dem Menü, um dein Konto zu verwalten.",
232
233
  "profile.page.title": "Profil",
@@ -227,6 +227,7 @@
227
227
  "backend.nav.externalSystems": "External systems",
228
228
  "backend.nav.settings": "Settings",
229
229
  "backend.nav.settingsAdmin": "Administration",
230
+ "notifications.categories.auth": "Security",
230
231
  "profile.page.description": "Manage your account settings",
231
232
  "profile.page.selectItem": "Select an item from the menu to manage your account.",
232
233
  "profile.page.title": "Profile",
@@ -227,6 +227,7 @@
227
227
  "backend.nav.externalSystems": "Sistemas externos",
228
228
  "backend.nav.settings": "Configuración",
229
229
  "backend.nav.settingsAdmin": "Administración",
230
+ "notifications.categories.auth": "Seguridad",
230
231
  "profile.page.description": "Administra la configuración de tu cuenta",
231
232
  "profile.page.selectItem": "Selecciona un elemento del menú para administrar tu cuenta.",
232
233
  "profile.page.title": "Perfil",
@@ -227,6 +227,7 @@
227
227
  "backend.nav.externalSystems": "외부 시스템",
228
228
  "backend.nav.settings": "설정",
229
229
  "backend.nav.settingsAdmin": "관리",
230
+ "notifications.categories.auth": "보안",
230
231
  "profile.page.description": "계정 설정을 관리합니다",
231
232
  "profile.page.selectItem": "메뉴에서 항목을 선택하여 계정을 관리하세요.",
232
233
  "profile.page.title": "프로필",
@@ -227,6 +227,7 @@
227
227
  "backend.nav.externalSystems": "Systemy zewnetrzne",
228
228
  "backend.nav.settings": "Ustawienia",
229
229
  "backend.nav.settingsAdmin": "Administracja",
230
+ "notifications.categories.auth": "Bezpiecze\u0144stwo",
230
231
  "profile.page.description": "Zarządzaj ustawieniami konta",
231
232
  "profile.page.selectItem": "Wybierz element z menu, aby zarządzać swoim kontem.",
232
233
  "profile.page.title": "Profil",
@@ -3,6 +3,8 @@ import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/no
3
3
  export const notificationTypes: NotificationTypeDefinition[] = [
4
4
  {
5
5
  type: 'auth.password_reset.requested',
6
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
7
+ channels: ['in_app', 'email'],
6
8
  module: 'auth',
7
9
  titleKey: 'auth.notifications.passwordReset.requested.title',
8
10
  bodyKey: 'auth.notifications.passwordReset.requested.body',
@@ -22,6 +24,8 @@ export const notificationTypes: NotificationTypeDefinition[] = [
22
24
  },
23
25
  {
24
26
  type: 'auth.password_reset.completed',
27
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
28
+ channels: ['in_app', 'email'],
25
29
  module: 'auth',
26
30
  titleKey: 'auth.notifications.passwordReset.completed.title',
27
31
  bodyKey: 'auth.notifications.passwordReset.completed.body',
@@ -32,11 +36,15 @@ export const notificationTypes: NotificationTypeDefinition[] = [
32
36
  },
33
37
  {
34
38
  type: 'auth.account.locked',
39
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
40
+ channels: ['in_app', 'email'],
35
41
  module: 'auth',
36
42
  titleKey: 'auth.notifications.account.locked.title',
37
43
  bodyKey: 'auth.notifications.account.locked.body',
38
44
  icon: 'lock',
39
45
  severity: 'warning',
46
+ // Security alert — the user must not be able to silence it.
47
+ nonOptOut: true,
40
48
  actions: [
41
49
  {
42
50
  id: 'contact_support',
@@ -50,11 +58,15 @@ export const notificationTypes: NotificationTypeDefinition[] = [
50
58
  },
51
59
  {
52
60
  type: 'auth.login.new_device',
61
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
62
+ channels: ['in_app', 'email'],
53
63
  module: 'auth',
54
64
  titleKey: 'auth.notifications.login.newDevice.title',
55
65
  bodyKey: 'auth.notifications.login.newDevice.body',
56
66
  icon: 'smartphone',
57
67
  severity: 'info',
68
+ // Security alert — the user must not be able to silence it.
69
+ nonOptOut: true,
58
70
  actions: [
59
71
  {
60
72
  id: 'view_sessions',
@@ -69,6 +81,8 @@ export const notificationTypes: NotificationTypeDefinition[] = [
69
81
  },
70
82
  {
71
83
  type: 'auth.role.assigned',
84
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
85
+ channels: ['in_app', 'email'],
72
86
  module: 'auth',
73
87
  titleKey: 'auth.notifications.role.assigned.title',
74
88
  bodyKey: 'auth.notifications.role.assigned.body',
@@ -88,6 +102,8 @@ export const notificationTypes: NotificationTypeDefinition[] = [
88
102
  },
89
103
  {
90
104
  type: 'auth.role.revoked',
105
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
106
+ channels: ['in_app', 'email'],
91
107
  module: 'auth',
92
108
  titleKey: 'auth.notifications.role.revoked.title',
93
109
  bodyKey: 'auth.notifications.role.revoked.body',
@@ -392,5 +392,6 @@
392
392
  "common.remove": "Entfernen",
393
393
  "common.retry": "Wiederholen",
394
394
  "common.unknown": "Unbekannt",
395
- "common.yes": "Ja"
395
+ "common.yes": "Ja",
396
+ "notifications.categories.business_rules": "Geschäftsregeln"
396
397
  }
@@ -392,5 +392,6 @@
392
392
  "common.remove": "Remove",
393
393
  "common.retry": "Retry",
394
394
  "common.unknown": "Unknown",
395
- "common.yes": "Yes"
395
+ "common.yes": "Yes",
396
+ "notifications.categories.business_rules": "Business rules"
396
397
  }
@@ -392,5 +392,6 @@
392
392
  "common.remove": "Eliminar",
393
393
  "common.retry": "Reintentar",
394
394
  "common.unknown": "Desconocido",
395
- "common.yes": "Sí"
395
+ "common.yes": "Sí",
396
+ "notifications.categories.business_rules": "Reglas de negocio"
396
397
  }
@@ -392,5 +392,6 @@
392
392
  "common.remove": "제거",
393
393
  "common.retry": "재시도",
394
394
  "common.unknown": "알 수 없음",
395
- "common.yes": "예"
395
+ "common.yes": "예",
396
+ "notifications.categories.business_rules": "비즈니스 규칙"
396
397
  }
@@ -392,5 +392,6 @@
392
392
  "common.remove": "Usuń",
393
393
  "common.retry": "Ponów",
394
394
  "common.unknown": "Nieznany",
395
- "common.yes": "Tak"
395
+ "common.yes": "Tak",
396
+ "notifications.categories.business_rules": "Regu\u0142y biznesowe"
396
397
  }
@@ -3,6 +3,8 @@ import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/no
3
3
  export const notificationTypes: NotificationTypeDefinition[] = [
4
4
  {
5
5
  type: 'business_rules.rule.execution_failed',
6
+ // Ships without push — operators re-enable it per type from the Notification Delivery settings.
7
+ channels: ['in_app', 'email'],
6
8
  module: 'business_rules',
7
9
  titleKey: 'businessRules.notifications.rule.executionFailed.title',
8
10
  bodyKey: 'businessRules.notifications.rule.executionFailed.body',