import { CommandContext, EventContext, HandlerStatus } from "./handler"; /** * Single step in the Skill execution */ export interface Step = any> { /** Name of the step */ name: string; /** Function that gets called when the step should execute */ run: (context: C, parameters: G) => Promise; /** Optional function to indicate if the step should runSkill */ runWhen?: (context: C, parameters: G) => Promise; } export interface StepListener = any> { starting?(step: Step, parameters: G): Promise; skipped?(step: Step, parameters: G): Promise; completed?(step: Step, parameters: G, result: undefined | HandlerStatus): Promise; failed?(step: Step, parameters: G, error: Error): Promise; done?(parameters: G, result: undefined | HandlerStatus): Promise; } /** * Execute provided skill steps in the order they are provided or until one fails */ export declare function runSteps(options: { context: C; steps: Step | Array>; listeners?: StepListener | Array>; }): Promise; //# sourceMappingURL=steps.d.ts.map