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

@@ -6,13 +6,13 @@
*/
import { v4 as uuid } from 'uuid';
import type { AsyncUseCase } from '@gridpilot/shared/application';
import { Notification } from '../../domain/entities/Notification';
import type { NotificationData } from '../../domain/entities/Notification';
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
import type { INotificationPreferenceRepository } from '../../domain/repositories/INotificationPreferenceRepository';
import type { INotificationGatewayRegistry, NotificationDeliveryResult } from '../ports/INotificationGateway';
import type { NotificationType } from '../../domain/value-objects/NotificationType';
import type { NotificationChannel } from '../../domain/value-objects/NotificationChannel';
import type { NotificationType, NotificationChannel } from '../../domain/types/NotificationTypes';
export interface SendNotificationCommand {
recipientId: string;
@@ -43,7 +43,7 @@ export interface SendNotificationResult {
deliveryResults: NotificationDeliveryResult[];
}
export class SendNotificationUseCase {
export class SendNotificationUseCase implements AsyncUseCase<SendNotificationCommand, SendNotificationResult> {
constructor(
private readonly notificationRepository: INotificationRepository,
private readonly preferenceRepository: INotificationPreferenceRepository,