import { Resource } from './@types/depi'; import { DepiSession } from './depiUtils'; export interface TokenLoginData { userName: string; token: string; url: string; certificate: string; options: any; } export default class DepiExtensionApi { depiExtensionActivated: boolean; depiExtensionUnavailable: boolean; log: Function; session: DepiSession | null; constructor(log: Function); private tryActivateDepiExtension; private ensureDepiExtensionAvailable; /** * Get the login data for the current user. * @returns */ getDepiToken(): Promise; /** * Get the current depi-session or login and create a new one if none available. * @param forceNew - destory current session and create a new one. * @returns */ getDepiSession(forceNew?: boolean): Promise; /** * Logout and destroy session. */ destroy(): Promise; /** * Brings up the blackboard view. * @param branchName - optionally pass if you don't want to use the branch in the depi-session. */ showBlackboard(branchName?: string): Promise; /** * Bring ups the dependency graph for the given resource. * @param resource * @param branchName */ showDependencyGraph(resource: Resource, branchName?: string): Promise; /** * Bring ups the dependants graph (reverse dependency graph) for the given resource. * @param resource * @param branchName */ showDependantsGraph(resource: Resource, branchName?: string): Promise; /** * Lets the user select a resource from a list by first selecting resource group and then resource. * @returns A resource if one was selected, otherwise null. */ selectDepiResource(): Promise; /** * Calls out to reveal a resource and the depi-extension delegates this to any installed extension that matches the * resource tool of the resource. (If the tool is git, the depi-extension will handle it directly.) * @param resource */ revealDepiResource(resource: Resource): Promise; }