FlowStep interface exported

Last updated: 2026-03-05T10:53:28.859Z

Metrics

LOC: 64 Complexity: 1 Params: 0

Signature

interface FlowStep

Summary

A single step in a FlowScript

Source Code

export interface FlowStep {
  /** Step identifier — unique within the flow */
  id: string;
  /** Action to perform */
  action: FlowActionType;

  // ── Target element ────────────────────────────────────────────────────
  /** CSS selector for the target element (required for most actions) */
  selector?: string;
  /** Smart selectors ordered by priority (first = best) */
  smartSelectors?: SmartSelector[];
  /** Preferred selector strategy to try first */
  selectorStrategy?: SelectorStrategy;

  // ── Value / source ────────────────────────────────────────────────────
  /** How the fill value is determined — generator or fixed */
  valueSource?: FlowValueSource;

  // ── Navigate / URL ────────────────────────────────────────────────────
  /** Target URL for `navigate` steps */
  url?: string;

  // ── Select ────────────────────────────────────────────────────────────
  /** Index of the option to select (0-based) */
  selectIndex?: number;
  /** Text content of the option to select */
  selectText?: string;

  // ── Key press ─────────────────────────────────────────────────────────
  /** Key identifier for `press-key` (e.g. "Enter", "Tab") */
  key?: string;

  // ── Wait ──────────────────────────────────────────────────────────────
  /** Timeout in ms for `wait` steps (default: 10_000) */
  waitTimeout?: number;

  // ── Scroll ────────────────────────────────────────────────────────────
  /** Scroll coordinates for `scroll` steps */
  scrollPosition?: { x: number; y: number };

  // ── Assert ────────────────────────────────────────────────────────────
  /** Assertion config for `assert` steps */
  assertion?: FlowAssertion;

  // ── Timing ────────────────────────────────────────────────────────────
  /** Delay before executing this step (ms) — recorded from original timing */
  delayBefore?: number;
  /** Delay after executing this step (ms) */
  delayAfter?: number;

  // ── Caption ───────────────────────────────────────────────────────────
  /** Caption configuration for `caption` steps */
  caption?: CaptionConfig;

  // ── Effects ───────────────────────────────────────────────────────────
  /** Visual effects applied to the target element during this step */
  effects?: StepEffect[];

  // ── Metadata ──────────────────────────────────────────────────────────
  /** Human-readable label for display */
  label?: string;
  /** Whether this step is optional (skip on failure instead of abort) */
  optional?: boolean;
}

No outgoing dependencies.

Impact (Incoming)

graph LR FlowStep["FlowStep"] parseFlowScript["parseFlowScript"] isValidFieldType["isValidFieldType"] OrchestratorCallbacks["OrchestratorCallbacks"] executeStep["executeStep"] validFlowStep["validFlowStep"] assertFailed["assertFailed"] parseFlowScript -->|uses| FlowStep isValidFieldType -->|uses| FlowStep OrchestratorCallbacks -->|uses| FlowStep executeStep -->|uses| FlowStep validFlowStep -->|uses| FlowStep assertFailed -->|uses| FlowStep style FlowStep fill:#dbeafe,stroke:#2563eb,stroke-width:2px click FlowStep "9e707f428d9f0224.html" click parseFlowScript "010c355825278e12.html" click isValidFieldType "a95b73445027ba7e.html" click OrchestratorCallbacks "984a6b93df2ea9af.html" click executeStep "a26ccfb820921de2.html" click validFlowStep "0999acbe22f3d4c6.html" click assertFailed "32e8f6272df2aded.html"