import "reflect-metadata";
import { IAuditable } from "@codiac.io/codiac-common";
import { DataAuthUtils, DataAuthProvider } from "@codiac.io/codiac-common/security";
import { CabinetScope, ProjectConfig, ProjectUserConfig, UserContext } from "@codiac.io/codiac-relay-contracts";
import { RelayContainer } from "./relay/relay-container";
import { RelayClient as GenRelayClient } from "./apis/codiac-relay";
import { commandBase } from './cli-common';
import { Cabinet, EnterpriseRoot, Environment, RootMap } from './apis/codiac-api/contracts';
import { EnterpriseContextualizer } from './uilogic/enterprise-contextualizer';
import { ClusterConfiguratorFactory, TenantContextualizer } from "./uilogic";
import { LocalOps } from './ops';
import { ProjectContextRepo } from "./ops/data";
import { ArgumentManager } from "./cli-common/argument-manager";
import { UserContextManager } from "./user-context-loader";
import { CloudProviderContextualizer } from "./uilogic/cloud-provider-contextualizer";
import { LrpWatcherPredef } from "./uilogic/lrp-watcher-predef";
import { RootMapUiUtils } from "./uilogic/rootmap-ui-utils";
import { IMessagingClient } from "@codiac.io/codiac-messaging/dist/nats/client";
import { InteractionModes } from "./uilogic/config-ui-utils";
import { CspSupportMap } from "./codiac-entities/csp-support-map";
import { ICodiacClient } from "./apis/codiac-api/i-client";
import { IAuthClient } from "./apis/auth-client/i-auth-client";
/** Ensures tenant context and k8s context.
 *  For use with commands that operate on enterprise records or on an existing cluster.
 */
export declare abstract class CommandBaseEnterprise extends commandBase {
    run(): Promise<void>;
    protected runAsync(): Promise<void>;
    protected bootstrap(): void;
    /** Teardown method.  Logs errors but does not throw.
     * This is an exit method, to prevent any unresolved promises
     * from open messaging connections and listeners. */
    protected closeConnections(): Promise<void>;
    exit(exitCode?: number): void;
    /** Requires the current user to be an adminstrator in order to execute this command. */
    protected adminOnly: boolean;
    /** Flag set by nats clients on create
     * to prevent the need for this class to always instantiate them
     * just to check for open connections.
     * (see implementation in `CloseConnections()`) */
    hasConnectedYet: boolean;
    protected get dataAuthUtils(): DataAuthUtils;
    private __dataAuthUtils;
    protected get dataAuthProvider(): DataAuthProvider;
    private __dataAuthProvider;
    /** Prompts for Cloud Provider credentials. */
    protected get cspContextualizer(): CloudProviderContextualizer;
    private __cspContextualizer;
    /** Prompts for Cloud Provider credentials. */
    protected get cspUiFactory(): ClusterConfiguratorFactory;
    private __cspConfiguratorfactory;
    /** Resource types supported by the SDK,
     * implemented by the currently registered Csp Adapters. */
    protected get cspSupportMap(): CspSupportMap;
    private __cspSupportMap;
    protected set _userCntx(cntx: UserContext);
    get _userCntx(): UserContext;
    private __userCntx;
    get codiacApiUrl(): string;
    private __codiacApiUrl;
    /**  TODO:  Get this out of the CLI.  Any calls to the codiac api should be made from the relay. */
    protected get _codiacApi(): ICodiacClient;
    private __codiacApi;
    protected get authClient(): IAuthClient;
    private __authClient;
    get genRelayClient(): GenRelayClient;
    private __genRelayClient;
    private __msgClient;
    protected get msgClient(): IMessagingClient;
    private __watcher;
    protected get watcher(): LrpWatcherPredef;
    protected set _relayContainer(rc: RelayContainer);
    protected get _relayContainer(): RelayContainer;
    private __relayContainer;
    protected get _userContextManager(): UserContextManager;
    private __userContextManager;
    /** NOTE:  This property MUST ONLY be accessed from within a project folder.
   * It requires project scoped objects
   * such as: `projectRoot`, `projectConfig`, `projectUserConfig`, and `ProjectContextRepo`.
   *
   * It lazy-loads them, and its methods will fail without them.
  */
    protected get _ops(): LocalOps;
    private __ops;
    protected get enterpriseContextor(): EnterpriseContextualizer;
    private __enterpriseContextor;
    protected get rootMapUtils(): RootMapUiUtils;
    private _rootMapUtils_backer;
    protected get exec(): ArgumentManager;
    private __exec;
    /** This getter Lazyloads from ioc. */
    protected get projCfgRepo(): ProjectContextRepo | undefined;
    private __projCfgRepo;
    private __projCfgRepo_isSet;
    /** This getter Lazyloads from ioc. */
    protected get _projCfg(): ProjectConfig | undefined;
    private __projCfg;
    private __projCfg_isSet;
    /** This getter Lazyloads from ioc. */
    protected get _projUserCfg(): ProjectUserConfig | undefined;
    private __projUserCfg;
    private __projUserCfg_isSet;
    /** Lazyloads the project root folder path by walking up the current path to find a project config file. */
    protected get _projectRoot(): string | undefined;
    private __projectRoot;
    private __projectRoot_isSet;
    /** Currently just coincides with projectRoot. */
    protected get _dockerRoot(): string | undefined;
    /** Retrieves "all-the-things" from the api for the given enterprise. Throws not found or on error. */
    protected getRootMap(enterpriseCode?: string): Promise<RootMap>;
    protected createAuditable(): IAuditable;
    /** Logs the user in as needed, and persists the new context object to the local machine. */
    protected bindUserInIoc(cntx: UserContext): UserContext;
    /** Logs the user in as needed, and persists the new context object to the local machine. */
    protected establishTenantContext(currentContext: UserContext, tenantContextualizer?: TenantContextualizer): Promise<UserContext>;
    /** Resolves the interaction mode from the given command flags. */
    protected getInteractionMode(silentFlag?: boolean | undefined, echoFlag?: boolean | undefined, toScriptFlag?: boolean | undefined): InteractionModes | undefined;
    /** Acquires and adopts the identity of a single enterprise for the current project
     * (DOES NOT establish an AssetBinding for the current tenant).
     * TODO: Move this to commandBase
     */
    protected establishEnterpriseContext(rootMap: RootMap, enterpriseCode?: string, interactionMode?: InteractionModes | undefined): Promise<{
        enterprise: EnterpriseRoot;
    }>;
    /** Acquires and adopts the identity of a single enterprise (and asset) for the current project
     * (aka: establishes an AssetBinding for the current tenant).
     * TODO: return undefined to mean for "all in enterprise"
     * TODO: Move this to commandBase
     *
     * @param suppressConfirmations (Optional: defaults to false) Prevents confirmations of user-values that are remembered from prior runs.
     */
    protected establishAssetContext(enterprise: EnterpriseRoot, suppressConfirmations?: boolean): Promise<string[]>;
    /** Defaults to the cabinet declared in the project user config.
     * NOTE:  Run EstablishEnterpriseContext() before calling this method!!  It throws if no enterprise has been establiashed.
    */
    protected establishCabinetContext(requestedCabinet?: string, requestedEnviro?: string): Promise<CabinetScope>;
    /** This is only here so we can get the cluster name.
     * Defaults to the cabinet declared in the project user config.
     * NOTE:  Run EstablishEnterpriseContext() before calling this method!!  It throws if no enterprise has been establiashed.
    */
    protected establishCabinet(requestedCabinet?: string, suppressConfirmations?: boolean): Promise<Cabinet>;
    /** UI dialogue to acquire a valid environment under the current tenant.  */
    protected establishEnvironment(requestedEnv?: string): Promise<Environment>;
    protected establishCloudProviderCreds(rootMap: RootMap, clusterName: string, suppressConfirmations?: boolean, providedUserName?: string, providedSecret?: string): Promise<void>;
}
