nb-js-client 0.0.0
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 +19 -0
- package/dist/api/connections-api.service.d.ts +12 -0
- package/dist/api/discovery-api.service.d.ts +8 -0
- package/dist/api/divide-api.service.d.ts +17 -0
- package/dist/api/extensions-api.service.d.ts +21 -0
- package/dist/api/extensions-external-api.service.d.ts +9 -0
- package/dist/api/fca-api.service.d.ts +14 -0
- package/dist/api/gateway-api.service.d.ts +9 -0
- package/dist/api/group-api.service.d.ts +11 -0
- package/dist/api/index.d.ts +18 -0
- package/dist/api/license-api.service.d.ts +13 -0
- package/dist/api/logstash-api.service.d.ts +8 -0
- package/dist/api/notifications-api.service.d.ts +17 -0
- package/dist/api/role-api.service.d.ts +15 -0
- package/dist/api/share-api.service.d.ts +14 -0
- package/dist/api/storage-element-api.service.d.ts +32 -0
- package/dist/api/storage-files-api.service.d.ts +13 -0
- package/dist/api/storage-share-api.service.d.ts +11 -0
- package/dist/api/storage-trash-api.service.d.ts +10 -0
- package/dist/api/user-api.service.d.ts +40 -0
- package/dist/bundle.cjs.js +1 -0
- package/dist/bundle.esm.js +1 -0
- package/dist/classes/client.d.ts +39 -0
- package/dist/classes/index.d.ts +2 -0
- package/dist/classes/rest.d.ts +13 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/send-request.d.ts +6 -0
- package/dist/index.d.ts +1051 -0
- package/dist/types/auth.d.ts +9 -0
- package/dist/types/base.d.ts +48 -0
- package/dist/types/connection.d.ts +45 -0
- package/dist/types/discovery.d.ts +15 -0
- package/dist/types/divide.d.ts +72 -0
- package/dist/types/extension.d.ts +93 -0
- package/dist/types/group.d.ts +23 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptor.d.ts +4 -0
- package/dist/types/license.d.ts +23 -0
- package/dist/types/lock-screen.d.ts +4 -0
- package/dist/types/notification.d.ts +85 -0
- package/dist/types/permission.d.ts +10 -0
- package/dist/types/query-init.d.ts +23 -0
- package/dist/types/restriction.d.ts +9 -0
- package/dist/types/role.d.ts +17 -0
- package/dist/types/setting.d.ts +57 -0
- package/dist/types/storage-trash.d.ts +14 -0
- package/dist/types/storage.d.ts +105 -0
- package/dist/types/user-log.d.ts +17 -0
- package/dist/types/user.d.ts +67 -0
- package/package.json +33 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
interface AuthToken {
|
|
2
|
+
access_token: string;
|
|
3
|
+
refresh_token: string;
|
|
4
|
+
}
|
|
5
|
+
interface AuthType {
|
|
6
|
+
classic: boolean;
|
|
7
|
+
basic: boolean;
|
|
8
|
+
ldap: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface NbClientParams {
|
|
12
|
+
host: string;
|
|
13
|
+
version?: number;
|
|
14
|
+
}
|
|
15
|
+
interface NbRequestParams {
|
|
16
|
+
path: string;
|
|
17
|
+
headers?: Record<string, any>;
|
|
18
|
+
query?: Record<string, any>;
|
|
19
|
+
body?: any;
|
|
20
|
+
cache?: RequestCache;
|
|
21
|
+
}
|
|
22
|
+
interface NbAppState {
|
|
23
|
+
clientParams: NbClientParams;
|
|
24
|
+
requestParams: NbRequestParams;
|
|
25
|
+
}
|
|
26
|
+
interface ResponseItem<T> {
|
|
27
|
+
row: T;
|
|
28
|
+
}
|
|
29
|
+
interface ResponseList<T> {
|
|
30
|
+
rows: T[];
|
|
31
|
+
total: number;
|
|
32
|
+
}
|
|
33
|
+
interface RequestBaseParams {
|
|
34
|
+
limit: number;
|
|
35
|
+
offset?: number;
|
|
36
|
+
order_by?: string;
|
|
37
|
+
order_direction?: OrderDirection;
|
|
38
|
+
}
|
|
39
|
+
declare enum OrderDirection {
|
|
40
|
+
DEFAULT = "",
|
|
41
|
+
ASC = "asc",
|
|
42
|
+
DESC = "desc"
|
|
43
|
+
}
|
|
44
|
+
type Lang = {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
declare enum EngineType {
|
|
48
|
+
WebSocket = "websocket",
|
|
49
|
+
PostMessage = "postmessage",
|
|
50
|
+
Empty = ""
|
|
51
|
+
}
|
|
52
|
+
declare enum StorageRoot {
|
|
53
|
+
my = "my",
|
|
54
|
+
fca = "fca",
|
|
55
|
+
divide = "divide",
|
|
56
|
+
share = "share",
|
|
57
|
+
favorite = "favorite"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface User {
|
|
61
|
+
id: number;
|
|
62
|
+
create_date: string;
|
|
63
|
+
update_date: string;
|
|
64
|
+
last_login_date: string;
|
|
65
|
+
login: string;
|
|
66
|
+
password: string;
|
|
67
|
+
first_name: string;
|
|
68
|
+
middle_name: string;
|
|
69
|
+
last_name: string;
|
|
70
|
+
email: string;
|
|
71
|
+
auth_type: UserAuthType;
|
|
72
|
+
avatar_path: string;
|
|
73
|
+
home_path: string;
|
|
74
|
+
status: UserStatus;
|
|
75
|
+
type: UserType;
|
|
76
|
+
role_id: number | null;
|
|
77
|
+
}
|
|
78
|
+
type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name'>;
|
|
79
|
+
declare enum UserAuthType {
|
|
80
|
+
Native = "native",
|
|
81
|
+
Ldap = "ldap"
|
|
82
|
+
}
|
|
83
|
+
declare enum UserStatus {
|
|
84
|
+
Registering = "registering",
|
|
85
|
+
Activated = "activated",
|
|
86
|
+
Blocked = "blocked",
|
|
87
|
+
BlockedByLicense = "blocked_by_license"
|
|
88
|
+
}
|
|
89
|
+
declare enum UserType {
|
|
90
|
+
User = "user",
|
|
91
|
+
Guest = "guest",
|
|
92
|
+
Emperor = "emperor",
|
|
93
|
+
Anonymous = "anonymous"
|
|
94
|
+
}
|
|
95
|
+
interface UserSession {
|
|
96
|
+
create_date: string;
|
|
97
|
+
expire_in: string;
|
|
98
|
+
ip: string;
|
|
99
|
+
user_agent: string;
|
|
100
|
+
id: number;
|
|
101
|
+
is_current?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface UserToken {
|
|
104
|
+
id: number;
|
|
105
|
+
name: string;
|
|
106
|
+
expire_in: string;
|
|
107
|
+
create_date: string;
|
|
108
|
+
token?: string;
|
|
109
|
+
}
|
|
110
|
+
interface RequestUserListParams extends RequestBaseParams {
|
|
111
|
+
email?: string;
|
|
112
|
+
first_name?: string;
|
|
113
|
+
middle_name?: string;
|
|
114
|
+
last_name?: string;
|
|
115
|
+
login?: string;
|
|
116
|
+
is_admin?: boolean;
|
|
117
|
+
id?: number[];
|
|
118
|
+
role_ids?: number[];
|
|
119
|
+
statuses?: UserStatus[];
|
|
120
|
+
search_field?: string;
|
|
121
|
+
with_me?: boolean;
|
|
122
|
+
type: UserType;
|
|
123
|
+
exclude_type?: UserType;
|
|
124
|
+
}
|
|
125
|
+
type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
|
|
126
|
+
|
|
127
|
+
interface RequestStorageListParams extends RequestBaseParams {
|
|
128
|
+
search?: string;
|
|
129
|
+
is_favorite?: boolean;
|
|
130
|
+
is_divided?: boolean;
|
|
131
|
+
divide_id?: number | null;
|
|
132
|
+
path?: string;
|
|
133
|
+
min_size?: number | null;
|
|
134
|
+
max_size?: number | null;
|
|
135
|
+
type?: StorageElementType;
|
|
136
|
+
file_name_ext?: string[];
|
|
137
|
+
from_sharing_token?: string;
|
|
138
|
+
from_path?: string;
|
|
139
|
+
from_sharing_password?: string;
|
|
140
|
+
}
|
|
141
|
+
interface StorageElement {
|
|
142
|
+
name: string;
|
|
143
|
+
size: number;
|
|
144
|
+
shared: boolean;
|
|
145
|
+
full_path: string;
|
|
146
|
+
path: string;
|
|
147
|
+
type: StorageElementType;
|
|
148
|
+
file_name_ext: string;
|
|
149
|
+
content_type: StorageElementContentType;
|
|
150
|
+
update_date: string;
|
|
151
|
+
create_date: string;
|
|
152
|
+
with_preview: boolean;
|
|
153
|
+
is_favorite: boolean;
|
|
154
|
+
owner: User;
|
|
155
|
+
owner_id: number;
|
|
156
|
+
version?: StorageElementVersion;
|
|
157
|
+
divide_id?: number;
|
|
158
|
+
access_mode?: PermissionType;
|
|
159
|
+
to_user_group_name?: string;
|
|
160
|
+
created_by_extension?: string;
|
|
161
|
+
}
|
|
162
|
+
type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
|
|
163
|
+
is_work_dir?: boolean;
|
|
164
|
+
};
|
|
165
|
+
declare enum StorageElementType {
|
|
166
|
+
Dir = "dir",
|
|
167
|
+
File = "file",
|
|
168
|
+
WorkDir = "work_dir"
|
|
169
|
+
}
|
|
170
|
+
declare enum StorageElementContentType {
|
|
171
|
+
Any = "any",
|
|
172
|
+
Dir = "dir",
|
|
173
|
+
Code = "code",
|
|
174
|
+
Image = "image",
|
|
175
|
+
Audio = "audio",
|
|
176
|
+
Video = "video",
|
|
177
|
+
Text = "text",
|
|
178
|
+
Doc = "doc",
|
|
179
|
+
Xls = "xls",
|
|
180
|
+
Ppt = "ppt"
|
|
181
|
+
}
|
|
182
|
+
interface StorageElementPaste {
|
|
183
|
+
from_path: string;
|
|
184
|
+
to_path: string;
|
|
185
|
+
}
|
|
186
|
+
interface StorageElementPasteParams {
|
|
187
|
+
paths: StorageElementPaste[];
|
|
188
|
+
overwrite: boolean;
|
|
189
|
+
from_divide_id?: number | null;
|
|
190
|
+
to_divide_id?: number | null;
|
|
191
|
+
}
|
|
192
|
+
interface StorageElementVersion {
|
|
193
|
+
id: string;
|
|
194
|
+
size: number;
|
|
195
|
+
user_id: number;
|
|
196
|
+
name: string;
|
|
197
|
+
description: string;
|
|
198
|
+
create_date: string;
|
|
199
|
+
update_date: string;
|
|
200
|
+
is_current_version: boolean;
|
|
201
|
+
}
|
|
202
|
+
interface StorageElementHistory {
|
|
203
|
+
user_id: number;
|
|
204
|
+
action: StorageElementHistoryAction;
|
|
205
|
+
create_date: string;
|
|
206
|
+
}
|
|
207
|
+
declare enum StorageElementHistoryAction {
|
|
208
|
+
Create = "create",
|
|
209
|
+
Update = "update",
|
|
210
|
+
Move = "move"
|
|
211
|
+
}
|
|
212
|
+
interface StorageElementHistoryNote {
|
|
213
|
+
name: string;
|
|
214
|
+
description: string;
|
|
215
|
+
divide_id: number | null;
|
|
216
|
+
file_version_id: string;
|
|
217
|
+
path: string;
|
|
218
|
+
}
|
|
219
|
+
interface RequestHistoryListParams extends RequestBaseParams {
|
|
220
|
+
path: string;
|
|
221
|
+
divide_id?: number | null;
|
|
222
|
+
}
|
|
223
|
+
interface UploadNetRequestParams {
|
|
224
|
+
path: string;
|
|
225
|
+
url: string;
|
|
226
|
+
overwrite?: boolean;
|
|
227
|
+
divide_id?: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare enum DivideScope {
|
|
231
|
+
Storage = "/storage/element",
|
|
232
|
+
Connection = "/connections"
|
|
233
|
+
}
|
|
234
|
+
type DivideResourceType = string | number;
|
|
235
|
+
declare enum PermissionType {
|
|
236
|
+
CLOSE = "",
|
|
237
|
+
READ = "r",
|
|
238
|
+
WRITE = "rw"
|
|
239
|
+
}
|
|
240
|
+
declare enum RestrictionStatus {
|
|
241
|
+
WAITING = "waiting",
|
|
242
|
+
APPROVED = "approved",
|
|
243
|
+
REJECTED = "rejected"
|
|
244
|
+
}
|
|
245
|
+
declare enum RestrictionBooleanStatus {
|
|
246
|
+
TRUE = "true",
|
|
247
|
+
FALSE = "false"
|
|
248
|
+
}
|
|
249
|
+
declare enum DivideMode {
|
|
250
|
+
User = "to_user_id",
|
|
251
|
+
Group = "to_user_group_id"
|
|
252
|
+
}
|
|
253
|
+
interface ShareInfo extends DivideParams {
|
|
254
|
+
token: string;
|
|
255
|
+
access_mode: PermissionType;
|
|
256
|
+
expire_delta: number | null;
|
|
257
|
+
expire_in?: string;
|
|
258
|
+
with_password: boolean;
|
|
259
|
+
share_sub_type: StorageElementType;
|
|
260
|
+
create_date: string;
|
|
261
|
+
update_date: string;
|
|
262
|
+
owner_id: number;
|
|
263
|
+
resource: string;
|
|
264
|
+
}
|
|
265
|
+
interface UserDivide extends DivideParams {
|
|
266
|
+
access_mode: PermissionType;
|
|
267
|
+
create_date: string;
|
|
268
|
+
id: number;
|
|
269
|
+
name: string;
|
|
270
|
+
owner_id: number;
|
|
271
|
+
resource: string;
|
|
272
|
+
to_user_group_id: number;
|
|
273
|
+
to_user_id: number;
|
|
274
|
+
type: StorageElementType;
|
|
275
|
+
update_date: string;
|
|
276
|
+
}
|
|
277
|
+
interface DivideParams {
|
|
278
|
+
restriction_status: RestrictionStatus;
|
|
279
|
+
moderator_id?: number;
|
|
280
|
+
comment: string;
|
|
281
|
+
}
|
|
282
|
+
interface RequestUserDivideParams {
|
|
283
|
+
is_to_user_group: boolean;
|
|
284
|
+
access_mode?: PermissionType;
|
|
285
|
+
limit?: number;
|
|
286
|
+
offset?: number;
|
|
287
|
+
search_field?: string;
|
|
288
|
+
}
|
|
289
|
+
type DivideResponseList = ResponseList<UserDivide> & {
|
|
290
|
+
total_r: number;
|
|
291
|
+
total_rw: number;
|
|
292
|
+
};
|
|
293
|
+
interface ShareModel {
|
|
294
|
+
token: string;
|
|
295
|
+
access_mode: PermissionType;
|
|
296
|
+
password: string | null;
|
|
297
|
+
expire_delta: number | null;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
interface Connection {
|
|
301
|
+
id: number;
|
|
302
|
+
name: string;
|
|
303
|
+
type: ConnectionType;
|
|
304
|
+
address: string;
|
|
305
|
+
login: string;
|
|
306
|
+
password: string;
|
|
307
|
+
port: number;
|
|
308
|
+
root_path: string;
|
|
309
|
+
group_name: ConnectionGroup;
|
|
310
|
+
divide_id?: number;
|
|
311
|
+
access_mode?: PermissionType;
|
|
312
|
+
owner?: Pick<User, 'first_name' | 'last_name' | 'login' | 'middle_name'>;
|
|
313
|
+
update_date: string;
|
|
314
|
+
create_date: string;
|
|
315
|
+
expire_in: string;
|
|
316
|
+
to_user_group_name?: string;
|
|
317
|
+
}
|
|
318
|
+
declare enum ConnectionGroup {
|
|
319
|
+
Storages = "storages_connections_group",
|
|
320
|
+
Webhooks = "webhooks_connections_group",
|
|
321
|
+
Unknown = "unknown_connections_group",
|
|
322
|
+
Proxy = "proxy_connections_group"
|
|
323
|
+
}
|
|
324
|
+
declare enum ConnectionType {
|
|
325
|
+
SSH = "ssh_connection",
|
|
326
|
+
YandexDisk = "yandex_disk",
|
|
327
|
+
Mail = "mail",
|
|
328
|
+
Discord = "discord",
|
|
329
|
+
Webdav = "webdav_connection",
|
|
330
|
+
Nextcloud = "nextcloud_connection",
|
|
331
|
+
NextBox = "nextbox_connection",
|
|
332
|
+
HttpProxy = "http_proxy_connection",
|
|
333
|
+
S3 = "s3_connection"
|
|
334
|
+
}
|
|
335
|
+
interface RequestConnectionParams extends RequestBaseParams {
|
|
336
|
+
name?: string | null;
|
|
337
|
+
group_name?: ConnectionGroup;
|
|
338
|
+
is_divided?: boolean;
|
|
339
|
+
type?: string;
|
|
340
|
+
}
|
|
341
|
+
type ConnectionCreateParams = Omit<Connection, 'group_name'>;
|
|
342
|
+
|
|
343
|
+
interface Discovery {
|
|
344
|
+
id: number;
|
|
345
|
+
create_date: string;
|
|
346
|
+
update_date: string;
|
|
347
|
+
active: boolean;
|
|
348
|
+
back_url: string;
|
|
349
|
+
front_url: string;
|
|
350
|
+
instance_number: number;
|
|
351
|
+
name: string;
|
|
352
|
+
route: null;
|
|
353
|
+
route_name: string;
|
|
354
|
+
with_swagger: boolean;
|
|
355
|
+
dynamic_config_path?: string;
|
|
356
|
+
version: string;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
type SettingLang = string | Lang | null;
|
|
360
|
+
declare enum SettingControlType {
|
|
361
|
+
Text = "text",
|
|
362
|
+
String = "string",
|
|
363
|
+
Number = "number",
|
|
364
|
+
CheckBox = "checkbox",
|
|
365
|
+
Select = "select",
|
|
366
|
+
RadioList = "radio_list",
|
|
367
|
+
ConnectionChoose = "connection_choose",
|
|
368
|
+
MultiConnectionChoose = "multi_connection_choose"
|
|
369
|
+
}
|
|
370
|
+
interface Setting {
|
|
371
|
+
fields: SettingField[];
|
|
372
|
+
title?: SettingLang;
|
|
373
|
+
name?: string;
|
|
374
|
+
context?: string;
|
|
375
|
+
toggle_box?: boolean;
|
|
376
|
+
collapsed_box?: boolean;
|
|
377
|
+
activity_switch?: boolean;
|
|
378
|
+
}
|
|
379
|
+
interface SettingVariant {
|
|
380
|
+
label?: SettingLang;
|
|
381
|
+
value: any;
|
|
382
|
+
}
|
|
383
|
+
interface SettingField {
|
|
384
|
+
name: string;
|
|
385
|
+
value: any;
|
|
386
|
+
label?: SettingLang;
|
|
387
|
+
help?: SettingLang;
|
|
388
|
+
placeholder?: SettingLang;
|
|
389
|
+
view?: SettingFieldView;
|
|
390
|
+
control: {
|
|
391
|
+
type: SettingControlType;
|
|
392
|
+
filter?: Record<string, any>;
|
|
393
|
+
variants?: SettingVariant[];
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
type SettingFieldView = SettingViewConnectionChoose | SettingViewSelect | any;
|
|
397
|
+
interface SettingViewConnectionChoose {
|
|
398
|
+
id: number;
|
|
399
|
+
name: string;
|
|
400
|
+
owner_id: number;
|
|
401
|
+
}
|
|
402
|
+
interface SettingViewSelect {
|
|
403
|
+
show_clear?: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface SettingValueField {
|
|
406
|
+
name: string;
|
|
407
|
+
value: any;
|
|
408
|
+
}
|
|
409
|
+
interface SettingValue {
|
|
410
|
+
name: string;
|
|
411
|
+
context?: string;
|
|
412
|
+
fields: SettingValueField[];
|
|
413
|
+
activity_switch?: boolean;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
interface ExtensionDefault {
|
|
417
|
+
ext_value: string;
|
|
418
|
+
extension_meta_uniq_key: string;
|
|
419
|
+
icon_path: string;
|
|
420
|
+
devlocal?: boolean;
|
|
421
|
+
}
|
|
422
|
+
declare enum ExtensionType {
|
|
423
|
+
App = "app",
|
|
424
|
+
File = "file",
|
|
425
|
+
WorkDir = "work_dir"
|
|
426
|
+
}
|
|
427
|
+
declare enum ExtensionFileMode {
|
|
428
|
+
Read = "read",
|
|
429
|
+
ReadAndWrite = "read_and_write",
|
|
430
|
+
Write = "write"
|
|
431
|
+
}
|
|
432
|
+
interface Extension {
|
|
433
|
+
id: number;
|
|
434
|
+
create_date: string;
|
|
435
|
+
update_date: string;
|
|
436
|
+
with_settings?: boolean;
|
|
437
|
+
name: Lang;
|
|
438
|
+
devlocal?: boolean;
|
|
439
|
+
dev_frame_params?: {
|
|
440
|
+
engine: EngineType;
|
|
441
|
+
host?: string;
|
|
442
|
+
port?: number;
|
|
443
|
+
};
|
|
444
|
+
version: string;
|
|
445
|
+
latest_repo_version?: string;
|
|
446
|
+
description: Lang;
|
|
447
|
+
uniq_key: string;
|
|
448
|
+
icon: string;
|
|
449
|
+
type: ExtensionType;
|
|
450
|
+
path: string;
|
|
451
|
+
file?: {
|
|
452
|
+
mode: ExtensionFileMode;
|
|
453
|
+
ext: string[];
|
|
454
|
+
default_ext?: string;
|
|
455
|
+
index: string;
|
|
456
|
+
};
|
|
457
|
+
app?: {
|
|
458
|
+
menu: {
|
|
459
|
+
index: string;
|
|
460
|
+
icon: string;
|
|
461
|
+
label: Lang;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
work_dir?: {
|
|
465
|
+
index: string;
|
|
466
|
+
};
|
|
467
|
+
settings?: SettingValue[];
|
|
468
|
+
settings_template?: Setting[];
|
|
469
|
+
}
|
|
470
|
+
interface ExtensionMetaPayload {
|
|
471
|
+
uniq_key: string;
|
|
472
|
+
}
|
|
473
|
+
interface ExtensionListParams extends RequestBaseParams {
|
|
474
|
+
search?: string | null;
|
|
475
|
+
uniq_key?: string[];
|
|
476
|
+
file_name_ext?: string;
|
|
477
|
+
type?: StorageElementType[];
|
|
478
|
+
ext_value?: string | null;
|
|
479
|
+
file_mode?: ExtensionFileMode[];
|
|
480
|
+
lang?: string;
|
|
481
|
+
}
|
|
482
|
+
interface ExtensionExternalListParams extends RequestBaseParams {
|
|
483
|
+
search_field?: string;
|
|
484
|
+
}
|
|
485
|
+
interface ExtensionExternalInList {
|
|
486
|
+
id: number;
|
|
487
|
+
create_date: string;
|
|
488
|
+
update_date: string;
|
|
489
|
+
name: string;
|
|
490
|
+
description: string;
|
|
491
|
+
uniq_key: string;
|
|
492
|
+
version: string;
|
|
493
|
+
tags: string[];
|
|
494
|
+
links: string[];
|
|
495
|
+
}
|
|
496
|
+
interface ExtensionExternal extends ExtensionExternalInList {
|
|
497
|
+
versions: VersionExtension[];
|
|
498
|
+
images?: string[];
|
|
499
|
+
with_readme?: boolean;
|
|
500
|
+
}
|
|
501
|
+
interface VersionExtension {
|
|
502
|
+
version: string;
|
|
503
|
+
size: number;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
interface Group {
|
|
507
|
+
id: number;
|
|
508
|
+
name: string;
|
|
509
|
+
description: string;
|
|
510
|
+
amount_users: number;
|
|
511
|
+
create_date: string;
|
|
512
|
+
owner_id: number;
|
|
513
|
+
owner: UserLabel;
|
|
514
|
+
update_date: string;
|
|
515
|
+
icon: string;
|
|
516
|
+
icon_color: string;
|
|
517
|
+
}
|
|
518
|
+
interface RequestGroupListParams extends RequestBaseParams {
|
|
519
|
+
id?: number[];
|
|
520
|
+
name?: string;
|
|
521
|
+
description?: string;
|
|
522
|
+
search_field?: string;
|
|
523
|
+
}
|
|
524
|
+
type CreateGroupParams = Pick<Group, 'name' | 'description'> & {
|
|
525
|
+
users?: number[];
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
interface License {
|
|
529
|
+
custom_max_users_count: number | null;
|
|
530
|
+
expire_in: string;
|
|
531
|
+
key: string | null;
|
|
532
|
+
plan: Tariff;
|
|
533
|
+
error?: LicenseError | string;
|
|
534
|
+
}
|
|
535
|
+
interface ChangeLicenseParams {
|
|
536
|
+
key: string;
|
|
537
|
+
domain: string;
|
|
538
|
+
}
|
|
539
|
+
declare enum Tariff {
|
|
540
|
+
Free = "free",
|
|
541
|
+
Business = "business",
|
|
542
|
+
Enterprise = "enterprise"
|
|
543
|
+
}
|
|
544
|
+
declare enum LicenseError {
|
|
545
|
+
NotActivated = "License not activated",
|
|
546
|
+
Blocked = "License blocked",
|
|
547
|
+
Expired = "License has been expired",
|
|
548
|
+
NotValid = "License not valid",
|
|
549
|
+
NotFound = "license file not found"
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
interface LockScreen {
|
|
553
|
+
enabled: boolean;
|
|
554
|
+
duration: number;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
interface UserNotification {
|
|
558
|
+
id: number;
|
|
559
|
+
create_date: string;
|
|
560
|
+
update_date: string;
|
|
561
|
+
entity_type: NotificationEntityType;
|
|
562
|
+
action: NotificationAction;
|
|
563
|
+
title: string;
|
|
564
|
+
msg: string;
|
|
565
|
+
transition: boolean;
|
|
566
|
+
read: boolean;
|
|
567
|
+
style: NotificationStyle;
|
|
568
|
+
payload: NotificationPayload;
|
|
569
|
+
from_user_id?: number;
|
|
570
|
+
owner?: UserLabel;
|
|
571
|
+
}
|
|
572
|
+
type RequestNotificationListParams = RequestBaseParams & {
|
|
573
|
+
read?: boolean;
|
|
574
|
+
search?: string;
|
|
575
|
+
};
|
|
576
|
+
type ResponseListNotification = ResponseList<UserNotification> & {
|
|
577
|
+
total_all: number;
|
|
578
|
+
};
|
|
579
|
+
declare enum NotificationEntityType {
|
|
580
|
+
Dir = "dir",
|
|
581
|
+
File = "file",
|
|
582
|
+
User = "user",
|
|
583
|
+
Other = "other",
|
|
584
|
+
WorkDir = "work_dir",
|
|
585
|
+
License = "license",
|
|
586
|
+
Extension = "extension",
|
|
587
|
+
Connection = "connection"
|
|
588
|
+
}
|
|
589
|
+
declare enum NotificationAction {
|
|
590
|
+
OpenSharing = "open_sharing",
|
|
591
|
+
ChangeSharing = "change_sharing",
|
|
592
|
+
CancelSharing = "cancel_sharing",
|
|
593
|
+
DivideDirAddFileToOwner = "divide_dir_add_file_to_owner",
|
|
594
|
+
DivideDirAddDirToOwner = "divide_dir_add_dir_to_owner",
|
|
595
|
+
DivideDirAddWorkDirToOwner = "divide_dir_add_work_dir_to_owner",
|
|
596
|
+
DivideConnectionAddFileToOwner = "divide_connection_add_file_to_owner",
|
|
597
|
+
DivideConnectionAddDirToOwner = "divide_connection_add_dir_to_owner",
|
|
598
|
+
CancelDivideDir = "cancel_divide_dir",
|
|
599
|
+
CancelDivideFile = "cancel_divide_file",
|
|
600
|
+
CancelDivideWorkDir = "cancel_divide_work_dir",
|
|
601
|
+
CancelDivideConnection = "cancel_divide_connection",
|
|
602
|
+
DeleteExtension = "delete_extension",
|
|
603
|
+
NewVersionExtension = "new_version_extension",
|
|
604
|
+
Other = "other"
|
|
605
|
+
}
|
|
606
|
+
declare enum NotificationRowAction {
|
|
607
|
+
Read = "read",
|
|
608
|
+
Unread = "unread",
|
|
609
|
+
Delete = "delete"
|
|
610
|
+
}
|
|
611
|
+
declare enum NotificationStyle {
|
|
612
|
+
Plain = "plain",
|
|
613
|
+
Success = "success",
|
|
614
|
+
Info = "info",
|
|
615
|
+
Warning = "warning",
|
|
616
|
+
Error = "error"
|
|
617
|
+
}
|
|
618
|
+
type NotificationActionGroup = {
|
|
619
|
+
[key: string]: NotificationActionEnabledGroup;
|
|
620
|
+
};
|
|
621
|
+
interface NotificationActionEnabledGroup {
|
|
622
|
+
enabled_system: boolean;
|
|
623
|
+
enabled_mail: boolean;
|
|
624
|
+
}
|
|
625
|
+
type NotificationPayload = PayloadFile | any;
|
|
626
|
+
interface PayloadFile {
|
|
627
|
+
access_mode: PermissionType;
|
|
628
|
+
create_date: string;
|
|
629
|
+
id: number;
|
|
630
|
+
name: string;
|
|
631
|
+
owner_id: number;
|
|
632
|
+
path: string;
|
|
633
|
+
to_user_id: number;
|
|
634
|
+
type: StorageElementType;
|
|
635
|
+
update_date: string;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
interface Permission {
|
|
639
|
+
group_name: Lang;
|
|
640
|
+
permissions: PermissionItem[];
|
|
641
|
+
}
|
|
642
|
+
interface PermissionItem {
|
|
643
|
+
id: number;
|
|
644
|
+
priority: number;
|
|
645
|
+
title: Lang;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare enum RestrictionSharing {
|
|
649
|
+
NONE = "none",
|
|
650
|
+
SOFT = "soft",
|
|
651
|
+
HARD = "hard"
|
|
652
|
+
}
|
|
653
|
+
interface Restriction {
|
|
654
|
+
sharing: RestrictionSharing;
|
|
655
|
+
divide: RestrictionSharing;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
interface QueryInit {
|
|
659
|
+
license?: License;
|
|
660
|
+
unread_notifications?: ResponseList<UserNotification> & {
|
|
661
|
+
total_all: number;
|
|
662
|
+
};
|
|
663
|
+
extensions_apps?: ResponseList<Extension>;
|
|
664
|
+
extensions_defaults: ResponseList<ExtensionDefault>;
|
|
665
|
+
me?: User;
|
|
666
|
+
cache_users: User[];
|
|
667
|
+
lock_screen: LockScreen;
|
|
668
|
+
restrictions?: Restriction;
|
|
669
|
+
open_in_desktop_settings: {
|
|
670
|
+
open_in_desktop_enabled: boolean;
|
|
671
|
+
};
|
|
672
|
+
inject_scripts?: string[];
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
interface Role {
|
|
676
|
+
id: number;
|
|
677
|
+
name: string;
|
|
678
|
+
description: string;
|
|
679
|
+
create_date: string;
|
|
680
|
+
update_date: string;
|
|
681
|
+
is_default: boolean;
|
|
682
|
+
owner_id: number;
|
|
683
|
+
grant_access_all: boolean;
|
|
684
|
+
permissions_id?: number[];
|
|
685
|
+
}
|
|
686
|
+
interface RequestRoleListParams extends RequestBaseParams {
|
|
687
|
+
id?: number[];
|
|
688
|
+
search_field?: string;
|
|
689
|
+
}
|
|
690
|
+
type CreateRoleParams = Pick<Role, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
|
|
691
|
+
|
|
692
|
+
interface UsersLog {
|
|
693
|
+
create_date: string;
|
|
694
|
+
service_name: string;
|
|
695
|
+
user_login: string;
|
|
696
|
+
event_type: string;
|
|
697
|
+
action: string;
|
|
698
|
+
resource: string;
|
|
699
|
+
description: string;
|
|
700
|
+
}
|
|
701
|
+
interface RequestUsersLogParams extends RequestBaseParams {
|
|
702
|
+
user_id?: string;
|
|
703
|
+
search_field?: string;
|
|
704
|
+
from_date?: string;
|
|
705
|
+
to_date?: string;
|
|
706
|
+
with_me?: boolean;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
interface StorageTrashElement {
|
|
710
|
+
content_type: StorageElementContentType;
|
|
711
|
+
del_group_id: number;
|
|
712
|
+
file_name_ext: string;
|
|
713
|
+
full_path: string;
|
|
714
|
+
name: string;
|
|
715
|
+
path: string;
|
|
716
|
+
size: number;
|
|
717
|
+
type: StorageElementType;
|
|
718
|
+
update_date: string;
|
|
719
|
+
with_preview: boolean;
|
|
720
|
+
}
|
|
721
|
+
type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
|
|
722
|
+
|
|
723
|
+
declare class NotificationsApiService {
|
|
724
|
+
private client;
|
|
725
|
+
constructor(client: Client);
|
|
726
|
+
list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
|
|
727
|
+
toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
|
|
728
|
+
toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
|
|
729
|
+
delete(id: number[]): Promise<void>;
|
|
730
|
+
deleteAll(): Promise<void>;
|
|
731
|
+
getPermission(): Promise<{
|
|
732
|
+
enabled: boolean;
|
|
733
|
+
}>;
|
|
734
|
+
setPermission(permission: boolean): Promise<void>;
|
|
735
|
+
getSubscription(): Promise<NotificationActionGroup>;
|
|
736
|
+
setSubscription(data: NotificationActionGroup): Promise<void>;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
declare class StorageFilesApiService {
|
|
740
|
+
private client;
|
|
741
|
+
constructor(client: Client);
|
|
742
|
+
read(path: string, params: any): Promise<ResponseItem<any>>;
|
|
743
|
+
replace(params: {
|
|
744
|
+
path: string;
|
|
745
|
+
divide_id?: number;
|
|
746
|
+
}, data: any): Promise<ResponseItem<StorageElement>>;
|
|
747
|
+
upload(file: File, path: string, divide_id?: number): Promise<ResponseItem<StorageElement>>;
|
|
748
|
+
uploadNet(data: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
type Interceptor<T = any> = {
|
|
752
|
+
fulfilled: (value: T) => T | Promise<T>;
|
|
753
|
+
rejected: (error: any) => any;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
declare class Client {
|
|
757
|
+
state: NbAppState;
|
|
758
|
+
rest: Rest;
|
|
759
|
+
AuthApi: AuthApiService;
|
|
760
|
+
ConnectionsApi: ConnectionsApiService;
|
|
761
|
+
DiscoveryApi: DiscoveryApiService;
|
|
762
|
+
DivideApi: DivideApiService;
|
|
763
|
+
ExtensionsApi: ExtensionsApiService;
|
|
764
|
+
ExtensionsExternalApi: ExtensionsExternalApiService;
|
|
765
|
+
FcaApi: FcaApiService;
|
|
766
|
+
GatewayApi: GatewayApiService;
|
|
767
|
+
GroupApi: GroupApiService;
|
|
768
|
+
LicenseApi: LicenseApiService;
|
|
769
|
+
LogstashApi: LogstashApiService;
|
|
770
|
+
NotificationsApi: NotificationsApiService;
|
|
771
|
+
RoleApi: RoleApiService;
|
|
772
|
+
ShareApi: ShareApiService;
|
|
773
|
+
StorageElementApi: StorageElementApiService;
|
|
774
|
+
StorageFilesApi: StorageFilesApiService;
|
|
775
|
+
StorageShareApi: StorageShareApiService;
|
|
776
|
+
StorageTrashApi: StorageTrashApiService;
|
|
777
|
+
UserApi: UserApiService;
|
|
778
|
+
requestInterceptors: Interceptor<RequestInit>[];
|
|
779
|
+
responseInterceptors: Interceptor<Response>[];
|
|
780
|
+
constructor(clientParams: NbClientParams);
|
|
781
|
+
request: {
|
|
782
|
+
use: (fulfilled: (config: RequestInit) => RequestInit | Promise<RequestInit>, rejected: (error: any) => any) => void;
|
|
783
|
+
};
|
|
784
|
+
response: {
|
|
785
|
+
use: (fulfilled: (response: Response) => Response | Promise<Response>, rejected: (error: any) => any) => void;
|
|
786
|
+
};
|
|
787
|
+
resetParams(params: Partial<NbClientParams & NbRequestParams>): void;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
declare class Rest {
|
|
791
|
+
private client;
|
|
792
|
+
constructor(client: Client);
|
|
793
|
+
get state(): NbAppState;
|
|
794
|
+
get(path: string, query?: Record<string, any>): Promise<any>;
|
|
795
|
+
post(path: string, body?: BodyInit | null): Promise<any>;
|
|
796
|
+
put(path: string, body?: BodyInit | null): Promise<any>;
|
|
797
|
+
patch(path: string, body?: BodyInit | null): Promise<any>;
|
|
798
|
+
delete(path: string, query?: Record<string, any>): Promise<any>;
|
|
799
|
+
private request;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
declare class AuthApiService {
|
|
803
|
+
private client;
|
|
804
|
+
constructor(client: Client);
|
|
805
|
+
info(): Promise<AuthType>;
|
|
806
|
+
login(data: {
|
|
807
|
+
login: string;
|
|
808
|
+
password: string;
|
|
809
|
+
is_remember: boolean;
|
|
810
|
+
}): Promise<AuthToken>;
|
|
811
|
+
ldapLogin(data: {
|
|
812
|
+
login: string;
|
|
813
|
+
password: string;
|
|
814
|
+
is_remember: boolean;
|
|
815
|
+
}): Promise<AuthToken>;
|
|
816
|
+
updateToken(data: AuthToken): Promise<any>;
|
|
817
|
+
logout(): Promise<void>;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
declare class ConnectionsApiService {
|
|
821
|
+
private client;
|
|
822
|
+
constructor(client: Client);
|
|
823
|
+
list(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
|
|
824
|
+
get(id: number): Promise<ResponseItem<Connection>>;
|
|
825
|
+
update(id: number, data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
|
|
826
|
+
delete(id: number): Promise<void>;
|
|
827
|
+
create(data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
|
|
828
|
+
dashboard(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
declare class DiscoveryApiService {
|
|
832
|
+
private client;
|
|
833
|
+
constructor(client: Client);
|
|
834
|
+
discovery(params?: any): Promise<ResponseList<Discovery>>;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
declare class DivideApiService {
|
|
838
|
+
private client;
|
|
839
|
+
constructor(client: Client);
|
|
840
|
+
divideDelete(service: DivideScope, id: number): Promise<void>;
|
|
841
|
+
divideDeleteAll(service: DivideScope, resource: DivideResourceType, access_mode: PermissionType, is_to_user_group: boolean): Promise<void>;
|
|
842
|
+
divideChange(service: DivideScope, id: number, access_mode: PermissionType): Promise<UserDivide>;
|
|
843
|
+
divideCreate(service: DivideScope, resource: DivideResourceType, id: number, access_mode: PermissionType, key: DivideMode): Promise<ResponseItem<UserDivide>>;
|
|
844
|
+
divideUsers(service: DivideScope, resource: DivideResourceType, params: RequestUserDivideParams): Promise<DivideResponseList>;
|
|
845
|
+
restrictions(params?: any): Promise<ResponseList<UserDivide>>;
|
|
846
|
+
restrictionsChange(token: number, data: {
|
|
847
|
+
status: any;
|
|
848
|
+
comment: string;
|
|
849
|
+
}): Promise<ResponseList<UserDivide>>;
|
|
850
|
+
private makeParam;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare class ExtensionsApiService {
|
|
854
|
+
private client;
|
|
855
|
+
constructor(client: Client);
|
|
856
|
+
getSetting(uniqKey: string): Promise<SettingValue[]>;
|
|
857
|
+
setSetting(uniqKey: string, params: SettingValue[]): Promise<void>;
|
|
858
|
+
deleteSetting(uniqKey: string): Promise<void>;
|
|
859
|
+
get(id: number): Promise<ResponseItem<Extension>>;
|
|
860
|
+
getByKey(uniqKey: string): Promise<ResponseItem<Extension | null>>;
|
|
861
|
+
getDefault(ext_code?: string[]): Promise<ResponseList<ExtensionDefault>>;
|
|
862
|
+
setDefault(ext_code: string, ext_uniq_key: string): Promise<ExtensionDefault>;
|
|
863
|
+
checkUpdates(): Promise<void>;
|
|
864
|
+
updateVersion(id: number, version: string): Promise<Extension>;
|
|
865
|
+
list(params?: ExtensionListParams): Promise<ResponseList<Extension & {
|
|
866
|
+
with_settings: boolean;
|
|
867
|
+
}>>;
|
|
868
|
+
delete(id: number, name: string): Promise<void>;
|
|
869
|
+
upload(file: File): Promise<ResponseItem<Extension>>;
|
|
870
|
+
install(uniq_key: string, version: string): Promise<any>;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
declare class ExtensionsExternalApiService {
|
|
874
|
+
private client;
|
|
875
|
+
constructor(client: Client);
|
|
876
|
+
listExtensionsSite(params: ExtensionExternalListParams): Promise<ResponseList<ExtensionExternalInList>>;
|
|
877
|
+
extensionDetailSite(uniqKey: string): Promise<ExtensionExternal>;
|
|
878
|
+
extensionMarkdown(uniqKey: string): Promise<string>;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
declare class FcaApiService {
|
|
882
|
+
private client;
|
|
883
|
+
constructor(client: Client);
|
|
884
|
+
info(rootID: number, path: string): Promise<StorageElement>;
|
|
885
|
+
list(rootID: number, params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
|
|
886
|
+
create(rootID: number, data: CreateStorageElementParams): Promise<any>;
|
|
887
|
+
replace(rootID: number, path: string, data: any): Promise<ResponseItem<StorageElement>>;
|
|
888
|
+
read(id: number, path: string): Promise<ResponseItem<any>>;
|
|
889
|
+
upload(rootID: number, file: File, path?: string): Promise<ResponseItem<StorageElement>>;
|
|
890
|
+
delete(rootID: number, path: string): Promise<void>;
|
|
891
|
+
check(data: ConnectionCreateParams): Promise<void>;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare class GatewayApiService {
|
|
895
|
+
private client;
|
|
896
|
+
constructor(client: Client);
|
|
897
|
+
settings(): Promise<Setting[]>;
|
|
898
|
+
changeSettings(data: SettingValue[]): Promise<void>;
|
|
899
|
+
queryInit(): Promise<QueryInit>;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
declare class GroupApiService {
|
|
903
|
+
private client;
|
|
904
|
+
constructor(client: Client);
|
|
905
|
+
list(params: RequestGroupListParams): Promise<ResponseList<Group>>;
|
|
906
|
+
listUsers(id: number): Promise<ResponseList<User>>;
|
|
907
|
+
create(data: CreateGroupParams): Promise<ResponseItem<Group>>;
|
|
908
|
+
update(id: number, data: CreateGroupParams): Promise<ResponseItem<Group>>;
|
|
909
|
+
delete(id: number): Promise<void>;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
declare class LicenseApiService {
|
|
913
|
+
private client;
|
|
914
|
+
constructor(client: Client);
|
|
915
|
+
info(): Promise<License>;
|
|
916
|
+
create(data: ChangeLicenseParams): Promise<License>;
|
|
917
|
+
check(): Promise<License>;
|
|
918
|
+
delete(): Promise<void>;
|
|
919
|
+
getHash(): Promise<{
|
|
920
|
+
hash: string;
|
|
921
|
+
}>;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
declare class LogstashApiService {
|
|
925
|
+
private client;
|
|
926
|
+
constructor(client: Client);
|
|
927
|
+
getUsersLogs(params: RequestUsersLogParams): Promise<ResponseList<UsersLog>>;
|
|
928
|
+
getSystemLogs(path: string): Promise<string>;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
declare class RoleApiService {
|
|
932
|
+
private client;
|
|
933
|
+
constructor(client: Client);
|
|
934
|
+
list(params?: RequestRoleListParams): Promise<ResponseList<Role>>;
|
|
935
|
+
get(id: number): Promise<ResponseItem<Role>>;
|
|
936
|
+
getDefault(): Promise<ResponseItem<Role>>;
|
|
937
|
+
create(data: CreateRoleParams): Promise<ResponseItem<Role>>;
|
|
938
|
+
update(id: number, data: CreateRoleParams): Promise<ResponseItem<Role>>;
|
|
939
|
+
delete(id: number): Promise<void>;
|
|
940
|
+
permissions(): Promise<ResponseList<Permission>>;
|
|
941
|
+
addPermissions(id: number, ids: number[]): Promise<void>;
|
|
942
|
+
deletePermissions(id: number, ids: number[]): Promise<void>;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
declare class UserApiService {
|
|
946
|
+
private client;
|
|
947
|
+
constructor(client: Client);
|
|
948
|
+
list(params: RequestUserListParams): Promise<ResponseList<User>>;
|
|
949
|
+
get(id: number): Promise<ResponseItem<User>>;
|
|
950
|
+
create(data: CreateUserParams): Promise<ResponseItem<User>>;
|
|
951
|
+
update(id: number, data: CreateUserParams): Promise<ResponseItem<User>>;
|
|
952
|
+
delete(id: number, params?: {
|
|
953
|
+
hard: boolean;
|
|
954
|
+
}): Promise<void>;
|
|
955
|
+
restore(id: number): Promise<void>;
|
|
956
|
+
me(): Promise<ResponseItem<User>>;
|
|
957
|
+
updateMe(data: CreateUserParams): Promise<ResponseItem<User>>;
|
|
958
|
+
createToken(data: {
|
|
959
|
+
name: string;
|
|
960
|
+
expire_in: string | null;
|
|
961
|
+
}): Promise<UserToken>;
|
|
962
|
+
listToken(params: RequestBaseParams): Promise<ResponseList<UserToken>>;
|
|
963
|
+
deleteToken(id: number): Promise<void>;
|
|
964
|
+
changeMyPassword(data: {
|
|
965
|
+
new_password: string;
|
|
966
|
+
old_password: string;
|
|
967
|
+
}): Promise<{
|
|
968
|
+
success: boolean;
|
|
969
|
+
}>;
|
|
970
|
+
changeUsersPassword(id: number, data: {
|
|
971
|
+
new_password: string;
|
|
972
|
+
}): Promise<{
|
|
973
|
+
success: boolean;
|
|
974
|
+
}>;
|
|
975
|
+
meUploadAvatar(file: Blob, fileName: string): Promise<{
|
|
976
|
+
file_path: string;
|
|
977
|
+
}>;
|
|
978
|
+
meDeleteAvatar(): Promise<void>;
|
|
979
|
+
meListSession(params: RequestBaseParams): Promise<ResponseList<UserSession>>;
|
|
980
|
+
meDeleteSession(id?: number): Promise<void>;
|
|
981
|
+
setRole(id: number, role_id?: number | null): Promise<void>;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
declare class ShareApiService {
|
|
985
|
+
private client;
|
|
986
|
+
constructor(client: Client);
|
|
987
|
+
info(path: string, share_token: string): Promise<ShareInfo>;
|
|
988
|
+
checkPassword(password: string, share_token: string): Promise<any>;
|
|
989
|
+
checkToken(share_token: string): Promise<any>;
|
|
990
|
+
restrictions(params?: RequestBaseParams): Promise<ResponseList<ShareInfo>>;
|
|
991
|
+
restrictionsChange(token: string, data: {
|
|
992
|
+
status: RestrictionStatus;
|
|
993
|
+
comment: string;
|
|
994
|
+
}): Promise<ResponseList<ShareInfo>>;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
declare class StorageShareApiService {
|
|
998
|
+
private client;
|
|
999
|
+
constructor(client: Client);
|
|
1000
|
+
info(path: string): Promise<ShareInfo>;
|
|
1001
|
+
create(path: string, permissions_type: PermissionType): Promise<ShareInfo>;
|
|
1002
|
+
change(data: ShareModel): Promise<ShareInfo>;
|
|
1003
|
+
delete(path: string): Promise<void>;
|
|
1004
|
+
refresh(token: string): Promise<ShareInfo>;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
declare class StorageElementApiService {
|
|
1008
|
+
private client;
|
|
1009
|
+
constructor(client: Client);
|
|
1010
|
+
list(params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
|
|
1011
|
+
info(params: {
|
|
1012
|
+
path: string;
|
|
1013
|
+
divide_id?: number;
|
|
1014
|
+
file_version_id?: string;
|
|
1015
|
+
}): Promise<StorageElement>;
|
|
1016
|
+
size(data: {
|
|
1017
|
+
paths: string[];
|
|
1018
|
+
divide_id?: number;
|
|
1019
|
+
}): Promise<number>;
|
|
1020
|
+
move(data: StorageElementPasteParams, hasFCA?: boolean): Promise<void>;
|
|
1021
|
+
copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
|
|
1022
|
+
pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
|
|
1023
|
+
create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1024
|
+
delete(path: string, divide_id?: number): Promise<void>;
|
|
1025
|
+
favorite(path: string): Promise<void>;
|
|
1026
|
+
removeFavorite(path: string): Promise<void>;
|
|
1027
|
+
createItem(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1028
|
+
createWorkDir(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
|
|
1029
|
+
history(params: RequestHistoryListParams): Promise<ResponseList<StorageElementHistory>>;
|
|
1030
|
+
versions(params: RequestHistoryListParams): Promise<ResponseList<StorageElementVersion>>;
|
|
1031
|
+
createVersion(data: StorageElementHistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1032
|
+
editVersion(data: StorageElementHistoryNote): Promise<ResponseItem<StorageElementVersion>>;
|
|
1033
|
+
deleteVersion(params: RequestHistoryListParams): Promise<void>;
|
|
1034
|
+
makeCurrentVersion(data: RequestHistoryListParams): Promise<void>;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
declare class StorageTrashApiService {
|
|
1038
|
+
private client;
|
|
1039
|
+
constructor(client: Client);
|
|
1040
|
+
list(params: RequestStorageListParams): Promise<ResponseList<StorageTrashElement>>;
|
|
1041
|
+
clear(item: StorageTrashItem): Promise<void>;
|
|
1042
|
+
clearAll(): Promise<void>;
|
|
1043
|
+
restore(del_groups: StorageTrashItem[]): Promise<void>;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
declare function sendRequest(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', params: NbClientParams, options: NbRequestParams, interceptors: {
|
|
1047
|
+
request: Interceptor<RequestInit>[];
|
|
1048
|
+
response: Interceptor<Response>[];
|
|
1049
|
+
}): Promise<Response>;
|
|
1050
|
+
|
|
1051
|
+
export { AuthApiService, type AuthToken, type AuthType, type ChangeLicenseParams, Client, type Connection, type ConnectionCreateParams, ConnectionGroup, ConnectionType, ConnectionsApiService, type CreateGroupParams, type CreateRoleParams, type CreateStorageElementParams, type CreateUserParams, 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, type Group, GroupApiService, type Lang, type License, LicenseApiService, LicenseError, type LockScreen, LogstashApiService, type NbAppState, type NbClientParams, type NbRequestParams, NotificationAction, type NotificationActionGroup, NotificationEntityType, type NotificationPayload, NotificationRowAction, NotificationStyle, OrderDirection, type PayloadFile, type Permission, type PermissionItem, PermissionType, type QueryInit, type RequestBaseParams, type RequestConnectionParams, type RequestGroupListParams, type RequestHistoryListParams, type RequestNotificationListParams, type RequestRoleListParams, type RequestStorageListParams, type RequestUserDivideParams, type RequestUserListParams, type RequestUsersLogParams, type ResponseItem, type ResponseList, type ResponseListNotification, Rest, type Restriction, RestrictionBooleanStatus, RestrictionSharing, RestrictionStatus, type Role, 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 StorageElement, StorageElementApiService, StorageElementContentType, type StorageElementHistory, StorageElementHistoryAction, type StorageElementHistoryNote, type StorageElementPaste, type StorageElementPasteParams, StorageElementType, type StorageElementVersion, StorageRoot, StorageShareApiService, StorageTrashApiService, type StorageTrashElement, type StorageTrashItem, Tariff, type UploadNetRequestParams, type User, UserApiService, UserAuthType, type UserDivide, type UserLabel, type UserNotification, type UserSession, UserStatus, type UserToken, UserType, type UsersLog, sendRequest };
|