import type { Job, TaskHandlerResult, TypedJobs } from '../../../index.js'; import type { RetryConfig, TaskHandlerArgsNoInput } from './taskTypes.js'; export type WorkflowStep = { /** * If this step is completed, the workflow will be marked as completed */ completesJob?: boolean; condition?: (args: { job: Job; }) => boolean; /** * Each task needs to have a unique ID to track its status */ id: string; /** * Specify the number of times that this workflow should be retried if it fails for any reason. * * @default By default, workflows are not retried and `retries` is `0`. */ retries?: number | RetryConfig; } & ({ inlineTask?: (args: TWorkflowSlug extends keyof TypedJobs['workflows'] ? TaskHandlerArgsNoInput : TaskHandlerArgsNoInput) => Promise> | TaskHandlerResult; } | { input: (args: { job: Job; }) => TypedJobs['tasks'][TTaskSlug]['input']; task: TTaskSlug; }); type AllWorkflowSteps = { [TTaskSlug in keyof TypedJobs['tasks']]: WorkflowStep; }[keyof TypedJobs['tasks']]; export type WorkflowJSON = Array>; export {}; //# sourceMappingURL=workflowJSONTypes.d.ts.map