/** * Notification Integrations for aurasecurity * * Supports: * - Slack (webhooks + bot API) * - Discord (webhooks) * - Email (SMTP) * - Custom webhooks */ export interface NotificationConfig { slack?: { webhookUrl?: string; botToken?: string; channel?: string; enabled: boolean; }; discord?: { webhookUrl?: string; enabled: boolean; }; email?: { smtp: { host: string; port: number; secure: boolean; user: string; pass: string; }; from: string; to: string[]; enabled: boolean; }; webhook?: { url: string; headers?: Record; enabled: boolean; }; } export interface NotificationPayload { title: string; message: string; severity: 'low' | 'medium' | 'high' | 'critical'; auditId?: string; target?: string; findings?: { critical: number; high: number; medium: number; low: number; }; link?: string; } export declare class NotificationService { private config; private dbPath?; constructor(config?: NotificationConfig, dbPath?: string); /** * Load configuration from database settings */ loadFromDatabase(): void; /** * Send notification to all configured channels */ notify(payload: NotificationPayload): Promise<{ sent: string[]; failed: string[]; }>; /** * Send to Slack webhook */ private sendSlack; /** * Send to Discord webhook */ private sendDiscord; /** * Send to custom webhook */ private sendWebhook; /** * Test a specific notification channel */ testChannel(channel: 'slack' | 'discord' | 'webhook'): Promise<{ success: boolean; error?: string; }>; private getSeverityColor; private getSeverityColorInt; private getSeverityEmoji; } /** * Create notification from scan result */ export declare function createNotificationFromAudit(auditId: string, type: string, target: string, summary: { critical: number; high: number; medium: number; low: number; }, baseUrl?: string): NotificationPayload;