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

RealtimeNotificationsOptions

@mineflow/client-react


@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

ParameterTypeDescription
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.bodystringDescription Текст уведомления Example Отчёт за 2026-06-05 (дневная смена) подан и ждёт вашего утверждения.
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.organizationIdstringFormat: uuid Description UUID организации Example 11111111-1111-4111-8111-111111111111
n.resourceIdstring | null-
n.resourceTypestring | nullDescription Тип связанной сущности для deep-link Example shift-report
n.severityNotification_OutputSeverityDescription info
n.targetRolesstring[]Description Системные роли-получатели Example [ "Engineer", "CEO" ]
n.targetUserIdstring | null-
n.titlestringDescription Заголовок Example Сменный отчёт сдан на утверждение

Returns

void