@api-client/core 0.8.22 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +12 -5
- package/build/browser.js +2 -3
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +12 -5
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/src/events/BaseEvents.d.ts +137 -18
- package/build/src/events/BaseEvents.js.map +1 -1
- package/build/src/events/EventTypes.d.ts +0 -14
- package/build/src/events/EventTypes.js +0 -2
- package/build/src/events/EventTypes.js.map +1 -1
- package/build/src/events/Events.d.ts +1 -5
- package/build/src/events/Events.js +0 -2
- package/build/src/events/Events.js.map +1 -1
- package/build/src/events/transport/TransportEventTypes.d.ts +0 -1
- package/build/src/events/transport/TransportEventTypes.js +0 -1
- package/build/src/events/transport/TransportEventTypes.js.map +1 -1
- package/build/src/events/transport/TransportEvents.d.ts +0 -8
- package/build/src/events/transport/TransportEvents.js +0 -11
- package/build/src/events/transport/TransportEvents.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +0 -3
- package/build/src/mocking/ProjectMock.js +0 -3
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/lib/History.js +5 -0
- package/build/src/mocking/lib/History.js.map +1 -1
- package/build/src/models/{Workspace.d.ts → Folder.d.ts} +7 -7
- package/build/src/models/{Workspace.js → Folder.js} +5 -5
- package/build/src/models/Folder.js.map +1 -0
- package/build/src/models/HttpHistory.d.ts +38 -43
- package/build/src/models/HttpHistory.js +27 -34
- package/build/src/models/HttpHistory.js.map +1 -1
- package/build/src/models/HttpProject.d.ts +0 -2
- package/build/src/models/HttpProject.js +0 -27
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/Project.d.ts +0 -8
- package/build/src/models/Project.js +0 -4
- package/build/src/models/Project.js.map +1 -1
- package/build/src/models/ProjectFolder.d.ts +0 -2
- package/build/src/models/ProjectFolder.js +0 -14
- package/build/src/models/ProjectFolder.js.map +1 -1
- package/build/src/models/ProjectItem.d.ts +0 -2
- package/build/src/models/ProjectItem.js +0 -20
- package/build/src/models/ProjectItem.js.map +1 -1
- package/build/src/models/ProjectRequest.d.ts +2 -3
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/RequestConfig.d.ts +1 -1
- package/build/src/models/Space.d.ts +25 -0
- package/build/src/models/Space.js +76 -0
- package/build/src/models/Space.js.map +1 -0
- package/build/src/models/TrashEntry.d.ts +27 -0
- package/build/src/models/TrashEntry.js +2 -0
- package/build/src/models/TrashEntry.js.map +1 -0
- package/build/src/models/store/Backend.d.ts +0 -315
- package/build/src/models/store/Backend.js +0 -1
- package/build/src/models/store/Backend.js.map +1 -1
- package/build/src/models/store/File.d.ts +31 -1
- package/build/src/models/store/File.js +6 -6
- package/build/src/models/store/File.js.map +1 -1
- package/build/src/proxy/HttpProjectProxy.d.ts +4 -0
- package/build/src/proxy/HttpProjectProxy.js +10 -2
- package/build/src/proxy/HttpProjectProxy.js.map +1 -1
- package/build/src/proxy/ProxyService.d.ts +0 -10
- package/build/src/proxy/ProxyService.js +0 -14
- package/build/src/proxy/ProxyService.js.map +1 -1
- package/build/src/runtime/node/InteropInterfaces.d.ts +1 -2
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -3
- package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.d.ts +7 -8
- package/build/src/runtime/node/ProjectRequestRunner.js +2 -3
- package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunner.d.ts +3 -4
- package/build/src/runtime/node/ProjectRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunnerWorker.js +0 -4
- package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
- package/build/src/runtime/store/CertificatesSdk.d.ts +46 -0
- package/build/src/runtime/store/CertificatesSdk.js +227 -0
- package/build/src/runtime/store/CertificatesSdk.js.map +1 -0
- package/build/src/runtime/store/FilesSdk.d.ts +21 -16
- package/build/src/runtime/store/FilesSdk.js +75 -23
- package/build/src/runtime/store/FilesSdk.js.map +1 -1
- package/build/src/runtime/store/HistorySdk.d.ts +11 -8
- package/build/src/runtime/store/HistorySdk.js +140 -17
- package/build/src/runtime/store/HistorySdk.js.map +1 -1
- package/build/src/runtime/store/RevisionsSdk.d.ts +12 -0
- package/build/src/runtime/store/RevisionsSdk.js +43 -0
- package/build/src/runtime/store/RevisionsSdk.js.map +1 -0
- package/build/src/runtime/store/RouteBuilder.d.ts +16 -18
- package/build/src/runtime/store/RouteBuilder.js +33 -60
- package/build/src/runtime/store/RouteBuilder.js.map +1 -1
- package/build/src/runtime/store/Sdk.d.ts +10 -7
- package/build/src/runtime/store/Sdk.js +12 -5
- package/build/src/runtime/store/Sdk.js.map +1 -1
- package/build/src/runtime/store/SdkBase.js.map +1 -1
- package/build/src/runtime/store/SharedSdk.d.ts +2 -2
- package/build/src/runtime/store/SharedSdk.js.map +1 -1
- package/build/src/runtime/store/SpacesSdk.d.ts +29 -0
- package/build/src/runtime/store/SpacesSdk.js +135 -0
- package/build/src/runtime/store/SpacesSdk.js.map +1 -0
- package/build/src/runtime/store/TrashSdk.d.ts +35 -0
- package/build/src/runtime/store/TrashSdk.js +155 -0
- package/build/src/runtime/store/TrashSdk.js.map +1 -0
- package/build/src/runtime/store/UsersSdk.d.ts +2 -2
- package/build/src/runtime/store/UsersSdk.js.map +1 -1
- package/build/src/runtime/store/interfaces/ApiClientStore.d.ts +30 -0
- package/build/src/runtime/store/interfaces/ApiClientStore.js +2 -0
- package/build/src/runtime/store/interfaces/ApiClientStore.js.map +1 -0
- package/build/src/runtime/store/interfaces/Certificates.d.ts +49 -0
- package/build/src/runtime/store/interfaces/Certificates.js +2 -0
- package/build/src/runtime/store/interfaces/Certificates.js.map +1 -0
- package/build/src/runtime/store/interfaces/Files.d.ts +63 -0
- package/build/src/runtime/store/interfaces/Files.js +2 -0
- package/build/src/runtime/store/interfaces/Files.js.map +1 -0
- package/build/src/runtime/store/interfaces/History.d.ts +63 -0
- package/build/src/runtime/store/interfaces/History.js +2 -0
- package/build/src/runtime/store/interfaces/History.js.map +1 -0
- package/build/src/runtime/store/interfaces/Media.d.ts +42 -0
- package/build/src/runtime/store/interfaces/Media.js +2 -0
- package/build/src/runtime/store/interfaces/Media.js.map +1 -0
- package/build/src/runtime/store/interfaces/Revisions.d.ts +25 -0
- package/build/src/runtime/store/interfaces/Revisions.js +2 -0
- package/build/src/runtime/store/interfaces/Revisions.js.map +1 -0
- package/build/src/runtime/store/interfaces/Spaces.d.ts +42 -0
- package/build/src/runtime/store/interfaces/Spaces.js +2 -0
- package/build/src/runtime/store/interfaces/Spaces.js.map +1 -0
- package/build/src/runtime/store/interfaces/Trash.d.ts +38 -0
- package/build/src/runtime/store/interfaces/Trash.js +2 -0
- package/build/src/runtime/store/interfaces/Trash.js.map +1 -0
- package/package.json +1 -1
- package/src/events/BaseEvents.ts +148 -18
- package/src/events/EventTypes.ts +0 -2
- package/src/events/Events.ts +0 -2
- package/src/events/transport/TransportEventTypes.ts +0 -1
- package/src/events/transport/TransportEvents.ts +0 -13
- package/src/mocking/ProjectMock.ts +0 -4
- package/src/mocking/lib/History.ts +5 -0
- package/src/models/{Workspace.ts → Folder.ts} +12 -12
- package/src/models/HttpHistory.ts +53 -63
- package/src/models/HttpProject.ts +0 -29
- package/src/models/Project.ts +0 -8
- package/src/models/ProjectFolder.ts +0 -16
- package/src/models/ProjectItem.ts +0 -18
- package/src/models/ProjectRequest.ts +3 -4
- package/src/models/RequestConfig.ts +1 -1
- package/src/models/Space.ts +91 -0
- package/src/models/TrashEntry.ts +29 -0
- package/src/models/store/Backend.ts +0 -342
- package/src/models/store/File.ts +39 -6
- package/src/proxy/HttpProjectProxy.ts +14 -2
- package/src/proxy/ProxyService.ts +0 -15
- package/src/proxy/readme.md +0 -1
- package/src/runtime/node/InteropInterfaces.ts +1 -2
- package/src/runtime/node/ProjectParallelRunner.ts +2 -3
- package/src/runtime/node/ProjectRequestRunner.ts +13 -14
- package/src/runtime/node/ProjectRunner.ts +3 -4
- package/src/runtime/node/ProjectRunnerWorker.ts +1 -4
- package/src/runtime/store/CertificatesSdk.ts +231 -0
- package/src/runtime/store/FilesSdk.ts +88 -35
- package/src/runtime/store/HistorySdk.ts +145 -33
- package/src/runtime/store/RevisionsSdk.ts +44 -0
- package/src/runtime/store/RouteBuilder.ts +37 -69
- package/src/runtime/store/Sdk.ts +17 -7
- package/src/runtime/store/SdkBase.ts +1 -1
- package/src/runtime/store/SharedSdk.ts +3 -3
- package/src/runtime/store/SpacesSdk.ts +136 -0
- package/src/runtime/store/TrashSdk.ts +159 -0
- package/src/runtime/store/UsersSdk.ts +3 -3
- package/src/runtime/store/interfaces/ApiClientStore.ts +39 -0
- package/src/runtime/store/interfaces/Certificates.ts +56 -0
- package/src/runtime/store/interfaces/Files.ts +70 -0
- package/src/runtime/store/interfaces/History.ts +64 -0
- package/src/runtime/store/interfaces/Media.ts +46 -0
- package/src/runtime/store/interfaces/Revisions.ts +27 -0
- package/src/runtime/store/interfaces/Spaces.ts +48 -0
- package/src/runtime/store/interfaces/Trash.ts +42 -0
- package/build/src/events/models/ClientCertificateEvents.d.ts +0 -54
- package/build/src/events/models/ClientCertificateEvents.js +0 -78
- package/build/src/events/models/ClientCertificateEvents.js.map +0 -1
- package/build/src/events/models/ModelEventTypes.d.ts +0 -13
- package/build/src/events/models/ModelEventTypes.js +0 -14
- package/build/src/events/models/ModelEventTypes.js.map +0 -1
- package/build/src/events/models/ModelEvents.d.ts +0 -4
- package/build/src/events/models/ModelEvents.js +0 -5
- package/build/src/events/models/ModelEvents.js.map +0 -1
- package/build/src/mocking/lib/App.d.ts +0 -36
- package/build/src/mocking/lib/App.js +0 -70
- package/build/src/mocking/lib/App.js.map +0 -1
- package/build/src/models/AppProject.d.ts +0 -817
- package/build/src/models/AppProject.js +0 -1721
- package/build/src/models/AppProject.js.map +0 -1
- package/build/src/models/AppRequest.d.ts +0 -69
- package/build/src/models/AppRequest.js +0 -150
- package/build/src/models/AppRequest.js.map +0 -1
- package/build/src/models/Workspace.js.map +0 -1
- package/build/src/proxy/AppProjectProxy.d.ts +0 -28
- package/build/src/proxy/AppProjectProxy.js +0 -107
- package/build/src/proxy/AppProjectProxy.js.map +0 -1
- package/build/src/runtime/store/AppSdk.d.ts +0 -213
- package/build/src/runtime/store/AppSdk.js +0 -836
- package/build/src/runtime/store/AppSdk.js.map +0 -1
- package/src/events/models/ClientCertificateEvents.ts +0 -85
- package/src/events/models/ModelEventTypes.ts +0 -13
- package/src/events/models/ModelEvents.ts +0 -5
- package/src/mocking/lib/App.ts +0 -101
- package/src/models/AppProject.ts +0 -2188
- package/src/models/AppRequest.ts +0 -176
- package/src/proxy/AppProjectProxy.ts +0 -126
- package/src/runtime/store/AppSdk.ts +0 -842
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
* A helper class to make sure routes user and reported by this service are consistent.
|
|
3
3
|
*/
|
|
4
4
|
export class RouteBuilder {
|
|
5
|
+
static spaces(): string {
|
|
6
|
+
return '/spaces';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
static space(key: string): string {
|
|
10
|
+
return `/spaces/${key}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
/**
|
|
6
14
|
* @returns The path to the /files route.
|
|
7
15
|
*/
|
|
@@ -37,6 +45,13 @@ export class RouteBuilder {
|
|
|
37
45
|
return `/file/${file}/revisions`;
|
|
38
46
|
}
|
|
39
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @returns The path to the /file/[id]/revisions route.
|
|
50
|
+
*/
|
|
51
|
+
static fileBreadcrumbs(file: string): string {
|
|
52
|
+
return `/file/${file}/breadcrumbs`;
|
|
53
|
+
}
|
|
54
|
+
|
|
40
55
|
/**
|
|
41
56
|
* @returns The path to the /backend route.
|
|
42
57
|
*/
|
|
@@ -80,94 +95,47 @@ export class RouteBuilder {
|
|
|
80
95
|
return `/history/${key}`;
|
|
81
96
|
}
|
|
82
97
|
|
|
83
|
-
static
|
|
84
|
-
return '/
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
static app(appId: string): string {
|
|
88
|
-
return `/app/${appId}`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// GET
|
|
92
|
-
static appQuery(appId: string): string {
|
|
93
|
-
return `${this.app(appId)}/query`;
|
|
98
|
+
static historyClear(type: 'space' | 'project' | 'request', ...key: string[]): string {
|
|
99
|
+
return `/history/clear/${type}/${key.join('/')}`;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return `${this.app(appId)}/query/requests`;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// GET
|
|
102
|
-
static appQueryProjects(appId: string): string {
|
|
103
|
-
return `${this.app(appId)}/query/projects`;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// GET, POST
|
|
107
|
-
static appRequests(appId: string): string {
|
|
108
|
-
return `${this.app(appId)}/requests`;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// GET, DELETE
|
|
112
|
-
static appRequestItem(appId: string, key: string): string {
|
|
113
|
-
return `${this.appRequests(appId)}/${key}`;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
static appRequestsBatch(appId: string): string {
|
|
117
|
-
return `${this.appRequests(appId)}/batch`;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// POST
|
|
121
|
-
static appRequestsBatchCreate(appId: string): string {
|
|
122
|
-
return `${this.appRequestsBatch(appId)}/create`;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// POST
|
|
126
|
-
static appRequestsBatchRead(appId: string): string {
|
|
127
|
-
return `${this.appRequestsBatch(appId)}/read`;
|
|
102
|
+
static shared(): string {
|
|
103
|
+
return '/shared';
|
|
128
104
|
}
|
|
129
105
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return `${this.appRequestsBatch(appId)}/delete`;
|
|
106
|
+
static certificates(): string {
|
|
107
|
+
return '/certificates';
|
|
133
108
|
}
|
|
134
109
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return `${this.appRequestsBatch(appId)}/undelete`;
|
|
110
|
+
static certificate(key: string): string {
|
|
111
|
+
return `/certificates/${key}`;
|
|
138
112
|
}
|
|
139
113
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return `${this.app(appId)}/projects`;
|
|
114
|
+
static certificatesEmpty(key: string): string {
|
|
115
|
+
return `/certificates/empty/${key}`;
|
|
143
116
|
}
|
|
144
117
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return `${this.appProjects(appId)}/${key}`;
|
|
118
|
+
static certificateBatchCreate(): string {
|
|
119
|
+
return `/certificate/batch/create`;
|
|
148
120
|
}
|
|
149
121
|
|
|
150
|
-
static
|
|
151
|
-
return
|
|
122
|
+
static certificateBatchDelete(): string {
|
|
123
|
+
return `/certificate/batch/delete`;
|
|
152
124
|
}
|
|
153
125
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return `${this.appProjectsBatch(appId)}/create`;
|
|
126
|
+
static trash(): string {
|
|
127
|
+
return `/trash`
|
|
157
128
|
}
|
|
158
129
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return `${this.appProjectsBatch(appId)}/read`;
|
|
130
|
+
static trashItem(key: string): string {
|
|
131
|
+
return `/trash/${key}`
|
|
162
132
|
}
|
|
163
133
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return `${this.appProjectsBatch(appId)}/delete`;
|
|
134
|
+
static trashEmpty(space: string): string {
|
|
135
|
+
return `/trash/empty/${space}`
|
|
167
136
|
}
|
|
168
137
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return `${this.appProjectsBatch(appId)}/undelete`;
|
|
138
|
+
static trashRestore(fileKey: string): string {
|
|
139
|
+
return `/trash/restore/${fileKey}`
|
|
172
140
|
}
|
|
173
141
|
}
|
package/src/runtime/store/Sdk.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IListOptions } from '../../models/store/Backend.js';
|
|
2
1
|
import { Http } from './Http.js';
|
|
3
2
|
import { WsClient } from './WsClient.js';
|
|
4
3
|
import { AuthSdk } from './AuthSdk.js';
|
|
@@ -7,7 +6,11 @@ import { FilesSdk } from './FilesSdk.js';
|
|
|
7
6
|
import { UsersSdk } from './UsersSdk.js';
|
|
8
7
|
import { HistorySdk } from './HistorySdk.js';
|
|
9
8
|
import { SharedSdk } from './SharedSdk.js';
|
|
10
|
-
import {
|
|
9
|
+
import { ContextListOptions, ContextSpaceListOptions } from '../../events/BaseEvents.js';
|
|
10
|
+
import { CertificatesSdk } from './CertificatesSdk.js';
|
|
11
|
+
import { RevisionsSdk } from './RevisionsSdk.js';
|
|
12
|
+
import { SpacesSdk } from './SpacesSdk.js';
|
|
13
|
+
import { TrashSdk } from './TrashSdk.js';
|
|
11
14
|
|
|
12
15
|
const baseUriSymbol = Symbol('baseUri');
|
|
13
16
|
|
|
@@ -52,10 +55,13 @@ export abstract class Sdk {
|
|
|
52
55
|
*/
|
|
53
56
|
shared = new SharedSdk(this);
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
certificates = new CertificatesSdk(this);
|
|
59
|
+
|
|
60
|
+
revisions = new RevisionsSdk(this);
|
|
61
|
+
|
|
62
|
+
spaces = new SpacesSdk(this);
|
|
63
|
+
|
|
64
|
+
trash = new TrashSdk(this);
|
|
59
65
|
|
|
60
66
|
/**
|
|
61
67
|
* When set it limits log output to minimum.
|
|
@@ -121,7 +127,7 @@ export abstract class Sdk {
|
|
|
121
127
|
* @param url The URL object to the API endpoint
|
|
122
128
|
* @param options The list options, if any
|
|
123
129
|
*/
|
|
124
|
-
appendListOptions(url: URL, options:
|
|
130
|
+
appendListOptions(url: URL, options: ContextListOptions = {}): void {
|
|
125
131
|
const { searchParams } = url;
|
|
126
132
|
if (options.cursor) {
|
|
127
133
|
searchParams.set('cursor', options.cursor);
|
|
@@ -143,6 +149,10 @@ export abstract class Sdk {
|
|
|
143
149
|
if (options.since) {
|
|
144
150
|
searchParams.set('since', String(options.since));
|
|
145
151
|
}
|
|
152
|
+
const typed = options as ContextSpaceListOptions;
|
|
153
|
+
if (typed.space) {
|
|
154
|
+
searchParams.set('space', typed.space);
|
|
155
|
+
}
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
158
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SdkBase, E_RESPONSE_STATUS, E_RESPONSE_NO_VALUE, E_INVALID_JSON, E_RESPONSE_UNKNOWN, ISdkRequestOptions } from './SdkBase.js';
|
|
2
2
|
import { RouteBuilder } from './RouteBuilder.js';
|
|
3
|
-
import { IListOptions, IListResponse } from '../../models/store/Backend.js';
|
|
4
3
|
import { IFile } from '../../models/store/File.js';
|
|
5
4
|
import { SdkError } from './Errors.js';
|
|
6
5
|
import { ListFileKind } from './FilesSdk.js';
|
|
6
|
+
import { ContextListResult, ContextSpaceListOptions } from '../../events/BaseEvents.js';
|
|
7
7
|
|
|
8
8
|
export class SharedSdk extends SdkBase {
|
|
9
9
|
/**
|
|
@@ -13,7 +13,7 @@ export class SharedSdk extends SdkBase {
|
|
|
13
13
|
* @param options Optional query options.
|
|
14
14
|
* @param request Optional request options.
|
|
15
15
|
*/
|
|
16
|
-
async list(kinds?: ListFileKind[], options?:
|
|
16
|
+
async list(kinds?: ListFileKind[], options?: ContextSpaceListOptions, request: ISdkRequestOptions = {}): Promise<ContextListResult<IFile>> {
|
|
17
17
|
const token = request.token || this.sdk.token;
|
|
18
18
|
const url = this.sdk.getUrl(RouteBuilder.shared());
|
|
19
19
|
this.sdk.appendListOptions(url, options);
|
|
@@ -35,7 +35,7 @@ export class SharedSdk extends SdkBase {
|
|
|
35
35
|
if (!result.body) {
|
|
36
36
|
throw new SdkError(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`, 0);
|
|
37
37
|
}
|
|
38
|
-
let data:
|
|
38
|
+
let data: ContextListResult<IFile>;
|
|
39
39
|
try {
|
|
40
40
|
data = JSON.parse(result.body);
|
|
41
41
|
} catch (e) {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { SdkBase, E_RESPONSE_STATUS, E_RESPONSE_NO_VALUE, E_INVALID_JSON, E_RESPONSE_UNKNOWN, ISdkRequestOptions } from './SdkBase.js';
|
|
2
|
+
import { RouteBuilder } from './RouteBuilder.js';
|
|
3
|
+
import { ContextChangeRecord, ContextListOptions, ContextListResult } from '../../events/BaseEvents.js';
|
|
4
|
+
import { ISpace, Kind as SpaceKind } from '../../models/Space.js';
|
|
5
|
+
import { SdkError } from './Errors.js';
|
|
6
|
+
|
|
7
|
+
export class SpacesSdk extends SdkBase {
|
|
8
|
+
/**
|
|
9
|
+
* Lists spaces created by the user.
|
|
10
|
+
* @param options The list query options
|
|
11
|
+
*/
|
|
12
|
+
async list(options?: ContextListOptions, request: ISdkRequestOptions = {}): Promise<ContextListResult<ISpace>> {
|
|
13
|
+
const token = request.token || this.sdk.token;
|
|
14
|
+
const url = this.sdk.getUrl(RouteBuilder.spaces());
|
|
15
|
+
this.sdk.appendListOptions(url, options);
|
|
16
|
+
const result = await this.sdk.http.get(url.toString(), { token });
|
|
17
|
+
this.inspectCommonStatusCodes(result.status);
|
|
18
|
+
const E_PREFIX = 'Unable to list spaces. ';
|
|
19
|
+
if (result.status !== 200) {
|
|
20
|
+
this.logInvalidResponse(result);
|
|
21
|
+
let e = this.createGenericSdkError(result.body)
|
|
22
|
+
if (!e) {
|
|
23
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
24
|
+
e.response = result.body;
|
|
25
|
+
}
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
28
|
+
if (!result.body) {
|
|
29
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
30
|
+
}
|
|
31
|
+
let data: ContextListResult<ISpace>;
|
|
32
|
+
try {
|
|
33
|
+
data = JSON.parse(result.body);
|
|
34
|
+
} catch (e) {
|
|
35
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
36
|
+
}
|
|
37
|
+
if (!Array.isArray(data.items)) {
|
|
38
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
39
|
+
}
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Creates a space from a space definition.
|
|
45
|
+
*
|
|
46
|
+
* @param space The space definition.
|
|
47
|
+
*/
|
|
48
|
+
async add(space: ISpace, request: ISdkRequestOptions = {}): Promise<ContextChangeRecord<ISpace>> {
|
|
49
|
+
const token = request.token || this.sdk.token;
|
|
50
|
+
const url = this.sdk.getUrl(RouteBuilder.spaces());
|
|
51
|
+
const body = JSON.stringify(space);
|
|
52
|
+
const result = await this.sdk.http.post(url.toString(), { token, body });
|
|
53
|
+
this.inspectCommonStatusCodes(result.status);
|
|
54
|
+
const E_PREFIX = 'Unable to create a space. ';
|
|
55
|
+
if (result.status !== 200) {
|
|
56
|
+
this.logInvalidResponse(result);
|
|
57
|
+
let e = this.createGenericSdkError(result.body)
|
|
58
|
+
if (!e) {
|
|
59
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
60
|
+
e.response = result.body;
|
|
61
|
+
}
|
|
62
|
+
throw e;
|
|
63
|
+
}
|
|
64
|
+
if (!result.body) {
|
|
65
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
66
|
+
}
|
|
67
|
+
let data: ContextChangeRecord<ISpace>;
|
|
68
|
+
try {
|
|
69
|
+
data = JSON.parse(result.body);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
72
|
+
}
|
|
73
|
+
if (!data.key) {
|
|
74
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
75
|
+
}
|
|
76
|
+
return data;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Reads a single space from the store.
|
|
81
|
+
* @param key The key of the space to read.
|
|
82
|
+
*/
|
|
83
|
+
async read(key: string, request: ISdkRequestOptions = {}): Promise<ISpace> {
|
|
84
|
+
const token = request.token || this.sdk.token;
|
|
85
|
+
const url = this.sdk.getUrl(RouteBuilder.space(key));
|
|
86
|
+
const result = await this.sdk.http.get(url.toString(), { token });
|
|
87
|
+
this.inspectCommonStatusCodes(result.status);
|
|
88
|
+
const E_PREFIX = 'Unable to read a space. ';
|
|
89
|
+
if (result.status !== 200) {
|
|
90
|
+
this.logInvalidResponse(result);
|
|
91
|
+
let e = this.createGenericSdkError(result.body)
|
|
92
|
+
if (!e) {
|
|
93
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
94
|
+
e.response = result.body;
|
|
95
|
+
}
|
|
96
|
+
throw e;
|
|
97
|
+
}
|
|
98
|
+
if (!result.body) {
|
|
99
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
100
|
+
}
|
|
101
|
+
let data: ISpace;
|
|
102
|
+
try {
|
|
103
|
+
data = JSON.parse(result.body);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
106
|
+
}
|
|
107
|
+
if (data.kind !== SpaceKind) {
|
|
108
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
109
|
+
}
|
|
110
|
+
return data;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Marks space as deleted.
|
|
115
|
+
* Note, this does not remove any data from the store. It marks the space as deleted
|
|
116
|
+
* and then the space is ignored by most of the API.
|
|
117
|
+
*
|
|
118
|
+
* @param key The key of the space to delete.
|
|
119
|
+
*/
|
|
120
|
+
async delete(key: string, request: ISdkRequestOptions = {}): Promise<void> {
|
|
121
|
+
const token = request.token || this.sdk.token;
|
|
122
|
+
const url = this.sdk.getUrl(RouteBuilder.space(key));
|
|
123
|
+
const result = await this.sdk.http.delete(url.toString(), { token });
|
|
124
|
+
this.inspectCommonStatusCodes(result.status, result.body);
|
|
125
|
+
const E_PREFIX = 'Unable to delete the space. ';
|
|
126
|
+
if (result.status !== 204) {
|
|
127
|
+
this.logInvalidResponse(result);
|
|
128
|
+
let e = this.createGenericSdkError(result.body)
|
|
129
|
+
if (!e) {
|
|
130
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
131
|
+
e.response = result.body;
|
|
132
|
+
}
|
|
133
|
+
throw e;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { SdkBase, E_RESPONSE_STATUS, E_RESPONSE_NO_VALUE, E_INVALID_JSON, E_RESPONSE_UNKNOWN, ISdkRequestOptions } from './SdkBase.js';
|
|
2
|
+
import { RouteBuilder } from './RouteBuilder.js';
|
|
3
|
+
import { ContextChangeRecord, ContextListResult, ContextSpaceListOptions } from '../../events/BaseEvents.js';
|
|
4
|
+
import { SdkError } from './Errors.js';
|
|
5
|
+
import { IFile } from '../../models/store/File.js';
|
|
6
|
+
import { TrashEntry, TrashEntryCreate } from '../../models/TrashEntry.js';
|
|
7
|
+
|
|
8
|
+
export class TrashSdk extends SdkBase {
|
|
9
|
+
/**
|
|
10
|
+
* Inserts a record of file delete.
|
|
11
|
+
*
|
|
12
|
+
* @param entry The trash entry definition
|
|
13
|
+
* @param space The parent space of the file
|
|
14
|
+
*/
|
|
15
|
+
async add(entry: TrashEntryCreate, space: string, request: ISdkRequestOptions = {}): Promise<ContextChangeRecord<TrashEntry>> {
|
|
16
|
+
const token = request.token || this.sdk.token;
|
|
17
|
+
const url = this.sdk.getUrl(RouteBuilder.trash());
|
|
18
|
+
url.searchParams.set('space', space);
|
|
19
|
+
const body = JSON.stringify(entry);
|
|
20
|
+
const result = await this.sdk.http.post(url.toString(), { token, body });
|
|
21
|
+
this.inspectCommonStatusCodes(result.status);
|
|
22
|
+
const E_PREFIX = 'Unable to create a trash. ';
|
|
23
|
+
if (result.status !== 200) {
|
|
24
|
+
this.logInvalidResponse(result);
|
|
25
|
+
let e = this.createGenericSdkError(result.body)
|
|
26
|
+
if (!e) {
|
|
27
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
28
|
+
e.response = result.body;
|
|
29
|
+
}
|
|
30
|
+
throw e;
|
|
31
|
+
}
|
|
32
|
+
if (!result.body) {
|
|
33
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
34
|
+
}
|
|
35
|
+
let data: ContextChangeRecord<TrashEntry>;
|
|
36
|
+
try {
|
|
37
|
+
data = JSON.parse(result.body);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
40
|
+
}
|
|
41
|
+
if (!data.key) {
|
|
42
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
43
|
+
}
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Lists trashed entires.
|
|
49
|
+
* @param options The list query options.
|
|
50
|
+
*/
|
|
51
|
+
async list(options: ContextSpaceListOptions, request: ISdkRequestOptions = {}): Promise<ContextListResult<TrashEntry>> {
|
|
52
|
+
const token = request.token || this.sdk.token;
|
|
53
|
+
const url = this.sdk.getUrl(RouteBuilder.trash());
|
|
54
|
+
this.sdk.appendListOptions(url, options);
|
|
55
|
+
const result = await this.sdk.http.get(url.toString(), { token });
|
|
56
|
+
this.inspectCommonStatusCodes(result.status);
|
|
57
|
+
const E_PREFIX = 'Unable to list trash. ';
|
|
58
|
+
if (result.status !== 200) {
|
|
59
|
+
this.logInvalidResponse(result);
|
|
60
|
+
let e = this.createGenericSdkError(result.body)
|
|
61
|
+
if (!e) {
|
|
62
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
63
|
+
e.response = result.body;
|
|
64
|
+
}
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
67
|
+
if (!result.body) {
|
|
68
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
69
|
+
}
|
|
70
|
+
let data: ContextListResult<TrashEntry>;
|
|
71
|
+
try {
|
|
72
|
+
data = JSON.parse(result.body);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
75
|
+
}
|
|
76
|
+
if (!Array.isArray(data.items)) {
|
|
77
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
78
|
+
}
|
|
79
|
+
return data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Removes a trash entry permanently from the store.
|
|
84
|
+
* @param key The key of the deleted object
|
|
85
|
+
*/
|
|
86
|
+
async delete(key: string, request: ISdkRequestOptions = {}): Promise<void> {
|
|
87
|
+
const token = request.token || this.sdk.token;
|
|
88
|
+
const url = this.sdk.getUrl(RouteBuilder.trashItem(key));
|
|
89
|
+
const result = await this.sdk.http.delete(url.toString(), { token });
|
|
90
|
+
this.inspectCommonStatusCodes(result.status, result.body);
|
|
91
|
+
const E_PREFIX = 'Unable to delete the trash entry. ';
|
|
92
|
+
if (result.status !== 204) {
|
|
93
|
+
this.logInvalidResponse(result);
|
|
94
|
+
let e = this.createGenericSdkError(result.body)
|
|
95
|
+
if (!e) {
|
|
96
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
97
|
+
e.response = result.body;
|
|
98
|
+
}
|
|
99
|
+
throw e;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Restores a file from the trash.
|
|
105
|
+
* It deletes a trash entry and updates the `file` object.
|
|
106
|
+
*
|
|
107
|
+
* @param key The key of the file to restore
|
|
108
|
+
*/
|
|
109
|
+
async restore(key: string, request: ISdkRequestOptions = {}): Promise<ContextChangeRecord<IFile>> {
|
|
110
|
+
const token = request.token || this.sdk.token;
|
|
111
|
+
const url = this.sdk.getUrl(RouteBuilder.trashRestore(key));
|
|
112
|
+
const result = await this.sdk.http.put(url.toString(), { token });
|
|
113
|
+
this.inspectCommonStatusCodes(result.status, result.body);
|
|
114
|
+
const E_PREFIX = 'Unable to restore from trash. ';
|
|
115
|
+
if (result.status !== 204) {
|
|
116
|
+
this.logInvalidResponse(result);
|
|
117
|
+
let e = this.createGenericSdkError(result.body)
|
|
118
|
+
if (!e) {
|
|
119
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
120
|
+
e.response = result.body;
|
|
121
|
+
}
|
|
122
|
+
throw e;
|
|
123
|
+
}
|
|
124
|
+
if (!result.body) {
|
|
125
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
126
|
+
}
|
|
127
|
+
let data: ContextChangeRecord<IFile>;
|
|
128
|
+
try {
|
|
129
|
+
data = JSON.parse(result.body);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
|
|
132
|
+
}
|
|
133
|
+
if (!data.key) {
|
|
134
|
+
throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
|
|
135
|
+
}
|
|
136
|
+
return data;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Empties the trash for the given space.
|
|
141
|
+
* @param space The space key to remove trash for.
|
|
142
|
+
*/
|
|
143
|
+
async empty(space: string, request: ISdkRequestOptions = {}): Promise<void> {
|
|
144
|
+
const token = request.token || this.sdk.token;
|
|
145
|
+
const url = this.sdk.getUrl(RouteBuilder.trashEmpty(space));
|
|
146
|
+
const result = await this.sdk.http.delete(url.toString(), { token });
|
|
147
|
+
this.inspectCommonStatusCodes(result.status, result.body);
|
|
148
|
+
const E_PREFIX = 'Unable to empty trash. ';
|
|
149
|
+
if (result.status !== 204) {
|
|
150
|
+
this.logInvalidResponse(result);
|
|
151
|
+
let e = this.createGenericSdkError(result.body)
|
|
152
|
+
if (!e) {
|
|
153
|
+
e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
|
|
154
|
+
e.response = result.body;
|
|
155
|
+
}
|
|
156
|
+
throw e;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SdkBase, E_RESPONSE_STATUS, E_RESPONSE_NO_VALUE, E_INVALID_JSON, E_RESPONSE_UNKNOWN, ISdkRequestOptions } from './SdkBase.js';
|
|
2
2
|
import { RouteBuilder } from './RouteBuilder.js';
|
|
3
|
-
import { IListOptions, IListResponse } from '../../models/store/Backend.js';
|
|
4
3
|
import { IUser } from '../../models/store/User.js';
|
|
4
|
+
import { ContextListResult, ContextListOptions } from '../../events/BaseEvents.js';
|
|
5
5
|
|
|
6
6
|
export class UsersSdk extends SdkBase {
|
|
7
7
|
/**
|
|
@@ -39,7 +39,7 @@ export class UsersSdk extends SdkBase {
|
|
|
39
39
|
* @param options Optional query options.
|
|
40
40
|
* @param request Optional request options.
|
|
41
41
|
*/
|
|
42
|
-
async list(options?:
|
|
42
|
+
async list(options?: ContextListOptions, request: ISdkRequestOptions = {}): Promise<ContextListResult<IUser>> {
|
|
43
43
|
const token = request.token || this.sdk.token;
|
|
44
44
|
const url = this.sdk.getUrl(RouteBuilder.users());
|
|
45
45
|
this.sdk.appendListOptions(url, options);
|
|
@@ -53,7 +53,7 @@ export class UsersSdk extends SdkBase {
|
|
|
53
53
|
if (!result.body) {
|
|
54
54
|
throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
|
|
55
55
|
}
|
|
56
|
-
let data:
|
|
56
|
+
let data: ContextListResult<IUser>;
|
|
57
57
|
try {
|
|
58
58
|
data = JSON.parse(result.body);
|
|
59
59
|
} catch (e) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Certificates } from "./Certificates.js";
|
|
2
|
+
import { Files } from "./Files.js";
|
|
3
|
+
import { History } from "./History.js";
|
|
4
|
+
import { Media } from "./Media.js";
|
|
5
|
+
import { Revisions } from "./Revisions.js";
|
|
6
|
+
import { Spaces } from "./Spaces.js";
|
|
7
|
+
import { Trash } from "./Trash.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A base class to define access to the API Client store.
|
|
11
|
+
* This is used by particular store implementation (like IDB or net-store).
|
|
12
|
+
*/
|
|
13
|
+
export interface ApiClientStore {
|
|
14
|
+
/**
|
|
15
|
+
* The current space.
|
|
16
|
+
* The bindings will fill up workspace key information when needed.
|
|
17
|
+
* This way the events won't need to contain this information.
|
|
18
|
+
*/
|
|
19
|
+
space?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Initializes the store.
|
|
23
|
+
*/
|
|
24
|
+
initializeStore(): Promise<void>;
|
|
25
|
+
|
|
26
|
+
history: History;
|
|
27
|
+
|
|
28
|
+
spaces: Spaces;
|
|
29
|
+
|
|
30
|
+
certificates: Certificates;
|
|
31
|
+
|
|
32
|
+
trash: Trash;
|
|
33
|
+
|
|
34
|
+
revisions: Revisions;
|
|
35
|
+
|
|
36
|
+
media: Media;
|
|
37
|
+
|
|
38
|
+
files: Files;
|
|
39
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { HttpCertificate } from "../../../models/ClientCertificate.js";
|
|
2
|
+
import { ContextChangeRecord, ContextDeleteRecord, ContextListResult, ContextSpaceListOptions, IBulkOperationResult } from "../../../events/BaseEvents.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A store for the client certificates.
|
|
6
|
+
* This just keeps record of removed files. File location does not change.
|
|
7
|
+
*/
|
|
8
|
+
export interface Certificates {
|
|
9
|
+
/**
|
|
10
|
+
* Inserts a certificate to the store
|
|
11
|
+
*
|
|
12
|
+
* @param value The value to insert.
|
|
13
|
+
* @param space The parent space of the certificate.
|
|
14
|
+
*/
|
|
15
|
+
add(value: HttpCertificate, space: string): Promise<ContextChangeRecord<HttpCertificate>>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Adds certificates in a bulk operation.
|
|
19
|
+
* @param value The lits of certificates to add.
|
|
20
|
+
* @param space The parent workspace
|
|
21
|
+
* @returns The list of inserted certificates. `undefined` when there was an error inserting a certificate.
|
|
22
|
+
*/
|
|
23
|
+
addBulk(values: HttpCertificate[], space: string): Promise<IBulkOperationResult<ContextChangeRecord<HttpCertificate>>>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param key The key of the certificate to read.
|
|
27
|
+
*/
|
|
28
|
+
read(key: string): Promise<HttpCertificate>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Lists certificate entires.
|
|
32
|
+
*
|
|
33
|
+
* @param space The parent space of the certificate.
|
|
34
|
+
* @param options The list query options.
|
|
35
|
+
*/
|
|
36
|
+
list(options?: ContextSpaceListOptions): Promise<ContextListResult<HttpCertificate>>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Marks the certificate as deleted.
|
|
40
|
+
*
|
|
41
|
+
* @param key The key of the certificate to delete.
|
|
42
|
+
*/
|
|
43
|
+
delete(key: string): Promise<ContextDeleteRecord>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Removed certificates in a bulk operation.
|
|
47
|
+
* @param keys The list of certificate keys to delete.
|
|
48
|
+
*/
|
|
49
|
+
deleteBulk(keys: string[]): Promise<IBulkOperationResult<ContextDeleteRecord>>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Removes all certificates from the store for the given workspace.
|
|
53
|
+
* @param space The parent workspace key
|
|
54
|
+
*/
|
|
55
|
+
empty(space: string): Promise<void>;
|
|
56
|
+
}
|