resolve todos in website
This commit is contained in:
@@ -5,27 +5,24 @@
|
||||
*/
|
||||
|
||||
// Use Cases
|
||||
export * from './use-cases/SendNotificationUseCase';
|
||||
export * from './use-cases/MarkNotificationReadUseCase';
|
||||
export * from './use-cases/GetUnreadNotificationsUseCase';
|
||||
export * from './use-cases/MarkNotificationReadUseCase';
|
||||
export * from './use-cases/NotificationPreferencesUseCases';
|
||||
export * from './use-cases/SendNotificationUseCase';
|
||||
|
||||
// Ports
|
||||
export * from './ports/INotificationGateway';
|
||||
export * from './ports/NotificationGateway';
|
||||
|
||||
// Re-export domain types for convenience
|
||||
export type {
|
||||
Notification,
|
||||
NotificationProps,
|
||||
NotificationStatus,
|
||||
NotificationData,
|
||||
NotificationUrgency,
|
||||
NotificationAction,
|
||||
Notification, NotificationAction, NotificationData, NotificationProps,
|
||||
NotificationStatus, NotificationUrgency
|
||||
} from '../domain/entities/Notification';
|
||||
export type { NotificationPreference, NotificationPreferenceProps, ChannelPreference, TypePreference } from '../domain/entities/NotificationPreference';
|
||||
export type { NotificationType, NotificationChannel } from '../domain/types/NotificationTypes';
|
||||
export { getNotificationTypeTitle, getNotificationTypePriority, getChannelDisplayName, isExternalChannel, DEFAULT_ENABLED_CHANNELS, ALL_CHANNELS } from '../domain/types/NotificationTypes';
|
||||
export type { ChannelPreference, NotificationPreference, NotificationPreferenceProps, TypePreference } from '../domain/entities/NotificationPreference';
|
||||
export { ALL_CHANNELS, DEFAULT_ENABLED_CHANNELS, getChannelDisplayName, getNotificationTypePriority, getNotificationTypeTitle, isExternalChannel } from '../domain/types/NotificationTypes';
|
||||
export type { NotificationChannel, NotificationType } from '../domain/types/NotificationTypes';
|
||||
|
||||
// Re-export repository interfaces
|
||||
export type { INotificationPreferenceRepository } from '../domain/repositories/INotificationPreferenceRepository';
|
||||
export type { INotificationRepository } from '../domain/repositories/INotificationRepository';
|
||||
export type { INotificationPreferenceRepository } from '../domain/repositories/INotificationPreferenceRepository';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface NotificationDeliveryResult {
|
||||
attemptedAt: Date;
|
||||
}
|
||||
|
||||
export interface INotificationGateway {
|
||||
export interface NotificationGateway {
|
||||
/**
|
||||
* Send a notification through this gateway's channel
|
||||
*/
|
||||
@@ -45,21 +45,21 @@ export interface INotificationGateway {
|
||||
* Registry for notification gateways
|
||||
* Allows routing notifications to the appropriate gateway based on channel
|
||||
*/
|
||||
export interface INotificationGatewayRegistry {
|
||||
export interface NotificationGatewayRegistry {
|
||||
/**
|
||||
* Register a gateway for a channel
|
||||
*/
|
||||
register(gateway: INotificationGateway): void;
|
||||
register(gateway: NotificationGateway): void;
|
||||
|
||||
/**
|
||||
* Get gateway for a specific channel
|
||||
*/
|
||||
getGateway(channel: NotificationChannel): INotificationGateway | null;
|
||||
getGateway(channel: NotificationChannel): NotificationGateway | null;
|
||||
|
||||
/**
|
||||
* Get all registered gateways
|
||||
*/
|
||||
getAllGateways(): INotificationGateway[];
|
||||
getAllGateways(): NotificationGateway[];
|
||||
|
||||
/**
|
||||
* Send notification through appropriate gateway
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { NotificationChannel } from '../../domain/types/NotificationTypes';
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
|
||||
export interface NotificationData {
|
||||
raceEventId?: string;
|
||||
@@ -36,6 +35,6 @@ export interface SendNotificationCommand {
|
||||
requiresResponse?: boolean;
|
||||
}
|
||||
|
||||
export interface INotificationService {
|
||||
export interface NotificationService {
|
||||
sendNotification(command: SendNotificationCommand): Promise<void>;
|
||||
}
|
||||
@@ -5,15 +5,14 @@
|
||||
* based on their preferences.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase, Logger } from '@core/shared/application';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import type { NotificationData } from '../../domain/entities/Notification';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import type { INotificationPreferenceRepository } from '../../domain/repositories/INotificationPreferenceRepository';
|
||||
import type { INotificationGatewayRegistry, NotificationDeliveryResult } from '../ports/INotificationGateway';
|
||||
import type { NotificationType, NotificationChannel } from '../../domain/types/NotificationTypes';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { NotificationDeliveryResult, NotificationGatewayRegistry } from '../ports/NotificationGateway';
|
||||
|
||||
export interface SendNotificationCommand {
|
||||
recipientId: string;
|
||||
@@ -48,7 +47,7 @@ export class SendNotificationUseCase implements AsyncUseCase<SendNotificationCom
|
||||
constructor(
|
||||
private readonly notificationRepository: INotificationRepository,
|
||||
private readonly preferenceRepository: INotificationPreferenceRepository,
|
||||
private readonly gatewayRegistry: INotificationGatewayRegistry,
|
||||
private readonly gatewayRegistry: NotificationGatewayRegistry,
|
||||
private readonly logger: Logger,
|
||||
) {
|
||||
this.logger.debug('SendNotificationUseCase initialized.');
|
||||
|
||||
Reference in New Issue
Block a user