Step API Reference
This page details the configuration and result structures for individual steps.
StepOptions<TInput>
Configuration object provided to the .step() method.
| Property | Type | Description |
|---|---|---|
retries | number | Number of retry attempts. |
retryDelayMs | number | Initial delay between retries in milliseconds. |
backoffFactor | 'fixed' | 'linear' | 'exponential' | Strategy to increase retry delay. |
timeoutMs | number | Maximum execution time for the step. |
jitter | boolean | Whether to add randomness to retry delays. |
maxRetryDelayMs | number | Cap for the retry delay. |
compensate | (ctx) => void | Promise<void> | Function to undo this step's side effects. |
StepResult
Object returned as part of the FlowResult containing the outcome of a step.
ts
type StepResult = {
name: string;
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
attempts: number;
durationMs: number;
error?: unknown;
};ParallelOptions
Options for parallel execution blocks.
| Property | Type | Description |
|---|---|---|
failFast | boolean | If true, the whole block fails as soon as one step fails. |