Creates a flash notification (ADMIN or SYSTEM source) and persists it.
- Called by GraphQL resolver (
notificationFlash_create) or internal system hooks.
| Name | Required | Type | Description |
|---|---|---|---|
dto |
Yes | CreateNotificationFlashUsecaseDto |
Session, level, source, content, recipients and options. |
- If
source=ADMIN, caller role must beADMIN. - Content payload must match
CUSTOMorTEMPLATEshape.
- Validates role guard for ADMIN source.
- Generates a new
groupId. - Persists notification via
bddService.notificationFlash.create. - Publishes subscription event when source is
SYSTEM.
- Returns created notification model.
- Writes to
notification_flashes. - Publishes
notification_flash_createdon SYSTEM notifications.
- Throws
ERRORS.FORBIDDENwhen non-admin tries ADMIN source creation. - Normalizes errors under
ERRORS.CREATE_NOTIFICATION_FLASH_USECASE.
bddService.notificationFlashloggerService- global PubSub helper
api/src/usecases/notification-flash/create.notification-flash.usecase.tsapi/src/graphql/notification-flash/notification-flash.resolver.ts