-
Notifications
You must be signed in to change notification settings - Fork 276
/
tokens.ts
47 lines (40 loc) 路 1 KB
/
tokens.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { Session } from '@jupyterlab/services';
import { Token } from '@lumino/coreutils';
/**
* The token for the sessions service.
*/
export const ISessions = new Token<ISessions>('@jupyterlite/session:ISessions');
/**
* The interface for the sessions services.
*/
export interface ISessions {
/**
* Get a session by id.
*
* @param id The id of the session.
*/
get(id: string): Promise<Session.IModel>;
/**
* List the running sessions
*/
list(): Promise<Session.IModel[]>;
/**
* Path an existing session.
* This can be used to rename a session.
*
* @param options The options to patch the session.
*/
patch: (options: Session.IModel) => Promise<Session.IModel>;
/**
* Start a new session.
*
* @param options The options to start a new session.
*/
startNew: (options: Session.IModel) => Promise<Session.IModel>;
/**
* Shut down a session.
*
* @param id The id of the session to shut down.
*/
shutdown: (id: string) => Promise<void>;
}