/**
 * Schedule Notifications
 *
 * Notification system for scheduled update events.
 * Supports terminal, desktop, and webhook channels.
 *
 * @since v1.51.3
 */
import type { QueueProcessResult } from './update-queue.js';
/**
 * Notification event types
 */
export type NotificationEventType = 'update_started' | 'update_completed' | 'update_failed';
/**
 * Plugin update status in notification
 */
export interface NotificationPluginStatus {
    name: string;
    oldVersion: string;
    newVersion: string;
    status: 'success' | 'failed' | 'skipped';
    error?: string;
}
/**
 * Notification event payload
 */
export interface NotificationEvent {
    type: NotificationEventType;
    timestamp: string;
    server?: string;
    plugins: NotificationPluginStatus[];
    summary: {
        total: number;
        successful: number;
        failed: number;
        skipped: number;
    };
    backupPath?: string;
    error?: string;
}
/**
 * Notification channel types
 */
export type NotificationChannel = 'terminal' | 'desktop' | 'webhook';
/**
 * Notification configuration
 */
export interface NotificationConfig {
    /** Whether notifications are enabled */
    enabled: boolean;
    /** Channels to send notifications to */
    channels: NotificationChannel[];
    /** Webhook URL for Discord/Slack notifications */
    webhookUrl?: string;
    /** Path to store terminal notifications for next session */
    notificationStorePath?: string;
}
/**
 * Stored notification for terminal display
 */
export interface StoredNotification {
    id: string;
    event: NotificationEvent;
    read: boolean;
    createdAt: string;
}
/**
 * Default notification configuration
 */
export declare const DEFAULT_NOTIFICATION_CONFIG: NotificationConfig;
/**
 * Schedule Notifier
 *
 * Sends notifications through configured channels.
 */
export declare class ScheduleNotifier {
    private config;
    constructor(config?: Partial<NotificationConfig>);
    /**
     * Update configuration
     */
    updateConfig(config: Partial<NotificationConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): NotificationConfig;
    /**
     * Send notification for an event
     */
    notify(event: NotificationEvent): Promise<{
        success: boolean;
        errors: string[];
    }>;
    /**
     * Create notification event from execution result
     */
    createEventFromResult(result: QueueProcessResult, type: NotificationEventType, options?: {
        server?: string;
        backupPath?: string;
        error?: string;
    }): NotificationEvent;
    /**
     * Send terminal notification (stored for next session)
     */
    private sendTerminalNotification;
    /**
     * Send desktop notification
     * Uses execFile with argument arrays to prevent command injection
     */
    private sendDesktopNotification;
    /**
     * Redact webhook URL for logging (hides auth tokens)
     */
    private redactWebhookUrl;
    /**
     * Send webhook notification (Discord/Slack compatible)
     */
    private sendWebhookNotification;
    /**
     * Create Discord-compatible webhook payload
     */
    private createWebhookPayload;
    /**
     * Get notification title based on event type
     */
    private getNotificationTitle;
    /**
     * Get notification message based on event
     */
    private getNotificationMessage;
    /**
     * Get notification description for webhook
     */
    private getNotificationDescription;
    /**
     * Get notification color for webhook (Discord format)
     */
    private getNotificationColor;
    /**
     * Get unread terminal notifications
     */
    getUnreadNotifications(): Promise<StoredNotification[]>;
    /**
     * Mark notifications as read
     */
    markAsRead(ids: string[]): Promise<void>;
    /**
     * Clear all notifications
     */
    clearNotifications(): Promise<void>;
}
/**
 * Get the singleton notifier instance
 */
export declare function getScheduleNotifier(): ScheduleNotifier | null;
/**
 * Initialize the schedule notifier
 */
export declare function initScheduleNotifier(config?: Partial<NotificationConfig>): ScheduleNotifier;
/**
 * Reset the singleton (for testing)
 */
export declare function resetScheduleNotifier(): void;
//# sourceMappingURL=notifications.d.ts.map