Перейти к основному содержимому

RealtimeNotificationsOptions

@mineflow/client-react


@mineflow/client-react / realtime / RealtimeNotificationsOptions

Interface: RealtimeNotificationsOptions

Defined in: client-react/src/realtime.tsx:269

Properties​

onNotification?​

optional onNotification?: (n: object) => void;

Defined in: client-react/src/realtime.tsx:271

Колбэк на каждое новое уведомление (toast/звук).

Parameters​

ParameterTypeDescription
n{ createdAt: string; eventId: string; eventType: string; id: string; messageKey: string; organizationId: string; params: { [key: string]: string | number; }; readAt?: string | null; resourceId: string | null; resourceType: string | null; severity: Notification_OutputSeverity; targetRoles: string[]; targetUserId: string | null; }-
n.createdAtstringFormat: date-time Description Время создания уведомления Example 2026-05-18T08:00:00.000Z
n.eventIdstringFormat: uuid Description UUID доменного события-источника Example 11111111-1111-4111-8111-111111111111
n.eventTypestringDescription Тип доменного события Example prd.shift-report.submitted
n.idstringFormat: uuid Description UUID уведомления Example 11111111-1111-4111-8111-111111111111
n.messageKeystringDescription Стабильный ключ сообщения (i18n). Клиент рендерит текст своим каталогом по messageKey+params (как коды ошибок) — сервер текст не отдаёт. Example shiftReportSubmitted
n.organizationIdstringFormat: uuid Description UUID организации Example 11111111-1111-4111-8111-111111111111
n.params{ [key: string]: string | number; }Description Параметры подстановки шаблона (готовые к выводу скаляры). Пусто = без параметров. Example { * "shiftDate": "2026-06-05", * "shiftType": "day" * }
n.readAt?string | nullDescription ISO-время прочтения получателем (BL-08); null = не прочитано. Отсутствует в live-payload (свежий push = непрочитано). Example 2026-06-05T11:30:00.000Z
n.resourceIdstring | null-
n.resourceTypestring | nullDescription Тип связанной сущности для deep-link Example shift-report
n.severityNotification_OutputSeverityDescription info
n.targetRolesstring[]Description Системные роли-получатели Example [ "Engineer", "CEO" ]
n.targetUserIdstring | null-

Returns​

void