import { Prepared, ProxyOptions } from './types.js'; import { KeyInput } from 'puppeteer'; type WaitUntil = 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'; type Selector = string; interface OpenPageInput { url: string; timeout?: number; wait_until?: WaitUntil; } interface WaitForSelectorInput { selector: Selector; timeout?: number; visible?: boolean; iframe_selector?: Selector; } interface SelectorRaceOption { selector: Selector; label: string; timeout?: number; } interface WaitForSelectorRaceInput { selectors: SelectorRaceOption[]; visible?: boolean; iframe_selector?: Selector; } interface ClickInput { selector: Selector; iframe_selector?: Selector; } interface TypeInput { selector: Selector; value: string; delay?: number; iframe_selector?: Selector; clear?: boolean; } interface KeyboardPressInput { key: KeyInput; } type Node = { next?: string; next_on_timeout?: string; result?: string; end?: boolean; }; type OpenPageNode = { type: 'open_page'; input: OpenPageInput; } & Node; type WaitForSelectorNode = { type: 'wait_for_selector'; input: WaitForSelectorInput; continue_on_timeout?: boolean; } & Node; type WaitForSelectorRaceNode = { type: 'wait_for_selector_race'; input: WaitForSelectorRaceInput; next_map: Record; validate_winner?: Record; } & Omit; type ClickNode = { type: 'click'; input: ClickInput; } & Node; type TypeNode = { type: 'type'; input: TypeInput; } & Node; type KeyboardPressNode = { type: 'keyboard_press'; input: KeyboardPressInput; } & Node; type StepNode = OpenPageNode | WaitForSelectorNode | WaitForSelectorRaceNode | ClickNode | TypeNode | KeyboardPressNode; type States = Record; type CaptureConfig = { type: 'page'; } | { type: 'iframe'; selector: Selector; }; export type Workflow = { starts_at: keyof States; states: States; capture?: CaptureConfig; }; export declare function withBrowserFlow(workflow: Workflow, headless: boolean, requestId: string, proxy?: ProxyOptions, url?: string): Promise; export {}; //# sourceMappingURL=withBrowserFlow.d.ts.map