import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
import type { ID } from '../../common/types.js';
import { AuditService } from '../../audit/service.js';
import { type RetentionPolicyConfig, type LitigationHold, type RetentionReport, type RetentionComplianceStatus, type CreateLitigationHoldInput, type ReleaseLitigationHoldInput } from './retention-policy.js';
/**
 * Dependencies for RetentionEnforcer
 */
export interface RetentionEnforcerDependencies {
    database?: NodePgDatabase;
    auditService?: AuditService;
}
/**
 * Options for enforcement run
 */
export interface EnforcementOptions {
    /** Dry run - don't actually delete, just report what would be deleted */
    dryRun?: boolean;
    /** Maximum records to process per category (for batching) */
    batchSize?: number;
    /** Specific categories to enforce (default: all) */
    categories?: Array<'intents' | 'auditLogs' | 'proofs' | 'sessions' | 'apiKeyLogs'>;
}
/**
 * Service for enforcing data retention policies
 */
export declare class RetentionEnforcer {
    private db;
    private injectedDb;
    private auditService;
    private policyConfig;
    private litigationHolds;
    private lastEnforcementRun?;
    private lastReport?;
    constructor(deps?: RetentionEnforcerDependencies, policyConfig?: Partial<RetentionPolicyConfig>);
    /**
     * Get the database instance (lazy initialization if not injected)
     */
    private getDb;
    /**
     * Get current retention policy configuration
     */
    getPolicyConfig(): RetentionPolicyConfig;
    /**
     * Update retention policy configuration
     */
    updatePolicyConfig(config: Partial<RetentionPolicyConfig>): void;
    /**
     * Create a new litigation hold
     */
    createLitigationHold(input: CreateLitigationHoldInput): Promise<LitigationHold>;
    /**
     * Release a litigation hold
     */
    releaseLitigationHold(input: ReleaseLitigationHoldInput): Promise<LitigationHold | null>;
    /**
     * Get a litigation hold by ID
     */
    getLitigationHold(holdId: ID): LitigationHold | null;
    /**
     * List all active litigation holds for a tenant
     */
    getActiveLitigationHolds(tenantId?: ID): LitigationHold[];
    /**
     * Check if a record is protected by litigation hold
     */
    private isProtectedByHold;
    /**
     * Main enforcement method - enforces all retention policies
     */
    enforceRetention(options?: EnforcementOptions): Promise<RetentionReport>;
    /**
     * Enforce retention for intents
     */
    private enforceIntentRetention;
    /**
     * Enforce retention for audit logs
     */
    private enforceAuditLogRetention;
    /**
     * Enforce retention for proofs
     *
     * Note: Proofs have very long retention (7 years) and should typically
     * only be anonymized, not deleted, to maintain chain integrity
     */
    private enforceProofRetention;
    /**
     * Enforce retention for sessions
     */
    private enforceSessionRetention;
    /**
     * Enforce retention for API key logs
     */
    private enforceApiKeyLogRetention;
    /**
     * Get the current compliance status for retention
     */
    getComplianceStatus(): Promise<RetentionComplianceStatus>;
    /**
     * Get the last enforcement report
     */
    getLastReport(): RetentionReport | undefined;
    /**
     * Create an empty enforcement result
     */
    private createEmptyResult;
}
/**
 * Get or create the retention enforcer singleton
 */
export declare function getRetentionEnforcer(deps?: RetentionEnforcerDependencies, policyConfig?: Partial<RetentionPolicyConfig>): RetentionEnforcer;
/**
 * Create a new retention enforcer instance
 */
export declare function createRetentionEnforcer(deps?: RetentionEnforcerDependencies, policyConfig?: Partial<RetentionPolicyConfig>): RetentionEnforcer;
/**
 * Reset the retention enforcer singleton (for testing)
 */
export declare function resetRetentionEnforcer(): void;
//# sourceMappingURL=retention-enforcer.d.ts.map