website refactor
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { Logger } from '@core/shared/domain/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
import {
|
||||
GetUnreadNotificationsUseCase,
|
||||
type GetUnreadNotificationsInput,
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
* Retrieves unread notifications for a recipient.
|
||||
*/
|
||||
|
||||
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';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
|
||||
export interface GetUnreadNotificationsInput {
|
||||
recipientId: string;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Logger } from '@core/shared/domain/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
import {
|
||||
DismissNotificationUseCase,
|
||||
MarkAllNotificationsReadUseCase,
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
* Marks a notification as read.
|
||||
*/
|
||||
|
||||
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 { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
|
||||
export interface MarkNotificationReadCommand {
|
||||
notificationId: string;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import type { ChannelPreference, NotificationPreference, TypePreference } from '../../domain/entities/NotificationPreference';
|
||||
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import {
|
||||
GetNotificationPreferencesQuery,
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
* Manages user notification preferences.
|
||||
*/
|
||||
|
||||
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';
|
||||
import type { ChannelPreference, TypePreference } from '../../domain/entities/NotificationPreference';
|
||||
import { NotificationPreference } from '../../domain/entities/NotificationPreference';
|
||||
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
|
||||
import { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
|
||||
/**
|
||||
* Query: GetNotificationPreferencesQuery
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Logger } from '@core/shared/domain/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
|
||||
|
||||
import {
|
||||
SendNotificationUseCase,
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
type SendNotificationResult,
|
||||
} from './SendNotificationUseCase';
|
||||
|
||||
import { NotificationPreferenceRepository } from '../../domain/repositories/NotificationPreferenceRepository';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { NotificationGatewayRegistry } from '../ports/NotificationGateway';
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
* based on their preferences.
|
||||
*/
|
||||
|
||||
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';
|
||||
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';
|
||||
import { NotificationRepository } from '../../domain/repositories/NotificationRepository';
|
||||
import { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { NotificationDeliveryResult, NotificationGatewayRegistry } from '../ports/NotificationGateway';
|
||||
|
||||
export interface SendNotificationCommand {
|
||||
recipientId: string;
|
||||
|
||||
Reference in New Issue
Block a user