import type { PayloadRequest } from '../../../../types/index.js';
import type { RetryConfig, RunInlineTaskFunction, RunTaskFunctions, TaskConfig, TaskHandlerResult } from '../../../config/types/taskTypes.js';
import type { BaseJob, SingleTaskStatus, WorkflowConfig } from '../../../config/types/workflowTypes.js';
import type { UpdateJobFunction } from './getUpdateJobFunction.js';
export type RunTaskFunctionState = {
    reachedMaxRetries: boolean;
};
export declare function handleTaskFailed({ error, executedAt, input, job, maxRetries, output, req, retriesConfig, runnerOutput, state, taskConfig, taskID, taskSlug, taskStatus, updateJob, }: {
    error?: Error;
    executedAt: Date;
    input: object;
    job: BaseJob;
    maxRetries: number;
    output: object;
    req: PayloadRequest;
    retriesConfig: number | RetryConfig;
    runnerOutput?: TaskHandlerResult<string>;
    state: RunTaskFunctionState;
    taskConfig?: TaskConfig<string>;
    taskID: string;
    taskSlug: string;
    taskStatus: null | SingleTaskStatus<string>;
    updateJob: UpdateJobFunction;
}): Promise<never>;
export declare const getRunTaskFunction: <TIsInline extends boolean>(state: RunTaskFunctionState, job: BaseJob, workflowConfig: WorkflowConfig<string>, req: PayloadRequest, isInline: TIsInline, updateJob: UpdateJobFunction) => TIsInline extends true ? RunInlineTaskFunction : RunTaskFunctions;
//# sourceMappingURL=getRunTaskFunction.d.ts.map