RealtimeNotificationsOptions
@mineflow/client-react / RealtimeNotificationsOptions
Interface: RealtimeNotificationsOptions
Defined in: client-react/src/realtime.tsx:173
Properties
onNotification?
optional onNotification?: (n: object) => void;
Defined in: client-react/src/realtime.tsx:175
Колбэк на каждое новое уведомление (toast/звук).
Parameters
| Parameter | Type | Description |
|---|---|---|
n | { body: string; createdAt: string; eventId: string; eventType: string; id: string; organizationId: string; resourceId: string | null; resourceType: string | null; severity: Notification_OutputSeverity; targetRoles: string[]; targetUserId: string | null; title: string; } | - |
n.body | string | Description Текст уведомления Example Отчёт за 2026-06-05 (дневная смена) подан и ждёт вашего утверждения. |
n.createdAt | string | Format: date-time Description Время создания уведомления Example 2026-05-18T08:00:00.000Z |
n.eventId | string | Format: uuid Description UUID доменного события-источника Example 11111111-1111-4111-8111-111111111111 |
n.eventType | string | Description Тип доменного события Example prd.shift-report.submitted |
n.id | string | Format: uuid Description UUID уведомления Example 11111111-1111-4111-8111-111111111111 |
n.organizationId | string | Format: uuid Description UUID организации Example 11111111-1111-4111-8111-111111111111 |
n.resourceId | string | null | - |
n.resourceType | string | null | Description Тип связанной сущности для deep-link Example shift-report |
n.severity | Notification_OutputSeverity | Description info |
n.targetRoles | string[] | Description Системные роли-получатели Example [ "Engineer", "CEO" ] |
n.targetUserId | string | null | - |
n.title | string | Description Заголовок Example Сменный отчёт сдан на утверждение |
Returns
void