import { type TaskTypes } from "./tasker";
export declare class Task {
    static create(type: TaskTypes, payload: string, options?: {
        scheduledAt?: Date;
        maxAttempts?: number;
    }): Promise<string>;
    static getNextBatch(): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }[]>;
    static getAll(): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }[]>;
    static getFailed(): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }[]>;
    static getSucceeded(): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }[]>;
    static count(): Promise<number>;
    static countUpcoming(): Promise<number>;
    static countFailed(): Promise<number>;
    static countSucceeded(): Promise<number>;
    static retry({ taskId, lastError, minRetryIntervalMins, }: {
        taskId: string;
        lastError?: string;
        minRetryIntervalMins?: number | null;
    }): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }>;
    static succeed(taskId: string): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }>;
    static cancel(taskId: string): Promise<{
        id: string;
        type: string;
        createdAt: Date;
        updatedAt: Date;
        payload: string;
        scheduledAt: Date;
        succeededAt: Date | null;
        attempts: number;
        maxAttempts: number;
        lastError: string | null;
        lastFailedAttemptAt: Date | null;
    }>;
    static cleanup(): Promise<void>;
}
//# sourceMappingURL=repository.d.ts.map