resolve todos in website
This commit is contained in:
40
core/notifications/application/ports/NotificationService.ts
Normal file
40
core/notifications/application/ports/NotificationService.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
|
||||
export interface NotificationData {
|
||||
raceEventId?: string;
|
||||
sessionId?: string;
|
||||
leagueId?: string;
|
||||
position?: number | 'DNF';
|
||||
positionChange?: number;
|
||||
incidents?: number;
|
||||
provisionalRatingChange?: number;
|
||||
finalRatingChange?: number;
|
||||
hadPenaltiesApplied?: boolean;
|
||||
deadline?: Date;
|
||||
protestId?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface NotificationAction {
|
||||
label: string;
|
||||
type: 'primary' | 'secondary' | 'danger';
|
||||
href?: string;
|
||||
actionId?: string;
|
||||
}
|
||||
|
||||
export interface SendNotificationCommand {
|
||||
recipientId: string;
|
||||
type: NotificationType;
|
||||
title: string;
|
||||
body: string;
|
||||
channel: NotificationChannel;
|
||||
urgency: 'silent' | 'toast' | 'modal';
|
||||
data?: NotificationData;
|
||||
actionUrl?: string;
|
||||
actions?: NotificationAction[];
|
||||
requiresResponse?: boolean;
|
||||
}
|
||||
|
||||
export interface NotificationService {
|
||||
sendNotification(command: SendNotificationCommand): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user