/**
 * Update Queue
 *
 * Manages queued plugin updates for scheduled execution.
 *
 * @since v1.48.0
 */
/**
 * Status of a queued update
 */
export type QueuedUpdateStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped';
/**
 * A plugin update waiting in the queue
 */
export interface QueuedUpdate {
    /** Unique identifier */
    id: string;
    /** Plugin identifier */
    pluginId: string;
    /** Plugin display name */
    pluginName: string;
    /** Current installed version */
    currentVersion: string;
    /** Target version to update to */
    targetVersion: string;
    /** Whether this is a major version change */
    isMajorUpdate: boolean;
    /** When this update was queued */
    queuedAt: string;
    /** Which schedule this is queued for (optional) */
    scheduleId?: string;
    /** When this update is scheduled to run */
    scheduledFor?: string;
    /** Current status */
    status: QueuedUpdateStatus;
    /** Error message if failed */
    error?: string;
    /** When the update was processed */
    processedAt?: string;
}
/**
 * Result of processing the update queue
 */
export interface QueueProcessResult {
    /** Total updates processed */
    total: number;
    /** Successfully applied */
    succeeded: number;
    /** Failed to apply */
    failed: number;
    /** Skipped (e.g., policy restrictions) */
    skipped: number;
    /** Updates that were processed */
    updates: QueuedUpdate[];
    /** Start time of processing */
    startedAt: string;
    /** End time of processing */
    completedAt: string;
}
/**
 * UpdateQueue manages pending plugin updates
 */
export declare class UpdateQueue {
    private state;
    private queuePath;
    constructor(queuePath: string);
    /**
     * Load queue from disk
     */
    load(): Promise<void>;
    /**
     * Save queue to disk
     */
    save(): Promise<void>;
    /**
     * Queue an update for later processing
     */
    queueUpdate(pluginId: string, pluginName: string, currentVersion: string, targetVersion: string, options?: {
        scheduleId?: string;
        scheduledFor?: string;
    }): Promise<QueuedUpdate>;
    /**
     * Get all queued updates
     */
    getQueue(): QueuedUpdate[];
    /**
     * Get all updates (including processed)
     */
    getAllUpdates(): QueuedUpdate[];
    /**
     * Get a specific update by ID
     */
    getUpdate(id: string): QueuedUpdate | undefined;
    /**
     * Remove an update from the queue
     */
    removeFromQueue(id: string): Promise<boolean>;
    /**
     * Update the status of a queued update
     */
    updateStatus(id: string, status: QueuedUpdateStatus, error?: string): Promise<QueuedUpdate | undefined>;
    /**
     * Process the queue with a handler function
     */
    processQueue(handler: (update: QueuedUpdate) => Promise<{
        success: boolean;
        error?: string;
    }>, options?: {
        skipMajorUpdates?: boolean;
    }): Promise<QueueProcessResult>;
    /**
     * Clear all pending updates
     */
    clearPending(): Promise<number>;
    /**
     * Clear completed and failed updates (keep pending)
     */
    clearProcessed(): Promise<number>;
    /**
     * Get queue statistics
     */
    getStats(): {
        pending: number;
        inProgress: number;
        completed: number;
        failed: number;
        skipped: number;
        majorUpdates: number;
    };
    /**
     * Get process history
     */
    getHistory(): typeof this.state.processHistory;
}
/**
 * Get the singleton update queue instance
 */
export declare function getUpdateQueue(queuePath?: string): UpdateQueue;
/**
 * Reset the singleton (for testing)
 */
export declare function resetUpdateQueue(): void;
//# sourceMappingURL=update-queue.d.ts.map