import { HandleCommand } from "./HandleCommand"; import { HandlerContext } from "./HandlerContext"; import { HandlerResult } from "./HandlerResult"; import { CommandHandlerMetadata } from "./metadata/automationMetadata"; import { Maker } from "./util/constructionUtils"; /** * 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 * @param h handle function * @param factory construction function * @param {string} name can be omitted if the function isn't exported * @param {string} description * @param {string[]} intent * @param {Tag[]} tags * @return {HandleCommand

} */ export declare function commandHandlerFrom

(h: OnCommand

, factory: Maker

, name?: string, description?: string, intent?: string | string[], tags?: string | string[]): HandleCommand

& CommandHandlerMetadata; //# sourceMappingURL=onCommand.d.ts.map