import { CommandMessageClient } from "./message"; import { ParametersObjectValue } from "./parameters"; import { CommandIncoming } from "./payload"; /** * Object with properties defining parameters. Useful for combination via spreads. */ export declare type ParametersPromptObject = Record; /** * Different strategies to ask for parameters in chat or web */ export declare enum ParameterStyle { /** Parameter questions will be prompted in a dialog */ Dialog = "dialog", /** Parameter questions will be prompted in a thread */ Threaded = "threaded", /** * Parameter questions will be prompted in the channel where the * command is being run */ Unthreaded = "unthreaded", /** * Parameter questions will be prompted in a dialog if the command * is triggered from a button or menu */ DialogAction = "dialog_action" } /** * Options to configure the parameter prompt */ export interface ParameterPromptOptions { /** Optional thread identifier to send this message to or true to send * this to the message that triggered this command. */ thread?: boolean | string; /** * Configure strategy on how to ask for parameters in chat or web */ parameterStyle?: ParameterStyle; /** * Configure auto submit strategy for when all required parameters are collected */ autoSubmit?: boolean; } /** * ParameterPrompts let the caller prompt for the provided parameters */ export declare type ParameterPrompt = (parameters: ParametersPromptObject, options?: ParameterPromptOptions) => Promise; export declare const AtomistContinuationMimeType = "application/x-atomist-continuation+json"; /** * Default ParameterPromptFactory that uses the WebSocket connection to send parameter prompts to the backend. * @param ctx */ export declare function commandRequestParameterPromptFactory(messageClient: CommandMessageClient, payload: CommandIncoming): ParameterPrompt; export declare class CommandListenerExecutionInterruptError extends Error { readonly message: string; constructor(message: string); } //# sourceMappingURL=parameter_prompt.d.ts.map