@open-mercato/core 0.6.8-develop.6983.1.e4f794099e → 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,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/lib/queue.ts"],
|
|
4
|
+
"sourcesContent": ["import type { EntityManager } from '@mikro-orm/postgresql'\nimport { createModuleQueue, type Queue } from '@open-mercato/queue'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('push_notifications')\n\nexport interface PushDeliveryJob {\n deliveryId: string\n tenantId: string\n organizationId: string | null\n}\n\nexport const PUSH_DELIVERIES_QUEUE = 'push-deliveries'\n// Scheduler-driven tick that recovers rows stranded in `sending` by a crashed worker (see\n// lib/push-reaper.ts). The `@open-mercato/scheduler` interval entry registered in setup.ts enqueues\n// one tick per tenant onto this queue; the reclaim-stuck worker processes it.\nexport const PUSH_STUCK_RECLAIM_QUEUE = 'push-stuck-reclaim'\n\nconst queues = new Map<string, Queue<PushDeliveryJob>>()\nconst LOCAL_WORKER_PROMISE_KEY = '__openMercatoPushLocalWorkerPromise__'\n\nexport function getPushQueue(queueName: string = PUSH_DELIVERIES_QUEUE): Queue<PushDeliveryJob> {\n const existing = queues.get(queueName)\n if (existing) return existing\n\n const concurrency = Math.max(1, Number.parseInt(process.env.PUSH_QUEUE_CONCURRENCY ?? '8', 10) || 8)\n const created = createModuleQueue<PushDeliveryJob>(queueName, { concurrency })\n\n queues.set(queueName, created)\n return created\n}\n\n// In local (dev/test) queue mode jobs are processed in-process. In async mode the\n// auto-discovered `workers/send-push.worker.ts` handles them, so this is a no-op there.\nasync function ensureLocalPushQueueWorkerStarted(): Promise<void> {\n if (process.env.QUEUE_STRATEGY === 'async') return\n\n const globalStore = globalThis as typeof globalThis & {\n [LOCAL_WORKER_PROMISE_KEY]?: Promise<void>\n }\n\n if (globalStore[LOCAL_WORKER_PROMISE_KEY]) {\n await globalStore[LOCAL_WORKER_PROMISE_KEY]\n return\n }\n\n globalStore[LOCAL_WORKER_PROMISE_KEY] = (async () => {\n const queue = getPushQueue()\n\n await queue.process(async (job) => {\n const [{ createRequestContainer }, { processPushDeliveryJob }] = await Promise.all([\n import('@open-mercato/shared/lib/di/container'),\n import('./push-delivery'),\n ])\n\n const container = await createRequestContainer()\n const em = (container.resolve('em') as EntityManager).fork()\n await processPushDeliveryJob(em, job.payload, (name) => container.resolve(name))\n })\n })().catch((error) => {\n delete globalStore[LOCAL_WORKER_PROMISE_KEY]\n logger.error('Failed to start local delivery worker', { error })\n throw error\n })\n\n await globalStore[LOCAL_WORKER_PROMISE_KEY]\n}\n\nexport async function enqueuePushDelivery(job: PushDeliveryJob, delayMs?: number): Promise<string> {\n const queue = getPushQueue()\n const jobId = await queue.enqueue(job, delayMs && delayMs > 0 ? { delayMs } : undefined)\n await ensureLocalPushQueueWorkerStarted()\n return jobId\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,yBAAqC;AAC9C,SAAS,oBAAoB;AAE7B,MAAM,SAAS,aAAa,oBAAoB;AAQzC,MAAM,wBAAwB;AAI9B,MAAM,2BAA2B;AAExC,MAAM,SAAS,oBAAI,IAAoC;AACvD,MAAM,2BAA2B;AAE1B,SAAS,aAAa,YAAoB,uBAA+C;AAC9F,QAAM,WAAW,OAAO,IAAI,SAAS;AACrC,MAAI,SAAU,QAAO;AAErB,QAAM,cAAc,KAAK,IAAI,GAAG,OAAO,SAAS,QAAQ,IAAI,0BAA0B,KAAK,EAAE,KAAK,CAAC;AACnG,QAAM,UAAU,kBAAmC,WAAW,EAAE,YAAY,CAAC;AAE7E,SAAO,IAAI,WAAW,OAAO;AAC7B,SAAO;AACT;AAIA,eAAe,oCAAmD;AAChE,MAAI,QAAQ,IAAI,mBAAmB,QAAS;AAE5C,QAAM,cAAc;AAIpB,MAAI,YAAY,wBAAwB,GAAG;AACzC,UAAM,YAAY,wBAAwB;AAC1C;AAAA,EACF;AAEA,cAAY,wBAAwB,KAAK,YAAY;AACnD,UAAM,QAAQ,aAAa;AAE3B,UAAM,MAAM,QAAQ,OAAO,QAAQ;AACjC,YAAM,CAAC,EAAE,uBAAuB,GAAG,EAAE,uBAAuB,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,QACjF,OAAO,uCAAuC;AAAA,QAC9C,OAAO,iBAAiB;AAAA,MAC1B,CAAC;AAED,YAAM,YAAY,MAAM,uBAAuB;AAC/C,YAAM,KAAM,UAAU,QAAQ,IAAI,EAAoB,KAAK;AAC3D,YAAM,uBAAuB,IAAI,IAAI,SAAS,CAAC,SAAS,UAAU,QAAQ,IAAI,CAAC;AAAA,IACjF,CAAC;AAAA,EACH,GAAG,EAAE,MAAM,CAAC,UAAU;AACpB,WAAO,YAAY,wBAAwB;AAC3C,WAAO,MAAM,yCAAyC,EAAE,MAAM,CAAC;AAC/D,UAAM;AAAA,EACR,CAAC;AAED,QAAM,YAAY,wBAAwB;AAC5C;AAEA,eAAsB,oBAAoB,KAAsB,SAAmC;AACjG,QAAM,QAAQ,aAAa;AAC3B,QAAM,QAAQ,MAAM,MAAM,QAAQ,KAAK,WAAW,UAAU,IAAI,EAAE,QAAQ,IAAI,MAAS;AACvF,QAAM,kCAAkC;AACxC,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const DEFAULT_STUCK_MINUTES = 5;
|
|
2
|
+
const MIN_STUCK_MINUTES = 1;
|
|
3
|
+
function resolveStuckThresholdMs() {
|
|
4
|
+
const raw = Number.parseInt(process.env.OM_PUSH_STUCK_RECLAIM_MINUTES ?? "", 10);
|
|
5
|
+
const minutes = Number.isFinite(raw) && raw >= MIN_STUCK_MINUTES ? raw : DEFAULT_STUCK_MINUTES;
|
|
6
|
+
return minutes * 60 * 1e3;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
DEFAULT_STUCK_MINUTES,
|
|
10
|
+
MIN_STUCK_MINUTES,
|
|
11
|
+
resolveStuckThresholdMs
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=reclaim-window.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/lib/reclaim-window.ts"],
|
|
4
|
+
"sourcesContent": ["// Single source of truth for the stuck-reclaim window. The reaper uses it to decide when a `sending`\n// row is abandoned; the send path uses it to bound a single provider send so a hung call can never\n// outlive the window (which would let the reaper reclaim the row mid-send). Keeping both on one resolver\n// guarantees the send timeout stays below the reclaim threshold \u2014 see push-delivery.ts.\n//\n// A floor of MIN_STUCK_MINUTES is enforced: `0` (the old \"reclaim on the next tick\") is UNSAFE because\n// `cutoff = now` matches an actively-`sending` row whose `updated_at` was stamped at claim, re-opening\n// an in-flight send. Sub-floor / negative / non-numeric values fall back to the default.\nexport const DEFAULT_STUCK_MINUTES = 5\nexport const MIN_STUCK_MINUTES = 1\n\nexport function resolveStuckThresholdMs(): number {\n const raw = Number.parseInt(process.env.OM_PUSH_STUCK_RECLAIM_MINUTES ?? '', 10)\n const minutes = Number.isFinite(raw) && raw >= MIN_STUCK_MINUTES ? raw : DEFAULT_STUCK_MINUTES\n return minutes * 60 * 1000\n}\n"],
|
|
5
|
+
"mappings": "AAQO,MAAM,wBAAwB;AAC9B,MAAM,oBAAoB;AAE1B,SAAS,0BAAkC;AAChD,QAAM,MAAM,OAAO,SAAS,QAAQ,IAAI,iCAAiC,IAAI,EAAE;AAC/E,QAAM,UAAU,OAAO,SAAS,GAAG,KAAK,OAAO,oBAAoB,MAAM;AACzE,SAAO,UAAU,KAAK;AACxB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getNotificationType } from "@open-mercato/core/modules/notifications/lib/notification-type-registry";
|
|
2
|
+
import { ADMIN_CUSTOM_MESSAGE_TYPE, ADMIN_CUSTOM_SILENT_TYPE } from "../notifications.js";
|
|
3
|
+
import { fanOutPushDeliveries } from "./push-fanout.js";
|
|
4
|
+
async function sendCustomPush(args) {
|
|
5
|
+
const {
|
|
6
|
+
resolve,
|
|
7
|
+
tenantId,
|
|
8
|
+
userId,
|
|
9
|
+
organizationId = null,
|
|
10
|
+
deviceId,
|
|
11
|
+
title,
|
|
12
|
+
body = null,
|
|
13
|
+
data,
|
|
14
|
+
pushOptions,
|
|
15
|
+
silent = false,
|
|
16
|
+
type = silent ? ADMIN_CUSTOM_SILENT_TYPE : ADMIN_CUSTOM_MESSAGE_TYPE
|
|
17
|
+
} = args;
|
|
18
|
+
const definition = getNotificationType(type);
|
|
19
|
+
if (!definition) {
|
|
20
|
+
throw new Error(`[internal] sendCustomPush: notification type "${type}" is not registered`);
|
|
21
|
+
}
|
|
22
|
+
if (definition.silent === true !== silent) {
|
|
23
|
+
throw new Error(`[internal] sendCustomPush: type "${type}" silent=${definition.silent === true} does not match requested silent=${silent}`);
|
|
24
|
+
}
|
|
25
|
+
const em = resolve("em");
|
|
26
|
+
return fanOutPushDeliveries({
|
|
27
|
+
em,
|
|
28
|
+
resolve,
|
|
29
|
+
scope: { tenantId, organizationId },
|
|
30
|
+
userId,
|
|
31
|
+
userDeviceId: deviceId,
|
|
32
|
+
notificationId: null,
|
|
33
|
+
notificationTypeId: type,
|
|
34
|
+
payload: {
|
|
35
|
+
title,
|
|
36
|
+
body,
|
|
37
|
+
data: { ...data ?? {}, type },
|
|
38
|
+
options: pushOptions,
|
|
39
|
+
silent
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const pushNotificationService = { sendCustomPush };
|
|
44
|
+
export {
|
|
45
|
+
pushNotificationService,
|
|
46
|
+
sendCustomPush
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=send-custom-push.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/lib/send-custom-push.ts"],
|
|
4
|
+
"sourcesContent": ["import type { EntityManager } from '@mikro-orm/postgresql'\nimport { getNotificationType } from '@open-mercato/core/modules/notifications/lib/notification-type-registry'\nimport type { PushOptions } from '@open-mercato/core/modules/communication_channels/lib/push-envelope'\nimport { ADMIN_CUSTOM_MESSAGE_TYPE, ADMIN_CUSTOM_SILENT_TYPE } from '../notifications'\nimport { fanOutPushDeliveries } from './push-fanout'\n\ntype Resolve = <T = unknown>(name: string) => T\n\nexport interface SendCustomPushArgs {\n /** Scoped DI resolver (e.g. an API route's request container `resolve`). */\n resolve: Resolve\n tenantId: string\n userId: string\n organizationId?: string | null\n /** Restrict delivery to one of the user's devices (`UserDevice.id`). Omit to send to all. */\n deviceId?: string\n /** Literal, already-authored push title (free text \u2014 not an i18n key, so not translated). */\n title: string\n /** Optional literal push body. */\n body?: string | null\n /** Arbitrary app-readable key/values delivered in the push data payload. */\n data?: Record<string, string>\n /** Optional per-provider push customization (sound, badge, priority, \u2026). */\n pushOptions?: PushOptions\n /**\n * When true, deliver as a **silent** data-only content-available wake-up (no visible banner)\n * instead of a visible alert. Defaults to false (visible).\n */\n silent?: boolean\n /**\n * Registered notification type to label the delivery with. Defaults to the admin custom-message\n * type (visible) or the admin custom-silent type when `silent` is set. Its `silent` flag MUST\n * match the requested mode.\n */\n type?: string\n}\n\n/**\n * Deliver an admin-composed, one-off push to all of a user's push-capable devices \u2014 **visible**\n * (literal title/body banner) or **silent** (`silent: true` \u2014 a data-only content-available wake-up\n * with no banner).\n *\n * A direct fan-out (no in-app `Notification` row, no email, no per-channel preference check). The\n * `type` MUST be registered and its `silent` flag MUST match the requested mode. Because the copy is\n * literal free text, it is delivered verbatim (no per-device locale translation). The actual provider\n * send happens in the `send-push` worker; the returned `enqueued` is the number of per-device jobs.\n *\n * Note: delivery here is forced by the direct fan-out itself \u2014 this path never consults the\n * preference service, so the type's `nonOptOut: true` is not load-bearing on this route (it matters\n * only if that type is ever routed through the normal preference-gated `notificationService.create()`\n * strategy).\n */\nexport async function sendCustomPush(args: SendCustomPushArgs): Promise<{ enqueued: number }> {\n const {\n resolve,\n tenantId,\n userId,\n organizationId = null,\n deviceId,\n title,\n body = null,\n data,\n pushOptions,\n silent = false,\n type = silent ? ADMIN_CUSTOM_SILENT_TYPE : ADMIN_CUSTOM_MESSAGE_TYPE,\n } = args\n\n const definition = getNotificationType(type)\n if (!definition) {\n throw new Error(`[internal] sendCustomPush: notification type \"${type}\" is not registered`)\n }\n if ((definition.silent === true) !== silent) {\n throw new Error(`[internal] sendCustomPush: type \"${type}\" silent=${definition.silent === true} does not match requested silent=${silent}`)\n }\n\n const em = resolve('em') as EntityManager\n\n return fanOutPushDeliveries({\n em,\n resolve,\n scope: { tenantId, organizationId },\n userId,\n userDeviceId: deviceId,\n notificationId: null,\n notificationTypeId: type,\n payload: {\n title,\n body,\n data: { ...(data ?? {}), type },\n options: pushOptions,\n silent,\n },\n })\n}\n\nexport interface PushNotificationService {\n sendCustomPush(args: SendCustomPushArgs): Promise<{ enqueued: number }>\n}\n\nexport const pushNotificationService: PushNotificationService = { sendCustomPush }\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,2BAA2B;AAEpC,SAAS,2BAA2B,gCAAgC;AACpE,SAAS,4BAA4B;AAgDrC,eAAsB,eAAe,MAAyD;AAC5F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,OAAO,SAAS,2BAA2B;AAAA,EAC7C,IAAI;AAEJ,QAAM,aAAa,oBAAoB,IAAI;AAC3C,MAAI,CAAC,YAAY;AACf,UAAM,IAAI,MAAM,iDAAiD,IAAI,qBAAqB;AAAA,EAC5F;AACA,MAAK,WAAW,WAAW,SAAU,QAAQ;AAC3C,UAAM,IAAI,MAAM,oCAAoC,IAAI,YAAY,WAAW,WAAW,IAAI,oCAAoC,MAAM,EAAE;AAAA,EAC5I;AAEA,QAAM,KAAK,QAAQ,IAAI;AAEvB,SAAO,qBAAqB;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,OAAO,EAAE,UAAU,eAAe;AAAA,IAClC;AAAA,IACA,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA,MAAM,EAAE,GAAI,QAAQ,CAAC,GAAI,KAAK;AAAA,MAC9B,SAAS;AAAA,MACT;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAMO,MAAM,0BAAmD,EAAE,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Migration } from "@mikro-orm/migrations";
|
|
2
|
+
class Migration20260625150049_push_notifications extends Migration {
|
|
3
|
+
up() {
|
|
4
|
+
this.addSql(`create table "push_notification_deliveries" ("id" uuid not null default gen_random_uuid(), "tenant_id" uuid not null, "organization_id" uuid null, "notification_id" uuid null, "notification_type_id" text not null, "user_device_id" uuid not null, "user_id" uuid not null, "provider" text not null, "token_snapshot" text not null, "status" text not null default 'pending', "attempts" int not null default 0, "last_error" text null, "payload" jsonb not null, "provider_response" jsonb null, "created_at" timestamptz not null, "sent_at" timestamptz null, "next_retry_at" timestamptz null, "updated_at" timestamptz not null, primary key ("id"));`);
|
|
5
|
+
this.addSql(`create index "push_notification_deliveries_notification_idx" on "push_notification_deliveries" ("notification_id");`);
|
|
6
|
+
this.addSql(`create index "push_notification_deliveries_tenant_status_idx" on "push_notification_deliveries" ("tenant_id", "status", "created_at");`);
|
|
7
|
+
this.addSql(`create unique index "push_notification_deliveries_notif_device_unique" on "push_notification_deliveries" ("notification_id", "user_device_id") where "notification_id" is not null;`);
|
|
8
|
+
}
|
|
9
|
+
down() {
|
|
10
|
+
this.addSql(`drop table if exists "push_notification_deliveries" cascade;`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
Migration20260625150049_push_notifications
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Migration20260625150049_push_notifications.js.map
|
package/dist/modules/push_notifications/migrations/Migration20260625150049_push_notifications.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/migrations/Migration20260625150049_push_notifications.ts"],
|
|
4
|
+
"sourcesContent": ["import { Migration } from '@mikro-orm/migrations';\n\nexport class Migration20260625150049_push_notifications extends Migration {\n\n override up(): void | Promise<void> {\n this.addSql(`create table \"push_notification_deliveries\" (\"id\" uuid not null default gen_random_uuid(), \"tenant_id\" uuid not null, \"organization_id\" uuid null, \"notification_id\" uuid null, \"notification_type_id\" text not null, \"user_device_id\" uuid not null, \"user_id\" uuid not null, \"provider\" text not null, \"token_snapshot\" text not null, \"status\" text not null default 'pending', \"attempts\" int not null default 0, \"last_error\" text null, \"payload\" jsonb not null, \"provider_response\" jsonb null, \"created_at\" timestamptz not null, \"sent_at\" timestamptz null, \"next_retry_at\" timestamptz null, \"updated_at\" timestamptz not null, primary key (\"id\"));`);\n this.addSql(`create index \"push_notification_deliveries_notification_idx\" on \"push_notification_deliveries\" (\"notification_id\");`);\n this.addSql(`create index \"push_notification_deliveries_tenant_status_idx\" on \"push_notification_deliveries\" (\"tenant_id\", \"status\", \"created_at\");`);\n this.addSql(`create unique index \"push_notification_deliveries_notif_device_unique\" on \"push_notification_deliveries\" (\"notification_id\", \"user_device_id\") where \"notification_id\" is not null;`);\n }\n\n override down(): void | Promise<void> {\n this.addSql(`drop table if exists \"push_notification_deliveries\" cascade;`);\n }\n\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAEnB,MAAM,mDAAmD,UAAU;AAAA,EAE/D,KAA2B;AAClC,SAAK,OAAO,koBAAkoB;AAC9oB,SAAK,OAAO,qHAAqH;AACjI,SAAK,OAAO,wIAAwI;AACpJ,SAAK,OAAO,qLAAqL;AAAA,EACnM;AAAA,EAES,OAA6B;AACpC,SAAK,OAAO,8DAA8D;AAAA,EAC5E;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Migration } from "@mikro-orm/migrations";
|
|
2
|
+
class Migration20260626120000_push_notifications_silent extends Migration {
|
|
3
|
+
up() {
|
|
4
|
+
this.addSql(`alter table "push_notification_deliveries" add column "silent" boolean not null default false;`);
|
|
5
|
+
}
|
|
6
|
+
down() {
|
|
7
|
+
this.addSql(`alter table "push_notification_deliveries" drop column "silent";`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
Migration20260626120000_push_notifications_silent
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Migration20260626120000_push_notifications_silent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/migrations/Migration20260626120000_push_notifications_silent.ts"],
|
|
4
|
+
"sourcesContent": ["import { Migration } from '@mikro-orm/migrations';\n\nexport class Migration20260626120000_push_notifications_silent extends Migration {\n\n override up(): void | Promise<void> {\n this.addSql(`alter table \"push_notification_deliveries\" add column \"silent\" boolean not null default false;`);\n }\n\n override down(): void | Promise<void> {\n this.addSql(`alter table \"push_notification_deliveries\" drop column \"silent\";`);\n }\n\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAEnB,MAAM,0DAA0D,UAAU;AAAA,EAEtE,KAA2B;AAClC,SAAK,OAAO,gGAAgG;AAAA,EAC9G;AAAA,EAES,OAA6B;AACpC,SAAK,OAAO,kEAAkE;AAAA,EAChF;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mobilePushDeliveryStrategy } from "./lib/push-delivery-strategy.js";
|
|
2
|
+
const deliveryStrategies = [mobilePushDeliveryStrategy];
|
|
3
|
+
var notifications_delivery_strategies_default = deliveryStrategies;
|
|
4
|
+
export {
|
|
5
|
+
notifications_delivery_strategies_default as default,
|
|
6
|
+
deliveryStrategies
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=notifications.delivery-strategies.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/modules/push_notifications/notifications.delivery-strategies.ts"],
|
|
4
|
+
"sourcesContent": ["import type { NotificationDeliveryStrategy } from '@open-mercato/core/modules/notifications/lib/deliveryStrategies'\nimport { mobilePushDeliveryStrategy } from './lib/push-delivery-strategy'\n\n// Discovered by the notifications `delivery-strategies` generator plugin and registered into the\n// notifications delivery seam at bootstrap (see notifications/generators.ts).\nexport const deliveryStrategies: NotificationDeliveryStrategy[] = [mobilePushDeliveryStrategy]\n\nexport default deliveryStrategies\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,kCAAkC;AAIpC,MAAM,qBAAqD,CAAC,0BAA0B;AAE7F,IAAO,4CAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const ADMIN_CUSTOM_MESSAGE_TYPE = "admin.custom_message";
|
|
2
|
+
const ADMIN_CUSTOM_SILENT_TYPE = "admin.custom_silent";
|
|
3
|
+
const notificationTypes = [
|
|
4
|
+
{
|
|
5
|
+
type: ADMIN_CUSTOM_MESSAGE_TYPE,
|
|
6
|
+
module: "push_notifications",
|
|
7
|
+
titleKey: "push_notifications.types.admin_custom_message.title",
|
|
8
|
+
bodyKey: "push_notifications.types.admin_custom_message.body",
|
|
9
|
+
labelKey: "push_notifications.types.admin_custom_message.label",
|
|
10
|
+
icon: "megaphone",
|
|
11
|
+
severity: "info",
|
|
12
|
+
actions: [],
|
|
13
|
+
category: "system",
|
|
14
|
+
nonOptOut: true,
|
|
15
|
+
silent: false,
|
|
16
|
+
hiddenFromSettings: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: ADMIN_CUSTOM_SILENT_TYPE,
|
|
20
|
+
module: "push_notifications",
|
|
21
|
+
titleKey: "push_notifications.types.admin_custom_silent.title",
|
|
22
|
+
bodyKey: "push_notifications.types.admin_custom_silent.body",
|
|
23
|
+
labelKey: "push_notifications.types.admin_custom_silent.label",
|
|
24
|
+
icon: "megaphone",
|
|
25
|
+
severity: "info",
|
|
26
|
+
actions: [],
|
|
27
|
+
category: "system",
|
|
28
|
+
nonOptOut: true,
|
|
29
|
+
silent: true,
|
|
30
|
+
hiddenFromSettings: true
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
var notifications_default = notificationTypes;
|
|
34
|
+
export {
|
|
35
|
+
ADMIN_CUSTOM_MESSAGE_TYPE,
|
|
36
|
+
ADMIN_CUSTOM_SILENT_TYPE,
|
|
37
|
+
notifications_default as default,
|
|
38
|
+
notificationTypes
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/modules/push_notifications/notifications.ts"],
|
|
4
|
+
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\n/**\n * Type id for admin-composed one-off custom pushes (see `lib/send-custom-push.ts` +\n * `api/custom-send`). It is `hiddenFromSettings` (never listed in the client catalogue / mobile\n * preferences screen) and `nonOptOut` (an admin broadcast the user cannot pre-disable). The message\n * title/body are literal free text supplied per send, so the `titleKey`/`bodyKey` below are only\n * placeholders and are never resolved at delivery time.\n */\nexport const ADMIN_CUSTOM_MESSAGE_TYPE = 'admin.custom_message'\n\n/**\n * Silent counterpart of {@link ADMIN_CUSTOM_MESSAGE_TYPE}: the type an admin \"silent\" one-off push is\n * labelled with (see `lib/send-custom-push.ts`). Same hidden / non-opt-out semantics, but `silent`\n * so the delivery is a data-only content-available wake-up rather than a visible banner.\n */\nexport const ADMIN_CUSTOM_SILENT_TYPE = 'admin.custom_silent'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: ADMIN_CUSTOM_MESSAGE_TYPE,\n module: 'push_notifications',\n titleKey: 'push_notifications.types.admin_custom_message.title',\n bodyKey: 'push_notifications.types.admin_custom_message.body',\n labelKey: 'push_notifications.types.admin_custom_message.label',\n icon: 'megaphone',\n severity: 'info',\n actions: [],\n category: 'system',\n nonOptOut: true,\n silent: false,\n hiddenFromSettings: true,\n },\n {\n type: ADMIN_CUSTOM_SILENT_TYPE,\n module: 'push_notifications',\n titleKey: 'push_notifications.types.admin_custom_silent.title',\n bodyKey: 'push_notifications.types.admin_custom_silent.body',\n labelKey: 'push_notifications.types.admin_custom_silent.label',\n icon: 'megaphone',\n severity: 'info',\n actions: [],\n category: 'system',\n nonOptOut: true,\n silent: true,\n hiddenFromSettings: true,\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
+
"mappings": "AASO,MAAM,4BAA4B;AAOlC,MAAM,2BAA2B;AAEjC,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,UAAU;AAAA,IACV,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,oBAAoB;AAAA,EACtB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,UAAU;AAAA,IACV,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,oBAAoB;AAAA,EACtB;AACF;AAEA,IAAO,wBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
3
|
+
import { PUSH_STUCK_RECLAIM_QUEUE } from "./lib/queue.js";
|
|
4
|
+
const logger = createLogger("push_notifications");
|
|
5
|
+
const RECLAIM_TICK_INTERVAL_SECONDS = Math.max(
|
|
6
|
+
30,
|
|
7
|
+
Number.parseInt(process.env.OM_PUSH_RECLAIM_TICK_SECONDS ?? "120", 10) || 120
|
|
8
|
+
);
|
|
9
|
+
function stableScheduleUuid(stableKey) {
|
|
10
|
+
const hex = createHash("sha256").update(stableKey).digest("hex");
|
|
11
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
|
|
12
|
+
}
|
|
13
|
+
const setup = {
|
|
14
|
+
defaultRoleFeatures: {
|
|
15
|
+
superadmin: ["push_notifications.*"],
|
|
16
|
+
admin: ["push_notifications.*"]
|
|
17
|
+
// The delivery log is ops/admin observability; employees are not granted it by default.
|
|
18
|
+
},
|
|
19
|
+
async seedDefaults({ container, tenantId }) {
|
|
20
|
+
const cradle = container;
|
|
21
|
+
if (typeof cradle.hasRegistration !== "function" || !cradle.hasRegistration("schedulerService")) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const schedulerService = container.resolve("schedulerService");
|
|
25
|
+
try {
|
|
26
|
+
await schedulerService.register({
|
|
27
|
+
id: stableScheduleUuid(`push_notifications:reclaim-stuck:${tenantId}`),
|
|
28
|
+
name: "Push delivery stuck-row reclaim",
|
|
29
|
+
description: `Every ${RECLAIM_TICK_INTERVAL_SECONDS}s, recover push deliveries stranded in 'sending' by a crashed worker (re-enqueue if attempts remain, else expire) and poll async provider receipts (Expo) to soft-delete unregistered devices.`,
|
|
30
|
+
scopeType: "tenant",
|
|
31
|
+
tenantId,
|
|
32
|
+
scheduleType: "interval",
|
|
33
|
+
scheduleValue: `${RECLAIM_TICK_INTERVAL_SECONDS}s`,
|
|
34
|
+
timezone: "UTC",
|
|
35
|
+
targetType: "queue",
|
|
36
|
+
targetQueue: PUSH_STUCK_RECLAIM_QUEUE,
|
|
37
|
+
targetPayload: { scope: { tenantId } },
|
|
38
|
+
sourceType: "module",
|
|
39
|
+
sourceModule: "push_notifications",
|
|
40
|
+
isEnabled: true
|
|
41
|
+
});
|
|
42
|
+
} catch (error) {
|
|
43
|
+
logger.warn("Failed to register reclaim-stuck schedule", { error });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var setup_default = setup;
|
|
48
|
+
export {
|
|
49
|
+
setup_default as default,
|
|
50
|
+
setup
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/modules/push_notifications/setup.ts"],
|
|
4
|
+
"sourcesContent": ["import { createHash } from 'node:crypto'\nimport type { ModuleSetupConfig } from '@open-mercato/shared/modules/setup'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\nimport { PUSH_STUCK_RECLAIM_QUEUE } from './lib/queue'\n\nconst logger = createLogger('push_notifications')\n\ntype SchedulerServiceLike = {\n register: (registration: {\n id: string\n name: string\n scopeType: 'system' | 'organization' | 'tenant'\n organizationId?: string\n tenantId?: string\n scheduleType: 'cron' | 'interval'\n scheduleValue: string\n timezone?: string\n targetType: 'queue' | 'command'\n targetQueue?: string\n targetPayload?: unknown\n sourceType?: 'user' | 'module'\n sourceModule?: string\n isEnabled?: boolean\n description?: string\n }) => Promise<void>\n}\n\n/**\n * How often the stuck-delivery reclaim tick fires. Default 120s \u2014 stranded rows are rare, so a slower\n * cadence than the delivery path is fine. Tunable via OM_PUSH_RECLAIM_TICK_SECONDS (min 30s).\n */\nconst RECLAIM_TICK_INTERVAL_SECONDS = Math.max(\n 30,\n Number.parseInt(process.env.OM_PUSH_RECLAIM_TICK_SECONDS ?? '120', 10) || 120,\n)\n\n/**\n * `scheduled_jobs.id` is a uuid column, so a module-owned schedule's stable\n * registration key must be hashed into a uuid rather than used verbatim \u2014 this\n * keeps `schedulerService.register()` an idempotent upsert across re-runs of\n * seedDefaults instead of trying to insert a raw string into the uuid PK.\n * Mirrors the communication_channels poll-tick registration.\n */\nfunction stableScheduleUuid(stableKey: string): string {\n const hex = createHash('sha256').update(stableKey).digest('hex')\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`\n}\n\nexport const setup: ModuleSetupConfig = {\n defaultRoleFeatures: {\n superadmin: ['push_notifications.*'],\n admin: ['push_notifications.*'],\n // The delivery log is ops/admin observability; employees are not granted it by default.\n },\n\n async seedDefaults({ container, tenantId }) {\n /**\n * Register the stuck-delivery reclaim tick with `@open-mercato/scheduler`. Tenant-scoped (one row\n * per tenant, keyed by a deterministic uuid so re-runs upsert) \u2014 the sweep covers org-bound and\n * tenant-level delivery rows alike. Skipped silently when the scheduler module isn't enabled so\n * the delivery rails stay usable in scheduler-less harnesses (mirrors communication_channels).\n */\n const cradle = container as { hasRegistration?: (name: string) => boolean }\n if (typeof cradle.hasRegistration !== 'function' || !cradle.hasRegistration('schedulerService')) {\n return\n }\n const schedulerService = container.resolve('schedulerService') as SchedulerServiceLike\n try {\n await schedulerService.register({\n id: stableScheduleUuid(`push_notifications:reclaim-stuck:${tenantId}`),\n name: 'Push delivery stuck-row reclaim',\n description:\n `Every ${RECLAIM_TICK_INTERVAL_SECONDS}s, recover push deliveries stranded in 'sending' by a crashed worker (re-enqueue if attempts remain, else expire) and poll async provider receipts (Expo) to soft-delete unregistered devices.`,\n scopeType: 'tenant',\n tenantId,\n scheduleType: 'interval',\n scheduleValue: `${RECLAIM_TICK_INTERVAL_SECONDS}s`,\n timezone: 'UTC',\n targetType: 'queue',\n targetQueue: PUSH_STUCK_RECLAIM_QUEUE,\n targetPayload: { scope: { tenantId } },\n sourceType: 'module',\n sourceModule: 'push_notifications',\n isEnabled: true,\n })\n } catch (error) {\n logger.warn('Failed to register reclaim-stuck schedule', { error })\n }\n },\n}\n\nexport default setup\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,oBAAoB;AAC7B,SAAS,gCAAgC;AAEzC,MAAM,SAAS,aAAa,oBAAoB;AA0BhD,MAAM,gCAAgC,KAAK;AAAA,EACzC;AAAA,EACA,OAAO,SAAS,QAAQ,IAAI,gCAAgC,OAAO,EAAE,KAAK;AAC5E;AASA,SAAS,mBAAmB,WAA2B;AACrD,QAAM,MAAM,WAAW,QAAQ,EAAE,OAAO,SAAS,EAAE,OAAO,KAAK;AAC/D,SAAO,GAAG,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC,IAAI,IAAI,MAAM,IAAI,EAAE,CAAC,IAAI,IAAI,MAAM,IAAI,EAAE,CAAC,IAAI,IAAI,MAAM,IAAI,EAAE,CAAC;AAC9G;AAEO,MAAM,QAA2B;AAAA,EACtC,qBAAqB;AAAA,IACnB,YAAY,CAAC,sBAAsB;AAAA,IACnC,OAAO,CAAC,sBAAsB;AAAA;AAAA,EAEhC;AAAA,EAEA,MAAM,aAAa,EAAE,WAAW,SAAS,GAAG;AAO1C,UAAM,SAAS;AACf,QAAI,OAAO,OAAO,oBAAoB,cAAc,CAAC,OAAO,gBAAgB,kBAAkB,GAAG;AAC/F;AAAA,IACF;AACA,UAAM,mBAAmB,UAAU,QAAQ,kBAAkB;AAC7D,QAAI;AACF,YAAM,iBAAiB,SAAS;AAAA,QAC9B,IAAI,mBAAmB,oCAAoC,QAAQ,EAAE;AAAA,QACrE,MAAM;AAAA,QACN,aACE,SAAS,6BAA6B;AAAA,QACxC,WAAW;AAAA,QACX;AAAA,QACA,cAAc;AAAA,QACd,eAAe,GAAG,6BAA6B;AAAA,QAC/C,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE;AAAA,QACrC,YAAY;AAAA,QACZ,cAAc;AAAA,QACd,WAAW;AAAA,MACb,CAAC;AAAA,IACH,SAAS,OAAO;AACd,aAAO,KAAK,6CAA6C,EAAE,MAAM,CAAC;AAAA,IACpE;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
2
|
+
import { PUSH_STUCK_RECLAIM_QUEUE } from "../lib/queue.js";
|
|
3
|
+
import { reclaimStuckPushDeliveries } from "../lib/push-reaper.js";
|
|
4
|
+
import { checkPushReceipts } from "../lib/push-receipt-reaper.js";
|
|
5
|
+
const logger = createLogger("push_notifications");
|
|
6
|
+
const metadata = {
|
|
7
|
+
queue: PUSH_STUCK_RECLAIM_QUEUE,
|
|
8
|
+
id: "push_notifications:reclaim-stuck",
|
|
9
|
+
concurrency: 1
|
|
10
|
+
// single-flight per tenant tick — the atomic claim guards overlaps anyway
|
|
11
|
+
};
|
|
12
|
+
async function handle(job, ctx) {
|
|
13
|
+
const raw = job?.payload ?? {};
|
|
14
|
+
const tenantId = raw.scope?.tenantId ?? raw.tenantId ?? null;
|
|
15
|
+
if (!tenantId) {
|
|
16
|
+
logger.warn("reclaim-stuck skipping tick \u2014 payload has no tenantId", { payload: raw });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const em = ctx.resolve("em").fork();
|
|
20
|
+
try {
|
|
21
|
+
const result = await reclaimStuckPushDeliveries(em, { tenantId });
|
|
22
|
+
if (result.reEnqueued > 0 || result.expired > 0) {
|
|
23
|
+
logger.info("reclaim-stuck swept stuck delivery rows", {
|
|
24
|
+
tenantId,
|
|
25
|
+
reEnqueued: result.reEnqueued,
|
|
26
|
+
expired: result.expired
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
} catch (error) {
|
|
30
|
+
logger.error("reclaim-stuck sweep failed", {
|
|
31
|
+
tenantId,
|
|
32
|
+
error: error instanceof Error ? error.message : String(error)
|
|
33
|
+
});
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const receiptEm = ctx.resolve("em").fork();
|
|
38
|
+
const receipts = await checkPushReceipts(receiptEm, { tenantId }, ctx.resolve);
|
|
39
|
+
if (receipts.unregistered > 0) {
|
|
40
|
+
logger.info("reclaim-stuck pruned devices from async push receipts", {
|
|
41
|
+
tenantId,
|
|
42
|
+
unregistered: receipts.unregistered,
|
|
43
|
+
checked: receipts.checked
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
} catch (error) {
|
|
47
|
+
logger.error("reclaim-stuck receipt sweep failed", {
|
|
48
|
+
tenantId,
|
|
49
|
+
error: error instanceof Error ? error.message : String(error)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
handle as default,
|
|
55
|
+
metadata
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=reclaim-stuck.worker.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/workers/reclaim-stuck.worker.ts"],
|
|
4
|
+
"sourcesContent": ["import type { EntityManager } from '@mikro-orm/postgresql'\nimport type { JobContext, QueuedJob, WorkerMeta } from '@open-mercato/queue'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\nimport { PUSH_STUCK_RECLAIM_QUEUE } from '../lib/queue'\nimport { reclaimStuckPushDeliveries } from '../lib/push-reaper'\nimport { checkPushReceipts } from '../lib/push-receipt-reaper'\n\nconst logger = createLogger('push_notifications')\n\n/**\n * Scheduler tick payload. Fired by the `@open-mercato/scheduler` interval entry registered in\n * setup.ts (`push_notifications:reclaim-stuck`). The scheduler adds `tenantId` at the top level of the\n * enqueued payload on top of the configured `targetPayload`, so accept either shape.\n */\nexport type ReclaimStuckTickPayload = {\n scope?: { tenantId?: string | null }\n tenantId?: string | null\n}\n\nexport const metadata: WorkerMeta = {\n queue: PUSH_STUCK_RECLAIM_QUEUE,\n id: 'push_notifications:reclaim-stuck',\n concurrency: 1, // single-flight per tenant tick \u2014 the atomic claim guards overlaps anyway\n}\n\ntype HandlerContext = JobContext & {\n resolve: <T = unknown>(name: string) => T\n}\n\nexport default async function handle(\n job: QueuedJob<ReclaimStuckTickPayload>,\n ctx: HandlerContext,\n): Promise<void> {\n const raw = (job?.payload ?? {}) as ReclaimStuckTickPayload\n const tenantId = raw.scope?.tenantId ?? raw.tenantId ?? null\n if (!tenantId) {\n logger.warn('reclaim-stuck skipping tick \u2014 payload has no tenantId', { payload: raw })\n return\n }\n\n const em = (ctx.resolve('em') as EntityManager).fork()\n try {\n const result = await reclaimStuckPushDeliveries(em, { tenantId })\n if (result.reEnqueued > 0 || result.expired > 0) {\n logger.info('reclaim-stuck swept stuck delivery rows', {\n tenantId,\n reEnqueued: result.reEnqueued,\n expired: result.expired,\n })\n }\n } catch (error) {\n logger.error('reclaim-stuck sweep failed', {\n tenantId,\n error: error instanceof Error ? error.message : String(error),\n })\n throw error\n }\n\n // Piggyback the Expo async-receipt hygiene pass on the same per-tenant tick (no separate scheduler\n // entry). Best-effort and isolated on its own EM fork: a receipt-check failure logs and returns, so it\n // never fails/retries the stuck-row reclaim above nor the tick itself.\n try {\n const receiptEm = (ctx.resolve('em') as EntityManager).fork()\n const receipts = await checkPushReceipts(receiptEm, { tenantId }, ctx.resolve)\n if (receipts.unregistered > 0) {\n logger.info('reclaim-stuck pruned devices from async push receipts', {\n tenantId,\n unregistered: receipts.unregistered,\n checked: receipts.checked,\n })\n }\n } catch (error) {\n logger.error('reclaim-stuck receipt sweep failed', {\n tenantId,\n error: error instanceof Error ? error.message : String(error),\n })\n }\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAC7B,SAAS,gCAAgC;AACzC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,MAAM,SAAS,aAAa,oBAAoB;AAYzC,MAAM,WAAuB;AAAA,EAClC,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,aAAa;AAAA;AACf;AAMA,eAAO,OACL,KACA,KACe;AACf,QAAM,MAAO,KAAK,WAAW,CAAC;AAC9B,QAAM,WAAW,IAAI,OAAO,YAAY,IAAI,YAAY;AACxD,MAAI,CAAC,UAAU;AACb,WAAO,KAAK,8DAAyD,EAAE,SAAS,IAAI,CAAC;AACrF;AAAA,EACF;AAEA,QAAM,KAAM,IAAI,QAAQ,IAAI,EAAoB,KAAK;AACrD,MAAI;AACF,UAAM,SAAS,MAAM,2BAA2B,IAAI,EAAE,SAAS,CAAC;AAChE,QAAI,OAAO,aAAa,KAAK,OAAO,UAAU,GAAG;AAC/C,aAAO,KAAK,2CAA2C;AAAA,QACrD;AAAA,QACA,YAAY,OAAO;AAAA,QACnB,SAAS,OAAO;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF,SAAS,OAAO;AACd,WAAO,MAAM,8BAA8B;AAAA,MACzC;AAAA,MACA,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,IAC9D,CAAC;AACD,UAAM;AAAA,EACR;AAKA,MAAI;AACF,UAAM,YAAa,IAAI,QAAQ,IAAI,EAAoB,KAAK;AAC5D,UAAM,WAAW,MAAM,kBAAkB,WAAW,EAAE,SAAS,GAAG,IAAI,OAAO;AAC7E,QAAI,SAAS,eAAe,GAAG;AAC7B,aAAO,KAAK,yDAAyD;AAAA,QACnE;AAAA,QACA,cAAc,SAAS;AAAA,QACvB,SAAS,SAAS;AAAA,MACpB,CAAC;AAAA,IACH;AAAA,EACF,SAAS,OAAO;AACd,WAAO,MAAM,sCAAsC;AAAA,MACjD;AAAA,MACA,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,IAC9D,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
2
|
+
import { PUSH_DELIVERIES_QUEUE } from "../lib/queue.js";
|
|
3
|
+
import { processPushDeliveryJob } from "../lib/push-delivery.js";
|
|
4
|
+
const logger = createLogger("push_notifications");
|
|
5
|
+
const metadata = {
|
|
6
|
+
queue: PUSH_DELIVERIES_QUEUE,
|
|
7
|
+
id: "push_notifications:send-push",
|
|
8
|
+
concurrency: 8
|
|
9
|
+
};
|
|
10
|
+
async function handle(job, ctx) {
|
|
11
|
+
const em = ctx.resolve("em").fork();
|
|
12
|
+
try {
|
|
13
|
+
await processPushDeliveryJob(em, job.payload, ctx.resolve);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
logger.error("send-push job processing failed", {
|
|
16
|
+
deliveryId: job.payload.deliveryId,
|
|
17
|
+
tenantId: job.payload.tenantId,
|
|
18
|
+
error: error instanceof Error ? error.message : String(error)
|
|
19
|
+
});
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
handle as default,
|
|
25
|
+
metadata
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=send-push.worker.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/push_notifications/workers/send-push.worker.ts"],
|
|
4
|
+
"sourcesContent": ["import type { EntityManager } from '@mikro-orm/postgresql'\nimport type { JobContext, QueuedJob, WorkerMeta } from '@open-mercato/queue'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\nimport { PUSH_DELIVERIES_QUEUE, type PushDeliveryJob } from '../lib/queue'\nimport { processPushDeliveryJob } from '../lib/push-delivery'\n\nconst logger = createLogger('push_notifications')\n\nexport const metadata: WorkerMeta = {\n queue: PUSH_DELIVERIES_QUEUE,\n id: 'push_notifications:send-push',\n concurrency: 8,\n}\n\ntype HandlerContext = JobContext & {\n resolve: <T = unknown>(name: string) => T\n}\n\nexport default async function handle(\n job: QueuedJob<PushDeliveryJob>,\n ctx: HandlerContext,\n): Promise<void> {\n const em = (ctx.resolve('em') as EntityManager).fork()\n try {\n await processPushDeliveryJob(em, job.payload, ctx.resolve)\n } catch (error) {\n logger.error('send-push job processing failed', {\n deliveryId: job.payload.deliveryId,\n tenantId: job.payload.tenantId,\n error: error instanceof Error ? error.message : String(error),\n })\n throw error\n }\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAC7B,SAAS,6BAAmD;AAC5D,SAAS,8BAA8B;AAEvC,MAAM,SAAS,aAAa,oBAAoB;AAEzC,MAAM,WAAuB;AAAA,EAClC,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,aAAa;AACf;AAMA,eAAO,OACL,KACA,KACe;AACf,QAAM,KAAM,IAAI,QAAQ,IAAI,EAAoB,KAAK;AACrD,MAAI;AACF,UAAM,uBAAuB,IAAI,IAAI,SAAS,IAAI,OAAO;AAAA,EAC3D,SAAS,OAAO;AACd,WAAO,MAAM,mCAAmC;AAAA,MAC9C,YAAY,IAAI,QAAQ;AAAA,MACxB,UAAU,IAAI,QAAQ;AAAA,MACtB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,IAC9D,CAAC;AACD,UAAM;AAAA,EACR;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const notificationTypes = [
|
|
2
2
|
{
|
|
3
3
|
type: "sales.order.created",
|
|
4
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
5
|
+
channels: ["in_app", "email"],
|
|
4
6
|
module: "sales",
|
|
5
7
|
titleKey: "sales.notifications.order.created.title",
|
|
6
8
|
bodyKey: "sales.notifications.order.created.body",
|
|
@@ -21,6 +23,8 @@ const notificationTypes = [
|
|
|
21
23
|
},
|
|
22
24
|
{
|
|
23
25
|
type: "sales.quote.created",
|
|
26
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
27
|
+
channels: ["in_app", "email"],
|
|
24
28
|
module: "sales",
|
|
25
29
|
titleKey: "sales.notifications.quote.created.title",
|
|
26
30
|
bodyKey: "sales.notifications.quote.created.body",
|
|
@@ -41,6 +45,8 @@ const notificationTypes = [
|
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
47
|
type: "sales.payment.received",
|
|
48
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
49
|
+
channels: ["in_app", "email"],
|
|
44
50
|
module: "sales",
|
|
45
51
|
titleKey: "sales.notifications.payment.received.title",
|
|
46
52
|
bodyKey: "sales.notifications.payment.received.body",
|
|
@@ -61,6 +67,8 @@ const notificationTypes = [
|
|
|
61
67
|
},
|
|
62
68
|
{
|
|
63
69
|
type: "sales.quote.expiring",
|
|
70
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
71
|
+
channels: ["in_app", "email"],
|
|
64
72
|
module: "sales",
|
|
65
73
|
titleKey: "sales.notifications.quote.expiring.title",
|
|
66
74
|
bodyKey: "sales.notifications.quote.expiring.body",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/sales/notifications.ts"],
|
|
4
|
-
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'sales.order.created',\n module: 'sales',\n titleKey: 'sales.notifications.order.created.title',\n bodyKey: 'sales.notifications.order.created.body',\n icon: 'shopping-cart',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/orders/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/orders/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.quote.created',\n module: 'sales',\n titleKey: 'sales.notifications.quote.created.title',\n bodyKey: 'sales.notifications.quote.created.body',\n icon: 'file-text',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/quotes/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/quotes/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.payment.received',\n module: 'sales',\n titleKey: 'sales.notifications.payment.received.title',\n bodyKey: 'sales.notifications.payment.received.body',\n icon: 'credit-card',\n severity: 'success',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/orders/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/orders/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.quote.expiring',\n module: 'sales',\n titleKey: 'sales.notifications.quote.expiring.title',\n bodyKey: 'sales.notifications.quote.expiring.body',\n icon: 'clock',\n severity: 'warning',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/quotes/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/quotes/{sourceEntityId}',\n expiresAfterHours: 72, // 3 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
-
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'sales.order.created',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'sales',\n titleKey: 'sales.notifications.order.created.title',\n bodyKey: 'sales.notifications.order.created.body',\n icon: 'shopping-cart',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/orders/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/orders/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.quote.created',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'sales',\n titleKey: 'sales.notifications.quote.created.title',\n bodyKey: 'sales.notifications.quote.created.body',\n icon: 'file-text',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/quotes/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/quotes/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.payment.received',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'sales',\n titleKey: 'sales.notifications.payment.received.title',\n bodyKey: 'sales.notifications.payment.received.body',\n icon: 'credit-card',\n severity: 'success',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/orders/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/orders/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'sales.quote.expiring',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'sales',\n titleKey: 'sales.notifications.quote.expiring.title',\n bodyKey: 'sales.notifications.quote.expiring.body',\n icon: 'clock',\n severity: 'warning',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/sales/quotes/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/sales/quotes/{sourceEntityId}',\n expiresAfterHours: 72, // 3 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
+
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AAAA,EACA;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AAAA,EACA;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AAAA,EACA;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AACF;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const notificationTypes = [
|
|
2
2
|
{
|
|
3
3
|
type: "staff.leave_request.pending",
|
|
4
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
5
|
+
channels: ["in_app", "email"],
|
|
4
6
|
module: "staff",
|
|
5
7
|
titleKey: "staff.notifications.leaveRequest.pending.title",
|
|
6
8
|
bodyKey: "staff.notifications.leaveRequest.pending.body",
|
|
@@ -28,6 +30,8 @@ const notificationTypes = [
|
|
|
28
30
|
},
|
|
29
31
|
{
|
|
30
32
|
type: "staff.leave_request.approved",
|
|
33
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
34
|
+
channels: ["in_app", "email"],
|
|
31
35
|
module: "staff",
|
|
32
36
|
titleKey: "staff.notifications.leaveRequest.approved.title",
|
|
33
37
|
bodyKey: "staff.notifications.leaveRequest.approved.body",
|
|
@@ -48,6 +52,8 @@ const notificationTypes = [
|
|
|
48
52
|
},
|
|
49
53
|
{
|
|
50
54
|
type: "staff.leave_request.rejected",
|
|
55
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
56
|
+
channels: ["in_app", "email"],
|
|
51
57
|
module: "staff",
|
|
52
58
|
titleKey: "staff.notifications.leaveRequest.rejected.title",
|
|
53
59
|
bodyKey: "staff.notifications.leaveRequest.rejected.body",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/staff/notifications.ts"],
|
|
4
|
-
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'staff.leave_request.pending',\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.pending.title',\n bodyKey: 'staff.notifications.leaveRequest.pending.body',\n icon: 'calendar-off',\n severity: 'warning',\n actions: [\n {\n id: 'approve',\n labelKey: 'staff.notifications.leaveRequest.actions.approve',\n variant: 'default',\n icon: 'check',\n commandId: 'staff.leave-requests.accept',\n },\n {\n id: 'reject',\n labelKey: 'staff.notifications.leaveRequest.actions.reject',\n variant: 'destructive',\n icon: 'x',\n commandId: 'staff.leave-requests.reject',\n },\n ],\n primaryActionId: 'approve',\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168,\n },\n {\n type: 'staff.leave_request.approved',\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.approved.title',\n bodyKey: 'staff.notifications.leaveRequest.approved.body',\n icon: 'calendar-check',\n severity: 'success',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/staff/leave-requests/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'staff.leave_request.rejected',\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.rejected.title',\n bodyKey: 'staff.notifications.leaveRequest.rejected.body',\n icon: 'calendar-x',\n severity: 'warning',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/staff/leave-requests/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
-
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'staff.leave_request.pending',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.pending.title',\n bodyKey: 'staff.notifications.leaveRequest.pending.body',\n icon: 'calendar-off',\n severity: 'warning',\n actions: [\n {\n id: 'approve',\n labelKey: 'staff.notifications.leaveRequest.actions.approve',\n variant: 'default',\n icon: 'check',\n commandId: 'staff.leave-requests.accept',\n },\n {\n id: 'reject',\n labelKey: 'staff.notifications.leaveRequest.actions.reject',\n variant: 'destructive',\n icon: 'x',\n commandId: 'staff.leave-requests.reject',\n },\n ],\n primaryActionId: 'approve',\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168,\n },\n {\n type: 'staff.leave_request.approved',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.approved.title',\n bodyKey: 'staff.notifications.leaveRequest.approved.body',\n icon: 'calendar-check',\n severity: 'success',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/staff/leave-requests/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n {\n type: 'staff.leave_request.rejected',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'staff',\n titleKey: 'staff.notifications.leaveRequest.rejected.title',\n bodyKey: 'staff.notifications.leaveRequest.rejected.body',\n icon: 'calendar-x',\n severity: 'warning',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/staff/leave-requests/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/staff/leave-requests/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
+
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,mBAAmB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AAAA,EACA;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AACF;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const notificationTypes = [
|
|
2
2
|
{
|
|
3
3
|
type: "workflows.task.assigned",
|
|
4
|
+
// Ships without push — operators re-enable it per type from the Notification Delivery settings.
|
|
5
|
+
channels: ["in_app", "email"],
|
|
4
6
|
module: "workflows",
|
|
5
7
|
titleKey: "workflows.notifications.task.assigned.title",
|
|
6
8
|
bodyKey: "workflows.notifications.task.assigned.body",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/workflows/notifications.ts"],
|
|
4
|
-
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'workflows.task.assigned',\n module: 'workflows',\n titleKey: 'workflows.notifications.task.assigned.title',\n bodyKey: 'workflows.notifications.task.assigned.body',\n icon: 'clipboard-list',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/workflows/tasks/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/workflows/tasks/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
-
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'workflows.task.assigned',\n // Ships without push \u2014 operators re-enable it per type from the Notification Delivery settings.\n channels: ['in_app', 'email'],\n module: 'workflows',\n titleKey: 'workflows.notifications.task.assigned.title',\n bodyKey: 'workflows.notifications.task.assigned.body',\n icon: 'clipboard-list',\n severity: 'info',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/workflows/tasks/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/workflows/tasks/{sourceEntityId}',\n expiresAfterHours: 168, // 7 days\n },\n]\n\nexport default notificationTypes\n"],
|
|
5
|
+
"mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA;AAAA,IAEN,UAAU,CAAC,UAAU,OAAO;AAAA,IAC5B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA;AAAA,EACrB;AACF;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,9 @@ export const source_entity_type = "source_entity_type";
|
|
|
18
18
|
export const source_entity_id = "source_entity_id";
|
|
19
19
|
export const link_href = "link_href";
|
|
20
20
|
export const group_key = "group_key";
|
|
21
|
+
export const data = "data";
|
|
22
|
+
export const push_options = "push_options";
|
|
23
|
+
export const channels = "channels";
|
|
21
24
|
export const created_at = "created_at";
|
|
22
25
|
export const read_at = "read_at";
|
|
23
26
|
export const actioned_at = "actioned_at";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const id = "id";
|
|
2
|
+
export const tenant_id = "tenant_id";
|
|
3
|
+
export const user_id = "user_id";
|
|
4
|
+
export const notification_type_id = "notification_type_id";
|
|
5
|
+
export const channel = "channel";
|
|
6
|
+
export const enabled = "enabled";
|
|
7
|
+
export const created_at = "created_at";
|
|
8
|
+
export const updated_at = "updated_at";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const id = "id";
|
|
2
|
+
export const tenant_id = "tenant_id";
|
|
3
|
+
export const label_key = "label_key";
|
|
4
|
+
export const description_key = "description_key";
|
|
5
|
+
export const category = "category";
|
|
6
|
+
export const silent = "silent";
|
|
7
|
+
export const non_opt_out = "non_opt_out";
|
|
8
|
+
export const created_at = "created_at";
|
|
9
|
+
export const updated_at = "updated_at";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const id = "id";
|
|
2
|
+
export const tenant_id = "tenant_id";
|
|
3
|
+
export const notification_type_id = "notification_type_id";
|
|
4
|
+
export const channels = "channels";
|
|
5
|
+
export const non_opt_out = "non_opt_out";
|
|
6
|
+
export const created_at = "created_at";
|
|
7
|
+
export const updated_at = "updated_at";
|