/**
 * Incident Response System - Incident Manager
 *
 * Core incident management functionality including incident lifecycle,
 * playbook execution, escalation workflows, and reporting.
 *
 * Features:
 * - Automated playbook execution
 * - Trigger-based incident creation from alerts
 * - Parallel step execution with dependencies
 * - State persistence and recovery
 * - Rollback capabilities
 */
import { Incident, CreateIncidentInput, UpdateIncidentInput, Playbook, PlaybookInput, PlaybookExecutionState, StepExecutionResult, Evidence, IncidentStatus, IncidentSeverity, IncidentType, IncidentReport, IncidentMetrics, IncidentEventHandler, IncidentManagerConfig, Alert } from './types.js';
import { NotificationServiceConfig } from './notification.js';
import { PlaybookExecutor } from './executor.js';
import { IncidentTrigger } from './triggers.js';
export declare class IncidentManager {
    private incidents;
    private playbooks;
    private eventHandlers;
    private escalationTimers;
    private executionContexts;
    private config;
    private notificationService;
    private executor;
    private trigger;
    private automationEnabled;
    constructor(config?: Partial<IncidentManagerConfig>, notificationConfig?: NotificationServiceConfig);
    /**
     * Set up event handlers for the executor
     */
    private setupExecutorEvents;
    /**
     * Send notification when a step is waiting for action
     */
    private notifyStepWaiting;
    /**
     * Create a new incident
     */
    createIncident(input: CreateIncidentInput): Promise<Incident>;
    /**
     * Update an existing incident
     */
    updateIncident(incidentId: string, updates: UpdateIncidentInput): Promise<Incident>;
    /**
     * Get an incident by ID
     */
    getIncident(incidentId: string): Incident | undefined;
    /**
     * Get all incidents with optional filters
     */
    getIncidents(filters?: {
        status?: IncidentStatus;
        severity?: IncidentSeverity;
        type?: IncidentType;
        assignee?: string;
        fromDate?: Date;
        toDate?: Date;
    }): Incident[];
    /**
     * Acknowledge an incident
     */
    acknowledgeIncident(incidentId: string, acknowledger: string): Promise<Incident>;
    /**
     * Close an incident
     */
    closeIncident(incidentId: string, closedBy: string, resolution: {
        rootCause?: string;
        remediation?: string;
        lessonsLearned?: string;
    }): Promise<Incident>;
    /**
     * Add evidence to an incident
     */
    addEvidence(incidentId: string, evidence: Omit<Evidence, 'id' | 'collectedAt'>): Promise<Evidence>;
    /**
     * Add a comment to the incident timeline
     */
    addComment(incidentId: string, author: string, comment: string): Promise<void>;
    /**
     * Register a playbook
     */
    registerPlaybook(input: PlaybookInput): void;
    /**
     * Get a playbook by ID
     */
    getPlaybook(playbookId: string): Playbook | undefined;
    /**
     * Get all registered playbooks
     */
    getPlaybooks(): Playbook[];
    /**
     * Start executing a playbook for an incident
     */
    startPlaybook(incidentId: string, playbookId: string): Promise<void>;
    /**
     * Execute a specific playbook step
     */
    executeStep(incidentId: string, stepId: string): Promise<StepExecutionResult>;
    /**
     * Mark a manual step as completed
     */
    completeManualStep(incidentId: string, stepId: string, completedBy: string): Promise<void>;
    /**
     * Approve a step that requires approval
     */
    approveStep(incidentId: string, stepId: string, approver: string): Promise<void>;
    /**
     * Get playbook execution status
     */
    getPlaybookStatus(incidentId: string): {
        inProgress: boolean;
        completedSteps: number;
        totalSteps: number;
        pendingApprovals: string[];
        pendingManualSteps: string[];
        failedSteps: string[];
    } | null;
    private startEscalationTimer;
    private clearEscalationTimers;
    /**
     * Generate an incident report
     */
    generateReport(incidentId: string, generatedBy: string): IncidentReport;
    /**
     * Get incident metrics
     */
    getMetrics(fromDate?: Date, toDate?: Date): IncidentMetrics;
    /**
     * Subscribe to incident events
     */
    onEvent(handler: IncidentEventHandler): () => void;
    private createTimelineEntry;
    private handleStatusTransition;
    private findMatchingPlaybook;
    private evaluateTriggerConditions;
    private tryAutoAssign;
    private executeNextSteps;
    private emitEvent;
    private formatTimeline;
    private generateRecommendations;
    /**
     * Clean up resources
     */
    destroy(): void;
    /**
     * Process an alert and potentially create an incident
     */
    processAlert(alert: Alert): Promise<{
        incidentCreated: boolean;
        incidentId?: string;
        reason?: string;
    }>;
    /**
     * Get playbook execution state for an incident
     */
    getExecutionState(incidentId: string): Promise<PlaybookExecutionState | null>;
    /**
     * Approve a step in a playbook execution
     */
    approvePlaybookStep(incidentId: string, stepId: string, approver: string): Promise<void>;
    /**
     * Complete a manual step in a playbook execution
     */
    completeManualPlaybookStep(incidentId: string, stepId: string, completedBy: string, output?: unknown): Promise<void>;
    /**
     * Cancel a playbook execution
     */
    cancelPlaybookExecution(incidentId: string): Promise<void>;
    /**
     * Rollback a failed playbook execution
     */
    rollbackPlaybookExecution(incidentId: string): Promise<void>;
    /**
     * Get all active playbook executions
     */
    getActiveExecutions(): Promise<PlaybookExecutionState[]>;
    /**
     * Register a custom action with the executor
     */
    registerAction(action: Parameters<typeof this.executor.registerAction>[0]): void;
    /**
     * Add an alert rule for automatic incident creation
     */
    addAlertRule(rule: Parameters<typeof this.trigger.addRule>[0]): void;
    /**
     * Remove an alert rule
     */
    removeAlertRule(ruleId: string): boolean;
    /**
     * Get all alert rules
     */
    getAlertRules(): ReturnType<typeof this.trigger.getRules>;
    /**
     * Enable or disable automation
     */
    setAutomationEnabled(enabled: boolean): void;
    /**
     * Check if automation is enabled
     */
    isAutomationEnabled(): boolean;
    /**
     * Get the executor instance (for advanced usage)
     */
    getExecutor(): PlaybookExecutor;
    /**
     * Get the trigger instance (for advanced usage)
     */
    getTrigger(): IncidentTrigger;
}
export declare const createIncidentManager: (config?: Partial<IncidentManagerConfig>, notificationConfig?: NotificationServiceConfig) => IncidentManager;
export * from './types.js';
export { NotificationService, createNotificationService } from './notification.js';
export { PlaybookExecutor, createPlaybookExecutor } from './executor.js';
export { IncidentTrigger, createIncidentTrigger } from './triggers.js';
export * from './actions/index.js';
export { dataBreachPlaybook } from './playbooks/data-breach.js';
export { accountCompromisePlaybook } from './playbooks/account-compromise.js';
//# sourceMappingURL=index.d.ts.map