import type { ClassType } from '../../types';
export declare const JobSymbol: unique symbol;
export declare const InputDataSymbol: unique symbol;
export declare const OutputDataSymbol: unique symbol;
export interface WorkerJobOptions {
    queueName?: string;
    queue?: string;
    cronSchedule?: string | null;
    cron?: string | null;
}
export declare abstract class BaseJob<I = void, O = void> {
    [JobSymbol]: symbol;
    [InputDataSymbol]: I;
    [OutputDataSymbol]: O;
    static QUEUE_NAME: string;
    static CRON_SCHEDULE: string | null;
    abstract handle(data: I): Promise<O> | O;
}
export interface BaseJobClass {
    QUEUE_NAME: string;
    CRON_SCHEDULE: string | null;
}
export type JobClass<I = any, O = any> = ClassType<BaseJob<I, O>> & BaseJobClass;
export declare function WorkerJob(options?: WorkerJobOptions): ClassDecorator;
export declare function getRegisteredWorkerJobs(): JobClass[];
export interface IJobOptions {
    delay?: number;
    queueName?: string;
    runInTest?: boolean;
    runImmediately?: boolean;
    recordToDatabase?: boolean;
    repeatKey?: string;
}
export type WorkerJobStatus = 'queued' | 'completed' | 'failed' | 'skipped';
export interface QueuedWorkerJob<I = unknown> {
    id: string;
    queue: string;
    name: string;
    data: I;
    jobClass: JobClass<I>;
    options: IJobOptions;
    createdAt: Date;
    shouldExecuteAt: Date;
    attemptsMade: number;
    status: WorkerJobStatus;
    result?: unknown;
}
export interface WorkerJobRecord<I = unknown, O = unknown> {
    id: string;
    queue: string;
    queueId: string;
    attempt: number;
    name: string;
    data: I;
    traceId: string | null;
    status: 'completed' | 'failed';
    result: O;
    createdAt: Date;
    shouldExecuteAt: Date;
    executedAt: Date;
    completedAt: Date;
}
//# sourceMappingURL=types.d.ts.map