import type { BinderUrlSet, KernelOptions, RepoProviderSpec, RestAPIContentsResponse, ServerRestAPI, ServerRuntime, ServerSettings, SessionIModel } from './types'; import type { Config } from './config'; import type { ServiceManager, Session } from '@jupyterlab/services'; import type { LiteServerConfig } from 'thebe-lite'; import type { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import { KernelSpecAPI, ServerConnection } from '@jupyterlab/services'; import ThebeSession from './session'; declare class ThebeServer implements ServerRuntime, ServerRestAPI { readonly id: string; readonly config: Config; readonly ready: Promise; sessionManager?: Session.IManager; serviceManager?: ServiceManager; repoProviders?: RepoProviderSpec[]; binderUrls?: BinderUrlSet; userServerUrl?: string; private resolveReadyFn?; private rejectReadyFn?; private _isDisposed; private events; constructor(config: Config); get isBinder(): boolean; get isReady(): boolean; get isDisposed(): boolean; get settings(): ServerConnection.ISettings | undefined; shutdownSession(id: string): Promise; shutdownAllSessions(): Promise; check(): Promise; dispose(): void; startNewSession(rendermime: IRenderMimeRegistry, kernelOptions?: KernelOptions): Promise; listRunningSessions(): Promise; refreshRunningSessions(): Promise; connectToExistingSession(model: SessionIModel, rendermime: IRenderMimeRegistry): Promise; clearSavedBinderSessions(): Promise; /** * Connect to a Jupyter server directly * */ connectToJupyterServer(): Promise; /** * Connect to Jupyterlite Server */ connectToJupyterLiteServer(config?: LiteServerConfig): Promise; makeBinderUrls(): BinderUrlSet; checkForSavedBinderSession(): Promise; /** * Connect to a Binder instance in order to * access a Jupyter server that can provide kernels * * @param ctx * @param opts * @returns */ connectToServerViaBinder(customProviders?: RepoProviderSpec[]): Promise; getFetchUrl(relativeUrl: string): URL; static status(serverSettings: ServerSettings): Promise; getKernelSpecs(): Promise; getContents(opts: { path: string; type?: 'notebook' | 'file' | 'directory'; format?: 'text' | 'base64'; returnContent?: boolean; }): Promise; duplicateFile(opts: { path: string; copy_from: string; ext?: string; type?: 'notebook' | 'file'; }): Promise; createDirectory(opts: { path: string; }): Promise; renameContents(opts: { path: string; newPath: string; }): Promise; uploadFile(opts: { path: string; content: string; format?: 'json' | 'text' | 'base64'; type?: 'notebook' | 'file'; }): Promise; } export default ThebeServer;