import { Server as SocketServer } from 'socket.io';
/**
 * Notification Types
 */
export declare enum NotificationType {
    TASK_ASSIGNED = "task_assigned",
    TASK_UPDATED = "task_updated",
    TASK_COMPLETED = "task_completed",
    TASK_OVERDUE = "task_overdue",
    COMMENT_ADDED = "comment_added",
    MENTION = "mention",
    STATUS_CHANGED = "status_changed",
    DEADLINE_APPROACHING = "deadline_approaching",
    WORKFLOW_TRIGGERED = "workflow_triggered",
    COLLABORATION_INVITE = "collaboration_invite"
}
/**
 * Notification Priority Levels
 */
export declare enum NotificationPriority {
    LOW = "low",
    MEDIUM = "medium",
    HIGH = "high",
    URGENT = "urgent"
}
/**
 * Notification Interface
 */
export interface Notification {
    id?: string;
    type: NotificationType;
    priority: NotificationPriority;
    userId: string;
    title: string;
    message: string;
    metadata?: Record<string, any>;
    read: boolean;
    readAt?: string;
    createdAt: string;
    expiresAt?: string;
    actionUrl?: string;
    actions?: NotificationAction[];
}
/**
 * Notification Action
 */
export interface NotificationAction {
    label: string;
    action: string;
    url?: string;
    data?: Record<string, any>;
}
/**
 * User Notification Preferences
 */
export interface NotificationPreferences {
    userId: string;
    email: {
        enabled: boolean;
        frequency: 'instant' | 'hourly' | 'daily' | 'weekly';
        types: NotificationType[];
    };
    realtime: {
        enabled: boolean;
        types: NotificationType[];
        sound: boolean;
        desktop: boolean;
    };
    doNotDisturb: {
        enabled: boolean;
        startTime?: string;
        endTime?: string;
        timezone?: string;
    };
}
/**
 * Notification Service
 * Manages real-time and email notifications
 */
export declare class NotificationService {
    private io;
    private emailTransporter;
    private directusClient;
    private emailQueue;
    private connectedUsers;
    private userPreferences;
    private redisClient;
    constructor();
    /**
     * Initialize all services
     */
    private initializeServices;
    /**
     * Initialize Socket.io server
     */
    initializeSocketServer(io: SocketServer): void;
    /**
     * Initialize email transporter
     */
    private initializeEmailTransporter;
    /**
     * Send notification to user(s)
     */
    sendNotification(userIds: string | string[], notification: Omit<Notification, 'id' | 'userId' | 'createdAt' | 'read' | 'readAt'>): Promise<void>;
    /**
     * Send real-time notification via Socket.io
     */
    private sendRealtimeNotification;
    /**
     * Queue email notification
     */
    private queueEmailNotification;
    /**
     * Process email job from queue
     */
    private processEmailJob;
    /**
     * Send single email notification
     */
    private sendEmailNotification;
    /**
     * Send email digest
     */
    private sendEmailDigest;
    /**
     * Generate email HTML template
     */
    private generateEmailHTML;
    /**
     * Generate digest email HTML
     */
    private generateDigestHTML;
    /**
     * Helper: Get priority color
     */
    private getPriorityColor;
    /**
     * Helper: Get email delay based on frequency
     */
    private getEmailDelay;
    /**
     * Save notification to database
     */
    private saveNotification;
    /**
     * Get user notification preferences
     */
    private getUserPreferences;
    /**
     * Update user notification preferences
     */
    updateUserPreferences(userId: string, preferences: Partial<NotificationPreferences>): Promise<void>;
    /**
     * Load all user preferences
     */
    private loadUserPreferences;
    /**
     * Check if notification type should be sent real-time
     */
    private shouldSendRealtimeNotification;
    /**
     * Check if notification type should be sent via email
     */
    private shouldSendEmailNotification;
    /**
     * Check if user is in Do Not Disturb mode
     */
    private isUserInDND;
    /**
     * Track connected user
     */
    private addConnectedUser;
    /**
     * Remove connected user
     */
    private removeConnectedUser;
    /**
     * Send pending notifications to newly connected user
     */
    private sendPendingNotifications;
    /**
     * Mark notification as read
     */
    markNotificationAsRead(notificationId: string, userId: string): Promise<void>;
    /**
     * Mark all notifications as read for a user
     */
    markAllNotificationsAsRead(userId: string): Promise<void>;
    /**
     * Subscribe to notification types
     */
    subscribeToNotificationTypes(userId: string, types: NotificationType[]): Promise<void>;
    /**
     * Unsubscribe from notification types
     */
    unsubscribeFromNotificationTypes(userId: string, types: NotificationType[]): Promise<void>;
    /**
     * Get unread notifications for digest
     */
    private getUnreadNotifications;
    /**
     * Mark notifications as emailed
     */
    private markNotificationsAsEmailed;
    /**
     * Clean up old notifications
     */
    cleanupOldNotifications(daysToKeep?: number): Promise<number>;
}
export declare const notificationService: NotificationService;
//# sourceMappingURL=notificationService.d.ts.map