import { Graph } from 'graphlib'; import { BitId } from '../../bit-id'; import { ModelComponent, Version } from '../models'; import Scope from '../scope'; import Component from '../../consumer/component/consumer-component'; import Consumer from '../../consumer/consumer'; export declare type DependenciesInfo = { id: BitId; depth: number; parent: string; dependencyType: string; }; export default class DependencyGraph { graph: Graph; scopeName: string; constructor(graph: Graph); setScopeName(scopeName: string): void; static loadAllVersions(scope: Scope): Promise; static loadLatest(scope: Scope): Promise; static loadFromString(str: object): DependencyGraph; static buildGraphWithAllVersions(scope: Scope): Graph; static buildGraphFromScope(scope: Scope): Promise; static buildGraphFromWorkspace(consumer: Consumer, onlyLatest?: boolean, reverse?: boolean): Promise; static buildGraphFromCurrentlyUsedComponents(consumer: Consumer): Promise; static _addDependenciesToGraph(id: BitId, graph: Graph, component: Version | Component, reverse?: boolean): void; getSubGraphOfConnectedComponents(id: BitId): Graph; getDependenciesInfo(id: BitId): DependenciesInfo[]; getDependentsInfo(id: BitId): DependenciesInfo[]; _getIdWithLatestVersion(id: BitId): BitId; getComponent(id: BitId): ModelComponent; getImmediateDependentsPerId(id: BitId, returnNodeValue?: boolean): Array; getImmediateDependenciesPerId(id: BitId): string[]; serialize(graph?: Graph): Object; }