{"version":3,"sources":["../../../../src/queues/config/types/workflowJSONTypes.ts"],"sourcesContent":["import type { Job, TaskHandlerResult, TypedJobs } from '../../../index.js'\nimport type { RetryConfig, TaskHandlerArgsNoInput } from './taskTypes.js'\n\nexport type WorkflowStep<\n TTaskSlug extends keyof TypedJobs['tasks'],\n TWorkflowSlug extends false | keyof TypedJobs['workflows'] = false,\n> = {\n /**\n * If this step is completed, the workflow will be marked as completed\n */\n completesJob?: boolean\n condition?: (args: { job: Job }) => boolean\n /**\n * Each task needs to have a unique ID to track its status\n */\n id: string\n /**\n * Specify the number of times that this workflow should be retried if it fails for any reason.\n *\n * @default By default, workflows are not retried and `retries` is `0`.\n */\n retries?: number | RetryConfig\n} & (\n | {\n inlineTask?: (\n args: TWorkflowSlug extends keyof TypedJobs['workflows']\n ? TaskHandlerArgsNoInput\n : TaskHandlerArgsNoInput,\n ) => Promise> | TaskHandlerResult\n }\n | {\n input: (args: { job: Job }) => TypedJobs['tasks'][TTaskSlug]['input']\n task: TTaskSlug\n }\n)\n\ntype AllWorkflowSteps = {\n [TTaskSlug in keyof TypedJobs['tasks']]: WorkflowStep\n}[keyof TypedJobs['tasks']]\n\nexport type WorkflowJSON =\n Array>\n"],"names":[],"mappings":"AAwCA,WACwC"}