/**
 * Health Alert Types
 *
 * Type definitions for the health alert system.
 *
 * @since v1.66.0
 */
/**
 * Alert condition types
 */
export type AlertConditionType = 'health_score' | 'component_score' | 'specific_issue' | 'trend' | 'event' | 'vulnerability' | 'abandonment';
/**
 * Comparison operators for alert conditions
 */
export type AlertOperator = '<' | '>' | '<=' | '>=' | '==' | '!=' | 'contains' | 'not_contains';
/**
 * Alert notification channels
 */
export type AlertChannel = 'ui' | 'desktop' | 'webhook' | 'log';
/**
 * Alert severity levels
 */
export type AlertSeverity = 'critical' | 'warning' | 'info';
/**
 * Alert condition definition
 */
export interface AlertCondition {
    /** Type of condition */
    type: AlertConditionType;
    /** Comparison operator */
    operator: AlertOperator;
    /** Value to compare against */
    value: number | string;
    /** Specific component to check (for component_score type) */
    component?: 'version' | 'compatibility' | 'maintenance' | 'dependencies' | 'security';
    /** Filter to specific plugins */
    plugins?: string[];
    /** Filter to specific issue types */
    issueTypes?: string[];
}
/**
 * Alert rule definition
 */
export interface AlertRule {
    /** Unique rule ID */
    id: string;
    /** Human-readable name */
    name: string;
    /** Description of what this rule checks */
    description?: string;
    /** The condition to evaluate */
    condition: AlertCondition;
    /** Alert severity when triggered */
    severity: AlertSeverity;
    /** Channels to notify */
    notifyVia: AlertChannel[];
    /** Cooldown period in hours before re-alerting */
    cooldown: number;
    /** Whether to auto-resolve when condition no longer met */
    autoResolve: boolean;
    /** Whether this rule is enabled */
    enabled: boolean;
    /** Custom message template */
    messageTemplate?: string;
}
/**
 * Alert instance (a triggered alert)
 */
export interface Alert {
    /** Unique alert instance ID */
    id: string;
    /** Rule that triggered this alert */
    ruleId: string;
    /** Rule name for display */
    ruleName: string;
    /** Severity level */
    severity: AlertSeverity;
    /** Alert title */
    title: string;
    /** Alert message */
    message: string;
    /** Affected plugin(s) */
    affectedPlugins: string[];
    /** When the alert was triggered */
    triggeredAt: number;
    /** When the alert was acknowledged */
    acknowledgedAt?: number;
    /** When the alert was resolved */
    resolvedAt?: number;
    /** Whether the alert is currently active */
    active: boolean;
    /** Additional context data */
    context?: Record<string, unknown>;
}
/**
 * Alert history entry
 */
export interface AlertHistoryEntry {
    /** Alert ID */
    alertId: string;
    /** Rule ID */
    ruleId: string;
    /** Alert title */
    title: string;
    /** Severity */
    severity: AlertSeverity;
    /** When triggered */
    triggeredAt: number;
    /** When resolved */
    resolvedAt?: number;
    /** Duration in ms */
    durationMs?: number;
    /** Whether it was auto-resolved */
    autoResolved: boolean;
}
/**
 * Alert engine state
 */
export interface AlertEngineState {
    /** Active alerts */
    activeAlerts: Alert[];
    /** Alert history */
    history: AlertHistoryEntry[];
    /** Rule cooldown timestamps */
    cooldowns: Record<string, number>;
    /** Last check timestamp */
    lastCheck: number;
}
/**
 * Alert check result
 */
export interface AlertCheckResult {
    /** New alerts triggered */
    triggered: Alert[];
    /** Alerts that were resolved */
    resolved: Alert[];
    /** Alerts still active */
    active: Alert[];
    /** Check timestamp */
    timestamp: number;
}
/**
 * Webhook notification payload
 */
export interface WebhookAlertPayload {
    /** Alert data */
    alert: Alert;
    /** Server name/ID */
    serverName?: string;
    /** Timestamp */
    timestamp: string;
    /** Severity for filtering */
    severity: AlertSeverity;
    /** Source identifier */
    source: 'pluginator';
}
/**
 * Default alert rules
 */
export declare const DEFAULT_ALERT_RULES: AlertRule[];
/**
 * Alert configuration
 */
export interface AlertConfig {
    /** Whether alerting is enabled */
    enabled: boolean;
    /** Alert rules */
    rules: AlertRule[];
    /** Global cooldown multiplier */
    cooldownMultiplier: number;
    /** Maximum alerts per day */
    maxAlertsPerDay: number;
    /** Webhook URL for notifications */
    webhookUrl?: string;
    /** Desktop notifications enabled */
    desktopNotifications: boolean;
}
/**
 * Default alert configuration
 */
export declare const DEFAULT_ALERT_CONFIG: AlertConfig;
//# sourceMappingURL=alert-types.d.ts.map