import { HandleCommand } from "./HandleCommand"; import { HandlerContext } from "./HandlerContext"; import { HandlerResult } from "./HandlerResult"; import { CommandHandlerMetadata } from "./metadata/automationMetadata"; import { Maker } from "./util/constructionUtils"; export declare enum QuestionStyle { Dialog = "dialog", Threaded = "threaded", Unthreaded = "unthreaded", DialogAction = "dialog_action" } /** * Handle the given command. Parameters will have been set on a fresh * parameters instance before invocation * @param {HandlerContext} ctx context from which GraphQL client can be obtained, * messages can be sent etc. * @return a Promise of a HandlerResult, containing a status code, or anything else representing * success. */ export declare type OnCommand

= (ctx: HandlerContext, parameters: P) => Promise | Promise; /** * Create a HandleCommand instance with the appropriate metadata wrapping * the given function */ export declare function commandHandlerFrom

(h: OnCommand

, factory: Maker

, name?: string, description?: string, intent?: string | string[], tags?: string | string[], autoSubmit?: boolean, question?: QuestionStyle): HandleCommand

& CommandHandlerMetadata;