website refactor

This commit is contained in:
2026-01-16 18:21:06 +01:00
parent 2f53727702
commit 095885544b
146 changed files with 970 additions and 524 deletions

View File

@@ -4,12 +4,15 @@
* Retrieves unread notifications for a recipient.
*/
import { NotificationRepository } from '@/notifications/domain/repositories/NotificationRepository';
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
import type { Logger } from '@core/shared/domain/Logger';
import { Result } from '@core/shared/domain/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
import type { Notification } from '../../domain/entities/Notification';
export interface GetUnreadNotificationsInput {
recipientId: string;
}
export interface GetUnreadNotificationsResult {
notifications: Notification[];

View File

@@ -4,11 +4,15 @@
* Marks a notification as read.
*/
import { NotificationRepository } from '@/notifications/domain/repositories/NotificationRepository';
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
import type { Logger } from '@core/shared/domain/Logger';
import { Result } from '@core/shared/domain/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
export interface MarkNotificationReadCommand {
notificationId: string;
recipientId: string;
}
export interface MarkNotificationReadResult {
notificationId: string;

View File

@@ -4,8 +4,8 @@
* Manages user notification preferences.
*/
import { NotificationPreferenceRepository } from '@/notifications/domain/repositories/NotificationPreferenceRepository';
import { NotificationChannel, NotificationType } from '@/notifications/domain/types/NotificationTypes';
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
import { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
import type { Logger } from '@core/shared/domain/Logger';
import { Result } from '@core/shared/domain/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';

View File

@@ -5,7 +5,7 @@
* based on their preferences.
*/
import { NotificationChannel, NotificationType } from '@/notifications/domain/types/NotificationTypes';
import { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
import type { Logger } from '@core/shared/domain/Logger';
import { Result } from '@core/shared/domain/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
@@ -13,6 +13,8 @@ import { v4 as uuid } from 'uuid';
import type { NotificationData } from '../../domain/entities/Notification';
import { Notification } from '../../domain/entities/Notification';
import type { NotificationDeliveryResult, NotificationGatewayRegistry } from '../ports/NotificationGateway';
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
export interface SendNotificationCommand {
recipientId: string;
@@ -93,7 +95,7 @@ export class SendNotificationUseCase {
// Check quiet hours (skip external channels during quiet hours)
const effectiveChannels = preferences.isInQuietHours()
? channels.filter(ch => ch === 'in_app')
? channels.filter((ch: NotificationChannel) => ch === 'in_app')
: channels;
// Ensure at least in_app is used

View File

@@ -1,5 +1,4 @@
import type { DomainError } from '@core/shared/errors/DomainError';
import type { CommonDomainErrorKind } from '@core/shared/errors/DomainError';
import type { DomainError, CommonDomainErrorKind } from '@core/shared/errors/DomainError';
/**
* Domain Error: NotificationDomainError