@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.
- package/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/notification/index.js +6 -0
- package/dist/generated/entities/notification/index.js.map +2 -2
- package/dist/generated/entities/notification_preference/index.js +19 -0
- package/dist/generated/entities/notification_preference/index.js.map +7 -0
- package/dist/generated/entities/notification_type/index.js +21 -0
- package/dist/generated/entities/notification_type/index.js.map +7 -0
- package/dist/generated/entities/notification_type_override/index.js +17 -0
- package/dist/generated/entities/notification_type_override/index.js.map +7 -0
- package/dist/generated/entities/push_notification_delivery/index.js +41 -0
- package/dist/generated/entities/push_notification_delivery/index.js.map +7 -0
- package/dist/generated/entities/user_device/index.js +35 -0
- package/dist/generated/entities/user_device/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +12 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +72 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/api.js +2 -1
- package/dist/helpers/integration/api.js.map +2 -2
- package/dist/helpers/integration/appRoot.js +9 -0
- package/dist/helpers/integration/appRoot.js.map +7 -0
- package/dist/helpers/integration/dbFixtures.js +1 -4
- package/dist/helpers/integration/dbFixtures.js.map +2 -2
- package/dist/helpers/integration/pushFake.js +126 -0
- package/dist/helpers/integration/pushFake.js.map +7 -0
- package/dist/modules/auth/notifications.js +16 -0
- package/dist/modules/auth/notifications.js.map +2 -2
- package/dist/modules/business_rules/notifications.js +2 -0
- package/dist/modules/business_rules/notifications.js.map +2 -2
- package/dist/modules/catalog/notifications.js +2 -0
- package/dist/modules/catalog/notifications.js.map +2 -2
- package/dist/modules/communication_channels/acl.js +9 -0
- package/dist/modules/communication_channels/acl.js.map +2 -2
- package/dist/modules/communication_channels/api/delete/admin/channels/[id]/route.js +133 -0
- package/dist/modules/communication_channels/api/delete/admin/channels/[id]/route.js.map +7 -0
- package/dist/modules/communication_channels/api/get/channels/[id]/health/route.js +6 -2
- package/dist/modules/communication_channels/api/get/channels/[id]/health/route.js.map +2 -2
- package/dist/modules/communication_channels/api/get/channels/[id]/route.js +6 -2
- package/dist/modules/communication_channels/api/get/channels/[id]/route.js.map +2 -2
- package/dist/modules/communication_channels/api/get/channels/route.js +2 -1
- package/dist/modules/communication_channels/api/get/channels/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js +10 -5
- package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/channels/connect/credentials/route.js +29 -1
- package/dist/modules/communication_channels/api/post/channels/connect/credentials/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.js +157 -0
- package/dist/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.js.map +7 -0
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +8 -1
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
- package/dist/modules/communication_channels/commands/admin-delete-channel.js +141 -0
- package/dist/modules/communication_channels/commands/admin-delete-channel.js.map +7 -0
- package/dist/modules/communication_channels/commands/connect-credential-channel.js +25 -8
- package/dist/modules/communication_channels/commands/connect-credential-channel.js.map +2 -2
- package/dist/modules/communication_channels/commands/deliver-outbound-message.js +2 -2
- package/dist/modules/communication_channels/commands/deliver-outbound-message.js.map +2 -2
- package/dist/modules/communication_channels/commands/push-register.js +1 -1
- package/dist/modules/communication_channels/commands/push-register.js.map +2 -2
- package/dist/modules/communication_channels/commands/push-unregister.js +4 -3
- package/dist/modules/communication_channels/commands/push-unregister.js.map +2 -2
- package/dist/modules/communication_channels/data/entities.js +4 -0
- package/dist/modules/communication_channels/data/entities.js.map +2 -2
- package/dist/modules/communication_channels/data/validators.js +2 -1
- package/dist/modules/communication_channels/data/validators.js.map +2 -2
- package/dist/modules/communication_channels/lib/access-control.js +11 -1
- package/dist/modules/communication_channels/lib/access-control.js.map +2 -2
- package/dist/modules/communication_channels/lib/connect-channel.js +20 -12
- package/dist/modules/communication_channels/lib/connect-channel.js.map +2 -2
- package/dist/modules/communication_channels/lib/push-adapter.js +68 -0
- package/dist/modules/communication_channels/lib/push-adapter.js.map +7 -0
- package/dist/modules/communication_channels/lib/push-capabilities.js +31 -0
- package/dist/modules/communication_channels/lib/push-capabilities.js.map +7 -0
- package/dist/modules/communication_channels/lib/push-connect-error.js +20 -0
- package/dist/modules/communication_channels/lib/push-connect-error.js.map +7 -0
- package/dist/modules/communication_channels/lib/push-credential-errors.js +41 -0
- package/dist/modules/communication_channels/lib/push-credential-errors.js.map +7 -0
- package/dist/modules/communication_channels/lib/push-envelope.js +46 -0
- package/dist/modules/communication_channels/lib/push-envelope.js.map +7 -0
- package/dist/modules/communication_channels/lib/refcounted-client-cache.js +64 -0
- package/dist/modules/communication_channels/lib/refcounted-client-cache.js.map +7 -0
- package/dist/modules/communication_channels/migrations/Migration20260703123630_communication_channels.js +13 -0
- package/dist/modules/communication_channels/migrations/Migration20260703123630_communication_channels.js.map +7 -0
- package/dist/modules/communication_channels/notifications.js +4 -0
- package/dist/modules/communication_channels/notifications.js.map +2 -2
- package/dist/modules/communication_channels/setup.js +2 -0
- package/dist/modules/communication_channels/setup.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +21 -0
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/customer_accounts/notifications.js +12 -0
- package/dist/modules/customer_accounts/notifications.js.map +2 -2
- package/dist/modules/customers/notifications.js +4 -0
- package/dist/modules/customers/notifications.js.map +2 -2
- package/dist/modules/devices/acl.js +11 -0
- package/dist/modules/devices/acl.js.map +7 -0
- package/dist/modules/devices/api/[id]/route.js +167 -0
- package/dist/modules/devices/api/[id]/route.js.map +7 -0
- package/dist/modules/devices/api/admin/devices/[id]/route.js +219 -0
- package/dist/modules/devices/api/admin/devices/[id]/route.js.map +7 -0
- package/dist/modules/devices/api/admin/devices/route.js +140 -0
- package/dist/modules/devices/api/admin/devices/route.js.map +7 -0
- package/dist/modules/devices/api/auth.js +9 -0
- package/dist/modules/devices/api/auth.js.map +7 -0
- package/dist/modules/devices/api/deviceList.js +53 -0
- package/dist/modules/devices/api/deviceList.js.map +7 -0
- package/dist/modules/devices/api/deviceOps.js +118 -0
- package/dist/modules/devices/api/deviceOps.js.map +7 -0
- package/dist/modules/devices/api/openapi.js +19 -0
- package/dist/modules/devices/api/openapi.js.map +7 -0
- package/dist/modules/devices/api/route.js +143 -0
- package/dist/modules/devices/api/route.js.map +7 -0
- package/dist/modules/devices/backend/devices/[id]/page.js +135 -0
- package/dist/modules/devices/backend/devices/[id]/page.js.map +7 -0
- package/dist/modules/devices/backend/devices/[id]/page.meta.js +16 -0
- package/dist/modules/devices/backend/devices/[id]/page.meta.js.map +7 -0
- package/dist/modules/devices/backend/devices/create/page.js +68 -0
- package/dist/modules/devices/backend/devices/create/page.js.map +7 -0
- package/dist/modules/devices/backend/devices/create/page.meta.js +16 -0
- package/dist/modules/devices/backend/devices/create/page.meta.js.map +7 -0
- package/dist/modules/devices/backend/devices/page.js +235 -0
- package/dist/modules/devices/backend/devices/page.js.map +7 -0
- package/dist/modules/devices/backend/devices/page.meta.js +23 -0
- package/dist/modules/devices/backend/devices/page.meta.js.map +7 -0
- package/dist/modules/devices/commands/deactivate.js +107 -0
- package/dist/modules/devices/commands/deactivate.js.map +7 -0
- package/dist/modules/devices/commands/index.js +4 -0
- package/dist/modules/devices/commands/index.js.map +7 -0
- package/dist/modules/devices/commands/register.js +183 -0
- package/dist/modules/devices/commands/register.js.map +7 -0
- package/dist/modules/devices/commands/shared.js +74 -0
- package/dist/modules/devices/commands/shared.js.map +7 -0
- package/dist/modules/devices/commands/update.js +126 -0
- package/dist/modules/devices/commands/update.js.map +7 -0
- package/dist/modules/devices/data/entities.js +83 -0
- package/dist/modules/devices/data/entities.js.map +7 -0
- package/dist/modules/devices/data/validators.js +49 -0
- package/dist/modules/devices/data/validators.js.map +7 -0
- package/dist/modules/devices/di.js +11 -0
- package/dist/modules/devices/di.js.map +7 -0
- package/dist/modules/devices/encryption.js +12 -0
- package/dist/modules/devices/encryption.js.map +7 -0
- package/dist/modules/devices/events.js +19 -0
- package/dist/modules/devices/events.js.map +7 -0
- package/dist/modules/devices/index.js +17 -0
- package/dist/modules/devices/index.js.map +7 -0
- package/dist/modules/devices/lib/operationMetadata.js +20 -0
- package/dist/modules/devices/lib/operationMetadata.js.map +7 -0
- package/dist/modules/devices/migrations/Migration20260602120000.js +15 -0
- package/dist/modules/devices/migrations/Migration20260602120000.js.map +7 -0
- package/dist/modules/devices/migrations/Migration20260630120000.js +15 -0
- package/dist/modules/devices/migrations/Migration20260630120000.js.map +7 -0
- package/dist/modules/devices/migrations/Migration20260701120000.js +13 -0
- package/dist/modules/devices/migrations/Migration20260701120000.js.map +7 -0
- package/dist/modules/devices/migrations/Migration20260721120000.js +15 -0
- package/dist/modules/devices/migrations/Migration20260721120000.js.map +7 -0
- package/dist/modules/devices/setup.js +13 -0
- package/dist/modules/devices/setup.js.map +7 -0
- package/dist/modules/entities/cli.js +8 -3
- package/dist/modules/entities/cli.js.map +2 -2
- package/dist/modules/entities/migrations/Migration20260722120000.js +28 -0
- package/dist/modules/entities/migrations/Migration20260722120000.js.map +7 -0
- package/dist/modules/inbox_ops/notifications.js +2 -0
- package/dist/modules/inbox_ops/notifications.js.map +2 -2
- package/dist/modules/messages/notifications.js +2 -0
- package/dist/modules/messages/notifications.js.map +2 -2
- package/dist/modules/notifications/acl.js +3 -1
- package/dist/modules/notifications/acl.js.map +2 -2
- package/dist/modules/notifications/api/admin/preferences/route.js +167 -0
- package/dist/modules/notifications/api/admin/preferences/route.js.map +7 -0
- package/dist/modules/notifications/api/channels/route.js +54 -0
- package/dist/modules/notifications/api/channels/route.js.map +7 -0
- package/dist/modules/notifications/api/preferences/route.js +126 -0
- package/dist/modules/notifications/api/preferences/route.js.map +7 -0
- package/dist/modules/notifications/api/route.js +8 -1
- package/dist/modules/notifications/api/route.js.map +2 -2
- package/dist/modules/notifications/api/types/[id]/channels/[channel]/route.js +187 -0
- package/dist/modules/notifications/api/types/[id]/channels/[channel]/route.js.map +7 -0
- package/dist/modules/notifications/api/types/route.js +225 -0
- package/dist/modules/notifications/api/types/route.js.map +7 -0
- package/dist/modules/notifications/api/unread-count/route.js +5 -1
- package/dist/modules/notifications/api/unread-count/route.js.map +2 -2
- package/dist/modules/notifications/backend/notifications/user-preferences/page.js +10 -0
- package/dist/modules/notifications/backend/notifications/user-preferences/page.js.map +7 -0
- package/dist/modules/notifications/backend/notifications/user-preferences/page.meta.js +28 -0
- package/dist/modules/notifications/backend/notifications/user-preferences/page.meta.js.map +7 -0
- package/dist/modules/notifications/backend/profile/notification-preferences/page.js +10 -0
- package/dist/modules/notifications/backend/profile/notification-preferences/page.js.map +7 -0
- package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js +33 -0
- package/dist/modules/notifications/backend/profile/notification-preferences/page.meta.js.map +7 -0
- package/dist/modules/notifications/data/entities.js +128 -1
- package/dist/modules/notifications/data/entities.js.map +2 -2
- package/dist/modules/notifications/data/validators.js +95 -2
- package/dist/modules/notifications/data/validators.js.map +2 -2
- package/dist/modules/notifications/di.js +7 -0
- package/dist/modules/notifications/di.js.map +2 -2
- package/dist/modules/notifications/events.js +17 -0
- package/dist/modules/notifications/events.js.map +2 -2
- package/dist/modules/notifications/frontend/NotificationPreferenceMatrix.js +190 -0
- package/dist/modules/notifications/frontend/NotificationPreferenceMatrix.js.map +7 -0
- package/dist/modules/notifications/frontend/NotificationPreferencesPageClient.js +124 -0
- package/dist/modules/notifications/frontend/NotificationPreferencesPageClient.js.map +7 -0
- package/dist/modules/notifications/frontend/NotificationSettingsPageClient.js +166 -1
- package/dist/modules/notifications/frontend/NotificationSettingsPageClient.js.map +2 -2
- package/dist/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.js +172 -0
- package/dist/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.js.map +7 -0
- package/dist/modules/notifications/generators.js +63 -0
- package/dist/modules/notifications/generators.js.map +7 -0
- package/dist/modules/notifications/lib/delivery-strategies-registry.js +19 -0
- package/dist/modules/notifications/lib/delivery-strategies-registry.js.map +7 -0
- package/dist/modules/notifications/lib/deliveryStrategies.js.map +2 -2
- package/dist/modules/notifications/lib/derive-category.js +8 -0
- package/dist/modules/notifications/lib/derive-category.js.map +7 -0
- package/dist/modules/notifications/lib/notification-channel-registry.js +35 -0
- package/dist/modules/notifications/lib/notification-channel-registry.js.map +7 -0
- package/dist/modules/notifications/lib/notification-type-registry.js +87 -0
- package/dist/modules/notifications/lib/notification-type-registry.js.map +7 -0
- package/dist/modules/notifications/lib/notificationCopy.js +14 -0
- package/dist/modules/notifications/lib/notificationCopy.js.map +7 -0
- package/dist/modules/notifications/lib/notificationFactory.js +4 -1
- package/dist/modules/notifications/lib/notificationFactory.js.map +2 -2
- package/dist/modules/notifications/lib/notificationMapper.js +2 -0
- package/dist/modules/notifications/lib/notificationMapper.js.map +2 -2
- package/dist/modules/notifications/lib/notificationPreferenceService.js +83 -0
- package/dist/modules/notifications/lib/notificationPreferenceService.js.map +7 -0
- package/dist/modules/notifications/lib/notificationService.js +83 -28
- package/dist/modules/notifications/lib/notificationService.js.map +2 -2
- package/dist/modules/notifications/lib/notificationVisibility.js +24 -0
- package/dist/modules/notifications/lib/notificationVisibility.js.map +7 -0
- package/dist/modules/notifications/lib/routeHelpers.js +11 -1
- package/dist/modules/notifications/lib/routeHelpers.js.map +2 -2
- package/dist/modules/notifications/lib/shouldDeliver.js +46 -0
- package/dist/modules/notifications/lib/shouldDeliver.js.map +7 -0
- package/dist/modules/notifications/lib/strategies/email-delivery-strategy.js +54 -0
- package/dist/modules/notifications/lib/strategies/email-delivery-strategy.js.map +7 -0
- package/dist/modules/notifications/lib/strategies/in-app-delivery-strategy.js +12 -0
- package/dist/modules/notifications/lib/strategies/in-app-delivery-strategy.js.map +7 -0
- package/dist/modules/notifications/lib/typeCatalogue.js +71 -0
- package/dist/modules/notifications/lib/typeCatalogue.js.map +7 -0
- package/dist/modules/notifications/lib/typeChannelSettings.js +12 -0
- package/dist/modules/notifications/lib/typeChannelSettings.js.map +7 -0
- package/dist/modules/notifications/lib/typeOverrides.js +19 -0
- package/dist/modules/notifications/lib/typeOverrides.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260625122947_notifications.js +14 -0
- package/dist/modules/notifications/migrations/Migration20260625122947_notifications.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.js +15 -0
- package/dist/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.js +13 -0
- package/dist/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.js +15 -0
- package/dist/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260706120000_notifications_channels.js +13 -0
- package/dist/modules/notifications/migrations/Migration20260706120000_notifications_channels.js.map +7 -0
- package/dist/modules/notifications/migrations/Migration20260716123121_notifications.js +14 -0
- package/dist/modules/notifications/migrations/Migration20260716123121_notifications.js.map +7 -0
- package/dist/modules/notifications/notification-channels.js +26 -0
- package/dist/modules/notifications/notification-channels.js.map +7 -0
- package/dist/modules/notifications/notifications.delivery-strategies.js +12 -0
- package/dist/modules/notifications/notifications.delivery-strategies.js.map +7 -0
- package/dist/modules/notifications/setup.js +16 -1
- package/dist/modules/notifications/setup.js.map +2 -2
- package/dist/modules/notifications/subscribers/deliver-notification.js +66 -57
- package/dist/modules/notifications/subscribers/deliver-notification.js.map +2 -2
- package/dist/modules/notifications/subscribers/sync-notification-types.js +16 -0
- package/dist/modules/notifications/subscribers/sync-notification-types.js.map +7 -0
- package/dist/modules/notifications/widgets/injection/profile-preferences-menu/widget.js +23 -0
- package/dist/modules/notifications/widgets/injection/profile-preferences-menu/widget.js.map +7 -0
- package/dist/modules/notifications/widgets/injection-table.js +14 -0
- package/dist/modules/notifications/widgets/injection-table.js.map +7 -0
- package/dist/modules/push_notifications/acl.js +13 -0
- package/dist/modules/push_notifications/acl.js.map +7 -0
- package/dist/modules/push_notifications/api/custom-send/route.js +141 -0
- package/dist/modules/push_notifications/api/custom-send/route.js.map +7 -0
- package/dist/modules/push_notifications/api/deliveries/[id]/route.js +110 -0
- package/dist/modules/push_notifications/api/deliveries/[id]/route.js.map +7 -0
- package/dist/modules/push_notifications/api/deliveries/route.js +56 -0
- package/dist/modules/push_notifications/api/deliveries/route.js.map +7 -0
- package/dist/modules/push_notifications/api/openapi.js +19 -0
- package/dist/modules/push_notifications/api/openapi.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/[id]/page.js +103 -0
- package/dist/modules/push_notifications/backend/push_notifications/[id]/page.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/[id]/page.meta.js +13 -0
- package/dist/modules/push_notifications/backend/push_notifications/[id]/page.meta.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/page.js +213 -0
- package/dist/modules/push_notifications/backend/push_notifications/page.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/page.meta.js +23 -0
- package/dist/modules/push_notifications/backend/push_notifications/page.meta.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/send/page.js +245 -0
- package/dist/modules/push_notifications/backend/push_notifications/send/page.js.map +7 -0
- package/dist/modules/push_notifications/backend/push_notifications/send/page.meta.js +26 -0
- package/dist/modules/push_notifications/backend/push_notifications/send/page.meta.js.map +7 -0
- package/dist/modules/push_notifications/data/entities.js +92 -0
- package/dist/modules/push_notifications/data/entities.js.map +7 -0
- package/dist/modules/push_notifications/data/extensions.js +23 -0
- package/dist/modules/push_notifications/data/extensions.js.map +7 -0
- package/dist/modules/push_notifications/data/validators.js +89 -0
- package/dist/modules/push_notifications/data/validators.js.map +7 -0
- package/dist/modules/push_notifications/di.js +17 -0
- package/dist/modules/push_notifications/di.js.map +7 -0
- package/dist/modules/push_notifications/events.js +24 -0
- package/dist/modules/push_notifications/events.js.map +7 -0
- package/dist/modules/push_notifications/index.js +16 -0
- package/dist/modules/push_notifications/index.js.map +7 -0
- package/dist/modules/push_notifications/lib/fake-provider-recorder.js +80 -0
- package/dist/modules/push_notifications/lib/fake-provider-recorder.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-delivery-strategy.js +54 -0
- package/dist/modules/push_notifications/lib/push-delivery-strategy.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-delivery.js +297 -0
- package/dist/modules/push_notifications/lib/push-delivery.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-fanout.js +138 -0
- package/dist/modules/push_notifications/lib/push-fanout.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-health.js +32 -0
- package/dist/modules/push_notifications/lib/push-health.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-reaper.js +87 -0
- package/dist/modules/push_notifications/lib/push-reaper.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-receipt-reaper.js +136 -0
- package/dist/modules/push_notifications/lib/push-receipt-reaper.js.map +7 -0
- package/dist/modules/push_notifications/lib/push-stub-adapter.js +63 -0
- package/dist/modules/push_notifications/lib/push-stub-adapter.js.map +7 -0
- package/dist/modules/push_notifications/lib/queue.js +53 -0
- package/dist/modules/push_notifications/lib/queue.js.map +7 -0
- package/dist/modules/push_notifications/lib/reclaim-window.js +13 -0
- package/dist/modules/push_notifications/lib/reclaim-window.js.map +7 -0
- package/dist/modules/push_notifications/lib/send-custom-push.js +48 -0
- package/dist/modules/push_notifications/lib/send-custom-push.js.map +7 -0
- package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js +16 -0
- package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js.map +7 -0
- package/dist/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.js +13 -0
- package/dist/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.js.map +7 -0
- package/dist/modules/push_notifications/notifications.delivery-strategies.js +8 -0
- package/dist/modules/push_notifications/notifications.delivery-strategies.js.map +7 -0
- package/dist/modules/push_notifications/notifications.js +40 -0
- package/dist/modules/push_notifications/notifications.js.map +7 -0
- package/dist/modules/push_notifications/setup.js +52 -0
- package/dist/modules/push_notifications/setup.js.map +7 -0
- package/dist/modules/push_notifications/workers/reclaim-stuck.worker.js +57 -0
- package/dist/modules/push_notifications/workers/reclaim-stuck.worker.js.map +7 -0
- package/dist/modules/push_notifications/workers/send-push.worker.js +27 -0
- package/dist/modules/push_notifications/workers/send-push.worker.js.map +7 -0
- package/dist/modules/sales/notifications.js +8 -0
- package/dist/modules/sales/notifications.js.map +2 -2
- package/dist/modules/staff/notifications.js +6 -0
- package/dist/modules/staff/notifications.js.map +2 -2
- package/dist/modules/workflows/notifications.js +2 -0
- package/dist/modules/workflows/notifications.js.map +2 -2
- package/generated/entities/notification/index.ts +3 -0
- package/generated/entities/notification_preference/index.ts +8 -0
- package/generated/entities/notification_type/index.ts +9 -0
- package/generated/entities/notification_type_override/index.ts +7 -0
- package/generated/entities/push_notification_delivery/index.ts +19 -0
- package/generated/entities/user_device/index.ts +16 -0
- package/generated/entities.ids.generated.ts +12 -1
- package/generated/entity-fields-registry.ts +72 -0
- package/package.json +7 -7
- package/src/helpers/integration/api.ts +2 -1
- package/src/helpers/integration/appRoot.ts +13 -0
- package/src/helpers/integration/dbFixtures.ts +1 -5
- package/src/helpers/integration/pushFake.ts +219 -0
- package/src/modules/auth/i18n/de.json +1 -0
- package/src/modules/auth/i18n/en.json +1 -0
- package/src/modules/auth/i18n/es.json +1 -0
- package/src/modules/auth/i18n/ko.json +1 -0
- package/src/modules/auth/i18n/pl.json +1 -0
- package/src/modules/auth/notifications.ts +16 -0
- package/src/modules/business_rules/i18n/de.json +2 -1
- package/src/modules/business_rules/i18n/en.json +2 -1
- package/src/modules/business_rules/i18n/es.json +2 -1
- package/src/modules/business_rules/i18n/ko.json +2 -1
- package/src/modules/business_rules/i18n/pl.json +2 -1
- package/src/modules/business_rules/notifications.ts +2 -0
- package/src/modules/catalog/i18n/de.json +2 -1
- package/src/modules/catalog/i18n/en.json +2 -1
- package/src/modules/catalog/i18n/es.json +2 -1
- package/src/modules/catalog/i18n/ko.json +2 -1
- package/src/modules/catalog/i18n/pl.json +2 -1
- package/src/modules/catalog/notifications.ts +2 -0
- package/src/modules/communication_channels/acl.ts +9 -0
- package/src/modules/communication_channels/api/delete/admin/channels/[id]/route.ts +168 -0
- package/src/modules/communication_channels/api/get/channels/[id]/health/route.ts +6 -2
- package/src/modules/communication_channels/api/get/channels/[id]/route.ts +6 -2
- package/src/modules/communication_channels/api/get/channels/route.ts +2 -1
- package/src/modules/communication_channels/api/post/channels/[id]/test-send/route.ts +16 -5
- package/src/modules/communication_channels/api/post/channels/connect/credentials/route.ts +37 -1
- package/src/modules/communication_channels/api/post/channels/connect/tenant-credentials/route.ts +175 -0
- package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +11 -1
- package/src/modules/communication_channels/commands/admin-delete-channel.ts +203 -0
- package/src/modules/communication_channels/commands/connect-credential-channel.ts +63 -15
- package/src/modules/communication_channels/commands/deliver-outbound-message.ts +10 -2
- package/src/modules/communication_channels/commands/push-register.ts +7 -1
- package/src/modules/communication_channels/commands/push-unregister.ts +14 -3
- package/src/modules/communication_channels/data/entities.ts +10 -0
- package/src/modules/communication_channels/data/validators.ts +1 -0
- package/src/modules/communication_channels/i18n/de.json +35 -1
- package/src/modules/communication_channels/i18n/en.json +35 -1
- package/src/modules/communication_channels/i18n/es.json +35 -1
- package/src/modules/communication_channels/i18n/ko.json +35 -1
- package/src/modules/communication_channels/i18n/pl.json +35 -1
- package/src/modules/communication_channels/lib/access-control.ts +42 -0
- package/src/modules/communication_channels/lib/adapter.ts +25 -0
- package/src/modules/communication_channels/lib/connect-channel.ts +61 -26
- package/src/modules/communication_channels/lib/push-adapter.ts +139 -0
- package/src/modules/communication_channels/lib/push-capabilities.ts +42 -0
- package/src/modules/communication_channels/lib/push-connect-error.ts +52 -0
- package/src/modules/communication_channels/lib/push-credential-errors.ts +58 -0
- package/src/modules/communication_channels/lib/push-envelope.ts +104 -0
- package/src/modules/communication_channels/lib/refcounted-client-cache.ts +123 -0
- package/src/modules/communication_channels/migrations/.snapshot-open-mercato.json +9 -0
- package/src/modules/communication_channels/migrations/Migration20260703123630_communication_channels.ts +20 -0
- package/src/modules/communication_channels/notifications.ts +4 -0
- package/src/modules/communication_channels/setup.ts +2 -0
- package/src/modules/configs/i18n/de.json +5 -1
- package/src/modules/configs/i18n/en.json +5 -1
- package/src/modules/configs/i18n/es.json +5 -1
- package/src/modules/configs/i18n/ko.json +5 -1
- package/src/modules/configs/i18n/pl.json +5 -1
- package/src/modules/configs/lib/upgrade-actions.ts +21 -0
- package/src/modules/customer_accounts/i18n/de.json +2 -1
- package/src/modules/customer_accounts/i18n/en.json +2 -1
- package/src/modules/customer_accounts/i18n/es.json +2 -1
- package/src/modules/customer_accounts/i18n/ko.json +2 -1
- package/src/modules/customer_accounts/i18n/pl.json +2 -1
- package/src/modules/customer_accounts/notifications.ts +12 -0
- package/src/modules/customers/i18n/de.json +2 -1
- package/src/modules/customers/i18n/en.json +2 -1
- package/src/modules/customers/i18n/es.json +2 -1
- package/src/modules/customers/i18n/ko.json +2 -1
- package/src/modules/customers/i18n/pl.json +2 -1
- package/src/modules/customers/notifications.ts +4 -0
- package/src/modules/devices/AGENTS.md +101 -0
- package/src/modules/devices/acl.ts +7 -0
- package/src/modules/devices/api/[id]/route.ts +180 -0
- package/src/modules/devices/api/admin/devices/[id]/route.ts +235 -0
- package/src/modules/devices/api/admin/devices/route.ts +160 -0
- package/src/modules/devices/api/auth.ts +13 -0
- package/src/modules/devices/api/deviceList.ts +54 -0
- package/src/modules/devices/api/deviceOps.ts +186 -0
- package/src/modules/devices/api/openapi.ts +23 -0
- package/src/modules/devices/api/route.ts +165 -0
- package/src/modules/devices/backend/devices/[id]/page.meta.ts +12 -0
- package/src/modules/devices/backend/devices/[id]/page.tsx +164 -0
- package/src/modules/devices/backend/devices/create/page.meta.ts +12 -0
- package/src/modules/devices/backend/devices/create/page.tsx +81 -0
- package/src/modules/devices/backend/devices/page.meta.ts +21 -0
- package/src/modules/devices/backend/devices/page.tsx +259 -0
- package/src/modules/devices/commands/deactivate.ts +126 -0
- package/src/modules/devices/commands/index.ts +3 -0
- package/src/modules/devices/commands/register.ts +199 -0
- package/src/modules/devices/commands/shared.ts +119 -0
- package/src/modules/devices/commands/update.ts +142 -0
- package/src/modules/devices/data/entities.ts +79 -0
- package/src/modules/devices/data/validators.ts +65 -0
- package/src/modules/devices/di.ts +9 -0
- package/src/modules/devices/encryption.ts +15 -0
- package/src/modules/devices/events.ts +16 -0
- package/src/modules/devices/i18n/de.json +45 -0
- package/src/modules/devices/i18n/en.json +45 -0
- package/src/modules/devices/i18n/es.json +45 -0
- package/src/modules/devices/i18n/ko.json +45 -0
- package/src/modules/devices/i18n/pl.json +45 -0
- package/src/modules/devices/index.ts +15 -0
- package/src/modules/devices/lib/operationMetadata.ts +35 -0
- package/src/modules/devices/migrations/.snapshot-open-mercato.json +200 -0
- package/src/modules/devices/migrations/Migration20260602120000.ts +15 -0
- package/src/modules/devices/migrations/Migration20260630120000.ts +20 -0
- package/src/modules/devices/migrations/Migration20260701120000.ts +13 -0
- package/src/modules/devices/migrations/Migration20260721120000.ts +18 -0
- package/src/modules/devices/setup.ts +11 -0
- package/src/modules/entities/cli.ts +16 -2
- package/src/modules/entities/migrations/Migration20260722120000.ts +38 -0
- package/src/modules/inbox_ops/i18n/de.json +2 -1
- package/src/modules/inbox_ops/i18n/en.json +2 -1
- package/src/modules/inbox_ops/i18n/es.json +2 -1
- package/src/modules/inbox_ops/i18n/ko.json +2 -1
- package/src/modules/inbox_ops/i18n/pl.json +2 -1
- package/src/modules/inbox_ops/notifications.ts +2 -0
- package/src/modules/messages/i18n/de.json +2 -1
- package/src/modules/messages/i18n/en.json +2 -1
- package/src/modules/messages/i18n/es.json +2 -1
- package/src/modules/messages/i18n/ko.json +2 -1
- package/src/modules/messages/i18n/pl.json +2 -1
- package/src/modules/messages/notifications.ts +2 -0
- package/src/modules/notifications/AGENTS.md +54 -0
- package/src/modules/notifications/acl.ts +2 -0
- package/src/modules/notifications/api/admin/preferences/route.ts +193 -0
- package/src/modules/notifications/api/channels/route.ts +54 -0
- package/src/modules/notifications/api/preferences/route.ts +131 -0
- package/src/modules/notifications/api/route.ts +8 -1
- package/src/modules/notifications/api/types/[id]/channels/[channel]/route.ts +226 -0
- package/src/modules/notifications/api/types/route.ts +239 -0
- package/src/modules/notifications/api/unread-count/route.ts +5 -1
- package/src/modules/notifications/backend/notifications/user-preferences/page.meta.ts +26 -0
- package/src/modules/notifications/backend/notifications/user-preferences/page.tsx +12 -0
- package/src/modules/notifications/backend/profile/notification-preferences/page.meta.ts +31 -0
- package/src/modules/notifications/backend/profile/notification-preferences/page.tsx +12 -0
- package/src/modules/notifications/data/entities.ts +144 -0
- package/src/modules/notifications/data/validators.ts +116 -0
- package/src/modules/notifications/di.ts +7 -0
- package/src/modules/notifications/events.ts +23 -0
- package/src/modules/notifications/frontend/NotificationPreferenceMatrix.tsx +287 -0
- package/src/modules/notifications/frontend/NotificationPreferencesPageClient.tsx +155 -0
- package/src/modules/notifications/frontend/NotificationSettingsPageClient.tsx +273 -2
- package/src/modules/notifications/frontend/NotificationUserPreferencesAdminPageClient.tsx +214 -0
- package/src/modules/notifications/generators.ts +82 -0
- package/src/modules/notifications/i18n/de.json +43 -0
- package/src/modules/notifications/i18n/en.json +43 -0
- package/src/modules/notifications/i18n/es.json +43 -0
- package/src/modules/notifications/i18n/ko.json +43 -0
- package/src/modules/notifications/i18n/pl.json +44 -1
- package/src/modules/notifications/lib/delivery-strategies-registry.ts +30 -0
- package/src/modules/notifications/lib/deliveryStrategies.ts +40 -4
- package/src/modules/notifications/lib/derive-category.ts +15 -0
- package/src/modules/notifications/lib/notification-channel-registry.ts +59 -0
- package/src/modules/notifications/lib/notification-type-registry.ts +182 -0
- package/src/modules/notifications/lib/notificationCopy.ts +34 -0
- package/src/modules/notifications/lib/notificationFactory.ts +5 -1
- package/src/modules/notifications/lib/notificationMapper.ts +2 -0
- package/src/modules/notifications/lib/notificationPreferenceService.ts +138 -0
- package/src/modules/notifications/lib/notificationService.ts +129 -25
- package/src/modules/notifications/lib/notificationVisibility.ts +48 -0
- package/src/modules/notifications/lib/routeHelpers.ts +14 -1
- package/src/modules/notifications/lib/shouldDeliver.ts +112 -0
- package/src/modules/notifications/lib/strategies/email-delivery-strategy.ts +63 -0
- package/src/modules/notifications/lib/strategies/in-app-delivery-strategy.ts +21 -0
- package/src/modules/notifications/lib/typeCatalogue.ts +141 -0
- package/src/modules/notifications/lib/typeChannelSettings.ts +29 -0
- package/src/modules/notifications/lib/typeOverrides.ts +46 -0
- package/src/modules/notifications/migrations/.snapshot-open-mercato.json +874 -100
- package/src/modules/notifications/migrations/Migration20260625122947_notifications.ts +14 -0
- package/src/modules/notifications/migrations/Migration20260626120500_notifications_push_payload.ts +15 -0
- package/src/modules/notifications/migrations/Migration20260626130000_notifications_non_opt_out.ts +13 -0
- package/src/modules/notifications/migrations/Migration20260626140000_notifications_type_category_silent.ts +15 -0
- package/src/modules/notifications/migrations/Migration20260706120000_notifications_channels.ts +13 -0
- package/src/modules/notifications/migrations/Migration20260716123121_notifications.ts +14 -0
- package/src/modules/notifications/notification-channels.ts +30 -0
- package/src/modules/notifications/notifications.delivery-strategies.ts +15 -0
- package/src/modules/notifications/setup.ts +23 -1
- package/src/modules/notifications/subscribers/deliver-notification.ts +105 -71
- package/src/modules/notifications/subscribers/sync-notification-types.ts +18 -0
- package/src/modules/notifications/widgets/injection/profile-preferences-menu/widget.ts +35 -0
- package/src/modules/notifications/widgets/injection-table.ts +18 -0
- package/src/modules/push_notifications/AGENTS.md +92 -0
- package/src/modules/push_notifications/acl.ts +9 -0
- package/src/modules/push_notifications/api/custom-send/route.ts +175 -0
- package/src/modules/push_notifications/api/deliveries/[id]/route.ts +122 -0
- package/src/modules/push_notifications/api/deliveries/route.ts +58 -0
- package/src/modules/push_notifications/api/openapi.ts +22 -0
- package/src/modules/push_notifications/backend/push_notifications/[id]/page.meta.ts +9 -0
- package/src/modules/push_notifications/backend/push_notifications/[id]/page.tsx +149 -0
- package/src/modules/push_notifications/backend/push_notifications/page.meta.ts +21 -0
- package/src/modules/push_notifications/backend/push_notifications/page.tsx +239 -0
- package/src/modules/push_notifications/backend/push_notifications/send/page.meta.ts +24 -0
- package/src/modules/push_notifications/backend/push_notifications/send/page.tsx +327 -0
- package/src/modules/push_notifications/data/entities.ts +111 -0
- package/src/modules/push_notifications/data/extensions.ts +29 -0
- package/src/modules/push_notifications/data/validators.ts +102 -0
- package/src/modules/push_notifications/di.ts +20 -0
- package/src/modules/push_notifications/events.ts +21 -0
- package/src/modules/push_notifications/i18n/de.json +79 -0
- package/src/modules/push_notifications/i18n/en.json +79 -0
- package/src/modules/push_notifications/i18n/es.json +79 -0
- package/src/modules/push_notifications/i18n/ko.json +79 -0
- package/src/modules/push_notifications/i18n/pl.json +79 -0
- package/src/modules/push_notifications/index.ts +15 -0
- package/src/modules/push_notifications/lib/fake-provider-recorder.ts +154 -0
- package/src/modules/push_notifications/lib/push-delivery-strategy.ts +90 -0
- package/src/modules/push_notifications/lib/push-delivery.ts +455 -0
- package/src/modules/push_notifications/lib/push-fanout.ts +237 -0
- package/src/modules/push_notifications/lib/push-health.ts +47 -0
- package/src/modules/push_notifications/lib/push-reaper.ts +140 -0
- package/src/modules/push_notifications/lib/push-receipt-reaper.ts +210 -0
- package/src/modules/push_notifications/lib/push-stub-adapter.ts +80 -0
- package/src/modules/push_notifications/lib/queue.ts +74 -0
- package/src/modules/push_notifications/lib/reclaim-window.ts +16 -0
- package/src/modules/push_notifications/lib/send-custom-push.ts +100 -0
- package/src/modules/push_notifications/migrations/.snapshot-open-mercato.json +386 -0
- package/src/modules/push_notifications/migrations/Migration20260625150049_push_notifications.ts +16 -0
- package/src/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.ts +13 -0
- package/src/modules/push_notifications/notifications.delivery-strategies.ts +8 -0
- package/src/modules/push_notifications/notifications.ts +50 -0
- package/src/modules/push_notifications/setup.ts +92 -0
- package/src/modules/push_notifications/workers/reclaim-stuck.worker.ts +78 -0
- package/src/modules/push_notifications/workers/send-push.worker.ts +34 -0
- package/src/modules/sales/i18n/de.json +1 -0
- package/src/modules/sales/i18n/en.json +1 -0
- package/src/modules/sales/i18n/es.json +1 -0
- package/src/modules/sales/i18n/ko.json +1 -0
- package/src/modules/sales/i18n/pl.json +1 -0
- package/src/modules/sales/notifications.ts +8 -0
- package/src/modules/staff/i18n/de.json +1 -0
- package/src/modules/staff/i18n/en.json +1 -0
- package/src/modules/staff/i18n/es.json +1 -0
- package/src/modules/staff/i18n/ko.json +1 -0
- package/src/modules/staff/i18n/pl.json +1 -0
- package/src/modules/staff/notifications.ts +6 -0
- package/src/modules/workflows/i18n/de.json +1 -0
- package/src/modules/workflows/i18n/en.json +1 -0
- package/src/modules/workflows/i18n/es.json +1 -0
- package/src/modules/workflows/i18n/ko.json +1 -0
- package/src/modules/workflows/i18n/pl.json +1 -0
- 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.
|
|
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.
|
|
258
|
-
"@open-mercato/shared": "0.6.8-develop.
|
|
259
|
-
"@open-mercato/ui": "0.6.8-develop.
|
|
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.
|
|
265
|
-
"@open-mercato/shared": "0.6.8-develop.
|
|
266
|
-
"@open-mercato/ui": "0.6.8-develop.
|
|
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',
|
|
@@ -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',
|