nb-js-client 0.0.12 → 0.0.14
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/dist/api/auth-api.service.d.ts +12 -11
- package/dist/api/connections-api.service.d.ts +9 -1
- package/dist/api/divide-api.service.d.ts +3 -1
- package/dist/api/extensions-api.service.d.ts +11 -2
- package/dist/api/extensions-external-api.service.d.ts +7 -2
- package/dist/api/fca-api.service.d.ts +6 -2
- package/dist/api/gateway-api.service.d.ts +18 -2
- package/dist/api/group-api.service.d.ts +13 -4
- package/dist/api/index.d.ts +6 -2
- package/dist/api/links-api.service.d.ts +17 -0
- package/dist/api/logstash-api.service.d.ts +9 -2
- package/dist/api/notification-api.service.d.ts +24 -0
- package/dist/api/role-api.service.d.ts +14 -9
- package/dist/api/share-api.service.d.ts +2 -1
- package/dist/api/storage-element-api.service.d.ts +34 -10
- package/dist/api/storage-files-api.service.d.ts +9 -2
- package/dist/api/storage-instance-api.service.d.ts +7 -0
- package/dist/api/storage-trash-api.service.d.ts +2 -1
- package/dist/api/user-api.service.d.ts +18 -1
- package/dist/api/version-api.service.d.ts +19 -0
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.esm.js +1 -1
- package/dist/classes/client.d.ts +25 -33
- package/dist/classes/http-event.d.ts +24 -0
- package/dist/classes/http-response.d.ts +14 -0
- package/dist/classes/rest.d.ts +7 -7
- package/dist/index.d.ts +584 -396
- package/dist/tools/get-cookie-value.d.ts +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/normalize-headers.d.ts +1 -0
- package/dist/types/auth.d.ts +0 -2
- package/dist/types/base.d.ts +5 -1
- package/dist/types/connection.d.ts +2 -11
- package/dist/types/divide.d.ts +11 -1
- package/dist/types/extension.d.ts +1 -14
- package/dist/types/index.d.ts +3 -3
- package/dist/types/notification.d.ts +13 -8
- package/dist/types/request.d.ts +43 -0
- package/dist/types/setting.d.ts +1 -0
- package/dist/types/storage-trash.d.ts +11 -0
- package/dist/types/storage.d.ts +22 -39
- package/dist/types/user-log.d.ts +0 -8
- package/dist/types/user.d.ts +23 -17
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface AuthToken {
|
|
2
2
|
access_token: string;
|
|
3
3
|
refresh_token: string;
|
|
4
|
-
with_cookie?: boolean;
|
|
5
|
-
path?: string;
|
|
6
4
|
}
|
|
7
5
|
interface AuthType {
|
|
8
6
|
classic: boolean;
|
|
@@ -10,131 +8,6 @@ interface AuthType {
|
|
|
10
8
|
ldap: boolean;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
interface NbClientParams {
|
|
14
|
-
host?: string;
|
|
15
|
-
version?: number;
|
|
16
|
-
}
|
|
17
|
-
interface NbRequestParams {
|
|
18
|
-
path: string;
|
|
19
|
-
headers?: Record<string, any>;
|
|
20
|
-
query?: Record<string, any>;
|
|
21
|
-
body?: any;
|
|
22
|
-
cache?: RequestCache;
|
|
23
|
-
}
|
|
24
|
-
interface NbAppState {
|
|
25
|
-
clientParams: NbClientParams;
|
|
26
|
-
requestParams: NbRequestParams;
|
|
27
|
-
authToken: Map<number, AuthToken> | null;
|
|
28
|
-
skipInterceptors: boolean;
|
|
29
|
-
}
|
|
30
|
-
interface ResponseItem<T> {
|
|
31
|
-
row: T;
|
|
32
|
-
}
|
|
33
|
-
interface ResponseList<T> {
|
|
34
|
-
rows: T[];
|
|
35
|
-
total: number;
|
|
36
|
-
}
|
|
37
|
-
interface RequestBaseParams {
|
|
38
|
-
limit: number;
|
|
39
|
-
offset?: number;
|
|
40
|
-
order_by?: string;
|
|
41
|
-
order_direction?: OrderDirection;
|
|
42
|
-
}
|
|
43
|
-
declare enum OrderDirection {
|
|
44
|
-
DEFAULT = "",
|
|
45
|
-
ASC = "asc",
|
|
46
|
-
DESC = "desc"
|
|
47
|
-
}
|
|
48
|
-
type Lang = {
|
|
49
|
-
[key: string]: string;
|
|
50
|
-
};
|
|
51
|
-
declare enum EngineType {
|
|
52
|
-
WebSocket = "websocket",
|
|
53
|
-
PostMessage = "postmessage",
|
|
54
|
-
Empty = ""
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface User {
|
|
58
|
-
id: number;
|
|
59
|
-
create_date: string;
|
|
60
|
-
update_date: string;
|
|
61
|
-
last_login_date: string;
|
|
62
|
-
login: string;
|
|
63
|
-
password: string;
|
|
64
|
-
first_name: string;
|
|
65
|
-
middle_name: string;
|
|
66
|
-
last_name: string;
|
|
67
|
-
email: string;
|
|
68
|
-
auth_type: UserAuthType;
|
|
69
|
-
avatar_path: string;
|
|
70
|
-
home_path: string;
|
|
71
|
-
status: UserStatus;
|
|
72
|
-
type: UserType;
|
|
73
|
-
role_id: number | null;
|
|
74
|
-
}
|
|
75
|
-
type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name'>;
|
|
76
|
-
declare enum UserAuthType {
|
|
77
|
-
Native = "native",
|
|
78
|
-
Ldap = "ldap"
|
|
79
|
-
}
|
|
80
|
-
declare enum UserStatus {
|
|
81
|
-
Registering = "registering",
|
|
82
|
-
Activated = "activated",
|
|
83
|
-
Blocked = "blocked",
|
|
84
|
-
BlockedByLicense = "blocked_by_license"
|
|
85
|
-
}
|
|
86
|
-
declare enum UserType {
|
|
87
|
-
User = "user",
|
|
88
|
-
Guest = "guest",
|
|
89
|
-
Emperor = "emperor",
|
|
90
|
-
Anonymous = "anonymous"
|
|
91
|
-
}
|
|
92
|
-
interface UserSession {
|
|
93
|
-
create_date: string;
|
|
94
|
-
expire_in: string;
|
|
95
|
-
ip: string;
|
|
96
|
-
user_agent: string;
|
|
97
|
-
id: number;
|
|
98
|
-
is_current?: boolean;
|
|
99
|
-
}
|
|
100
|
-
interface UserToken {
|
|
101
|
-
id: number;
|
|
102
|
-
name: string;
|
|
103
|
-
expire_in: string;
|
|
104
|
-
create_date: string;
|
|
105
|
-
token?: string;
|
|
106
|
-
}
|
|
107
|
-
interface RequestUserListParams extends RequestBaseParams {
|
|
108
|
-
email?: string;
|
|
109
|
-
first_name?: string;
|
|
110
|
-
middle_name?: string;
|
|
111
|
-
last_name?: string;
|
|
112
|
-
login?: string;
|
|
113
|
-
is_admin?: boolean;
|
|
114
|
-
id?: number[];
|
|
115
|
-
role_ids?: number[];
|
|
116
|
-
statuses?: UserStatus[];
|
|
117
|
-
search_field?: string;
|
|
118
|
-
with_me?: boolean;
|
|
119
|
-
type: UserType;
|
|
120
|
-
exclude_type?: UserType;
|
|
121
|
-
}
|
|
122
|
-
type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
|
|
123
|
-
|
|
124
|
-
interface RequestStorageListParams extends RequestBaseParams {
|
|
125
|
-
search?: string;
|
|
126
|
-
is_favorite?: boolean;
|
|
127
|
-
is_divided?: boolean;
|
|
128
|
-
divide_id?: number | null;
|
|
129
|
-
path?: string;
|
|
130
|
-
min_size?: number | null;
|
|
131
|
-
max_size?: number | null;
|
|
132
|
-
type?: StorageElementType;
|
|
133
|
-
file_name_ext?: string[];
|
|
134
|
-
from_sharing_token?: string;
|
|
135
|
-
from_path?: string;
|
|
136
|
-
from_sharing_password?: string;
|
|
137
|
-
}
|
|
138
11
|
interface StorageElement {
|
|
139
12
|
name: string;
|
|
140
13
|
size: number;
|
|
@@ -148,17 +21,13 @@ interface StorageElement {
|
|
|
148
21
|
create_date: string;
|
|
149
22
|
with_preview: boolean;
|
|
150
23
|
is_favorite: boolean;
|
|
151
|
-
owner: User;
|
|
152
24
|
owner_id: number;
|
|
153
25
|
version?: StorageElementVersion;
|
|
154
26
|
divide_id?: number;
|
|
155
27
|
access_mode?: PermissionType;
|
|
156
|
-
|
|
28
|
+
to_user_group_id?: number;
|
|
157
29
|
created_by_extension?: string;
|
|
158
30
|
}
|
|
159
|
-
type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
|
|
160
|
-
is_work_dir?: boolean;
|
|
161
|
-
};
|
|
162
31
|
declare enum StorageElementType {
|
|
163
32
|
Dir = "dir",
|
|
164
33
|
File = "file",
|
|
@@ -199,11 +68,10 @@ interface StorageElementPaste {
|
|
|
199
68
|
from_path: string;
|
|
200
69
|
to_path: string;
|
|
201
70
|
}
|
|
202
|
-
interface
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
to_divide_id?: number | null;
|
|
71
|
+
interface StorageElementHistory {
|
|
72
|
+
user_id: number;
|
|
73
|
+
action: StorageElementHistoryAction;
|
|
74
|
+
create_date: string;
|
|
207
75
|
}
|
|
208
76
|
interface StorageElementVersion {
|
|
209
77
|
id: string;
|
|
@@ -215,33 +83,37 @@ interface StorageElementVersion {
|
|
|
215
83
|
update_date: string;
|
|
216
84
|
is_current_version: boolean;
|
|
217
85
|
}
|
|
218
|
-
interface StorageElementHistory {
|
|
219
|
-
user_id: number;
|
|
220
|
-
action: StorageElementHistoryAction;
|
|
221
|
-
create_date: string;
|
|
222
|
-
}
|
|
223
86
|
declare enum StorageElementHistoryAction {
|
|
224
87
|
Create = "create",
|
|
225
88
|
Update = "update",
|
|
226
89
|
Move = "move"
|
|
227
90
|
}
|
|
228
|
-
interface
|
|
91
|
+
interface HistoryNote {
|
|
229
92
|
name: string;
|
|
230
93
|
description: string;
|
|
231
94
|
divide_id: number | null;
|
|
232
95
|
file_version_id: string;
|
|
233
96
|
path: string;
|
|
234
97
|
}
|
|
235
|
-
interface
|
|
236
|
-
path: string;
|
|
237
|
-
divide_id?: number | null;
|
|
238
|
-
}
|
|
239
|
-
interface UploadNetRequestParams {
|
|
98
|
+
interface RequestVersionsSizeParams {
|
|
240
99
|
path: string;
|
|
241
|
-
url: string;
|
|
242
|
-
overwrite?: boolean;
|
|
243
100
|
divide_id?: number;
|
|
244
101
|
}
|
|
102
|
+
interface StorageInstance {
|
|
103
|
+
disk_id: string;
|
|
104
|
+
disk_size: number;
|
|
105
|
+
free_size: number;
|
|
106
|
+
instance_number: number;
|
|
107
|
+
quota_size_config: number;
|
|
108
|
+
quota_size_setting: number;
|
|
109
|
+
used_size: number;
|
|
110
|
+
}
|
|
111
|
+
interface SizeBySection {
|
|
112
|
+
content_type: string;
|
|
113
|
+
size: number;
|
|
114
|
+
count: number;
|
|
115
|
+
label: string;
|
|
116
|
+
}
|
|
245
117
|
|
|
246
118
|
declare enum DivideScope {
|
|
247
119
|
Storage = "/storage/element",
|
|
@@ -267,6 +139,7 @@ declare enum DivideMode {
|
|
|
267
139
|
Group = "to_user_group_id"
|
|
268
140
|
}
|
|
269
141
|
interface ShareInfo extends DivideParams {
|
|
142
|
+
id: number;
|
|
270
143
|
token: string;
|
|
271
144
|
access_mode: PermissionType;
|
|
272
145
|
expire_delta: number | null;
|
|
@@ -277,6 +150,10 @@ interface ShareInfo extends DivideParams {
|
|
|
277
150
|
update_date: string;
|
|
278
151
|
owner_id: number;
|
|
279
152
|
resource: string;
|
|
153
|
+
file_info: StorageElement;
|
|
154
|
+
short_url: string;
|
|
155
|
+
}
|
|
156
|
+
interface UnionRestriction extends UserDivide, ShareInfo {
|
|
280
157
|
}
|
|
281
158
|
interface UserDivide extends DivideParams {
|
|
282
159
|
access_mode: PermissionType;
|
|
@@ -289,6 +166,11 @@ interface UserDivide extends DivideParams {
|
|
|
289
166
|
to_user_id: number;
|
|
290
167
|
type: StorageElementType;
|
|
291
168
|
update_date: string;
|
|
169
|
+
file_info: StorageElement;
|
|
170
|
+
}
|
|
171
|
+
declare enum RestrictionModeKey {
|
|
172
|
+
Divide = "divide",
|
|
173
|
+
Share = "share"
|
|
292
174
|
}
|
|
293
175
|
interface DivideParams {
|
|
294
176
|
restriction_status: RestrictionStatus;
|
|
@@ -313,6 +195,183 @@ interface ShareModel {
|
|
|
313
195
|
expire_delta: number | null;
|
|
314
196
|
}
|
|
315
197
|
|
|
198
|
+
interface NbClientParams {
|
|
199
|
+
host?: string;
|
|
200
|
+
version?: string;
|
|
201
|
+
}
|
|
202
|
+
interface NbRequestParams {
|
|
203
|
+
path: string;
|
|
204
|
+
headers?: Record<string, any>;
|
|
205
|
+
query?: Record<string, any>;
|
|
206
|
+
body?: any;
|
|
207
|
+
cache?: RequestCache;
|
|
208
|
+
}
|
|
209
|
+
interface NbAppState {
|
|
210
|
+
clientParams: NbClientParams;
|
|
211
|
+
requestParams: NbRequestParams;
|
|
212
|
+
authToken: Map<number, AuthToken> | null;
|
|
213
|
+
skipInterceptors: boolean;
|
|
214
|
+
}
|
|
215
|
+
interface ResponseItem<T> {
|
|
216
|
+
row: T;
|
|
217
|
+
}
|
|
218
|
+
interface ResponseList<T> {
|
|
219
|
+
rows: T[];
|
|
220
|
+
total: number;
|
|
221
|
+
current?: {
|
|
222
|
+
access_mode: PermissionType;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
interface RequestBaseParams {
|
|
226
|
+
limit: number;
|
|
227
|
+
offset?: number;
|
|
228
|
+
order_by?: string;
|
|
229
|
+
order_direction?: OrderDirection;
|
|
230
|
+
}
|
|
231
|
+
declare enum OrderDirection {
|
|
232
|
+
DEFAULT = "",
|
|
233
|
+
ASC = "asc",
|
|
234
|
+
DESC = "desc"
|
|
235
|
+
}
|
|
236
|
+
type Lang = {
|
|
237
|
+
[key: string]: string;
|
|
238
|
+
};
|
|
239
|
+
declare enum EngineType {
|
|
240
|
+
WebSocket = "websocket",
|
|
241
|
+
PostMessage = "postmessage",
|
|
242
|
+
Empty = ""
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
type Interceptor<T = any> = {
|
|
246
|
+
fulfilled: (value: T) => T | Promise<T>;
|
|
247
|
+
rejected: (error: any) => any;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
declare enum AccessRights {
|
|
251
|
+
LicenseRead = "license_read",// Просмотр
|
|
252
|
+
LicenseManage = "license_edit",// Управление лицензией
|
|
253
|
+
UsersRead = "users_read",// Просмотр
|
|
254
|
+
UsersCreate = "users_create",// Создание/редактирование
|
|
255
|
+
UsersActivate = "users_activate",// Активация/деактивация
|
|
256
|
+
GroupsRead = "groups_read",// Просмотр
|
|
257
|
+
GroupsCreate = "groups_create",// Создание/редактирование
|
|
258
|
+
RolesRead = "roles_read",// Просмотр списка
|
|
259
|
+
RolesCreate = "roles_create",// Создание/редактирование
|
|
260
|
+
Share = "share",// Шаринг доступа по ссылке
|
|
261
|
+
Divide = "divide",// Предоставление доступа
|
|
262
|
+
ExtensionsRead = "extensions_read",// Просмотр
|
|
263
|
+
ExtensionsManage = "extensions_write",// Управление расширениями
|
|
264
|
+
RestrictionShareRead = "restriction_share_read",// Просмотр
|
|
265
|
+
RestrictionShareWrite = "restriction_share_write",// Управление шарингом
|
|
266
|
+
RestrictionDivideRead = "restriction_divide_read",// Просмотр
|
|
267
|
+
RestrictionDivideWrite = "restriction_divide_write",// Управление доступами
|
|
268
|
+
ReadUserLogs = "read_user_logs",// Просмотр пользовательских логов
|
|
269
|
+
ReadSystemLogs = "read_system_logs",// Просмотр системных логов
|
|
270
|
+
ConnectionsRead = "connections_read",// Просмотр
|
|
271
|
+
ConnectionsDividing = "connections_dividing",// Предоставление доступа(поделиться)
|
|
272
|
+
ConnectionsYandexDisk = "connections_yandex_disk",// Yandex диск
|
|
273
|
+
ConnectionsSsh = "connections_ssh",// Ssh
|
|
274
|
+
ConnectionsMail = "connections_mail",// Почта
|
|
275
|
+
ConnectionsS3 = "connections_s3",// S3
|
|
276
|
+
ConnectionsDiscord = "connections_discord",// Discord
|
|
277
|
+
ConnectionsWebdav = "connections_webdav",// Webdav
|
|
278
|
+
ConnectionsNextcloud = "connections_nextcloud",// Nextcloud
|
|
279
|
+
ConnectionsNextbox = "connections_nextbox",// Nextbox
|
|
280
|
+
ConnectionsHttpProxy = "connections_http_proxy",// Http proxy
|
|
281
|
+
SystemInfoServiceList = "system_info_service_list",// Просмотр
|
|
282
|
+
SettingsRead = "settings_read",// Просмотр
|
|
283
|
+
SettingsWrite = "settings_write"
|
|
284
|
+
}
|
|
285
|
+
declare const CONNECTIONS_PERMISSION: AccessRights[];
|
|
286
|
+
|
|
287
|
+
interface User {
|
|
288
|
+
id: number;
|
|
289
|
+
create_date: string;
|
|
290
|
+
update_date: string;
|
|
291
|
+
last_login_date: string;
|
|
292
|
+
login: string;
|
|
293
|
+
password: string;
|
|
294
|
+
first_name: string;
|
|
295
|
+
middle_name: string;
|
|
296
|
+
last_name: string;
|
|
297
|
+
email: string;
|
|
298
|
+
auth_type: UserAuthType;
|
|
299
|
+
avatar_path: string;
|
|
300
|
+
home_path: string;
|
|
301
|
+
status: UserStatus;
|
|
302
|
+
type: UserType;
|
|
303
|
+
role_id: number | null;
|
|
304
|
+
}
|
|
305
|
+
type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name' | 'avatar_path'>;
|
|
306
|
+
declare enum UserAuthType {
|
|
307
|
+
Native = "native",
|
|
308
|
+
Ldap = "ldap"
|
|
309
|
+
}
|
|
310
|
+
declare enum UserStatus {
|
|
311
|
+
Registering = "registering",
|
|
312
|
+
Activated = "activated",
|
|
313
|
+
Blocked = "blocked",
|
|
314
|
+
BlockedByLicense = "blocked_by_license"
|
|
315
|
+
}
|
|
316
|
+
declare enum UserType {
|
|
317
|
+
User = "user",
|
|
318
|
+
Guest = "guest",
|
|
319
|
+
Emperor = "emperor",
|
|
320
|
+
Anonymous = "anonymous"
|
|
321
|
+
}
|
|
322
|
+
interface UserSession {
|
|
323
|
+
create_date: string;
|
|
324
|
+
expire_in: string;
|
|
325
|
+
ip: string;
|
|
326
|
+
user_agent: string;
|
|
327
|
+
id: number;
|
|
328
|
+
is_current?: boolean;
|
|
329
|
+
}
|
|
330
|
+
interface UserToken {
|
|
331
|
+
id: number;
|
|
332
|
+
name: string;
|
|
333
|
+
expire_in: string;
|
|
334
|
+
create_date: string;
|
|
335
|
+
token?: string;
|
|
336
|
+
}
|
|
337
|
+
interface UserGroup {
|
|
338
|
+
id: number;
|
|
339
|
+
name: string;
|
|
340
|
+
description: string;
|
|
341
|
+
amount_users: number;
|
|
342
|
+
create_date: string;
|
|
343
|
+
owner_id: number;
|
|
344
|
+
owner: UserLabel;
|
|
345
|
+
update_date: string;
|
|
346
|
+
icon: string;
|
|
347
|
+
icon_color: string;
|
|
348
|
+
}
|
|
349
|
+
interface UserRole {
|
|
350
|
+
id: number;
|
|
351
|
+
name: string;
|
|
352
|
+
description: string;
|
|
353
|
+
create_date: string;
|
|
354
|
+
update_date: string;
|
|
355
|
+
is_default: boolean;
|
|
356
|
+
owner_id: number;
|
|
357
|
+
grant_access_all: boolean;
|
|
358
|
+
permissions_id?: number[];
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
interface AccessToken {
|
|
362
|
+
exp: number;
|
|
363
|
+
iat: number;
|
|
364
|
+
login: string;
|
|
365
|
+
user_id: number;
|
|
366
|
+
is_remember: boolean;
|
|
367
|
+
with_cookie: boolean;
|
|
368
|
+
grant_access_all: boolean;
|
|
369
|
+
user_type: UserType;
|
|
370
|
+
permissions: {
|
|
371
|
+
[key: string]: AccessRights[];
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
316
375
|
interface Connection {
|
|
317
376
|
id: number;
|
|
318
377
|
name: string;
|
|
@@ -323,13 +382,13 @@ interface Connection {
|
|
|
323
382
|
port: number;
|
|
324
383
|
root_path: string;
|
|
325
384
|
group_name: ConnectionGroup;
|
|
385
|
+
owner_id: number;
|
|
326
386
|
divide_id?: number;
|
|
327
387
|
access_mode?: PermissionType;
|
|
328
|
-
owner?: Pick<User, 'first_name' | 'last_name' | 'login' | 'middle_name'>;
|
|
329
388
|
update_date: string;
|
|
330
389
|
create_date: string;
|
|
331
390
|
expire_in: string;
|
|
332
|
-
|
|
391
|
+
to_user_group_id?: number;
|
|
333
392
|
}
|
|
334
393
|
declare enum ConnectionGroup {
|
|
335
394
|
Storages = "storages_connections_group",
|
|
@@ -348,13 +407,6 @@ declare enum ConnectionType {
|
|
|
348
407
|
HttpProxy = "http_proxy_connection",
|
|
349
408
|
S3 = "s3_connection"
|
|
350
409
|
}
|
|
351
|
-
interface RequestConnectionParams extends RequestBaseParams {
|
|
352
|
-
name?: string | null;
|
|
353
|
-
group_name?: ConnectionGroup;
|
|
354
|
-
is_divided?: boolean;
|
|
355
|
-
type?: string;
|
|
356
|
-
}
|
|
357
|
-
type ConnectionCreateParams = Omit<Connection, 'group_name'>;
|
|
358
410
|
|
|
359
411
|
interface Discovery {
|
|
360
412
|
id: number;
|
|
@@ -403,6 +455,7 @@ interface SettingField {
|
|
|
403
455
|
help?: SettingLang;
|
|
404
456
|
placeholder?: SettingLang;
|
|
405
457
|
view?: SettingFieldView;
|
|
458
|
+
disabled?: boolean;
|
|
406
459
|
control: {
|
|
407
460
|
type: SettingControlType;
|
|
408
461
|
filter?: Record<string, any>;
|
|
@@ -486,18 +539,6 @@ interface Extension {
|
|
|
486
539
|
interface ExtensionMetaPayload {
|
|
487
540
|
uniq_key: string;
|
|
488
541
|
}
|
|
489
|
-
interface ExtensionListParams extends RequestBaseParams {
|
|
490
|
-
search?: string | null;
|
|
491
|
-
uniq_key?: string[];
|
|
492
|
-
file_name_ext?: string;
|
|
493
|
-
type?: StorageElementType[];
|
|
494
|
-
ext_value?: string | null;
|
|
495
|
-
file_mode?: ExtensionFileMode[];
|
|
496
|
-
lang?: string;
|
|
497
|
-
}
|
|
498
|
-
interface ExtensionExternalListParams extends RequestBaseParams {
|
|
499
|
-
search_field?: string;
|
|
500
|
-
}
|
|
501
542
|
interface ExtensionExternalInList {
|
|
502
543
|
id: number;
|
|
503
544
|
create_date: string;
|
|
@@ -519,28 +560,6 @@ interface VersionExtension {
|
|
|
519
560
|
size: number;
|
|
520
561
|
}
|
|
521
562
|
|
|
522
|
-
interface Group {
|
|
523
|
-
id: number;
|
|
524
|
-
name: string;
|
|
525
|
-
description: string;
|
|
526
|
-
amount_users: number;
|
|
527
|
-
create_date: string;
|
|
528
|
-
owner_id: number;
|
|
529
|
-
owner: UserLabel;
|
|
530
|
-
update_date: string;
|
|
531
|
-
icon: string;
|
|
532
|
-
icon_color: string;
|
|
533
|
-
}
|
|
534
|
-
interface RequestGroupListParams extends RequestBaseParams {
|
|
535
|
-
id?: number[];
|
|
536
|
-
name?: string;
|
|
537
|
-
description?: string;
|
|
538
|
-
search_field?: string;
|
|
539
|
-
}
|
|
540
|
-
type CreateGroupParams = Pick<Group, 'name' | 'description'> & {
|
|
541
|
-
users?: number[];
|
|
542
|
-
};
|
|
543
|
-
|
|
544
563
|
interface License {
|
|
545
564
|
custom_max_users_count: number | null;
|
|
546
565
|
expire_in: string;
|
|
@@ -585,13 +604,6 @@ interface UserNotification {
|
|
|
585
604
|
from_user_id?: number;
|
|
586
605
|
owner?: UserLabel;
|
|
587
606
|
}
|
|
588
|
-
type RequestNotificationListParams = RequestBaseParams & {
|
|
589
|
-
read?: boolean;
|
|
590
|
-
search?: string;
|
|
591
|
-
};
|
|
592
|
-
type ResponseListNotification = ResponseList<UserNotification> & {
|
|
593
|
-
total_all: number;
|
|
594
|
-
};
|
|
595
607
|
declare enum NotificationEntityType {
|
|
596
608
|
Dir = "dir",
|
|
597
609
|
File = "file",
|
|
@@ -617,6 +629,19 @@ declare enum NotificationAction {
|
|
|
617
629
|
CancelDivideConnection = "cancel_divide_connection",
|
|
618
630
|
DeleteExtension = "delete_extension",
|
|
619
631
|
NewVersionExtension = "new_version_extension",
|
|
632
|
+
TransferData = "transfer_data",
|
|
633
|
+
AllowInternalAccessUser = "allow_internal_access_to_user",
|
|
634
|
+
BlockInternalAccessUser = "block_internal_access_to_user",
|
|
635
|
+
WaitInternalAccessUser = "wait_internal_access_to_user",
|
|
636
|
+
WaitInternalAccessUserCreate = "wait_internal_access_to_user_create",
|
|
637
|
+
AllowInternalAccessGroup = "allow_internal_access_to_group",
|
|
638
|
+
BlockInternalAccessGroup = "block_internal_access_to_group",
|
|
639
|
+
WaitInternalAccessGroup = "wait_internal_access_to_group",
|
|
640
|
+
WaitInternalAccessGroupCreate = "wait_internal_access_to_group_create",
|
|
641
|
+
AllowSharing = "allow_sharing",
|
|
642
|
+
BlockSharing = "block_sharing",
|
|
643
|
+
WaitSharing = "wait_sharing",
|
|
644
|
+
WaitSharingCreate = "wait_sharing_create",
|
|
620
645
|
Other = "other"
|
|
621
646
|
}
|
|
622
647
|
declare enum NotificationRowAction {
|
|
@@ -661,6 +686,50 @@ interface PermissionItem {
|
|
|
661
686
|
title: Lang;
|
|
662
687
|
}
|
|
663
688
|
|
|
689
|
+
declare enum ResponseType {
|
|
690
|
+
ArrayBuffer = "arraybuffer",
|
|
691
|
+
Blob = "blob",
|
|
692
|
+
Json = "json",
|
|
693
|
+
Text = "text"
|
|
694
|
+
}
|
|
695
|
+
declare enum RequestMethod {
|
|
696
|
+
GET = "GET",
|
|
697
|
+
POST = "POST",
|
|
698
|
+
PUT = "PUT",
|
|
699
|
+
PATCH = "PATCH",
|
|
700
|
+
DELETE = "DELETE"
|
|
701
|
+
}
|
|
702
|
+
declare enum RequestObserve {
|
|
703
|
+
Body = "body",
|
|
704
|
+
Response = "response"
|
|
705
|
+
}
|
|
706
|
+
interface HttpResponse<T> {
|
|
707
|
+
status: number;
|
|
708
|
+
statusText: string;
|
|
709
|
+
headers: Headers;
|
|
710
|
+
body: T;
|
|
711
|
+
}
|
|
712
|
+
interface HttpEvent<T> {
|
|
713
|
+
loaded?: number;
|
|
714
|
+
total?: number;
|
|
715
|
+
body?: HttpResponse<T>;
|
|
716
|
+
error?: any;
|
|
717
|
+
}
|
|
718
|
+
interface RequestConfig {
|
|
719
|
+
params?: Record<string, string>;
|
|
720
|
+
body?: any;
|
|
721
|
+
cache?: RequestCache;
|
|
722
|
+
headers?: HeadersInit;
|
|
723
|
+
observe?: RequestObserve;
|
|
724
|
+
responseType?: ResponseType;
|
|
725
|
+
onUploadProgress?: OnUploadProgress;
|
|
726
|
+
}
|
|
727
|
+
interface ProgressEvent {
|
|
728
|
+
loaded: number;
|
|
729
|
+
total: number;
|
|
730
|
+
}
|
|
731
|
+
type OnUploadProgress = (progressEvent: ProgressEvent) => void;
|
|
732
|
+
|
|
664
733
|
declare enum RestrictionSharing {
|
|
665
734
|
NONE = "none",
|
|
666
735
|
SOFT = "soft",
|
|
@@ -671,40 +740,6 @@ interface Restriction {
|
|
|
671
740
|
divide: RestrictionSharing;
|
|
672
741
|
}
|
|
673
742
|
|
|
674
|
-
interface QueryInit {
|
|
675
|
-
license?: License;
|
|
676
|
-
unread_notifications?: ResponseList<UserNotification> & {
|
|
677
|
-
total_all: number;
|
|
678
|
-
};
|
|
679
|
-
extensions_apps?: ResponseList<Extension>;
|
|
680
|
-
extensions_defaults: ResponseList<ExtensionDefault>;
|
|
681
|
-
me?: User;
|
|
682
|
-
cache_users: User[];
|
|
683
|
-
lock_screen: LockScreen;
|
|
684
|
-
restrictions?: Restriction;
|
|
685
|
-
open_in_desktop_settings: {
|
|
686
|
-
open_in_desktop_enabled: boolean;
|
|
687
|
-
};
|
|
688
|
-
inject_scripts?: string[];
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
interface Role {
|
|
692
|
-
id: number;
|
|
693
|
-
name: string;
|
|
694
|
-
description: string;
|
|
695
|
-
create_date: string;
|
|
696
|
-
update_date: string;
|
|
697
|
-
is_default: boolean;
|
|
698
|
-
owner_id: number;
|
|
699
|
-
grant_access_all: boolean;
|
|
700
|
-
permissions_id?: number[];
|
|
701
|
-
}
|
|
702
|
-
interface RequestRoleListParams extends RequestBaseParams {
|
|
703
|
-
id?: number[];
|
|
704
|
-
search_field?: string;
|
|
705
|
-
}
|
|
706
|
-
type CreateRoleParams = Pick<Role, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
|
|
707
|
-
|
|
708
743
|
interface UsersLog {
|
|
709
744
|
create_date: string;
|
|
710
745
|
service_name: string;
|
|
@@ -714,13 +749,6 @@ interface UsersLog {
|
|
|
714
749
|
resource: string;
|
|
715
750
|
description: string;
|
|
716
751
|
}
|
|
717
|
-
interface RequestUsersLogParams extends RequestBaseParams {
|
|
718
|
-
user_id?: string;
|
|
719
|
-
search_field?: string;
|
|
720
|
-
from_date?: string;
|
|
721
|
-
to_date?: string;
|
|
722
|
-
with_me?: boolean;
|
|
723
|
-
}
|
|
724
752
|
|
|
725
753
|
interface StorageTrashElement {
|
|
726
754
|
content_type: StorageElementContentType;
|
|
@@ -732,42 +760,19 @@ interface StorageTrashElement {
|
|
|
732
760
|
size: number;
|
|
733
761
|
type: StorageElementType;
|
|
734
762
|
update_date: string;
|
|
763
|
+
version: VersionStorageTrashElement;
|
|
735
764
|
with_preview: boolean;
|
|
736
765
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
getPermission(): Promise<{
|
|
748
|
-
enabled: boolean;
|
|
749
|
-
}>;
|
|
750
|
-
setPermission(permission: boolean): Promise<void>;
|
|
751
|
-
getSubscription(): Promise<NotificationActionGroup>;
|
|
752
|
-
setSubscription(data: NotificationActionGroup): Promise<void>;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
declare class StorageFilesApiService {
|
|
756
|
-
private client;
|
|
757
|
-
constructor(client: Client);
|
|
758
|
-
read(path: string, params: any): Promise<ResponseItem<any>>;
|
|
759
|
-
replace(params: {
|
|
760
|
-
path: string;
|
|
761
|
-
divide_id?: number;
|
|
762
|
-
}, data: any): Promise<ResponseItem<StorageElement>>;
|
|
763
|
-
upload(file: File, path: string, divide_id?: number): Promise<ResponseItem<StorageElement>>;
|
|
764
|
-
uploadNet(data: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
type Interceptor<T = any> = {
|
|
768
|
-
fulfilled: (value: T) => T | Promise<T>;
|
|
769
|
-
rejected: (error: any) => any;
|
|
770
|
-
};
|
|
766
|
+
interface VersionStorageTrashElement {
|
|
767
|
+
create_date: string;
|
|
768
|
+
description: string;
|
|
769
|
+
id: string;
|
|
770
|
+
name: string | null;
|
|
771
|
+
size: number;
|
|
772
|
+
update_date: string;
|
|
773
|
+
user_id: number;
|
|
774
|
+
}
|
|
775
|
+
type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
|
|
771
776
|
|
|
772
777
|
declare class TokenUpdate {
|
|
773
778
|
private authApiService;
|
|
@@ -782,44 +787,39 @@ declare class TokenUpdate {
|
|
|
782
787
|
|
|
783
788
|
declare class Client {
|
|
784
789
|
state: NbAppState;
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
790
|
+
AuthApiService: AuthApiService;
|
|
791
|
+
ConnectionsApiService: ConnectionsApiService;
|
|
792
|
+
DiscoveryApiService: DiscoveryApiService;
|
|
793
|
+
DivideApiService: DivideApiService;
|
|
794
|
+
ExtensionsApiService: ExtensionsApiService;
|
|
795
|
+
ExtensionsExternalApiService: ExtensionsExternalApiService;
|
|
796
|
+
FcaApiService: FcaApiService;
|
|
797
|
+
GatewayApiService: GatewayApiService;
|
|
798
|
+
GroupApiService: GroupApiService;
|
|
799
|
+
LicenseApiService: LicenseApiService;
|
|
800
|
+
LinksApiService: LinksApiService;
|
|
801
|
+
LogstashApiService: LogstashApiService;
|
|
802
|
+
NotificationApiService: NotificationApiService;
|
|
803
|
+
RoleApiService: RoleApiService;
|
|
804
|
+
ShareApiService: ShareApiService;
|
|
805
|
+
StorageElementApiService: StorageElementApiService;
|
|
806
|
+
StorageFilesApiService: StorageFilesApiService;
|
|
807
|
+
StorageInstanceApiService: StorageInstanceApiService;
|
|
808
|
+
StorageShareApiService: StorageShareApiService;
|
|
809
|
+
StorageTrashApiService: StorageTrashApiService;
|
|
810
|
+
UserApiService: UserApiService;
|
|
811
|
+
VersionApiService: VersionApiService;
|
|
804
812
|
tokenUpdate: TokenUpdate;
|
|
805
813
|
rest: Rest;
|
|
806
814
|
requestInterceptors: Interceptor<RequestInit>[];
|
|
807
|
-
responseInterceptors: Interceptor<
|
|
815
|
+
responseInterceptors: Interceptor<any>[];
|
|
808
816
|
constructor(clientParams: NbClientParams);
|
|
809
817
|
request: {
|
|
810
818
|
use: (fulfilled: (config: RequestInit) => RequestInit | Promise<RequestInit>, rejected: (error: any) => any) => void;
|
|
811
819
|
};
|
|
812
820
|
response: {
|
|
813
|
-
use: (fulfilled: (response:
|
|
821
|
+
use: (fulfilled: (response: any) => any | Promise<any>, rejected: (error: any) => any) => void;
|
|
814
822
|
};
|
|
815
|
-
resetParams(params: {
|
|
816
|
-
host?: string;
|
|
817
|
-
version?: number;
|
|
818
|
-
headers?: Record<string, any>;
|
|
819
|
-
cache?: RequestCache;
|
|
820
|
-
authTokens?: Map<number, AuthToken> | null;
|
|
821
|
-
skipInterceptors?: boolean;
|
|
822
|
-
}): Promise<void>;
|
|
823
823
|
}
|
|
824
824
|
|
|
825
825
|
declare class Rest {
|
|
@@ -827,31 +827,32 @@ declare class Rest {
|
|
|
827
827
|
private tokenUpdate;
|
|
828
828
|
constructor(client: Client, tokenUpdate: TokenUpdate);
|
|
829
829
|
get state(): NbAppState;
|
|
830
|
-
get(path: string,
|
|
831
|
-
post(path: string, body?: BodyInit | null): Promise<any>;
|
|
832
|
-
put(path: string, body?: BodyInit | null): Promise<any>;
|
|
833
|
-
patch(path: string, body?: BodyInit | null): Promise<any>;
|
|
834
|
-
delete(path: string,
|
|
835
|
-
|
|
830
|
+
get(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
|
|
831
|
+
post(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
|
|
832
|
+
put(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
|
|
833
|
+
patch(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
|
|
834
|
+
delete(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
|
|
835
|
+
request<T>(method: RequestMethod, path: string, config?: RequestConfig): Promise<T | HttpResponse<T> | HttpEvent<T>>;
|
|
836
836
|
}
|
|
837
837
|
|
|
838
838
|
declare class AuthApiService {
|
|
839
839
|
private client;
|
|
840
840
|
constructor(client: Client);
|
|
841
841
|
info(): Promise<AuthType>;
|
|
842
|
-
login(data:
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
is_remember: boolean;
|
|
846
|
-
}): Promise<AuthToken>;
|
|
847
|
-
ldapLogin(data: {
|
|
848
|
-
login: string;
|
|
849
|
-
password: string;
|
|
850
|
-
is_remember: boolean;
|
|
851
|
-
}): Promise<AuthToken>;
|
|
852
|
-
updateToken(data: AuthToken): Promise<any>;
|
|
842
|
+
login(data: RequestAuthSettingsParams): Promise<AuthToken>;
|
|
843
|
+
ldapLogin(data: RequestAuthSettingsParams): Promise<AuthToken>;
|
|
844
|
+
updateToken(data: RequestAuthTokenParams): Promise<AuthToken>;
|
|
853
845
|
logout(): Promise<void>;
|
|
854
846
|
}
|
|
847
|
+
interface RequestAuthSettingsParams {
|
|
848
|
+
login: string;
|
|
849
|
+
password: string;
|
|
850
|
+
is_remember: boolean;
|
|
851
|
+
}
|
|
852
|
+
interface RequestAuthTokenParams extends AuthToken {
|
|
853
|
+
with_cookie?: boolean;
|
|
854
|
+
path?: string;
|
|
855
|
+
}
|
|
855
856
|
|
|
856
857
|
declare class ConnectionsApiService {
|
|
857
858
|
private client;
|
|
@@ -863,6 +864,14 @@ declare class ConnectionsApiService {
|
|
|
863
864
|
create(data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
|
|
864
865
|
dashboard(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
|
|
865
866
|
}
|
|
867
|
+
interface RequestConnectionParams extends RequestBaseParams {
|
|
868
|
+
id?: number[];
|
|
869
|
+
name?: string | null;
|
|
870
|
+
group_name?: ConnectionGroup;
|
|
871
|
+
is_divided?: boolean;
|
|
872
|
+
type?: string;
|
|
873
|
+
}
|
|
874
|
+
type ConnectionCreateParams = Omit<Connection, 'group_name'>;
|
|
866
875
|
|
|
867
876
|
declare class DiscoveryApiService {
|
|
868
877
|
private client;
|
|
@@ -878,6 +887,8 @@ declare class DivideApiService {
|
|
|
878
887
|
divideChange(service: DivideScope, id: number, access_mode: PermissionType): Promise<UserDivide>;
|
|
879
888
|
divideCreate(service: DivideScope, resource: DivideResourceType, id: number, access_mode: PermissionType, key: DivideMode): Promise<ResponseItem<UserDivide>>;
|
|
880
889
|
divideUsers(service: DivideScope, resource: DivideResourceType, params: RequestUserDivideParams): Promise<DivideResponseList>;
|
|
890
|
+
getRestriction(id: number): Promise<UnionRestriction>;
|
|
891
|
+
restrictionSize(key: string | number, modeKey: RestrictionModeKey): Promise<number>;
|
|
881
892
|
restrictions(params?: any): Promise<ResponseList<UserDivide>>;
|
|
882
893
|
restrictionsChange(token: number, data: {
|
|
883
894
|
status: any;
|
|
@@ -902,16 +913,102 @@ declare class ExtensionsApiService {
|
|
|
902
913
|
with_settings: boolean;
|
|
903
914
|
}>>;
|
|
904
915
|
delete(id: number, name: string): Promise<void>;
|
|
905
|
-
upload(file: File): Promise<ResponseItem<Extension
|
|
916
|
+
upload(onProgress: OnUploadProgress, file: File): Promise<HttpEvent<ResponseItem<Extension>>>;
|
|
906
917
|
install(uniq_key: string, version: string): Promise<any>;
|
|
907
918
|
}
|
|
919
|
+
interface ExtensionListParams extends RequestBaseParams {
|
|
920
|
+
search?: string | null;
|
|
921
|
+
uniq_key?: string[];
|
|
922
|
+
file_name_ext?: string;
|
|
923
|
+
type?: StorageElementType[];
|
|
924
|
+
ext_value?: string | null;
|
|
925
|
+
file_mode?: ExtensionFileMode[];
|
|
926
|
+
lang?: string;
|
|
927
|
+
}
|
|
908
928
|
|
|
909
929
|
declare class ExtensionsExternalApiService {
|
|
910
930
|
private client;
|
|
911
931
|
constructor(client: Client);
|
|
912
932
|
listExtensionsSite(params: ExtensionExternalListParams): Promise<ResponseList<ExtensionExternalInList>>;
|
|
913
933
|
extensionDetailSite(uniqKey: string): Promise<ExtensionExternal>;
|
|
914
|
-
extensionMarkdown(uniqKey: string
|
|
934
|
+
extensionMarkdown(uniqKey: string, config: {
|
|
935
|
+
responseType: ResponseType;
|
|
936
|
+
}): Promise<string>;
|
|
937
|
+
}
|
|
938
|
+
interface ExtensionExternalListParams extends RequestBaseParams {
|
|
939
|
+
search_field?: string;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
declare class StorageElementApiService {
|
|
943
|
+
private client;
|
|
944
|
+
private fcaApiService;
|
|
945
|
+
constructor(client: Client, fcaApiService: FcaApiService);
|
|
946
|
+
list(params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
|
|
947
|
+
info(params: {
|
|
948
|
+
path: string;
|
|
949
|
+
divide_id?: number;
|
|
950
|
+
file_version_id?: string;
|
|
951
|
+
}): Promise<StorageElement>;
|
|
952
|
+
combineInfo({ root, rootId, path, file_version_id, }: StorageRouteData): Promise<StorageElement>;
|
|
953
|
+
size(data: {
|
|
954
|
+
paths: string[];
|
|
955
|
+
divide_id?: number;
|
|
956
|
+
}): Promise<number>;
|
|
957
|
+
move(params: StorageElementPasteParams, to: StorageRoot, from: StorageRoot): Promise<void>;
|
|
958
|
+
copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
|
|
959
|
+
pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
|
|
960
|
+
create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
961
|
+
delete(path: string, divide_id?: number): Promise<void>;
|
|
962
|
+
favorite(path: string): Promise<void>;
|
|
963
|
+
removeFavorite(path: string): Promise<void>;
|
|
964
|
+
createItem(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
965
|
+
createWorkDir(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
966
|
+
sizeWithSection(params?: {
|
|
967
|
+
owner_id: number;
|
|
968
|
+
with_trash: boolean;
|
|
969
|
+
}): Promise<SizeBySection[] | null>;
|
|
970
|
+
}
|
|
971
|
+
interface RequestStorageListParams extends RequestBaseParams {
|
|
972
|
+
search?: string;
|
|
973
|
+
is_favorite?: boolean;
|
|
974
|
+
is_divided?: boolean;
|
|
975
|
+
divide_id?: number | null;
|
|
976
|
+
path?: string;
|
|
977
|
+
min_size?: number | null;
|
|
978
|
+
max_size?: number | null;
|
|
979
|
+
type?: StorageElementType;
|
|
980
|
+
file_name_ext?: string[];
|
|
981
|
+
from_sharing_token?: string;
|
|
982
|
+
from_path?: string;
|
|
983
|
+
from_sharing_password?: string;
|
|
984
|
+
}
|
|
985
|
+
interface StorageElementPasteParams {
|
|
986
|
+
paths: StorageElementPaste[];
|
|
987
|
+
overwrite: boolean;
|
|
988
|
+
from_divide_id?: number | null;
|
|
989
|
+
to_divide_id?: number | null;
|
|
990
|
+
}
|
|
991
|
+
type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
|
|
992
|
+
is_work_dir?: boolean;
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
declare class StorageFilesApiService {
|
|
996
|
+
private client;
|
|
997
|
+
constructor(client: Client);
|
|
998
|
+
read(path: string, params: any): Promise<ResponseItem<any>>;
|
|
999
|
+
replace(params: {
|
|
1000
|
+
path: string;
|
|
1001
|
+
divide_id?: number;
|
|
1002
|
+
}, data: any): Promise<ResponseItem<StorageElement>>;
|
|
1003
|
+
upload(onProgress: OnUploadProgress, file: File, path: string, divide_id?: number): Promise<HttpEvent<ResponseItem<StorageElement>>>;
|
|
1004
|
+
uploadNet(data: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
|
|
1005
|
+
}
|
|
1006
|
+
interface UploadNetRequestParams {
|
|
1007
|
+
path: string;
|
|
1008
|
+
url: string;
|
|
1009
|
+
overwrite?: boolean;
|
|
1010
|
+
divide_id?: number;
|
|
1011
|
+
connection_divide_id?: number;
|
|
915
1012
|
}
|
|
916
1013
|
|
|
917
1014
|
declare class FcaApiService {
|
|
@@ -922,7 +1019,8 @@ declare class FcaApiService {
|
|
|
922
1019
|
create(rootID: number, data: CreateStorageElementParams): Promise<any>;
|
|
923
1020
|
replace(rootID: number, path: string, data: any): Promise<ResponseItem<StorageElement>>;
|
|
924
1021
|
read(id: number, path: string): Promise<ResponseItem<any>>;
|
|
925
|
-
upload(rootID: number, file: File, path?: string): Promise<ResponseItem<StorageElement
|
|
1022
|
+
upload(onProgress: OnUploadProgress, rootID: number, file: File, path?: string): Promise<HttpEvent<ResponseItem<StorageElement>>>;
|
|
1023
|
+
uploadNet(rootID: number, params: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
|
|
926
1024
|
delete(rootID: number, path: string): Promise<void>;
|
|
927
1025
|
check(data: ConnectionCreateParams): Promise<void>;
|
|
928
1026
|
}
|
|
@@ -932,18 +1030,43 @@ declare class GatewayApiService {
|
|
|
932
1030
|
constructor(client: Client);
|
|
933
1031
|
settings(): Promise<Setting[]>;
|
|
934
1032
|
changeSettings(data: SettingValue[]): Promise<void>;
|
|
935
|
-
queryInit(): Promise<
|
|
1033
|
+
queryInit(): Promise<QueryInitResponse>;
|
|
1034
|
+
}
|
|
1035
|
+
interface QueryInitResponse {
|
|
1036
|
+
license?: License;
|
|
1037
|
+
unread_notifications?: ResponseList<UserNotification> & {
|
|
1038
|
+
total_all: number;
|
|
1039
|
+
};
|
|
1040
|
+
extensions_apps?: ResponseList<Extension>;
|
|
1041
|
+
extensions_defaults: ResponseList<ExtensionDefault>;
|
|
1042
|
+
me?: User;
|
|
1043
|
+
cache_users: User[];
|
|
1044
|
+
lock_screen: LockScreen;
|
|
1045
|
+
restrictions?: Restriction;
|
|
1046
|
+
open_in_desktop_settings: {
|
|
1047
|
+
open_in_desktop_enabled: boolean;
|
|
1048
|
+
};
|
|
1049
|
+
inject_scripts?: string[];
|
|
936
1050
|
}
|
|
937
1051
|
|
|
938
1052
|
declare class GroupApiService {
|
|
939
1053
|
private client;
|
|
940
1054
|
constructor(client: Client);
|
|
941
|
-
list(params:
|
|
1055
|
+
list(params: RequestUserGroupListParams): Promise<ResponseList<UserGroup>>;
|
|
942
1056
|
listUsers(id: number): Promise<ResponseList<User>>;
|
|
943
|
-
create(data:
|
|
944
|
-
update(id: number, data:
|
|
1057
|
+
create(data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
|
|
1058
|
+
update(id: number, data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
|
|
945
1059
|
delete(id: number): Promise<void>;
|
|
946
1060
|
}
|
|
1061
|
+
interface RequestUserGroupListParams extends RequestBaseParams {
|
|
1062
|
+
id?: number[];
|
|
1063
|
+
name?: string;
|
|
1064
|
+
description?: string;
|
|
1065
|
+
search_field?: string;
|
|
1066
|
+
}
|
|
1067
|
+
type CreateUserGroupParams = Pick<UserGroup, 'name' | 'description'> & {
|
|
1068
|
+
users?: number[];
|
|
1069
|
+
};
|
|
947
1070
|
|
|
948
1071
|
declare class LicenseApiService {
|
|
949
1072
|
private client;
|
|
@@ -957,25 +1080,115 @@ declare class LicenseApiService {
|
|
|
957
1080
|
}>;
|
|
958
1081
|
}
|
|
959
1082
|
|
|
1083
|
+
declare class LinksApiService {
|
|
1084
|
+
private client;
|
|
1085
|
+
constructor(client: Client);
|
|
1086
|
+
createShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
|
|
1087
|
+
updateShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
|
|
1088
|
+
}
|
|
1089
|
+
interface CutLinkRequest {
|
|
1090
|
+
entity_id: number;
|
|
1091
|
+
entity_type: string;
|
|
1092
|
+
full_url: string;
|
|
1093
|
+
}
|
|
1094
|
+
interface CutLinkResponse extends CutLinkRequest {
|
|
1095
|
+
full_url: string;
|
|
1096
|
+
short_url: string;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
960
1099
|
declare class LogstashApiService {
|
|
961
1100
|
private client;
|
|
962
1101
|
constructor(client: Client);
|
|
963
1102
|
getUsersLogs(params: RequestUsersLogParams): Promise<ResponseList<UsersLog>>;
|
|
964
|
-
getSystemLogs(path: string): Promise<string
|
|
1103
|
+
getSystemLogs(path: string, start: number, end: number): Promise<HttpResponse<string>>;
|
|
1104
|
+
}
|
|
1105
|
+
interface RequestUsersLogParams extends RequestBaseParams {
|
|
1106
|
+
user_id?: string;
|
|
1107
|
+
search_field?: string;
|
|
1108
|
+
from_date?: string;
|
|
1109
|
+
to_date?: string;
|
|
1110
|
+
with_me?: boolean;
|
|
965
1111
|
}
|
|
966
1112
|
|
|
1113
|
+
declare class NotificationApiService {
|
|
1114
|
+
private client;
|
|
1115
|
+
constructor(client: Client);
|
|
1116
|
+
list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
|
|
1117
|
+
toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
|
|
1118
|
+
toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
|
|
1119
|
+
delete(id: number[]): Promise<void>;
|
|
1120
|
+
deleteAll(): Promise<void>;
|
|
1121
|
+
getPermission(): Promise<{
|
|
1122
|
+
enabled: boolean;
|
|
1123
|
+
}>;
|
|
1124
|
+
setPermission(permission: boolean): Promise<void>;
|
|
1125
|
+
getSubscription(): Promise<NotificationActionGroup>;
|
|
1126
|
+
setSubscription(data: NotificationActionGroup): Promise<void>;
|
|
1127
|
+
}
|
|
1128
|
+
interface RequestNotificationListParams extends RequestBaseParams {
|
|
1129
|
+
read?: boolean;
|
|
1130
|
+
search?: string;
|
|
1131
|
+
}
|
|
1132
|
+
type ResponseListNotification = ResponseList<UserNotification> & {
|
|
1133
|
+
total_all: number;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
967
1136
|
declare class RoleApiService {
|
|
968
1137
|
private client;
|
|
969
1138
|
constructor(client: Client);
|
|
970
|
-
list(params?:
|
|
971
|
-
get(id: number): Promise<ResponseItem<
|
|
972
|
-
getDefault(): Promise<ResponseItem<
|
|
973
|
-
create(data:
|
|
974
|
-
update(id: number, data:
|
|
1139
|
+
list(params?: RequestUserRoleListParams): Promise<ResponseList<UserRole>>;
|
|
1140
|
+
get(id: number): Promise<ResponseItem<UserRole>>;
|
|
1141
|
+
getDefault(): Promise<ResponseItem<UserRole>>;
|
|
1142
|
+
create(data: CreateUserRoleParams): Promise<ResponseItem<UserRole>>;
|
|
1143
|
+
update(id: number, data: Partial<CreateUserRoleParams>): Promise<ResponseItem<UserRole>>;
|
|
975
1144
|
delete(id: number): Promise<void>;
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1145
|
+
permissionList(): Promise<ResponseList<Permission>>;
|
|
1146
|
+
addPermission(id: number, ids: number[]): Promise<void>;
|
|
1147
|
+
deletePermission(id: number, ids: number[]): Promise<void>;
|
|
1148
|
+
}
|
|
1149
|
+
interface RequestUserRoleListParams extends RequestBaseParams {
|
|
1150
|
+
id?: number[];
|
|
1151
|
+
search_field?: string;
|
|
1152
|
+
}
|
|
1153
|
+
type CreateUserRoleParams = Pick<UserRole, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
|
|
1154
|
+
|
|
1155
|
+
declare class ShareApiService {
|
|
1156
|
+
private client;
|
|
1157
|
+
constructor(client: Client);
|
|
1158
|
+
info(path: string, share_token: string): Promise<ShareInfo>;
|
|
1159
|
+
checkPassword(password: string, share_token: string): Promise<any>;
|
|
1160
|
+
checkToken(share_token: string): Promise<any>;
|
|
1161
|
+
getRestriction(token: string): Promise<UnionRestriction>;
|
|
1162
|
+
restrictions(params?: RequestBaseParams): Promise<ResponseList<ShareInfo>>;
|
|
1163
|
+
restrictionsChange(token: string, data: {
|
|
1164
|
+
status: RestrictionStatus;
|
|
1165
|
+
comment: string;
|
|
1166
|
+
}): Promise<ResponseList<ShareInfo>>;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
declare class StorageInstanceApiService {
|
|
1170
|
+
private client;
|
|
1171
|
+
constructor(client: Client);
|
|
1172
|
+
instance(): Promise<ResponseList<StorageInstance>>;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
declare class StorageShareApiService {
|
|
1176
|
+
private client;
|
|
1177
|
+
constructor(client: Client);
|
|
1178
|
+
info(path: string): Promise<ShareInfo>;
|
|
1179
|
+
create(path: string, permissions_type: PermissionType): Promise<ShareInfo>;
|
|
1180
|
+
change(data: ShareModel): Promise<ShareInfo>;
|
|
1181
|
+
delete(path: string): Promise<void>;
|
|
1182
|
+
refresh(token: string): Promise<ShareInfo>;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
declare class StorageTrashApiService {
|
|
1186
|
+
private client;
|
|
1187
|
+
constructor(client: Client);
|
|
1188
|
+
list(params: RequestStorageListParams): Promise<ResponseList<StorageTrashElement>>;
|
|
1189
|
+
clear(item: StorageTrashItem): Promise<void>;
|
|
1190
|
+
clearAll(): Promise<void>;
|
|
1191
|
+
restore(del_groups: StorageTrashItem[]): Promise<void>;
|
|
979
1192
|
}
|
|
980
1193
|
|
|
981
1194
|
declare class UserApiService {
|
|
@@ -1016,67 +1229,40 @@ declare class UserApiService {
|
|
|
1016
1229
|
meDeleteSession(id?: number): Promise<void>;
|
|
1017
1230
|
setRole(id: number, role_id?: number | null): Promise<void>;
|
|
1018
1231
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
private client;
|
|
1035
|
-
constructor(client: Client);
|
|
1036
|
-
info(path: string): Promise<ShareInfo>;
|
|
1037
|
-
create(path: string, permissions_type: PermissionType): Promise<ShareInfo>;
|
|
1038
|
-
change(data: ShareModel): Promise<ShareInfo>;
|
|
1039
|
-
delete(path: string): Promise<void>;
|
|
1040
|
-
refresh(token: string): Promise<ShareInfo>;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
declare class StorageElementApiService {
|
|
1044
|
-
private client;
|
|
1045
|
-
constructor(client: Client);
|
|
1046
|
-
list(params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
|
|
1047
|
-
info(params: {
|
|
1048
|
-
path: string;
|
|
1049
|
-
divide_id?: number;
|
|
1050
|
-
file_version_id?: string;
|
|
1051
|
-
}): Promise<StorageElement>;
|
|
1052
|
-
size(data: {
|
|
1053
|
-
paths: string[];
|
|
1054
|
-
divide_id?: number;
|
|
1055
|
-
}): Promise<number>;
|
|
1056
|
-
move(data: StorageElementPasteParams, hasFCA?: boolean): Promise<void>;
|
|
1057
|
-
copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
|
|
1058
|
-
pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
|
|
1059
|
-
create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1060
|
-
delete(path: string, divide_id?: number): Promise<void>;
|
|
1061
|
-
favorite(path: string): Promise<void>;
|
|
1062
|
-
removeFavorite(path: string): Promise<void>;
|
|
1063
|
-
createItem(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1064
|
-
createWorkDir(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1065
|
-
history(params: RequestHistoryListParams): Promise<ResponseList<StorageElementHistory>>;
|
|
1066
|
-
versions(params: RequestHistoryListParams): Promise<ResponseList<StorageElementVersion>>;
|
|
1067
|
-
createVersion(data: StorageElementHistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1068
|
-
editVersion(data: StorageElementHistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1069
|
-
deleteVersion(params: RequestHistoryListParams): Promise<void>;
|
|
1070
|
-
makeCurrentVersion(data: RequestHistoryListParams): Promise<void>;
|
|
1232
|
+
interface RequestUserListParams extends RequestBaseParams {
|
|
1233
|
+
email?: string;
|
|
1234
|
+
first_name?: string;
|
|
1235
|
+
middle_name?: string;
|
|
1236
|
+
last_name?: string;
|
|
1237
|
+
login?: string;
|
|
1238
|
+
is_admin?: boolean;
|
|
1239
|
+
id?: number[];
|
|
1240
|
+
role_ids?: number[];
|
|
1241
|
+
statuses?: UserStatus[];
|
|
1242
|
+
search_field?: string;
|
|
1243
|
+
with_me?: boolean;
|
|
1244
|
+
type?: UserType;
|
|
1245
|
+
exclude_type?: UserType;
|
|
1246
|
+
exclude_ids?: number[];
|
|
1071
1247
|
}
|
|
1248
|
+
type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
|
|
1072
1249
|
|
|
1073
|
-
declare class
|
|
1250
|
+
declare class VersionApiService {
|
|
1074
1251
|
private client;
|
|
1075
1252
|
constructor(client: Client);
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1253
|
+
history(params: HistoryRequestParams): Promise<ResponseList<StorageElementHistory>>;
|
|
1254
|
+
versions(params: HistoryListRequestParams): Promise<ResponseList<StorageElementVersion>>;
|
|
1255
|
+
create(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1256
|
+
edit(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1257
|
+
delete(params: HistoryRequestParams): Promise<void>;
|
|
1258
|
+
size(params: HistoryRequestParams): Promise<number>;
|
|
1259
|
+
makeCurrent(params: HistoryRequestParams): Promise<void>;
|
|
1260
|
+
}
|
|
1261
|
+
type HistoryListRequestParams = HistoryRequestParams & RequestBaseParams;
|
|
1262
|
+
interface HistoryRequestParams {
|
|
1263
|
+
path: string;
|
|
1264
|
+
divide_id?: number | null;
|
|
1265
|
+
file_version_id?: string;
|
|
1080
1266
|
}
|
|
1081
1267
|
|
|
1082
1268
|
declare const applyInterceptors: <T>(interceptors: {
|
|
@@ -1084,8 +1270,10 @@ declare const applyInterceptors: <T>(interceptors: {
|
|
|
1084
1270
|
rejected?: (error: any) => T | Promise<T>;
|
|
1085
1271
|
}[], arg: T) => Promise<T>;
|
|
1086
1272
|
|
|
1087
|
-
declare
|
|
1273
|
+
declare function getCookieValue(name: string): string | null;
|
|
1088
1274
|
|
|
1089
1275
|
declare const makeUrlParams: (params: Record<string, any>) => URLSearchParams;
|
|
1090
1276
|
|
|
1091
|
-
|
|
1277
|
+
declare function normalizeHeaders(headers: Headers | [string, string][] | Record<string, string>): Record<string, string>;
|
|
1278
|
+
|
|
1279
|
+
export { AccessRights, type AccessToken, AuthApiService, type AuthToken, type AuthType, CONNECTIONS_PERMISSION, type ChangeLicenseParams, Client, type Connection, type ConnectionCreateParams, ConnectionGroup, ConnectionType, ConnectionsApiService, type CreateStorageElementParams, type CreateUserGroupParams, type CreateUserParams, type CreateUserRoleParams, type Discovery, DiscoveryApiService, DivideApiService, DivideMode, type DivideResourceType, type DivideResponseList, DivideScope, EngineType, type Extension, type ExtensionDefault, type ExtensionExternal, type ExtensionExternalInList, type ExtensionExternalListParams, ExtensionFileMode, type ExtensionListParams, type ExtensionMetaPayload, ExtensionType, ExtensionsApiService, ExtensionsExternalApiService, FcaApiService, GatewayApiService, GroupApiService, type HistoryListRequestParams, type HistoryNote, type HistoryRequestParams, type HttpEvent, type HttpResponse, type Lang, type License, LicenseApiService, LicenseError, LinksApiService, type LockScreen, LogstashApiService, type NbAppState, type NbClientParams, type NbRequestParams, NotificationAction, type NotificationActionGroup, NotificationApiService, NotificationEntityType, type NotificationPayload, NotificationRowAction, NotificationStyle, type OnUploadProgress, OrderDirection, type PayloadFile, type Permission, type PermissionItem, PermissionType, type ProgressEvent, type QueryInitResponse, type RequestAuthSettingsParams, type RequestAuthTokenParams, type RequestBaseParams, type RequestConfig, type RequestConnectionParams, RequestMethod, type RequestNotificationListParams, RequestObserve, type RequestStorageListParams, type RequestUserDivideParams, type RequestUserGroupListParams, type RequestUserListParams, type RequestUserRoleListParams, type RequestUsersLogParams, type RequestVersionsSizeParams, type ResponseItem, type ResponseList, type ResponseListNotification, ResponseType, Rest, type Restriction, RestrictionBooleanStatus, RestrictionModeKey, RestrictionSharing, RestrictionStatus, RoleApiService, type Setting, SettingControlType, type SettingField, type SettingFieldView, type SettingLang, type SettingValue, type SettingValueField, type SettingVariant, type SettingViewConnectionChoose, type SettingViewSelect, ShareApiService, type ShareInfo, type ShareModel, type SizeBySection, type StorageElement, StorageElementApiService, StorageElementContentType, type StorageElementHistory, StorageElementHistoryAction, type StorageElementPaste, type StorageElementPasteParams, StorageElementType, type StorageElementVersion, StorageFilesApiService, type StorageInstance, StorageInstanceApiService, StorageRoot, type StorageRouteData, StorageShareApiService, StorageTrashApiService, type StorageTrashElement, type StorageTrashItem, Tariff, TokenUpdate, type UnionRestriction, type UploadNetRequestParams, type User, UserApiService, UserAuthType, type UserDivide, type UserGroup, type UserLabel, type UserNotification, type UserRole, type UserSession, UserStatus, type UserToken, UserType, type UsersLog, VersionApiService, applyInterceptors, getCookieValue, makeUrlParams, normalizeHeaders };
|