import { BaseAppConfig } from '../../app';
import type { JobClass, QueuedWorkerJob, IJobOptions } from './types';
import { Queue, type Job as BullJob, type QueueOptions, type WorkerOptions } from 'bullmq';
export interface BullMqWorkerJobData<I = unknown> {
    data: I;
    options: IJobOptions;
}
export declare class WorkerQueueRegistry {
    private readonly config?;
    private static readonly queues;
    private static readonly bullQueues;
    private static nextId;
    private readonly bullQueues;
    constructor(config?: BaseAppConfig | undefined);
    usesBullMq(): boolean;
    getDefaultQueueName(): string;
    getQueueName(jobClass: JobClass, options?: IJobOptions): string;
    enqueue<I>(jobClass: JobClass<I>, data: I, options?: IJobOptions): Promise<QueuedWorkerJob<I>>;
    add<I>(jobClass: JobClass<I>, data: I, options?: IJobOptions): QueuedWorkerJob<I>;
    getQueuedJobs(queue?: string): QueuedWorkerJob[];
    getAllQueuedJobs(): QueuedWorkerJob[];
    markCompleted(job: QueuedWorkerJob, result: unknown): void;
    markFailed(job: QueuedWorkerJob, result: unknown): void;
    remove(job: QueuedWorkerJob): void;
    clear(queue?: string): void;
    getBullQueue(queueName: string): Queue<BullMqWorkerJobData>;
    getBullQueues(): Array<{
        name: string;
        queue: Queue<BullMqWorkerJobData>;
    }>;
    normalizeJobData<I>(data: I | null | undefined): I;
    fromBullJob<I>(job: BullJob<BullMqWorkerJobData<I>>, jobClass: JobClass<I>): QueuedWorkerJob<I>;
    shutdown(): Promise<void>;
    static closeQueues(): Promise<void>;
    getBullMqOptions(): QueueOptions & Pick<WorkerOptions, 'connection' | 'prefix'>;
    private unwrapBullMqJobData;
}
//# sourceMappingURL=queue.d.ts.map