UNPKG

1.26 kBTypeScriptView Raw
1import { ParameterType } from "@atomist/automation-client/lib/SmartParameters";
2import { ButtonSpecification, MenuSpecification } from "@atomist/automation-client/lib/spi/message/MessageClient";
3import { Action } from "@atomist/slack-messages";
4import { CommandRegistration } from "../../registration/CommandRegistration";
5/**
6 * Create an actionable button invoking the given command
7 * @param buttonSpec
8 * @param commandHandlerRegistration command registration or command name
9 * @param parameters parameters to the command
10 * @return
11 */
12export declare function actionableButton<T extends ParameterType>(buttonSpec: ButtonSpecification, commandHandlerRegistration: CommandRegistration<T> | string, parameters?: ParameterType): Action;
13/**
14 * Create an actionable menu invoking the given command
15 * @param menuSpec
16 * @param commandHandlerRegistration command registration or command name
17 * @param parameterName name of the parameter to bind the menu to
18 * @param parameters parameters to the command
19 */
20export declare function actionableMenu<T extends ParameterType>(menuSpec: MenuSpecification, commandHandlerRegistration: CommandRegistration<T> | string, parameterName: string, parameters?: ParameterType): Action;
21//# sourceMappingURL=buttons.d.ts.map
\No newline at end of file