import { ModuleRef } from '@nestjs/core';
import { QueueJobResponseDto, QueueJobSearchDto } from "../dtos/queue.dto";
import { JobName, JobStatus, QueueCleanType, QueueName } from "../enum";
import { ConfigRepository } from "./config.repository";
import { EventRepository } from "./event.repository";
import { LoggingRepository } from "./logging.repository";
import { JobCounts, JobItem } from "../types";
export declare class JobRepository {
    private moduleRef;
    private configRepository;
    private eventRepository;
    private logger;
    private workers;
    private handlers;
    private workerWatcher?;
    private microservicesPresent;
    constructor(moduleRef: ModuleRef, configRepository: ConfigRepository, eventRepository: EventRepository, logger: LoggingRepository);
    setup(services: (new (...args: any[]) => unknown)[]): void;
    startWorkers(): void;
    watchWorkers(): void;
    teardown(): void;
    private checkWorkers;
    run({ name, data }: JobItem): Promise<JobStatus>;
    setConcurrency(queueName: QueueName, concurrency: number): void;
    isActive(name: QueueName): Promise<boolean>;
    isPaused(name: QueueName): Promise<boolean>;
    pause(name: QueueName): Promise<void>;
    resume(name: QueueName): Promise<void>;
    empty(name: QueueName): Promise<void>;
    clear(name: QueueName, type: QueueCleanType): Promise<string[]>;
    getJobCounts(name: QueueName): Promise<JobCounts>;
    private getQueueName;
    queueAll(items: JobItem[]): Promise<void>;
    queue(item: JobItem): Promise<void>;
    waitForQueueCompletion(...queues: QueueName[]): Promise<void>;
    searchJobs(name: QueueName, dto: QueueJobSearchDto): Promise<QueueJobResponseDto[]>;
    private getJobOptions;
    private getQueue;
    removeJob(name: JobName, jobID: string): Promise<void>;
}
