This commit is contained in:
2025-12-11 13:50:38 +01:00
parent e4c1be628d
commit c7e5de40d6
212 changed files with 2965 additions and 763 deletions

View File

@@ -4,6 +4,7 @@
* Marks a notification as read.
*/
import type { AsyncUseCase } from '@gridpilot/shared/application';
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
import { NotificationDomainError } from '../../domain/errors/NotificationDomainError';
@@ -12,7 +13,7 @@ export interface MarkNotificationReadCommand {
recipientId: string; // For validation
}
export class MarkNotificationReadUseCase {
export class MarkNotificationReadUseCase implements AsyncUseCase<MarkNotificationReadCommand, void> {
constructor(
private readonly notificationRepository: INotificationRepository,
) {}
@@ -42,7 +43,7 @@ export class MarkNotificationReadUseCase {
*
* Marks all notifications as read for a recipient.
*/
export class MarkAllNotificationsReadUseCase {
export class MarkAllNotificationsReadUseCase implements AsyncUseCase<string, void> {
constructor(
private readonly notificationRepository: INotificationRepository,
) {}
@@ -62,7 +63,7 @@ export interface DismissNotificationCommand {
recipientId: string;
}
export class DismissNotificationUseCase {
export class DismissNotificationUseCase implements AsyncUseCase<DismissNotificationCommand, void> {
constructor(
private readonly notificationRepository: INotificationRepository,
) {}