1 | import { ServerConnection } from '../serverconnection';
|
2 | /**
|
3 | * The url for the terminal service.
|
4 | */
|
5 | export declare const TERMINAL_SERVICE_URL = "api/terminals";
|
6 | /**
|
7 | * Whether the terminal service is available.
|
8 | */
|
9 | export declare function isAvailable(): boolean;
|
10 | /**
|
11 | * The server model for a terminal session.
|
12 | */
|
13 | export interface IModel {
|
14 | /**
|
15 | * The name of the terminal session.
|
16 | */
|
17 | readonly name: string;
|
18 | }
|
19 | /**
|
20 | * Start a new terminal session.
|
21 | *
|
22 | * @param settings - The server settings to use.
|
23 | *
|
24 | * @param name - The name of the target terminal.
|
25 | *
|
26 | * @param cwd - The path in which the terminal will start.
|
27 | *
|
28 | * @returns A promise that resolves with the session model.
|
29 | */
|
30 | export declare function startNew(settings?: ServerConnection.ISettings, name?: string, cwd?: string): Promise<IModel>;
|
31 | /**
|
32 | * List the running terminal sessions.
|
33 | *
|
34 | * @param settings - The server settings to use.
|
35 | *
|
36 | * @returns A promise that resolves with the list of running session models.
|
37 | */
|
38 | export declare function listRunning(settings?: ServerConnection.ISettings): Promise<IModel[]>;
|
39 | /**
|
40 | * Shut down a terminal session by name.
|
41 | *
|
42 | * @param name - The name of the target session.
|
43 | *
|
44 | * @param settings - The server settings to use.
|
45 | *
|
46 | * @returns A promise that resolves when the session is shut down.
|
47 | */
|
48 | export declare function shutdownTerminal(name: string, settings?: ServerConnection.ISettings): Promise<void>;
|