NeahNew/lib/types/notification.ts
2025-05-04 11:01:30 +02:00

28 lines
711 B
TypeScript

export interface Notification {
id: string;
source: 'leantime' | 'nextcloud' | 'gitea' | 'dolibarr' | 'moodle';
sourceId: string; // Original ID from the source system
type: string; // Type of notification (e.g., 'task', 'mention', 'comment')
title: string;
message: string;
link?: string; // Link to view the item in the source system
isRead: boolean;
timestamp: Date;
priority: 'low' | 'normal' | 'high';
user: {
id: string;
name?: string;
};
metadata?: Record<string, any>; // Additional source-specific data
}
export interface NotificationCount {
total: number;
unread: number;
sources: {
[key: string]: {
total: number;
unread: number;
}
};
}