NeahStable/lib/types/notification.ts
2026-01-16 00:12:15 +01:00

28 lines
760 B
TypeScript

export interface Notification {
id: string;
source: 'leantime' | 'rocketchat' | 'email' | 'calendar' | 'nextcloud' | 'gitea' | 'dolibarr' | 'moodle';
sourceId: string; // Original ID from the source system
type: string; // Type of notification (e.g., 'task', 'mention', 'comment', 'message')
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;
}
};
}