import * as vscode from 'vscode' ; export interface ClusterExplorerV1 { resolveCommandTarget ( target ? ) : ClusterExplorerV1 . ClusterExplorerNode | undefined ; registerNodeContributor ( nodeContributor ) : void ; readonly nodeSources : ClusterExplorerV1 . NodeSources ; registerNodeUICustomizer ( nodeUICustomizer ) : void ; refresh ( ) : void ; } export namespace ClusterExplorerV1 { export interface NodeContributor { contributesChildren ( parent ) : boolean ; getChildren ( parent ) : Promise < Node [ ] > ; } export interface NodeUICustomizer { customize ( node , treeItem ) : void | Thenable < void > ; } export interface Node { getChildren ( ) : Promise < Node [ ] > ; getTreeItem ( ) : vscode . TreeItem ; } export interface ClusterExplorerResourceNode { readonly nodeType : 'resource' ; readonly namespace : string | null ; readonly resourceKind : ResourceKind ; readonly name : string ; readonly metadata ? : any ; } export interface ClusterExplorerGroupingFolderNode { readonly nodeType : 'folder.grouping' ; } export interface ClusterExplorerResourceFolderNode { readonly nodeType : 'folder.resource' ; readonly resourceKind : ResourceKind ; } export interface ClusterExplorerContextNode { readonly nodeType : 'context' ; readonly name : string ; } export interface ClusterExplorerInactiveContextNode { readonly nodeType : 'context.inactive' ; readonly name : string ; } export interface ClusterExplorerConfigDataItemNode { readonly nodeType : 'configitem' ; readonly name : string ; } export interface ClusterExplorerErrorNode { readonly nodeType : 'error' ; } export interface ClusterExplorerHelmReleaseNode { readonly nodeType : 'helm.release' ; readonly name : string ; } export interface ClusterExplorerExtensionNode { readonly nodeType : 'extension' ; } export type ClusterExplorerNode = ClusterExplorerResourceNode | ClusterExplorerGroupingFolderNode | ClusterExplorerResourceFolderNode | ClusterExplorerContextNode | ClusterExplorerInactiveContextNode | ClusterExplorerConfigDataItemNode | ClusterExplorerErrorNode | ClusterExplorerHelmReleaseNode | ClusterExplorerExtensionNode ; export interface ResourceKind { readonly manifestKind : string ; readonly abbreviation : string ; } export interface NodeSource { at ( parentFolder ) : NodeContributor ; if ( condition ) : NodeSource ; nodes ( ) : Promise < Node [ ] > ; } export interface NodeSources { resourceFolder ( displayName , pluralDisplayName , manifestKind , abbreviation ) : NodeSource ; groupingFolder ( displayName , contextValue , ... children ) : NodeSource ; } }