groupNotificationsByEntity
@raizfc/contracts / groupNotificationsByEntity
Function: groupNotificationsByEntity()
groupNotificationsByEntity(
notifications): readonlyReadonly<{entityId:string;entityName:string;entityType:FeedEntityType;notifications: readonlyReadonly<{actionType?:"review_suggestion";category:NotificationCategory;createdAt:string;entityId?:string;entityName?:string;entityType?:FeedEntityType;id:string;priority:NotificationPriority;scope:NotificationScope;status:NotificationStatus;summary:string;targetRoute:string;title:string; }>[]; }>[]
Defined in: engagement/notifications.dto.ts:97
Stable grouping by (entityType, entityId), order of first appearance — pure so mocks and the
real backend group identically without either recomputing its own logic.
Parameters
notifications
readonly Readonly<{ actionType?: "review_suggestion"; category: NotificationCategory; createdAt: string; entityId?: string; entityName?: string; entityType?: FeedEntityType; id: string; priority: NotificationPriority; scope: NotificationScope; status: NotificationStatus; summary: string; targetRoute: string; title: string; }>[]
Returns
readonly Readonly<{ entityId: string; entityName: string; entityType: FeedEntityType; notifications: readonly Readonly<{ actionType?: "review_suggestion"; category: NotificationCategory; createdAt: string; entityId?: string; entityName?: string; entityType?: FeedEntityType; id: string; priority: NotificationPriority; scope: NotificationScope; status: NotificationStatus; summary: string; targetRoute: string; title: string; }>[]; }>[]