nb-js-client 0.0.13 → 0.0.15

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.
Files changed (45) hide show
  1. package/dist/api/auth-api.service.d.ts +12 -11
  2. package/dist/api/connections-api.service.d.ts +9 -1
  3. package/dist/api/divide-api.service.d.ts +3 -1
  4. package/dist/api/extensions-api.service.d.ts +11 -2
  5. package/dist/api/extensions-external-api.service.d.ts +7 -2
  6. package/dist/api/fca-api.service.d.ts +6 -2
  7. package/dist/api/gateway-api.service.d.ts +18 -2
  8. package/dist/api/group-api.service.d.ts +13 -4
  9. package/dist/api/index.d.ts +6 -2
  10. package/dist/api/links-api.service.d.ts +17 -0
  11. package/dist/api/logstash-api.service.d.ts +9 -2
  12. package/dist/api/notification-api.service.d.ts +24 -0
  13. package/dist/api/role-api.service.d.ts +14 -9
  14. package/dist/api/share-api.service.d.ts +2 -1
  15. package/dist/api/storage-element-api.service.d.ts +34 -10
  16. package/dist/api/storage-files-api.service.d.ts +9 -2
  17. package/dist/api/storage-instance-api.service.d.ts +7 -0
  18. package/dist/api/storage-trash-api.service.d.ts +2 -1
  19. package/dist/api/user-api.service.d.ts +18 -1
  20. package/dist/api/version-api.service.d.ts +19 -0
  21. package/dist/bundle.cjs.js +1 -1
  22. package/dist/bundle.esm.js +1 -1
  23. package/dist/classes/client.d.ts +25 -33
  24. package/dist/classes/http-event.d.ts +24 -0
  25. package/dist/classes/http-response.d.ts +14 -0
  26. package/dist/classes/rest.d.ts +12 -7
  27. package/dist/classes/token-update.d.ts +2 -2
  28. package/dist/index.d.ts +600 -407
  29. package/dist/tools/get-cookie-value.d.ts +1 -1
  30. package/dist/tools/index.d.ts +1 -0
  31. package/dist/tools/normalize-headers.d.ts +1 -0
  32. package/dist/types/auth.d.ts +0 -2
  33. package/dist/types/base.d.ts +7 -3
  34. package/dist/types/connection.d.ts +2 -11
  35. package/dist/types/divide.d.ts +11 -1
  36. package/dist/types/extension.d.ts +1 -14
  37. package/dist/types/index.d.ts +3 -3
  38. package/dist/types/notification.d.ts +13 -8
  39. package/dist/types/request.d.ts +43 -0
  40. package/dist/types/setting.d.ts +1 -0
  41. package/dist/types/storage-trash.d.ts +11 -0
  42. package/dist/types/storage.d.ts +22 -39
  43. package/dist/types/user-log.d.ts +0 -8
  44. package/dist/types/user.d.ts +23 -17
  45. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,140 +1,3 @@
1
- interface AuthToken {
2
- access_token: string;
3
- refresh_token: string;
4
- with_cookie?: boolean;
5
- path?: string;
6
- }
7
- interface AuthType {
8
- classic: boolean;
9
- basic: boolean;
10
- ldap: boolean;
11
- }
12
-
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
1
  interface StorageElement {
139
2
  name: string;
140
3
  size: number;
@@ -148,17 +11,13 @@ interface StorageElement {
148
11
  create_date: string;
149
12
  with_preview: boolean;
150
13
  is_favorite: boolean;
151
- owner: User;
152
14
  owner_id: number;
153
15
  version?: StorageElementVersion;
154
16
  divide_id?: number;
155
17
  access_mode?: PermissionType;
156
- to_user_group_name?: string;
18
+ to_user_group_id?: number;
157
19
  created_by_extension?: string;
158
20
  }
159
- type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
160
- is_work_dir?: boolean;
161
- };
162
21
  declare enum StorageElementType {
163
22
  Dir = "dir",
164
23
  File = "file",
@@ -199,11 +58,10 @@ interface StorageElementPaste {
199
58
  from_path: string;
200
59
  to_path: string;
201
60
  }
202
- interface StorageElementPasteParams {
203
- paths: StorageElementPaste[];
204
- overwrite: boolean;
205
- from_divide_id?: number | null;
206
- to_divide_id?: number | null;
61
+ interface StorageElementHistory {
62
+ user_id: number;
63
+ action: StorageElementHistoryAction;
64
+ create_date: string;
207
65
  }
208
66
  interface StorageElementVersion {
209
67
  id: string;
@@ -215,33 +73,37 @@ interface StorageElementVersion {
215
73
  update_date: string;
216
74
  is_current_version: boolean;
217
75
  }
218
- interface StorageElementHistory {
219
- user_id: number;
220
- action: StorageElementHistoryAction;
221
- create_date: string;
222
- }
223
76
  declare enum StorageElementHistoryAction {
224
77
  Create = "create",
225
78
  Update = "update",
226
79
  Move = "move"
227
80
  }
228
- interface StorageElementHistoryNote {
81
+ interface HistoryNote {
229
82
  name: string;
230
83
  description: string;
231
84
  divide_id: number | null;
232
85
  file_version_id: string;
233
86
  path: string;
234
87
  }
235
- interface RequestHistoryListParams extends RequestBaseParams {
88
+ interface RequestVersionsSizeParams {
236
89
  path: string;
237
- divide_id?: number | null;
238
- }
239
- interface UploadNetRequestParams {
240
- path: string;
241
- url: string;
242
- overwrite?: boolean;
243
90
  divide_id?: number;
244
91
  }
92
+ interface StorageInstance {
93
+ disk_id: string;
94
+ disk_size: number;
95
+ free_size: number;
96
+ instance_number: number;
97
+ quota_size_config: number;
98
+ quota_size_setting: number;
99
+ used_size: number;
100
+ }
101
+ interface SizeBySection {
102
+ content_type: string;
103
+ size: number;
104
+ count: number;
105
+ label: string;
106
+ }
245
107
 
246
108
  declare enum DivideScope {
247
109
  Storage = "/storage/element",
@@ -267,6 +129,7 @@ declare enum DivideMode {
267
129
  Group = "to_user_group_id"
268
130
  }
269
131
  interface ShareInfo extends DivideParams {
132
+ id: number;
270
133
  token: string;
271
134
  access_mode: PermissionType;
272
135
  expire_delta: number | null;
@@ -277,6 +140,10 @@ interface ShareInfo extends DivideParams {
277
140
  update_date: string;
278
141
  owner_id: number;
279
142
  resource: string;
143
+ file_info: StorageElement;
144
+ short_url: string;
145
+ }
146
+ interface UnionRestriction extends UserDivide, ShareInfo {
280
147
  }
281
148
  interface UserDivide extends DivideParams {
282
149
  access_mode: PermissionType;
@@ -289,6 +156,11 @@ interface UserDivide extends DivideParams {
289
156
  to_user_id: number;
290
157
  type: StorageElementType;
291
158
  update_date: string;
159
+ file_info: StorageElement;
160
+ }
161
+ declare enum RestrictionModeKey {
162
+ Divide = "divide",
163
+ Share = "share"
292
164
  }
293
165
  interface DivideParams {
294
166
  restriction_status: RestrictionStatus;
@@ -313,6 +185,193 @@ interface ShareModel {
313
185
  expire_delta: number | null;
314
186
  }
315
187
 
188
+ interface NbClientParams {
189
+ host?: string;
190
+ version?: string;
191
+ }
192
+ interface NbRequestParams {
193
+ path: string;
194
+ headers?: Record<string, any>;
195
+ query?: Record<string, any>;
196
+ body?: any;
197
+ cache?: RequestCache;
198
+ }
199
+ interface NbAppState {
200
+ clientParams: NbClientParams;
201
+ requestParams: NbRequestParams;
202
+ authToken: Map<number, RequestAuthTokenParams> | null;
203
+ skipInterceptors: boolean;
204
+ }
205
+ interface ResponseItem<T> {
206
+ row: T;
207
+ }
208
+ interface ResponseList<T> {
209
+ rows: T[];
210
+ total: number;
211
+ current?: {
212
+ access_mode: PermissionType;
213
+ };
214
+ }
215
+ interface RequestBaseParams {
216
+ limit: number;
217
+ offset?: number;
218
+ order_by?: string;
219
+ order_direction?: OrderDirection;
220
+ }
221
+ declare enum OrderDirection {
222
+ DEFAULT = "",
223
+ ASC = "asc",
224
+ DESC = "desc"
225
+ }
226
+ type Lang = {
227
+ [key: string]: string;
228
+ };
229
+ declare enum EngineType {
230
+ WebSocket = "websocket",
231
+ PostMessage = "postmessage",
232
+ Empty = ""
233
+ }
234
+
235
+ type Interceptor<T = any> = {
236
+ fulfilled: (value: T) => T | Promise<T>;
237
+ rejected: (error: any) => any;
238
+ };
239
+
240
+ declare enum AccessRights {
241
+ LicenseRead = "license_read",// Просмотр
242
+ LicenseManage = "license_edit",// Управление лицензией
243
+ UsersRead = "users_read",// Просмотр
244
+ UsersCreate = "users_create",// Создание/редактирование
245
+ UsersActivate = "users_activate",// Активация/деактивация
246
+ GroupsRead = "groups_read",// Просмотр
247
+ GroupsCreate = "groups_create",// Создание/редактирование
248
+ RolesRead = "roles_read",// Просмотр списка
249
+ RolesCreate = "roles_create",// Создание/редактирование
250
+ Share = "share",// Шаринг доступа по ссылке
251
+ Divide = "divide",// Предоставление доступа
252
+ ExtensionsRead = "extensions_read",// Просмотр
253
+ ExtensionsManage = "extensions_write",// Управление расширениями
254
+ RestrictionShareRead = "restriction_share_read",// Просмотр
255
+ RestrictionShareWrite = "restriction_share_write",// Управление шарингом
256
+ RestrictionDivideRead = "restriction_divide_read",// Просмотр
257
+ RestrictionDivideWrite = "restriction_divide_write",// Управление доступами
258
+ ReadUserLogs = "read_user_logs",// Просмотр пользовательских логов
259
+ ReadSystemLogs = "read_system_logs",// Просмотр системных логов
260
+ ConnectionsRead = "connections_read",// Просмотр
261
+ ConnectionsDividing = "connections_dividing",// Предоставление доступа(поделиться)
262
+ ConnectionsYandexDisk = "connections_yandex_disk",// Yandex диск
263
+ ConnectionsSsh = "connections_ssh",// Ssh
264
+ ConnectionsMail = "connections_mail",// Почта
265
+ ConnectionsS3 = "connections_s3",// S3
266
+ ConnectionsDiscord = "connections_discord",// Discord
267
+ ConnectionsWebdav = "connections_webdav",// Webdav
268
+ ConnectionsNextcloud = "connections_nextcloud",// Nextcloud
269
+ ConnectionsNextbox = "connections_nextbox",// Nextbox
270
+ ConnectionsHttpProxy = "connections_http_proxy",// Http proxy
271
+ SystemInfoServiceList = "system_info_service_list",// Просмотр
272
+ SettingsRead = "settings_read",// Просмотр
273
+ SettingsWrite = "settings_write"
274
+ }
275
+ declare const CONNECTIONS_PERMISSION: AccessRights[];
276
+
277
+ interface User {
278
+ id: number;
279
+ create_date: string;
280
+ update_date: string;
281
+ last_login_date: string;
282
+ login: string;
283
+ password: string;
284
+ first_name: string;
285
+ middle_name: string;
286
+ last_name: string;
287
+ email: string;
288
+ auth_type: UserAuthType;
289
+ avatar_path: string;
290
+ home_path: string;
291
+ status: UserStatus;
292
+ type: UserType;
293
+ role_id: number | null;
294
+ }
295
+ type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name' | 'avatar_path'>;
296
+ declare enum UserAuthType {
297
+ Native = "native",
298
+ Ldap = "ldap"
299
+ }
300
+ declare enum UserStatus {
301
+ Registering = "registering",
302
+ Activated = "activated",
303
+ Blocked = "blocked",
304
+ BlockedByLicense = "blocked_by_license"
305
+ }
306
+ declare enum UserType {
307
+ User = "user",
308
+ Guest = "guest",
309
+ Emperor = "emperor",
310
+ Anonymous = "anonymous"
311
+ }
312
+ interface UserSession {
313
+ create_date: string;
314
+ expire_in: string;
315
+ ip: string;
316
+ user_agent: string;
317
+ id: number;
318
+ is_current?: boolean;
319
+ }
320
+ interface UserToken {
321
+ id: number;
322
+ name: string;
323
+ expire_in: string;
324
+ create_date: string;
325
+ token?: string;
326
+ }
327
+ interface UserGroup {
328
+ id: number;
329
+ name: string;
330
+ description: string;
331
+ amount_users: number;
332
+ create_date: string;
333
+ owner_id: number;
334
+ owner: UserLabel;
335
+ update_date: string;
336
+ icon: string;
337
+ icon_color: string;
338
+ }
339
+ interface UserRole {
340
+ id: number;
341
+ name: string;
342
+ description: string;
343
+ create_date: string;
344
+ update_date: string;
345
+ is_default: boolean;
346
+ owner_id: number;
347
+ grant_access_all: boolean;
348
+ permissions_id?: number[];
349
+ }
350
+
351
+ interface AccessToken {
352
+ exp: number;
353
+ iat: number;
354
+ login: string;
355
+ user_id: number;
356
+ is_remember: boolean;
357
+ with_cookie: boolean;
358
+ grant_access_all: boolean;
359
+ user_type: UserType;
360
+ permissions: {
361
+ [key: string]: AccessRights[];
362
+ };
363
+ }
364
+
365
+ interface AuthToken {
366
+ access_token: string;
367
+ refresh_token: string;
368
+ }
369
+ interface AuthType {
370
+ classic: boolean;
371
+ basic: boolean;
372
+ ldap: boolean;
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
- to_user_group_name?: string;
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
- type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
738
-
739
- declare class NotificationsApiService {
740
- private client;
741
- constructor(client: Client);
742
- list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
743
- toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
744
- toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
745
- delete(id: number[]): Promise<void>;
746
- deleteAll(): Promise<void>;
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;
@@ -776,82 +781,83 @@ declare class TokenUpdate {
776
781
  private tokenUpdateResolve;
777
782
  constructor(authApiService: AuthApiService);
778
783
  isTokenExpire(timestamp: number): boolean;
779
- refreshToken(authToken: AuthToken): Promise<AuthToken | null>;
784
+ refreshToken(params: RequestAuthTokenParams): Promise<AuthToken | null>;
780
785
  private waitForTokenUpdate;
781
786
  }
782
787
 
783
788
  declare class Client {
784
789
  state: NbAppState;
785
- AuthApi: AuthApiService;
786
- ConnectionsApi: ConnectionsApiService;
787
- DiscoveryApi: DiscoveryApiService;
788
- DivideApi: DivideApiService;
789
- ExtensionsApi: ExtensionsApiService;
790
- ExtensionsExternalApi: ExtensionsExternalApiService;
791
- FcaApi: FcaApiService;
792
- GatewayApi: GatewayApiService;
793
- GroupApi: GroupApiService;
794
- LicenseApi: LicenseApiService;
795
- LogstashApi: LogstashApiService;
796
- NotificationsApi: NotificationsApiService;
797
- RoleApi: RoleApiService;
798
- ShareApi: ShareApiService;
799
- StorageElementApi: StorageElementApiService;
800
- StorageFilesApi: StorageFilesApiService;
801
- StorageShareApi: StorageShareApiService;
802
- StorageTrashApi: StorageTrashApiService;
803
- UserApi: UserApiService;
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<Response>[];
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: Response) => Response | Promise<Response>, rejected: (error: any) => any) => void;
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
+ declare const BASE_URL_V1 = "/api/v1";
826
+ declare const BASE_URL_V2 = "/api/v2";
827
+ declare const HOST: string;
825
828
  declare class Rest {
826
829
  private client;
827
830
  private tokenUpdate;
828
831
  constructor(client: Client, tokenUpdate: TokenUpdate);
829
832
  get state(): NbAppState;
830
- get(path: string, query?: Record<string, any>): Promise<any>;
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, query?: Record<string, any>): Promise<any>;
835
- private sendRequest;
833
+ get(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
834
+ post(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
835
+ put(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
836
+ patch(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
837
+ delete(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
838
+ request<T>(method: RequestMethod, path: string, config?: RequestConfig): Promise<T | HttpResponse<T> | HttpEvent<T>>;
839
+ changeBaseUrlVersion<T>(baseUrl: string, handler: () => Promise<T>): Promise<T>;
840
+ changeHost<T>(host: string, handler: () => Promise<T>): Promise<T>;
836
841
  }
837
842
 
838
843
  declare class AuthApiService {
839
844
  private client;
840
845
  constructor(client: Client);
841
846
  info(): Promise<AuthType>;
842
- login(data: {
843
- login: string;
844
- password: string;
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>;
847
+ login(data: RequestAuthSettingsParams): Promise<AuthToken>;
848
+ ldapLogin(data: RequestAuthSettingsParams): Promise<AuthToken>;
849
+ updateToken(data: RequestAuthTokenParams): Promise<AuthToken>;
853
850
  logout(): Promise<void>;
854
851
  }
852
+ interface RequestAuthSettingsParams {
853
+ login: string;
854
+ password: string;
855
+ is_remember: boolean;
856
+ }
857
+ interface RequestAuthTokenParams extends AuthToken {
858
+ with_cookie?: boolean;
859
+ path?: string;
860
+ }
855
861
 
856
862
  declare class ConnectionsApiService {
857
863
  private client;
@@ -863,6 +869,14 @@ declare class ConnectionsApiService {
863
869
  create(data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
864
870
  dashboard(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
865
871
  }
872
+ interface RequestConnectionParams extends RequestBaseParams {
873
+ id?: number[];
874
+ name?: string | null;
875
+ group_name?: ConnectionGroup;
876
+ is_divided?: boolean;
877
+ type?: string;
878
+ }
879
+ type ConnectionCreateParams = Omit<Connection, 'group_name'>;
866
880
 
867
881
  declare class DiscoveryApiService {
868
882
  private client;
@@ -878,6 +892,8 @@ declare class DivideApiService {
878
892
  divideChange(service: DivideScope, id: number, access_mode: PermissionType): Promise<UserDivide>;
879
893
  divideCreate(service: DivideScope, resource: DivideResourceType, id: number, access_mode: PermissionType, key: DivideMode): Promise<ResponseItem<UserDivide>>;
880
894
  divideUsers(service: DivideScope, resource: DivideResourceType, params: RequestUserDivideParams): Promise<DivideResponseList>;
895
+ getRestriction(id: number): Promise<UnionRestriction>;
896
+ restrictionSize(key: string | number, modeKey: RestrictionModeKey): Promise<number>;
881
897
  restrictions(params?: any): Promise<ResponseList<UserDivide>>;
882
898
  restrictionsChange(token: number, data: {
883
899
  status: any;
@@ -902,16 +918,102 @@ declare class ExtensionsApiService {
902
918
  with_settings: boolean;
903
919
  }>>;
904
920
  delete(id: number, name: string): Promise<void>;
905
- upload(file: File): Promise<ResponseItem<Extension>>;
921
+ upload(onProgress: OnUploadProgress, file: File): Promise<HttpEvent<ResponseItem<Extension>>>;
906
922
  install(uniq_key: string, version: string): Promise<any>;
907
923
  }
924
+ interface ExtensionListParams extends RequestBaseParams {
925
+ search?: string | null;
926
+ uniq_key?: string[];
927
+ file_name_ext?: string;
928
+ type?: StorageElementType[];
929
+ ext_value?: string | null;
930
+ file_mode?: ExtensionFileMode[];
931
+ lang?: string;
932
+ }
908
933
 
909
934
  declare class ExtensionsExternalApiService {
910
935
  private client;
911
936
  constructor(client: Client);
912
937
  listExtensionsSite(params: ExtensionExternalListParams): Promise<ResponseList<ExtensionExternalInList>>;
913
938
  extensionDetailSite(uniqKey: string): Promise<ExtensionExternal>;
914
- extensionMarkdown(uniqKey: string): Promise<string>;
939
+ extensionMarkdown(uniqKey: string, config: {
940
+ responseType: ResponseType;
941
+ }): Promise<string>;
942
+ }
943
+ interface ExtensionExternalListParams extends RequestBaseParams {
944
+ search_field?: string;
945
+ }
946
+
947
+ declare class StorageElementApiService {
948
+ private client;
949
+ private fcaApiService;
950
+ constructor(client: Client, fcaApiService: FcaApiService);
951
+ list(params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
952
+ info(params: {
953
+ path: string;
954
+ divide_id?: number;
955
+ file_version_id?: string;
956
+ }): Promise<StorageElement>;
957
+ combineInfo({ root, rootId, path, file_version_id, }: StorageRouteData): Promise<StorageElement>;
958
+ size(data: {
959
+ paths: string[];
960
+ divide_id?: number;
961
+ }): Promise<number>;
962
+ move(params: StorageElementPasteParams, to: StorageRoot, from: StorageRoot): Promise<void>;
963
+ copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
964
+ pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
965
+ create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
966
+ delete(path: string, divide_id?: number): Promise<void>;
967
+ favorite(path: string): Promise<void>;
968
+ removeFavorite(path: string): Promise<void>;
969
+ createItem(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
970
+ createWorkDir(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
971
+ sizeWithSection(params?: {
972
+ owner_id: number;
973
+ with_trash: boolean;
974
+ }): Promise<SizeBySection[] | null>;
975
+ }
976
+ interface RequestStorageListParams extends RequestBaseParams {
977
+ search?: string;
978
+ is_favorite?: boolean;
979
+ is_divided?: boolean;
980
+ divide_id?: number | null;
981
+ path?: string;
982
+ min_size?: number | null;
983
+ max_size?: number | null;
984
+ type?: StorageElementType;
985
+ file_name_ext?: string[];
986
+ from_sharing_token?: string;
987
+ from_path?: string;
988
+ from_sharing_password?: string;
989
+ }
990
+ interface StorageElementPasteParams {
991
+ paths: StorageElementPaste[];
992
+ overwrite: boolean;
993
+ from_divide_id?: number | null;
994
+ to_divide_id?: number | null;
995
+ }
996
+ type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
997
+ is_work_dir?: boolean;
998
+ };
999
+
1000
+ declare class StorageFilesApiService {
1001
+ private client;
1002
+ constructor(client: Client);
1003
+ read(path: string, params: any): Promise<ResponseItem<any>>;
1004
+ replace(params: {
1005
+ path: string;
1006
+ divide_id?: number;
1007
+ }, data: any): Promise<ResponseItem<StorageElement>>;
1008
+ upload(onProgress: OnUploadProgress, file: File, path: string, divide_id?: number): Promise<HttpEvent<ResponseItem<StorageElement>>>;
1009
+ uploadNet(data: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
1010
+ }
1011
+ interface UploadNetRequestParams {
1012
+ path: string;
1013
+ url: string;
1014
+ overwrite?: boolean;
1015
+ divide_id?: number;
1016
+ connection_divide_id?: number;
915
1017
  }
916
1018
 
917
1019
  declare class FcaApiService {
@@ -922,7 +1024,8 @@ declare class FcaApiService {
922
1024
  create(rootID: number, data: CreateStorageElementParams): Promise<any>;
923
1025
  replace(rootID: number, path: string, data: any): Promise<ResponseItem<StorageElement>>;
924
1026
  read(id: number, path: string): Promise<ResponseItem<any>>;
925
- upload(rootID: number, file: File, path?: string): Promise<ResponseItem<StorageElement>>;
1027
+ upload(onProgress: OnUploadProgress, rootID: number, file: File, path?: string): Promise<HttpEvent<ResponseItem<StorageElement>>>;
1028
+ uploadNet(rootID: number, params: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
926
1029
  delete(rootID: number, path: string): Promise<void>;
927
1030
  check(data: ConnectionCreateParams): Promise<void>;
928
1031
  }
@@ -932,18 +1035,43 @@ declare class GatewayApiService {
932
1035
  constructor(client: Client);
933
1036
  settings(): Promise<Setting[]>;
934
1037
  changeSettings(data: SettingValue[]): Promise<void>;
935
- queryInit(): Promise<QueryInit>;
1038
+ queryInit(): Promise<QueryInitResponse>;
1039
+ }
1040
+ interface QueryInitResponse {
1041
+ license?: License;
1042
+ unread_notifications?: ResponseList<UserNotification> & {
1043
+ total_all: number;
1044
+ };
1045
+ extensions_apps?: ResponseList<Extension>;
1046
+ extensions_defaults: ResponseList<ExtensionDefault>;
1047
+ me?: User;
1048
+ cache_users: User[];
1049
+ lock_screen: LockScreen;
1050
+ restrictions?: Restriction;
1051
+ open_in_desktop_settings: {
1052
+ open_in_desktop_enabled: boolean;
1053
+ };
1054
+ inject_scripts?: string[];
936
1055
  }
937
1056
 
938
1057
  declare class GroupApiService {
939
1058
  private client;
940
1059
  constructor(client: Client);
941
- list(params: RequestGroupListParams): Promise<ResponseList<Group>>;
1060
+ list(params: RequestUserGroupListParams): Promise<ResponseList<UserGroup>>;
942
1061
  listUsers(id: number): Promise<ResponseList<User>>;
943
- create(data: CreateGroupParams): Promise<ResponseItem<Group>>;
944
- update(id: number, data: CreateGroupParams): Promise<ResponseItem<Group>>;
1062
+ create(data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
1063
+ update(id: number, data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
945
1064
  delete(id: number): Promise<void>;
946
1065
  }
1066
+ interface RequestUserGroupListParams extends RequestBaseParams {
1067
+ id?: number[];
1068
+ name?: string;
1069
+ description?: string;
1070
+ search_field?: string;
1071
+ }
1072
+ type CreateUserGroupParams = Pick<UserGroup, 'name' | 'description'> & {
1073
+ users?: number[];
1074
+ };
947
1075
 
948
1076
  declare class LicenseApiService {
949
1077
  private client;
@@ -957,25 +1085,115 @@ declare class LicenseApiService {
957
1085
  }>;
958
1086
  }
959
1087
 
1088
+ declare class LinksApiService {
1089
+ private client;
1090
+ constructor(client: Client);
1091
+ createShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
1092
+ updateShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
1093
+ }
1094
+ interface CutLinkRequest {
1095
+ entity_id: number;
1096
+ entity_type: string;
1097
+ full_url: string;
1098
+ }
1099
+ interface CutLinkResponse extends CutLinkRequest {
1100
+ full_url: string;
1101
+ short_url: string;
1102
+ }
1103
+
960
1104
  declare class LogstashApiService {
961
1105
  private client;
962
1106
  constructor(client: Client);
963
1107
  getUsersLogs(params: RequestUsersLogParams): Promise<ResponseList<UsersLog>>;
964
- getSystemLogs(path: string): Promise<string>;
1108
+ getSystemLogs(path: string, start: number, end: number): Promise<HttpResponse<string>>;
1109
+ }
1110
+ interface RequestUsersLogParams extends RequestBaseParams {
1111
+ user_id?: string;
1112
+ search_field?: string;
1113
+ from_date?: string;
1114
+ to_date?: string;
1115
+ with_me?: boolean;
965
1116
  }
966
1117
 
1118
+ declare class NotificationApiService {
1119
+ private client;
1120
+ constructor(client: Client);
1121
+ list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
1122
+ toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
1123
+ toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
1124
+ delete(id: number[]): Promise<void>;
1125
+ deleteAll(): Promise<void>;
1126
+ getPermission(): Promise<{
1127
+ enabled: boolean;
1128
+ }>;
1129
+ setPermission(permission: boolean): Promise<void>;
1130
+ getSubscription(): Promise<NotificationActionGroup>;
1131
+ setSubscription(data: NotificationActionGroup): Promise<void>;
1132
+ }
1133
+ interface RequestNotificationListParams extends RequestBaseParams {
1134
+ read?: boolean;
1135
+ search?: string;
1136
+ }
1137
+ type ResponseListNotification = ResponseList<UserNotification> & {
1138
+ total_all: number;
1139
+ };
1140
+
967
1141
  declare class RoleApiService {
968
1142
  private client;
969
1143
  constructor(client: Client);
970
- list(params?: RequestRoleListParams): Promise<ResponseList<Role>>;
971
- get(id: number): Promise<ResponseItem<Role>>;
972
- getDefault(): Promise<ResponseItem<Role>>;
973
- create(data: CreateRoleParams): Promise<ResponseItem<Role>>;
974
- update(id: number, data: CreateRoleParams): Promise<ResponseItem<Role>>;
1144
+ list(params?: RequestUserRoleListParams): Promise<ResponseList<UserRole>>;
1145
+ get(id: number): Promise<ResponseItem<UserRole>>;
1146
+ getDefault(): Promise<ResponseItem<UserRole>>;
1147
+ create(data: CreateUserRoleParams): Promise<ResponseItem<UserRole>>;
1148
+ update(id: number, data: Partial<CreateUserRoleParams>): Promise<ResponseItem<UserRole>>;
975
1149
  delete(id: number): Promise<void>;
976
- permissions(): Promise<ResponseList<Permission>>;
977
- addPermissions(id: number, ids: number[]): Promise<void>;
978
- deletePermissions(id: number, ids: number[]): Promise<void>;
1150
+ permissionList(): Promise<ResponseList<Permission>>;
1151
+ addPermission(id: number, ids: number[]): Promise<void>;
1152
+ deletePermission(id: number, ids: number[]): Promise<void>;
1153
+ }
1154
+ interface RequestUserRoleListParams extends RequestBaseParams {
1155
+ id?: number[];
1156
+ search_field?: string;
1157
+ }
1158
+ type CreateUserRoleParams = Pick<UserRole, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
1159
+
1160
+ declare class ShareApiService {
1161
+ private client;
1162
+ constructor(client: Client);
1163
+ info(path: string, share_token: string): Promise<ShareInfo>;
1164
+ checkPassword(password: string, share_token: string): Promise<any>;
1165
+ checkToken(share_token: string): Promise<any>;
1166
+ getRestriction(token: string): Promise<UnionRestriction>;
1167
+ restrictions(params?: RequestBaseParams): Promise<ResponseList<ShareInfo>>;
1168
+ restrictionsChange(token: string, data: {
1169
+ status: RestrictionStatus;
1170
+ comment: string;
1171
+ }): Promise<ResponseList<ShareInfo>>;
1172
+ }
1173
+
1174
+ declare class StorageInstanceApiService {
1175
+ private client;
1176
+ constructor(client: Client);
1177
+ instance(): Promise<ResponseList<StorageInstance>>;
1178
+ }
1179
+
1180
+ declare class StorageShareApiService {
1181
+ private client;
1182
+ constructor(client: Client);
1183
+ info(path: string): Promise<ShareInfo>;
1184
+ create(path: string, permissions_type: PermissionType): Promise<ShareInfo>;
1185
+ change(data: ShareModel): Promise<ShareInfo>;
1186
+ delete(path: string): Promise<void>;
1187
+ refresh(token: string): Promise<ShareInfo>;
1188
+ }
1189
+
1190
+ declare class StorageTrashApiService {
1191
+ private client;
1192
+ constructor(client: Client);
1193
+ list(params: RequestStorageListParams): Promise<ResponseList<StorageTrashElement>>;
1194
+ clear(item: StorageTrashItem): Promise<void>;
1195
+ clearAll(): Promise<void>;
1196
+ restore(del_groups: StorageTrashItem[]): Promise<void>;
979
1197
  }
980
1198
 
981
1199
  declare class UserApiService {
@@ -1016,67 +1234,40 @@ declare class UserApiService {
1016
1234
  meDeleteSession(id?: number): Promise<void>;
1017
1235
  setRole(id: number, role_id?: number | null): Promise<void>;
1018
1236
  }
1019
-
1020
- declare class ShareApiService {
1021
- private client;
1022
- constructor(client: Client);
1023
- info(path: string, share_token: string): Promise<ShareInfo>;
1024
- checkPassword(password: string, share_token: string): Promise<any>;
1025
- checkToken(share_token: string): Promise<any>;
1026
- restrictions(params?: RequestBaseParams): Promise<ResponseList<ShareInfo>>;
1027
- restrictionsChange(token: string, data: {
1028
- status: RestrictionStatus;
1029
- comment: string;
1030
- }): Promise<ResponseList<ShareInfo>>;
1031
- }
1032
-
1033
- declare class StorageShareApiService {
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>;
1237
+ interface RequestUserListParams extends RequestBaseParams {
1238
+ email?: string;
1239
+ first_name?: string;
1240
+ middle_name?: string;
1241
+ last_name?: string;
1242
+ login?: string;
1243
+ is_admin?: boolean;
1244
+ id?: number[];
1245
+ role_ids?: number[];
1246
+ statuses?: UserStatus[];
1247
+ search_field?: string;
1248
+ with_me?: boolean;
1249
+ type?: UserType;
1250
+ exclude_type?: UserType;
1251
+ exclude_ids?: number[];
1071
1252
  }
1253
+ type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
1072
1254
 
1073
- declare class StorageTrashApiService {
1255
+ declare class VersionApiService {
1074
1256
  private client;
1075
1257
  constructor(client: Client);
1076
- list(params: RequestStorageListParams): Promise<ResponseList<StorageTrashElement>>;
1077
- clear(item: StorageTrashItem): Promise<void>;
1078
- clearAll(): Promise<void>;
1079
- restore(del_groups: StorageTrashItem[]): Promise<void>;
1258
+ history(params: HistoryRequestParams): Promise<ResponseList<StorageElementHistory>>;
1259
+ versions(params: HistoryListRequestParams): Promise<ResponseList<StorageElementVersion>>;
1260
+ create(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
1261
+ edit(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
1262
+ delete(params: HistoryRequestParams): Promise<void>;
1263
+ size(params: HistoryRequestParams): Promise<number>;
1264
+ makeCurrent(params: HistoryRequestParams): Promise<void>;
1265
+ }
1266
+ type HistoryListRequestParams = HistoryRequestParams & RequestBaseParams;
1267
+ interface HistoryRequestParams {
1268
+ path: string;
1269
+ divide_id?: number | null;
1270
+ file_version_id?: string;
1080
1271
  }
1081
1272
 
1082
1273
  declare const applyInterceptors: <T>(interceptors: {
@@ -1084,8 +1275,10 @@ declare const applyInterceptors: <T>(interceptors: {
1084
1275
  rejected?: (error: any) => T | Promise<T>;
1085
1276
  }[], arg: T) => Promise<T>;
1086
1277
 
1087
- declare const getCookieValue: (name: string) => string | null;
1278
+ declare function getCookieValue(name: string): string | null;
1088
1279
 
1089
1280
  declare const makeUrlParams: (params: Record<string, any>) => URLSearchParams;
1090
1281
 
1091
- 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, type StorageRouteData, StorageShareApiService, StorageTrashApiService, type StorageTrashElement, type StorageTrashItem, Tariff, TokenUpdate, type UploadNetRequestParams, type User, UserApiService, UserAuthType, type UserDivide, type UserLabel, type UserNotification, type UserSession, UserStatus, type UserToken, UserType, type UsersLog, applyInterceptors, getCookieValue, makeUrlParams };
1282
+ declare function normalizeHeaders(headers: Headers | [string, string][] | Record<string, string>): Record<string, string>;
1283
+
1284
+ export { AccessRights, type AccessToken, AuthApiService, type AuthToken, type AuthType, BASE_URL_V1, BASE_URL_V2, 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, HOST, 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 };