/**
 * Download Workflow
 *
 * Handles downloading plugin files with verification and progress tracking
 */
import { EventEmitter } from 'node:events';
import type { PluginInfo, PluginUpdateInfo } from '../core/types/index.js';
/**
 * Download progress event
 */
export interface DownloadProgress {
    pluginName: string;
    percent: number;
    bytesDownloaded: number;
    totalBytes: number;
    status: 'downloading' | 'verifying' | 'done' | 'error';
    message?: string;
}
/**
 * Download result
 */
export interface DownloadResult {
    success: boolean;
    pluginName: string;
    version: string;
    filePath: string;
    bytesDownloaded: number;
    checksumValid?: boolean;
    error?: string;
    backedUpFile?: string;
}
/**
 * Batch download result
 */
export interface BatchDownloadResult {
    successful: DownloadResult[];
    failed: DownloadResult[];
    duration: number;
}
/**
 * Download workflow options
 */
export interface DownloadWorkflowOptions {
    targetDir: string;
    backupExisting?: boolean;
    backupDir?: string;
    verifyChecksums?: boolean;
    strictChecksumVerification?: boolean;
    useStreaming?: boolean;
    concurrency?: number;
    onProgress?: (progress: DownloadProgress) => void;
}
/**
 * Plugin downloader class
 */
export declare class PluginDownloader extends EventEmitter {
    private options;
    constructor(options: DownloadWorkflowOptions);
    /**
     * Download a single plugin
     */
    download(info: PluginInfo): Promise<DownloadResult>;
    /**
     * Download multiple plugins
     */
    downloadBatch(plugins: PluginInfo[]): Promise<BatchDownloadResult>;
    /**
     * Download updates from update check results
     */
    downloadUpdates(updates: PluginUpdateInfo[]): Promise<BatchDownloadResult>;
    /**
     * Get the filename for a plugin
     */
    private getFilename;
}
/**
 * Create a plugin downloader
 */
export declare function createDownloader(options: DownloadWorkflowOptions): PluginDownloader;
/**
 * Quick download a single plugin
 */
export declare function quickDownload(info: PluginInfo, targetDir: string, onProgress?: (progress: DownloadProgress) => void): Promise<DownloadResult>;
//# sourceMappingURL=download.d.ts.map