import type { ID, Timestamp } from '../../common/types.js';
import { type EvidenceEventType } from './evidence-collector.js';
import { type TamperEvidentPackage, type HashVerifierConfig } from './hash-verifier.js';
import { type ExportFormat, type ComplianceEvidenceReport } from './report-generator.js';
/**
 * Export request parameters
 */
export interface ExportRequest {
    /** Start date for export period */
    startDate: string;
    /** End date for export period */
    endDate: string;
    /** Event types to include (defaults to all) */
    eventTypes?: EvidenceEventType[];
    /** Include raw payloads (defaults to false) */
    includePayloads?: boolean;
    /** Output format */
    format: ExportFormat;
}
/**
 * Export result
 */
export interface ExportResult {
    /** Operation ID */
    operationId: string;
    /** Export status */
    status: 'pending' | 'processing' | 'completed' | 'failed';
    /** Progress (0-100) */
    progress: number;
    /** Report (when completed) */
    report?: ComplianceEvidenceReport;
    /** Formatted output (when completed) */
    formattedOutput?: string | Record<string, string>;
    /** Tamper evidence package */
    tamperEvidence?: TamperEvidentPackage;
    /** Error message (if failed) */
    error?: string;
    /** Download URL (when available) */
    downloadUrl?: string;
}
/**
 * Overall compliance status summary
 */
export interface ComplianceStatusSummary {
    /** Status */
    status: 'healthy' | 'warning' | 'critical';
    /** Status message */
    message: string;
    /** Last audit timestamp */
    lastAuditAt?: Timestamp;
    /** Audit chain integrity */
    chainIntegrity: {
        verified: boolean;
        lastVerifiedAt?: Timestamp;
        recordsVerified?: number;
    };
    /** Data retention compliance */
    dataRetention: {
        compliant: boolean;
        lastEnforcedAt?: Timestamp;
        recordsProcessed?: number;
    };
    /** Active policies */
    policies: {
        total: number;
        enabled: number;
        lastUpdatedAt?: Timestamp;
    };
    /** Recent activity summary */
    recentActivity: {
        last24Hours: number;
        last7Days: number;
        last30Days: number;
    };
}
/**
 * Event summary by type and period
 */
export interface EventSummary {
    /** Period for the summary */
    period: {
        start: Timestamp;
        end: Timestamp;
    };
    /** Total events */
    totalEvents: number;
    /** Events by type */
    byType: Record<string, number>;
    /** Events by category */
    byCategory: Record<string, number>;
    /** Events by severity */
    bySeverity: Record<string, number>;
    /** Events by outcome */
    byOutcome: Record<string, number>;
    /** Hourly distribution */
    hourlyDistribution: Array<{
        hour: number;
        count: number;
    }>;
    /** Top actors */
    topActors: Array<{
        actorId: string;
        count: number;
    }>;
    /** Top resources */
    topResources: Array<{
        resourceType: string;
        count: number;
    }>;
}
/**
 * Main service for compliance evidence exports
 */
export declare class ComplianceExportService {
    private evidenceCollector;
    private hashVerifier;
    private reportGenerator;
    private exports;
    private exportData;
    constructor(hashVerifierConfig?: HashVerifierConfig);
    /**
     * Initialize the service
     */
    initialize(): Promise<void>;
    /**
     * Start a new export job
     */
    startExport(tenantId: ID, request: ExportRequest): Promise<string>;
    /**
     * Process an export job
     */
    private processExport;
    /**
     * Get export status
     */
    getExportStatus(operationId: string): ExportResult | undefined;
    /**
     * Get export download data
     */
    getExportDownload(operationId: string): {
        format: ExportFormat;
        data: string | Record<string, string>;
        filename: string;
        contentType: string;
    } | undefined;
    /**
     * Get overall compliance status
     */
    getComplianceStatus(tenantId: ID): Promise<ComplianceStatusSummary>;
    /**
     * Get event summary for a period
     */
    getEventSummary(tenantId: ID, startDate: Date, endDate: Date): Promise<EventSummary>;
    /**
     * Verify evidence integrity
     */
    verifyEvidence(operationId: string): Promise<{
        valid: boolean;
        errors: string[];
        details: Record<string, unknown>;
    }>;
    /**
     * Get supported event types
     */
    getSupportedEventTypes(): EvidenceEventType[];
    /**
     * Get supported export formats
     */
    getSupportedFormats(): ExportFormat[];
    /**
     * Clean up old exports
     */
    cleanupOldExports(maxAgeMs?: number): number;
}
/**
 * Get the singleton compliance export service instance
 */
export declare function getComplianceExportService(hashVerifierConfig?: HashVerifierConfig): ComplianceExportService;
/**
 * Reset the singleton (for testing)
 */
export declare function resetComplianceExportService(): void;
//# sourceMappingURL=service.d.ts.map