WorkflowSnapshot
interface exported by @mwillbanks/tuil-workflow.
interface
Public interface exported by @mwillbanks/tuil-workflow.
export interface WorkflowSnapshot<TState> {
readonly id: string;
readonly version: number;
readonly status: WorkflowStatus;
readonly state: TState;
readonly currentStep?: string;
readonly completedSteps: readonly string[];
readonly skippedSteps: readonly string[];
readonly history: readonly string[];
readonly errors: readonly string[];
readonly operations: readonly OperationSnapshot[];
readonly nestedWorkflow?: WorkflowSnapshot<unknown>;
readonly parallel: readonly WorkflowParallelSnapshot[];
readonly transitioning: boolean;
readonly startedAt?: number;
readonly completedAt?: number;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
id | string | Yes | The id member uses the string contract. | — |
version | number | Yes | The version member uses the number contract. | — |
status | WorkflowStatus | Yes | The status member uses the WorkflowStatus contract. | WorkflowStatus |
state | TState | Yes | The state member uses the TState contract. | — |
currentStep | string | undefined | No | The currentStep member uses the string | undefined contract. | — |
completedSteps | readonly string[] | Yes | The completedSteps member uses the readonly string[] contract. | — |
skippedSteps | readonly string[] | Yes | The skippedSteps member uses the readonly string[] contract. | — |
history | readonly string[] | Yes | The history member uses the readonly string[] contract. | — |
errors | readonly string[] | Yes | The errors member uses the readonly string[] contract. | — |
operations | readonly OperationSnapshot<unknown>[] | Yes | The operations member uses the readonly OperationSnapshot<unknown>[] contract. | OperationSnapshot |
nestedWorkflow | WorkflowSnapshot<unknown> | undefined | No | The nestedWorkflow member uses the WorkflowSnapshot<unknown> | undefined contract. | WorkflowSnapshot |
parallel | readonly WorkflowParallelSnapshot[] | Yes | The parallel member uses the readonly WorkflowParallelSnapshot[] contract. | WorkflowParallelSnapshot |
transitioning | boolean | Yes | The transitioning member uses the boolean contract. | — |
startedAt | number | undefined | No | The startedAt member uses the number | undefined contract. | — |
completedAt | number | undefined | No | The completedAt member uses the number | undefined contract. | — |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference