1 | import { DataConnector } from '@jupyterlab/statedb';
|
2 | import { ReadonlyPartialJSONObject } from '@lumino/coreutils';
|
3 | import { ServerConnection } from '../serverconnection';
|
4 |
|
5 |
|
6 |
|
7 | export declare class WorkspaceManager extends DataConnector<Workspace.IWorkspace> {
|
8 | |
9 |
|
10 |
|
11 | constructor(options?: WorkspaceManager.IOptions);
|
12 | /**
|
13 | * The server settings used to make API requests.
|
14 | */
|
15 | readonly serverSettings: ServerConnection.ISettings;
|
16 | /**
|
17 | * Fetch a workspace.
|
18 | *
|
19 | * @param id - The workspace's ID.
|
20 | *
|
21 | * @returns A promise that resolves if successful.
|
22 | */
|
23 | fetch(id: string): Promise<Workspace.IWorkspace>;
|
24 | /**
|
25 | * Fetch the list of workspace IDs that exist on the server.
|
26 | *
|
27 | * @returns A promise that resolves if successful.
|
28 | */
|
29 | list(): Promise<{
|
30 | ids: string[];
|
31 | values: Workspace.IWorkspace[];
|
32 | }>;
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | remove(id: string): Promise<void>;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | save(id: string, workspace: Workspace.IWorkspace): Promise<void>;
|
51 | }
|
52 |
|
53 |
|
54 |
|
55 | export declare namespace WorkspaceManager {
|
56 | |
57 |
|
58 |
|
59 | interface IOptions {
|
60 | |
61 |
|
62 |
|
63 | serverSettings?: ServerConnection.ISettings;
|
64 | }
|
65 | }
|
66 |
|
67 |
|
68 |
|
69 | export declare namespace Workspace {
|
70 | |
71 |
|
72 |
|
73 | interface IManager extends WorkspaceManager {
|
74 | }
|
75 | |
76 |
|
77 |
|
78 | interface IWorkspace {
|
79 | |
80 |
|
81 |
|
82 | data: ReadonlyPartialJSONObject;
|
83 | |
84 |
|
85 |
|
86 | metadata: {
|
87 | |
88 |
|
89 |
|
90 | id: string;
|
91 | };
|
92 | }
|
93 | }
|