import type { QueueItem, QueueItemType, QueueItemStatus } from '../../types/queue.js';
export type QueueProcessor = (item: QueueItem) => Promise<void>;
export declare class PriorityQueue {
    private items;
    private processing;
    private processor;
    private onPersist;
    constructor();
    setProcessor(processor: QueueProcessor): void;
    setOnPersist(callback: (items: QueueItem[]) => Promise<void>): void;
    add(type: QueueItemType, characterId: string, payload: Record<string, unknown>, maxRetries?: number): Promise<QueueItem>;
    dequeue(): QueueItem | undefined;
    updateStatus(id: string, status: QueueItemStatus, error?: string): Promise<QueueItem | null>;
    getById(id: string): QueueItem | undefined;
    getPending(): QueueItem[];
    getFailed(): QueueItem[];
    getAll(): QueueItem[];
    getStats(): {
        pending: number;
        processing: number;
        completed: number;
        failed: number;
    };
    retry(id: string): Promise<boolean>;
    loadItems(items: QueueItem[]): void;
    private sortQueue;
    private processNext;
    private persist;
}
export declare const queue: PriorityQueue;
//# sourceMappingURL=index.d.ts.map