import { RepoFinder } from "@atomist/automation-client/lib/operations/common/repoFinder";
import { RepoLoader } from "@atomist/automation-client/lib/operations/common/repoLoader";
import { Maker } from "@atomist/automation-client/lib/util/constructionUtils";
import { SoftwareDeliveryMachineConfiguration } from "../machine/SoftwareDeliveryMachineOptions";
import { ParametersDefinition } from "./ParametersDefinition";
/**
 * 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"
}
/**
 * Common supertype for all command registrations.
 */
export interface CommandRegistration<PARAMS> {
    /** Name of the command */
    name: string;
    /** Description of the command */
    description?: string;
    /**
     * Function to create a parameters object used by this command.
     * Empty parameters will be returned by default.
     */
    paramsMaker?: Maker<PARAMS>;
    /**
     * Define parameters used by this command.
     */
    parameters?: ParametersDefinition<PARAMS>;
    /**
     * Intent or list of intents. What you need to type to invoke the
     * command, for example via the bot.
     */
    intent?: string | string[] | RegExp;
    /**
     * Tags associated with this command. Useful in searching.
     */
    tags?: string | string[];
    /**
     * Configure command to submit without confirmation
     */
    autoSubmit?: boolean;
    /**
     * Configure strategy on how to prompt for parameters in chat or web
     */
    parameterStyle?: ParameterStyle;
    repoFinder?: RepoFinder;
    repoLoader?: (p: PARAMS) => RepoLoader;
    /**
     * If provided, select when this command is registered.
     * Enables conditional registration on SDM startup, based on
     * configuration, environment variables etc.
     * This method is invoked during SDM startup.
     * @param {SoftwareDeliveryMachineConfiguration} sdmConfiguration
     * @return {boolean}
     */
    registerWhen?: (sdmConfiguration: SoftwareDeliveryMachineConfiguration) => boolean;
}
//# sourceMappingURL=CommandRegistration.d.ts.map