import { Command } from '@oclif/core';
import { ScopedSetting } from '../../apis/codiac-api/contracts';
import { CommandBaseEnterprise } from '../../command-base-enterprise';
import { ConfigUiUtils } from '../../uilogic/config-ui-utils';
import { SpecialConfigTypesEnum } from '@codiac.io/codiac-domain';
/** The value provided as input that indicates
 * a user's desire to be prompted with a list from which choose the value(s),
 * instead of entering them manually or taking a default. */
export declare const PROMPT_ME_DESIGNATOR = "?";
export type TextValueParent = {
    text: string;
    value: string;
    children?: TextValueParent[];
};
export type ScopePedigree = {
    scope: string;
    target: string;
    parent?: ScopePedigree;
};
export type ScopedValuePedigree = {
    scope: string;
    target: string;
    value?: string;
    parent?: ScopedValuePedigree;
};
type ScopedSettingCandidate = Omit<ScopedSetting, "setting" | "value" | "targetFile"> & {
    targetFile?: string;
    configType?: SpecialConfigTypesEnum;
    settings: {
        setting: string;
        value: any;
    }[];
};
export default class ConfigAdd extends CommandBaseEnterprise {
    static description: string;
    static aliases: string[];
    static flags: {
        help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
        enterprise: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        asset: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        type: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        "enterprise-scope": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        enviro: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        cabinet: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        setting: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        "entire-file": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        value: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        "value-stdin": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        echo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        "to-script": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        "take-defaults": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
    };
    static args: {};
    static examples: Command.Example[];
    /** CLI Command-line string to rerun this execution as a non-TTY script. */
    private cmd;
    private _appConfig;
    protected get configUtils(): ConfigUiUtils;
    private _configUtils_backer;
    protected bootstrap(): void;
    run(): Promise<void>;
    private captureArgs;
    parseTable(input: string, separator?: string): {
        setting: string;
        value: any;
    }[];
    private buildCandidate_silently;
    private buildCandidate_interactively;
    /** Fails silently; Logs any exceptions and returns undefined. */
    private getConfigSchema;
    /** Converts the given json schema into a dictionary keyed by dotpath-ed property names with the property schema as the value.
     * eg:
     * ```
     * {
     *    "db.name": { type: "string" },
     *    "db.server": { type: "string" },
     *    "fav-color": { type: "string" },
     *    ...
     * }
     * ```
     */
    private flatten;
    private buildCommandString;
    private promptForValueAndValidate;
    /** Returns the recursive parent path of values for the given setting
     *  up through the enterprise scope.
     *  Returns undefined if the given setting is already scoped to enterprise.
     *
     * @param existingValues This MUST be filtered for this current setting (existing.setting == setting.setting).
     * */
    private buildPedigreeFor;
    private promptForScope;
    private buildSelectChoicesFrom;
    /** sets each value to "scope|target".
     *
     * This is MOSTLY a COPY-PASTE from the CabinetList command!!!  This view is prob gonna be pretty common - consider promoting it to a shared utility. */
    private buildCabinetTree;
    /** Truncates the string to the given length with an ellipses as suffix */
    private ellipsis;
    /** Copy of this method is in config:view */
    private promptForTargetFile;
    private extractSettingsFromFile;
    executeTask(candidate: ScopedSettingCandidate): Promise<void>;
    upsertSetting(settingObj: ScopedSetting): Promise<void>;
    writeSetting_local(setting: string, value: any): void;
    /** Retrieves the list of app config settings that are not yet explicitly declared in the app config file itself */
    getAvailableSettings(): Promise<string[]>;
}
export {};
