import { Graph } from '@teambit/graph.cleargraph';
import type { PubsubMain } from '@teambit/pubsub';
import { IssuesList } from '@teambit/component-issues';
import type { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';
import { ComponentMain, Component, ComponentFactory, InvalidComponent, ResolveAspectsOptions, AspectList } from '@teambit/component';
import { ComponentScopeDirMap, WorkspaceConfig } from '@teambit/config';
import { DependencyResolverMain, DependencyList } from '@teambit/dependency-resolver';
import { EnvsMain } from '@teambit/envs';
import { GraphqlMain } from '@teambit/graphql';
import { Harmony } from '@teambit/harmony';
import { Logger } from '@teambit/logger';
import type { ScopeMain } from '@teambit/scope';
import type { VariantsMain } from '@teambit/variants';
import { ComponentID, ComponentIdList } from '@teambit/component-id';
import { BitId } from '@teambit/legacy-bit-id';
import { LaneId } from '@teambit/lane-id';
import { Consumer } from '@teambit/legacy/dist/consumer';
import { GetBitMapComponentOptions } from '@teambit/legacy.bit-map';
import { ComponentsList } from '@teambit/legacy.component-list';
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
import { PathOsBased, PathOsBasedRelative, PathOsBasedAbsolute } from '@teambit/toolbox.path.path';
import { CompIdGraph, DepEdgeType } from '@teambit/graph';
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
import { WatchOptions } from '@teambit/watcher';
import type { ComponentLog } from '@teambit/legacy/dist/scope/models/model-component';
import { SourceFile, JsonVinyl } from '@teambit/component.sources';
import { Lane } from '@teambit/legacy/dist/scope/models';
import { GlobalConfigMain } from '@teambit/global-config';
import { ComponentConfigFile } from './component-config-file';
import { OnComponentAdd, OnComponentChange, OnComponentEventResult, OnComponentLoad, OnComponentRemove } from './on-component-events';
import { WorkspaceExtConfig } from './types';
import { ComponentStatus } from './workspace-component/component-status';
import { OnAspectsResolve, OnAspectsResolveSlot, OnBitmapChange, OnBitmapChangeSlot, OnWorkspaceConfigChange, OnWorkspaceConfigChangeSlot, OnComponentAddSlot, OnComponentChangeSlot, OnComponentLoadSlot, OnComponentRemoveSlot, OnRootAspectAdded, OnRootAspectAddedSlot } from './workspace.main.runtime';
import { ComponentLoadOptions, WorkspaceComponentLoader } from './workspace-component/workspace-component-loader';
import { ShouldLoadFunc } from './build-graph-from-fs';
import { BitMap } from './bit-map';
import type { MergeOptions as BitmapMergeOptions } from './bit-map';
import { AspectPackage, GetConfiguredUserAspectsPackagesOptions, WorkspaceAspectsLoader, WorkspaceLoadAspectsOptions } from './workspace-aspects-loader';
import { MergeConflictFile } from './merge-conflict-file';
import { CompFiles } from './workspace-component/comp-files';
import { Filter } from './filter';
import { ComponentStatusLegacy, ComponentStatusResult } from './workspace-component/component-status-loader';
export type EjectConfResult = {
    configPath: string;
};
export type ClearCacheOptions = {
    skipClearFailedToLoadEnvs?: boolean;
};
export declare const AspectSpecificField = "__specific";
export declare const ComponentAdded = "componentAdded";
export declare const ComponentChanged = "componentChanged";
export declare const ComponentRemoved = "componentRemoved";
export interface EjectConfOptions {
    propagate?: boolean;
    override?: boolean;
}
export type ComponentExtensionsOpts = {
    loadExtensions?: boolean;
};
type ComponentExtensionsResponse = {
    extensions: ExtensionDataList;
    beforeMerge: Array<{
        extensions: ExtensionDataList;
        origin: ExtensionsOrigin;
        extraData: any;
    }>;
    errors?: Error[];
    envId?: string;
};
export type ExtensionsOrigin = 'BitmapFile' | 'ModelSpecific' | 'ModelNonSpecific' | 'ConfigMerge' | 'WorkspaceVariants' | 'ComponentJsonFile' | 'FinalAfterMerge';
/**
 * API of the Bit Workspace
 */
export declare class Workspace implements ComponentFactory {
    /**
     * private pubsub.
     */
    private pubsub;
    private config;
    /**
     * private access to the legacy consumer instance.
     */
    consumer: Consumer;
    /**
     * access to the workspace `Scope` instance
     */
    readonly scope: ScopeMain;
    /**
     * access to the `ComponentProvider` instance
     */
    private componentAspect;
    private dependencyResolver;
    readonly variants: VariantsMain;
    private aspectLoader;
    readonly logger: Logger;
    private componentList;
    /**
     * private reference to the instance of Harmony.
     */
    private harmony;
    /**
     * on component load slot.
     */
    onComponentLoadSlot: OnComponentLoadSlot;
    /**
     * on component change slot.
     */
    private onComponentChangeSlot;
    readonly envs: EnvsMain;
    readonly globalConfig: GlobalConfigMain;
    /**
     * on component add slot.
     */
    private onComponentAddSlot;
    private onComponentRemoveSlot;
    private onAspectsResolveSlot;
    private onRootAspectAddedSlot;
    private graphql;
    private onBitmapChangeSlot;
    private onWorkspaceConfigChangeSlot;
    private warnedAboutMisconfiguredEnvs;
    priority: boolean;
    owner?: string;
    componentsScopeDirsMap: ComponentScopeDirMap;
    componentLoader: WorkspaceComponentLoader;
    private componentStatusLoader;
    bitMap: BitMap;
    /**
     * Indicate that we are now running installation process
     * This is important to know to ignore missing modules across different places
     */
    inInstallContext: boolean;
    private componentLoadedSelfAsAspects;
    private aspectsMerger;
    private componentDefaultScopeFromComponentDirAndNameWithoutConfigFileMemoized;
    /**
     * Components paths are calculated from the component package names of the workspace
     * They are used in webpack configuration to only track changes from these paths inside `node_modules`
     */
    private componentPathsRegExps;
    localAspects: Record<string, string>;
    filter: Filter;
    constructor(
    /**
     * private pubsub.
     */
    pubsub: PubsubMain, config: WorkspaceExtConfig, 
    /**
     * private access to the legacy consumer instance.
     */
    consumer: Consumer, 
    /**
     * access to the workspace `Scope` instance
     */
    scope: ScopeMain, 
    /**
     * access to the `ComponentProvider` instance
     */
    componentAspect: ComponentMain, dependencyResolver: DependencyResolverMain, variants: VariantsMain, aspectLoader: AspectLoaderMain, logger: Logger, componentList: ComponentsList, 
    /**
     * private reference to the instance of Harmony.
     */
    harmony: Harmony, 
    /**
     * on component load slot.
     */
    onComponentLoadSlot: OnComponentLoadSlot, 
    /**
     * on component change slot.
     */
    onComponentChangeSlot: OnComponentChangeSlot, envs: EnvsMain, globalConfig: GlobalConfigMain, 
    /**
     * on component add slot.
     */
    onComponentAddSlot: OnComponentAddSlot, onComponentRemoveSlot: OnComponentRemoveSlot, onAspectsResolveSlot: OnAspectsResolveSlot, onRootAspectAddedSlot: OnRootAspectAddedSlot, graphql: GraphqlMain, onBitmapChangeSlot: OnBitmapChangeSlot, onWorkspaceConfigChangeSlot: OnWorkspaceConfigChangeSlot);
    private validateConfig;
    /**
     * root path of the Workspace.
     */
    get path(): string;
    /**
     * Get the location of the bit roots folder
     */
    get rootComponentsPath(): string;
    /** get the `node_modules` folder of this workspace */
    private get modulesPath();
    get isLegacy(): boolean;
    registerOnComponentLoad(loadFn: OnComponentLoad): this;
    registerOnComponentChange(onComponentChangeFunc: OnComponentChange): this;
    registerOnComponentAdd(onComponentAddFunc: OnComponentAdd): this;
    registerOnComponentRemove(onComponentRemoveFunc: OnComponentRemove): this;
    registerOnBitmapChange(OnBitmapChangeFunc: OnBitmapChange): this;
    registerOnWorkspaceConfigChange(onWorkspaceConfigChangeFunc: OnWorkspaceConfigChange): void;
    registerOnAspectsResolve(onAspectsResolveFunc: OnAspectsResolve): this;
    registerOnRootAspectAdded(onRootAspectAddedFunc: OnRootAspectAdded): this;
    /**
     * name of the workspace as configured in either `workspace.json`.
     * defaults to workspace root directory name.
     */
    get name(): string;
    get icon(): string;
    listAutoTagPendingComponentIds(): Promise<ComponentID[]>;
    hasModifiedDependencies(component: Component): Promise<boolean>;
    /**
     * get Component issues
     */
    getComponentIssues(component: Component): IssuesList | null;
    /**
     * provides status of all components in the workspace.
     */
    getComponentStatus(component: Component): Promise<ComponentStatus>;
    /**
     * list all workspace components.
     */
    list(filter?: {
        offset: number;
        limit: number;
    }, loadOpts?: ComponentLoadOptions): Promise<Component[]>;
    listWithInvalid(loadOpts?: ComponentLoadOptions): Promise<{
        components: Component[];
        invalidComponents: InvalidComponent[];
    }>;
    /**
     * list all invalid components.
     * (see the invalid criteria in ConsumerComponent.isComponentInvalidByErrorType())
     */
    listInvalid(): Promise<InvalidComponent[]>;
    /**
     * get ids of all workspace components.
     * deleted components are filtered out. (use this.listIdsIncludeRemoved() if you need them)
     */
    listIds(): ComponentIdList;
    listIdsIncludeRemoved(): ComponentIdList;
    /**
     * Check if a specific id exist in the workspace
     * @param componentId
     */
    hasId(componentId: ComponentID): boolean;
    /**
     * given component-ids, return the ones that are part of the workspace
     */
    filterIds(ids: ComponentID[]): Promise<ComponentID[]>;
    /**
     * whether or not a workspace has a component with the given name
     */
    hasName(name: string): Promise<boolean>;
    /**
     * Check if a specific id exist in the workspace or in the scope
     * @param componentId
     */
    hasIdNested(componentId: ComponentID, includeCache?: boolean): Promise<boolean>;
    /**
     * list all modified components in the workspace.
     */
    modified(loadOpts?: ComponentLoadOptions): Promise<Component[]>;
    /**
     * list all new components in the workspace.
     */
    newComponents(): Promise<Component[]>;
    newComponentIds(): Promise<ComponentID[]>;
    locallyDeletedIds(): Promise<ComponentID[]>;
    duringMergeIds(): Promise<ComponentID[]>;
    /**
     * @deprecated use `listIds()` instead.
     * get all workspace component-ids
     */
    getAllComponentIds(): ComponentID[];
    listTagPendingIds(): Promise<ComponentID[]>;
    /**
     * list all components that can be tagged. (e.g. when tagging/snapping with --unmodified).
     * which are all components in the workspace, include locally deleted components.
     */
    listPotentialTagIds(): Promise<ComponentID[]>;
    getNewAndModifiedIds(): Promise<ComponentID[]>;
    newAndModified(): Promise<Component[]>;
    getLogs(id: ComponentID, shortHash?: boolean, startsFrom?: string): Promise<ComponentLog[]>;
    getGraph(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;
    getGraphIds(ids?: ComponentID[], shouldThrowOnMissingDep?: boolean): Promise<CompIdGraph>;
    getUnavailableOnMainComponents(): Promise<ComponentID[]>;
    getDependencies(component: Component): DependencyList;
    getSavedGraphOfComponentIfExist(component: Component): Promise<Graph<ComponentID, DepEdgeType> | null>;
    /**
     * given component ids, find their dependents in the workspace
     */
    getDependentsIds(ids: ComponentID[], filterOutNowWorkspaceIds?: boolean): Promise<ComponentID[]>;
    createAspectList(extensionDataList: ExtensionDataList): Promise<AspectList>;
    private extensionDataEntryToAspectEntry;
    /**
     * this is not the complete legacy component (ConsumerComponent), it's missing dependencies and hooks from Harmony
     * are skipped. do not trust the data you get from this method unless you know what you're doing.
     */
    getLegacyMinimal(id: ComponentID): Promise<ConsumerComponent | undefined>;
    getFilesModification(id: ComponentID): Promise<CompFiles>;
    /**
     * get a component from workspace
     * @param id component ID
     */
    get(componentId: ComponentID, legacyComponent?: ConsumerComponent, useCache?: boolean, storeInCache?: boolean, loadOpts?: ComponentLoadOptions): Promise<Component>;
    getConfiguredUserAspectsPackages(options: GetConfiguredUserAspectsPackagesOptions): Promise<AspectPackage[]>;
    /**
     * clears workspace, scope and all components caches.
     * doesn't clear the dependencies-data from the filesystem-cache.
     */
    clearCache(options?: ClearCacheOptions): Promise<void>;
    /**
     * clear the cache of all components in the workspace.
     * doesn't clear the dependencies-data from the filesystem-cache.
     */
    clearAllComponentsCache(): void;
    clearComponentCache(id: ComponentID): void;
    warmCache(): Promise<void>;
    getWorkspaceConfig(): WorkspaceConfig;
    cleanFromConfig(ids: ComponentID[]): Promise<boolean>;
    triggerOnComponentChange(id: ComponentID, files: PathOsBasedAbsolute[], removedFiles: PathOsBasedAbsolute[], watchOpts: WatchOptions): Promise<OnComponentEventResult[]>;
    triggerOnComponentAdd(id: ComponentID, watchOpts: WatchOptions): Promise<OnComponentEventResult[]>;
    triggerOnComponentRemove(id: ComponentID): Promise<OnComponentEventResult[]>;
    triggerOnBitmapChange(): Promise<void>;
    /**
     * the purpose is mostly to reload the workspace config when it changes, so entries like "defaultScope" are updated.
     * it also updates the DependencyResolver config. I couldn't find a good way to update all aspects in workspace.jsonc.
     */
    triggerOnWorkspaceConfigChange(): Promise<void>;
    getState(id: ComponentID, hash: string): Promise<import("@teambit/component").State>;
    getSnap(id: ComponentID, hash: string): Promise<import("@teambit/component").Snap>;
    getCurrentLaneId(): LaneId;
    getCurrentLaneObject(): Promise<Lane | undefined>;
    isOnMain(): boolean;
    isOnLane(): boolean;
    /**
     * if checked out to a lane and the lane exists in the remote,
     * return the remote lane. otherwise, return null.
     */
    getCurrentRemoteLane(): Promise<Lane | null>;
    getDefaultExtensions(): ExtensionDataList;
    getComponentConfigVinylFile(id: ComponentID, options: EjectConfOptions, excludeLocalChanges?: boolean): Promise<JsonVinyl>;
    private removeEnvVersionIfExistsLocally;
    ejectMultipleConfigs(ids: ComponentID[], options: EjectConfOptions): Promise<EjectConfResult[]>;
    getAspectConfigForComponent(id: ComponentID, aspectId: string): Promise<object | undefined>;
    getExtensionsFromScopeAndSpecific(id: ComponentID, excludeComponentJson?: boolean): Promise<ExtensionDataList>;
    /**
     * @deprecated use `this.idsByPattern` instead for consistency. also, it supports negation and list of patterns.
     *
     * load components into the workspace through a variants pattern.
     * @param pattern variants.
     * @param scope scope name.
     */
    byPattern(pattern: string, scope?: string): Promise<Component[]>;
    hasPattern(strArr: string[]): boolean;
    isPattern(str: string): boolean;
    /**
     * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.
     * it supports negate (!) character to exclude ids.
     */
    idsByPattern(pattern: string, throwForNoMatch?: boolean, opts?: {
        includeDeleted?: boolean;
    }): Promise<ComponentID[]>;
    filterIdsFromPoolIdsByPattern(pattern: string, ids: ComponentID[], throwForNoMatch?: boolean): Promise<ComponentID[]>;
    /**
     * useful for workspace commands, such as `bit build`, `bit compile`.
     * by default, it should be running on new and modified components.
     * a user can specify `--all` to run on all components or specify a pattern to limit to specific components.
     * some commands such as build/test needs to run also on the dependents.
     */
    getComponentsByUserInput(all?: boolean, pattern?: string, includeDependents?: boolean): Promise<Component[]>;
    getComponentsUsingEnv(env: string, ignoreVersion?: boolean, throwIfNotFound?: boolean): Promise<Component[]>;
    getMany(ids: Array<ComponentID>, loadOpts?: ComponentLoadOptions, throwOnFailure?: boolean): Promise<Component[]>;
    getManyByLegacy(components: ConsumerComponent[], loadOpts?: ComponentLoadOptions): Promise<Component[]>;
    /**
     * don't throw an error if the component was not found, simply return undefined.
     */
    getIfExist(componentId: ComponentID): Promise<Component | undefined>;
    /**
     * whether a component exists in the workspace
     */
    exists(componentId: ComponentID, opts?: {
        includeDeleted?: boolean;
    }): boolean;
    getIdIfExist(componentId: ComponentID): ComponentID | undefined;
    mergeBitmaps(bitmapContent: string, otherBitmapContent: string, opts?: BitmapMergeOptions): string;
    /**
     * This will make sure to fetch the objects prior to load them
     * do not use it if you are not sure you need it.
     * It will influence the performance
     * currently it used only for get many of aspects
     * @param ids
     */
    importAndGetMany(ids: Array<ComponentID>, reason?: string, loadOpts?: ComponentLoadOptions, throwOnError?: boolean): Promise<Component[]>;
    importCurrentLaneIfMissing(): Promise<Lane | undefined>;
    use(aspectIdStr: string): Promise<string>;
    unuse(aspectIdStr: string): Promise<boolean>;
    write(component: Component, rootPath?: string): Promise<void>;
    /**
     * @todo: the return path here is Linux when asking for relative and os-based when asking for absolute. fix this to be consistent.
     *
     * Get the component root dir in the file system (relative to workspace or full)
     * @param componentId
     * @param relative return the path relative to the workspace or full path
     */
    componentDir(componentId: ComponentID, bitMapOptions?: GetBitMapComponentOptions, options?: {
        relative: boolean;
    }): PathOsBased;
    /**
     * component's files in the workspace are symlinked to the node_modules, and a package.json file is generated on that
     * package directory to simulate a valid node package.
     * @returns the package directory inside the node_module.
     * by default the absolute path, unless `options.relative` was set
     */
    componentPackageDir(component: Component, options?: {
        relative: boolean;
    }): string;
    componentPackageName(component: Component): string;
    private componentDirFromLegacyId;
    componentDirToAbsolute(relativeComponentDir: PathOsBasedRelative): PathOsBasedAbsolute;
    componentDefaultScope(componentId: ComponentID): Promise<string | undefined>;
    componentDefaultScopeFromComponentDirAndName(relativeComponentDir: PathOsBasedRelative, name: string): Promise<string | undefined>;
    get defaultScope(): string;
    private componentDefaultScopeFromComponentDirAndNameWithoutConfigFile;
    /**
     * Calculate the component config based on:
     * the config property in the .bitmap file
     * the component.json file in the component folder
     * matching pattern in the variants config
     * defaults extensions from workspace config
     * extensions from the model.
     */
    componentExtensions(componentId: ComponentID, componentFromScope?: Component, excludeOrigins?: ExtensionsOrigin[], opts?: ComponentExtensionsOpts): Promise<ComponentExtensionsResponse>;
    warnAboutMisconfiguredEnv(envId: string): Promise<void>;
    getConfigMergeFilePath(): string;
    getConflictMergeFile(): MergeConflictFile;
    getDepsDataOfMergeConfig(id: ComponentID): Record<string, any> | undefined;
    /**
     * @deprecated
     * the workspace.jsonc conflicts are not written to the config-merge file anymore.
     * see https://github.com/teambit/bit/pull/8393 for more details.
     */
    getWorkspaceJsonConflictFromMergeConfig(): {
        data?: Record<string, any>;
        conflict: boolean;
    };
    getWorkspaceIssues(): Error[];
    listComponentsDuringMerge(): Promise<ComponentID[]>;
    getUnmergedComponent(componentId: ComponentID): Promise<Component | undefined>;
    isModified(component: Component): Promise<boolean>;
    isModifiedOrNew(component: Component): Promise<boolean>;
    isExported(id: ComponentID): boolean;
    getExportedFrom(ids: ComponentID[]): ComponentID[];
    /**
     * filter the given component-ids and set default-scope only to the new ones.
     * returns the affected components.
     */
    setDefaultScopeToComponents(componentIds: ComponentID[], scopeName: string): Promise<ComponentID[]>;
    /**
     * @param scopeName
     * @param includeComponents whether to update new components in the workspace to use the new default-scope
     * this is relevant only for new components that were using the previous default-scope
     */
    setDefaultScope(scopeName: string, includeComponents?: boolean): Promise<void>;
    addSpecificComponentConfig(id: ComponentID, aspectId: string, config?: Record<string, any>, { shouldMergeWithExisting, shouldMergeWithPrevious, }?: {
        shouldMergeWithExisting?: boolean;
        /**
         * relevant only when writing to .bitmap.
         * eject config of the given aspect-id, so then it won't override previous config. (see "adding prod dep, tagging then adding devDep" e2e-test)
         */
        shouldMergeWithPrevious?: boolean;
    }): Promise<void>;
    removeSpecificComponentConfig(id: ComponentID, aspectId: string, markWithMinusIfNotExist?: boolean): Promise<void>;
    getAspectIdFromConfig(componentId: ComponentID, aspectIdStr: string, ignoreAspectVersion?: boolean): Promise<string | undefined>;
    getSpecificComponentConfig(id: ComponentID, aspectId: string): Promise<any>;
    private isVendorComponentByComponentDir;
    /**
     * return the component config from its folder (component.json)
     * @param componentId
     */
    componentConfigFile(id: ComponentID): Promise<ComponentConfigFile | undefined>;
    /**
     * @param componentPath can be relative or absolute. supports Linux and Windows
     */
    getComponentIdByPath(componentPath: PathOsBased): Promise<ComponentID | undefined>;
    private componentConfigFileFromComponentDirAndName;
    /**
     * load aspects from the workspace and if not exists in the workspace, load from the scope.
     * keep in mind that the graph may have circles.
     */
    loadAspects(ids?: string[], throwOnError?: boolean, neededFor?: string, opts?: WorkspaceLoadAspectsOptions): Promise<string[]>;
    loadComponentsExtensions(extensions: ExtensionDataList, originatedFrom?: ComponentID, opts?: WorkspaceLoadAspectsOptions): Promise<void>;
    /**
     * returns one graph that includes all dependencies types. each edge has a label of the dependency
     * type. the nodes content is the Component object.
     */
    buildOneGraphForComponents(ids: ComponentID[], ignoreIds?: string[], shouldLoadFunc?: ShouldLoadFunc, shouldThrowOnMissingDep?: boolean): Promise<Graph<Component, string>>;
    resolveAspects(runtimeName?: string, componentIds?: ComponentID[], opts?: ResolveAspectsOptions): Promise<AspectDefinition[]>;
    /**
     * Provides a cache folder, unique per key.
     * Return value may be undefined, if workspace folder is unconventional (bare-scope, no node_modules, etc)
     */
    getTempDir(id: string): string;
    getWorkspaceAspectsLoader(): WorkspaceAspectsLoader;
    getCapsulePath(): string;
    shouldUseHashForCapsules(): boolean;
    /**
    }
  
    /**
     * this should be rarely in-use.
     * it's currently used by watch extension as a quick workaround to load .bitmap and the components
     */
    _reloadConsumer(): Promise<void>;
    getComponentPackagePath(component: Component): string;
    get defaultDirectory(): string;
    get legacyDefaultDirectory(): string;
    resolveComponentIdFromPackageName(packageName: string): Promise<ComponentID>;
    /**
     * Transform the id to ComponentId and get the exact id as appear in bitmap
     */
    resolveComponentId(id: string | BitId | ComponentID): Promise<ComponentID>;
    resolveMultipleComponentIds(ids: Array<string | ComponentID | ComponentID>): Promise<ComponentID[]>;
    /**
     * component-id coming from Scope don't have the defaultScope, the legacyComponentId.scope is always populated.
     * in the .bitmap we need to distinguish between the two, so the componentId needs to be corrected with the defaultScope.
     */
    resolveIdWithDefaultScope(componentId: ComponentID): ComponentID;
    /**
     * This will mutate the original extensions list and resolve it's ids
     *
     * @param {ExtensionDataList} extensions
     * @returns {Promise<void[]>}
     * @memberof Workspace
     */
    resolveExtensionsList(extensions: ExtensionDataList): Promise<void[]>;
    /**
     * configure an environment to the given components in the .bitmap file, this configuration overrides other, such as
     * overrides in workspace.jsonc.
     */
    setEnvToComponents(envId: ComponentID, componentIds: ComponentID[], verifyEnv?: boolean): Promise<void>;
    /**
     * helpful when a user provides an env-string to be set and this env has no version.
     * in the workspace config, a custom-env needs to be set with a version unless it's part of the workspace.
     * (inside envs/envs it's set without a version).
     */
    resolveEnvIdWithPotentialVersionForConfig(envId: ComponentID): Promise<string>;
    /**
     * remove env configuration from the .bitmap file, so then other configuration, such as "variants" will take place
     */
    unsetEnvFromComponents(ids: ComponentID[]): Promise<{
        changed: ComponentID[];
        unchanged: ComponentID[];
    }>;
    updateEnvForComponents(envIdStr?: string, pattern?: string): Promise<{
        updated: {
            [envId: string]: ComponentID[];
        };
        alreadyUpToDate: ComponentID[];
    }>;
    getComponentPathsRegExps(): RegExp[];
    setComponentPathsRegExps(): Promise<void>;
    getInjectedDirs(component: Component): Promise<string[]>;
    getAutoDetectOverrides(configuredExtensions: ExtensionDataList, id: ComponentID, legacyFiles: SourceFile[]): Promise<import("@teambit/legacy/dist/consumer/config/component-overrides").DependenciesOverridesData>;
    getAutoDetectConfigMerge(id: ComponentID): import("@teambit/legacy/dist/consumer/config/component-overrides").DependenciesOverridesData | undefined;
    getManyComponentsStatuses(ids: ComponentID[]): Promise<ComponentStatusResult[]>;
    getComponentStatusById(id: ComponentID): Promise<ComponentStatusLegacy>;
    setLocalOnly(ids: ComponentID[]): Promise<void>;
    unsetLocalOnly(ids: ComponentID[]): Promise<ComponentID[]>;
    listLocalOnly(): ComponentIdList;
}
export default Workspace;
