type CompiledStep =
| {
kind: "say";
text: string | DynamicText;
delayMs?: number;
}
| {
kind: "ask";
text: string | DynamicText;
stateKey: string;
opts?: CompiledAskOptions;
delayMs?: number;
}
| {
kind: "do";
fn: FlowAction;
media?: {
source: string;
caption?: string;
};
}
| {
kind: "choose";
prompt: string;
options: Record<string, CompiledChooseOption>;
stateKey?: string;
opts?: WaitOptions;
delayMs?: number;
}
| {
kind: "goto";
target: string;
}
| {
kind: "media";
type: FlowMediaKind;
source: FlowMediaSource;
caption?: string;
opts?: Omit<FlowMediaOptions, "delay">;
delayMs?: number;
}
| {
kind: "guard";
check: FlowGuard;
message?: string | DynamicText;
redirect?: string;
}
| {
kind: "use";
flow: CompiledFlow;
}
| {
kind: "delay";
ms: number;
}
| {
kind: "form";
form: FormDefinition;
opts?: FormStepOptions;
};
Union Members
Type Literal
{
kind: "say";
text: string | DynamicText;
delayMs?: number;
}
Type Literal
{
kind: "ask";
text: string | DynamicText;
stateKey: string;
opts?: CompiledAskOptions;
delayMs?: number;
}
Type Literal
{
kind: "do";
fn: FlowAction;
media?: {
source: string;
caption?: string;
};
}
| Name | Type | Description | Defined in |
|---|---|---|---|
kind | "do" | - | flows/FlowBuilder.ts:213 |
fn | FlowAction | - | flows/FlowBuilder.ts:214 |
media? | object | Legacy tag (flows compiled by older versions); .media() now compiles to a media step. | flows/FlowBuilder.ts:216 |
media.source | string | - | flows/FlowBuilder.ts:216 |
media.caption? | string | - | flows/FlowBuilder.ts:216 |
Type Literal
{
kind: "choose";
prompt: string;
options: Record<string, CompiledChooseOption>;
stateKey?: string;
opts?: WaitOptions;
delayMs?: number;
}
Type Literal
{
kind: "goto";
target: string;
}
Type Literal
{
kind: "media";
type: FlowMediaKind;
source: FlowMediaSource;
caption?: string;
opts?: Omit<FlowMediaOptions, "delay">;
delayMs?: number;
}
Type Literal
{
kind: "guard";
check: FlowGuard;
message?: string | DynamicText;
redirect?: string;
}
Type Literal
{
kind: "use";
flow: CompiledFlow;
}
Type Literal
{
kind: "delay";
ms: number;
}
Type Literal
{
kind: "form";
form: FormDefinition;
opts?: FormStepOptions;
}
.form(): a native form, or one question per field on providers without forms.