/**
 * Dead Letter Queue Manager
 * Failed job handling with compliance tracking (GDPR/HIPAA/SOC2)
 * Sealed namespace for immutability
 */
import { type RedisConfig } from '../../../src/index.js';
export type FailedJobEntry = {
    id: string;
    queueName: string;
    workerName: string;
    jobName: string;
    data: unknown;
    error: {
        message: string;
        stack?: string;
        name: string;
    };
    attemptsMade: number;
    maxAttempts: number;
    failedAt: Date;
    firstAttemptAt: Date;
    lastAttemptAt: Date;
    processingTime: number;
    metadata: {
        version?: string;
        region?: string;
        instanceId?: string;
    };
    complianceFlags: {
        containsPII: boolean;
        containsPHI: boolean;
        dataClassification: 'public' | 'internal' | 'confidential' | 'restricted';
    };
};
export type ComplianceAuditEntry = {
    timestamp: Date;
    action: 'access' | 'retry' | 'delete' | 'export' | 'anonymize';
    failedJobId: string;
    userId: string;
    userRole?: string;
    reason: string;
    ipAddress?: string;
    dataAccessed?: string[];
    result: 'success' | 'failure';
    errorMessage?: string;
};
export type RetentionPolicy = {
    enabled: boolean;
    defaultRetentionDays: number;
    gdprCompliant: boolean;
    hipaaCompliant: boolean;
    soc2Compliant: boolean;
    autoDeleteAfterDays?: number;
    anonymizeInsteadOfDelete: boolean;
};
export type DLQStats = {
    totalFailed: number;
    byQueue: Record<string, number>;
    byWorker: Record<string, number>;
    byErrorType: Record<string, number>;
    oldestFailure: Date | null;
    newestFailure: Date | null;
    averageAttempts: number;
    retentionViolations: number;
};
/**
 * Dead Letter Queue Manager - Sealed namespace
 */
export declare const DeadLetterQueue: Readonly<{
    /**
     * Initialize DLQ with Redis and retention policy
     */
    initialize(config: RedisConfig, policy: RetentionPolicy): void;
    /**
     * Add failed job to DLQ
     */
    addFailedJob(entry: FailedJobEntry): Promise<void>;
    /**
     * Get failed job by ID
     */
    getFailedJob(queueName: string, jobId: string, userId: string, reason: string): Promise<FailedJobEntry | null>;
    /**
     * Get all failed jobs for a queue
     */
    getFailedJobs(queueName: string, limit?: number): Promise<ReadonlyArray<FailedJobEntry>>;
    /**
     * Retry a failed job
     */
    retry(queueName: string, jobId: string, userId: string, reason: string): Promise<boolean>;
    /**
     * Delete a failed job (GDPR right to deletion)
     */
    deleteFailedJob(queueName: string, jobId: string, userId: string, reason: string): Promise<boolean>;
    /**
     * Anonymize a failed job (GDPR/HIPAA compliance)
     */
    anonymizeFailedJob(queueName: string, jobId: string, userId: string, reason: string): Promise<boolean>;
    /**
     * Get audit log for a failed job
     */
    getAuditLog(failedJobId: string, limit?: number): Promise<ReadonlyArray<ComplianceAuditEntry>>;
    /**
     * Get DLQ statistics
     */
    getStats(): Promise<DLQStats>;
    /**
     * Export failed jobs (compliance)
     */
    exportFailedJobs(queueName: string, userId: string, reason: string): Promise<ReadonlyArray<FailedJobEntry>>;
    /**
     * Update retention policy
     */
    updateRetentionPolicy(policy: RetentionPolicy): void;
    /**
     * Get current retention policy
     */
    getRetentionPolicy(): RetentionPolicy | null;
    /**
     * Shutdown DLQ manager
     */
    shutdown(): Promise<void>;
}>;
//# sourceMappingURL=DeadLetterQueue.d.ts.map