/**
 * Backup Verification
 *
 * Provides checksum generation and verification for backups.
 *
 * @since v1.41.2
 */
import { type HashAlgorithm } from './checksum.js';
/**
 * File entry in the backup manifest
 */
export interface ManifestEntry {
    /** Relative path within the backup */
    path: string;
    /** File size in bytes */
    size: number;
    /** File checksum */
    checksum: string;
    /** Last modified timestamp */
    modified?: string;
}
/**
 * Backup manifest with checksums
 */
export interface BackupManifest {
    /** Manifest version */
    version: '1.0';
    /** When the backup was created */
    created: string;
    /** Pluginator version that created the backup */
    pluginatorVersion: string;
    /** Optional description */
    description?: string;
    /** Hash algorithm used */
    algorithm: HashAlgorithm;
    /** Files in the backup */
    files: ManifestEntry[];
    /** Total number of files */
    fileCount: number;
    /** Total size in bytes (uncompressed) */
    totalSize: number;
    /** Combined checksum of all file checksums */
    totalChecksum: string;
}
/**
 * Result of backup verification
 */
export interface VerificationResult {
    /** Whether the backup is valid */
    valid: boolean;
    /** Number of files verified */
    filesVerified: number;
    /** Number of files with matching checksums */
    filesMatched: number;
    /** Issues found during verification */
    issues: VerificationIssue[];
    /** Time taken in milliseconds */
    duration: number;
}
/**
 * Verification issue
 */
export interface VerificationIssue {
    /** Type of issue */
    type: 'missing' | 'checksum_mismatch' | 'size_mismatch' | 'manifest_invalid' | 'extra_file';
    /** File path (if applicable) */
    path?: string;
    /** Expected value */
    expected?: string | number;
    /** Actual value */
    actual?: string | number;
    /** Description of the issue */
    message: string;
}
/**
 * Options for manifest generation
 */
export interface ManifestOptions {
    /** Hash algorithm to use (default: sha256) */
    algorithm?: HashAlgorithm;
    /** Description for the manifest */
    description?: string;
    /** Pluginator version */
    pluginatorVersion?: string;
}
/**
 * Default manifest filename
 */
export declare const MANIFEST_FILENAME = "backup-manifest.json";
/**
 * Generate a backup manifest for a directory
 */
export declare function generateManifest(sourceDir: string, options?: ManifestOptions): Promise<BackupManifest>;
/**
 * Save manifest to a file
 */
export declare function saveManifest(manifest: BackupManifest, outputPath: string): Promise<void>;
/**
 * Load manifest from a file
 */
export declare function loadManifest(manifestPath: string): Promise<BackupManifest | null>;
/**
 * Verify a directory against a manifest
 */
export declare function verifyAgainstManifest(targetDir: string, manifest: BackupManifest): Promise<VerificationResult>;
/**
 * Verify backup integrity using the total checksum
 */
export declare function verifyBackupIntegrity(targetDir: string, manifest: BackupManifest): Promise<{
    valid: boolean;
    message: string;
}>;
/**
 * Quick verification using only the total checksum
 * Faster than full verification but less detailed
 */
export declare function quickVerifyBackup(targetDir: string, manifest: BackupManifest): Promise<boolean>;
/**
 * Create a manifest and save it alongside the backup
 */
export declare function createVerifiedBackup(sourceDir: string, backupDir: string, options?: ManifestOptions): Promise<{
    manifest: BackupManifest;
    manifestPath: string;
}>;
/**
 * Format verification result for display
 */
export declare function formatVerificationResult(result: VerificationResult): string;
//# sourceMappingURL=backup-verification.d.ts.map