export type TaskRunStatus = "pending" | "in-progress" | "success" | "failure";
export interface Task {
    id?: string;
    type?: "local" | "cloud";
    retries?: number;
    maxRetries?: number;
    status?: TaskRunStatus;
    action: string;
    payload: any;
    beforeAction?: string;
    beforePayload?: any;
    afterAction?: string;
    afterPayload?: any;
    polling?: {
        interval?: number;
    };
    pollingResult?: {
        count: number;
        timerId?: any;
    };
    manual?: boolean;
    destroy?: boolean;
    [key: string]: any;
}
export interface TaskConfig {
    tasks: Task[];
}
type TaskModuleName = string;
type TaskQueueName = string;
type TaskStatus = "uncompleted" | "completed";
export interface TaskQueue {
    status: TaskStatus;
    tasks: Task[];
}
export interface RunTaskParams {
    module: TaskModuleName;
    queueId: TaskQueueName;
    callback?: () => void;
}
export interface DeleteTaskParams {
    module: TaskModuleName;
    queueId: TaskQueueName;
    taskId: string;
}
export interface AddTaskParams {
    module: TaskModuleName;
    queueId: TaskQueueName;
    tasks: Task[];
}
export interface TaskRunResult {
    status: TaskRunStatus;
    [key: string]: any;
}
export interface TasksModule {
    [key: TaskModuleName]: {
        [key: TaskQueueName]: {
            status: TaskStatus;
            tasks: Task[];
        };
    };
}
export {};
