/** * Repository Interface: INotificationRepository * * Defines the contract for persisting and retrieving Notification entities. */ import type { Notification } from '../entities/Notification'; import type { NotificationType } from '../types/NotificationTypes'; export interface INotificationRepository { /** * Find a notification by ID */ findById(id: string): Promise; /** * Find all notifications for a recipient */ findByRecipientId(recipientId: string): Promise; /** * Find unread notifications for a recipient */ findUnreadByRecipientId(recipientId: string): Promise; /** * Find notifications by type for a recipient */ findByRecipientIdAndType(recipientId: string, type: NotificationType): Promise; /** * Count unread notifications for a recipient */ countUnreadByRecipientId(recipientId: string): Promise; /** * Save a new notification */ create(notification: Notification): Promise; /** * Update an existing notification */ update(notification: Notification): Promise; /** * Delete a notification */ delete(id: string): Promise; /** * Delete all notifications for a recipient */ deleteAllByRecipientId(recipientId: string): Promise; /** * Mark all notifications as read for a recipient */ markAllAsReadByRecipientId(recipientId: string): Promise; }