nb-js-client 0.0.34 → 0.0.35

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 (57) hide show
  1. package/dist/api/auth-api.service.d.ts +20 -0
  2. package/dist/api/connections-api.service.d.ts +20 -0
  3. package/dist/api/discovery-api.service.d.ts +8 -0
  4. package/dist/api/divide-api.service.d.ts +19 -0
  5. package/dist/api/extensions-api.service.d.ts +33 -0
  6. package/dist/api/extensions-external-api.service.d.ts +14 -0
  7. package/dist/api/fca-api.service.d.ts +21 -0
  8. package/dist/api/gateway-api.service.d.ts +25 -0
  9. package/dist/api/group-api.service.d.ts +20 -0
  10. package/dist/api/index.d.ts +22 -0
  11. package/dist/api/license-api.service.d.ts +13 -0
  12. package/dist/api/links-api.service.d.ts +18 -0
  13. package/dist/api/logstash-api.service.d.ts +15 -0
  14. package/dist/api/notification-api.service.d.ts +25 -0
  15. package/dist/api/role-api.service.d.ts +20 -0
  16. package/dist/api/share-api.service.d.ts +15 -0
  17. package/dist/api/storage-element-api.service.d.ts +62 -0
  18. package/dist/api/storage-files-api.service.d.ts +23 -0
  19. package/dist/api/storage-instance-api.service.d.ts +7 -0
  20. package/dist/api/storage-share-api.service.d.ts +11 -0
  21. package/dist/api/storage-trash-api.service.d.ts +11 -0
  22. package/dist/api/user-api.service.d.ts +57 -0
  23. package/dist/api/version-api.service.d.ts +19 -0
  24. package/dist/bundle.cjs.js +1 -0
  25. package/dist/bundle.esm.js +1 -0
  26. package/dist/classes/client.d.ts +41 -0
  27. package/dist/classes/index.d.ts +3 -0
  28. package/dist/classes/rest.d.ts +24 -0
  29. package/dist/classes/token-update.d.ts +10 -0
  30. package/dist/index.d.ts +1313 -0
  31. package/dist/tools/apply-interceptors.d.ts +4 -0
  32. package/dist/tools/get-cookie-value.d.ts +1 -0
  33. package/dist/tools/index.d.ts +4 -0
  34. package/dist/tools/make-url-params.d.ts +1 -0
  35. package/dist/tools/normalize-headers.d.ts +1 -0
  36. package/dist/types/access-rights.d.ts +36 -0
  37. package/dist/types/access-token.d.ts +15 -0
  38. package/dist/types/auth.d.ts +9 -0
  39. package/dist/types/base.d.ts +48 -0
  40. package/dist/types/connection.d.ts +36 -0
  41. package/dist/types/discovery.d.ts +15 -0
  42. package/dist/types/divide.d.ts +82 -0
  43. package/dist/types/extension.d.ts +80 -0
  44. package/dist/types/index.d.ts +19 -0
  45. package/dist/types/interceptor.d.ts +4 -0
  46. package/dist/types/license.d.ts +23 -0
  47. package/dist/types/lock-screen.d.ts +4 -0
  48. package/dist/types/notification.d.ts +90 -0
  49. package/dist/types/permission.d.ts +10 -0
  50. package/dist/types/request.d.ts +44 -0
  51. package/dist/types/restriction.d.ts +9 -0
  52. package/dist/types/setting.d.ts +58 -0
  53. package/dist/types/storage-trash.d.ts +25 -0
  54. package/dist/types/storage.d.ts +114 -0
  55. package/dist/types/user-log.d.ts +9 -0
  56. package/dist/types/user.d.ts +74 -0
  57. package/package.json +3 -2
@@ -0,0 +1,1313 @@
1
+ interface StorageElement {
2
+ name: string;
3
+ size: number;
4
+ shared: boolean;
5
+ full_path: string;
6
+ path: string;
7
+ type: StorageElementType;
8
+ file_name_ext: string;
9
+ content_type: StorageElementContentType;
10
+ update_date: string;
11
+ create_date: string;
12
+ with_preview: boolean;
13
+ is_favorite: boolean;
14
+ owner_id: number;
15
+ version?: StorageElementVersion;
16
+ divide_id?: number;
17
+ access_mode?: PermissionType;
18
+ to_user_group_id?: number;
19
+ created_by_extension?: string;
20
+ check_status?: StorageElementCheckStatus;
21
+ }
22
+ declare enum StorageElementType {
23
+ Dir = "dir",
24
+ File = "file",
25
+ WorkDir = "work_dir"
26
+ }
27
+ declare enum StorageElementContentType {
28
+ Any = "any",
29
+ Dir = "dir",
30
+ Code = "code",
31
+ Image = "image",
32
+ Audio = "audio",
33
+ Video = "video",
34
+ Text = "text",
35
+ Doc = "doc",
36
+ Xls = "xls",
37
+ Ppt = "ppt"
38
+ }
39
+ declare enum StorageRoot {
40
+ my = "my",
41
+ fca = "fca",
42
+ divide = "divide",
43
+ share = "share",
44
+ favorite = "favorite"
45
+ }
46
+ interface StorageRouteData {
47
+ path: string;
48
+ root: StorageRoot;
49
+ rootId: number;
50
+ divideDir?: string;
51
+ share_token?: string;
52
+ share_password?: string;
53
+ share_back?: boolean;
54
+ dash_back?: boolean;
55
+ access_mode?: PermissionType;
56
+ file_version_id?: string;
57
+ }
58
+ interface StorageElementPaste {
59
+ from_path: string;
60
+ to_path: string;
61
+ }
62
+ interface StorageElementHistory {
63
+ user_id: number;
64
+ action: StorageElementHistoryAction;
65
+ create_date: string;
66
+ }
67
+ interface StorageElementVersion {
68
+ id: string;
69
+ size: number;
70
+ user_id: number;
71
+ name: string;
72
+ description: string;
73
+ create_date: string;
74
+ update_date: string;
75
+ is_current_version: boolean;
76
+ }
77
+ declare enum StorageElementHistoryAction {
78
+ Create = "create",
79
+ Update = "update",
80
+ Move = "move"
81
+ }
82
+ interface HistoryNote {
83
+ name: string;
84
+ description: string;
85
+ divide_id: number | null;
86
+ file_version_id: string;
87
+ path: string;
88
+ }
89
+ declare enum StorageElementCheckStatus {
90
+ CheckNull = 0,
91
+ CheckInProgress = 1,
92
+ CheckPositive = 2,
93
+ CheckNegative = 3
94
+ }
95
+ interface RequestVersionsSizeParams {
96
+ path: string;
97
+ divide_id?: number;
98
+ }
99
+ interface StorageInstance {
100
+ disk_id: string;
101
+ disk_size: number;
102
+ free_size: number;
103
+ instance_number: number;
104
+ quota_size_config: number;
105
+ quota_size_setting: number;
106
+ used_size: number;
107
+ }
108
+ interface SizeBySection {
109
+ content_type: string;
110
+ size: number;
111
+ count: number;
112
+ label: string;
113
+ }
114
+
115
+ declare enum DivideScope {
116
+ Storage = "/storage/element",
117
+ Connection = "/connections"
118
+ }
119
+ type DivideResourceType = string | number;
120
+ declare enum PermissionType {
121
+ CLOSE = "",
122
+ READ = "r",
123
+ WRITE = "rw"
124
+ }
125
+ declare enum RestrictionStatus {
126
+ WAITING = "waiting",
127
+ APPROVED = "approved",
128
+ REJECTED = "rejected"
129
+ }
130
+ declare enum RestrictionBooleanStatus {
131
+ TRUE = "true",
132
+ FALSE = "false"
133
+ }
134
+ declare enum DivideMode {
135
+ User = "to_user_id",
136
+ Group = "to_user_group_id"
137
+ }
138
+ interface ShareInfo extends DivideParams {
139
+ id: number;
140
+ token: string;
141
+ access_mode: PermissionType;
142
+ expire_delta: number | null;
143
+ expire_in?: string;
144
+ with_password: boolean;
145
+ share_sub_type: StorageElementType;
146
+ create_date: string;
147
+ update_date: string;
148
+ owner_id: number;
149
+ resource: string;
150
+ file_info: StorageElement;
151
+ short_url: string;
152
+ }
153
+ interface UnionRestriction extends UserDivide, ShareInfo {
154
+ }
155
+ interface UserDivide extends DivideParams {
156
+ access_mode: PermissionType;
157
+ create_date: string;
158
+ id: number;
159
+ name: string;
160
+ owner_id: number;
161
+ resource: string;
162
+ to_user_group_id: number;
163
+ to_user_id: number;
164
+ type: StorageElementType;
165
+ update_date: string;
166
+ file_info: StorageElement;
167
+ }
168
+ declare enum RestrictionModeKey {
169
+ Divide = "divide",
170
+ Share = "share"
171
+ }
172
+ interface DivideParams {
173
+ restriction_status: RestrictionStatus;
174
+ moderator_id?: number;
175
+ comment: string;
176
+ }
177
+ interface RequestUserDivideParams {
178
+ is_to_user_group: boolean;
179
+ access_mode?: PermissionType;
180
+ limit?: number;
181
+ offset?: number;
182
+ search_field?: string;
183
+ }
184
+ type DivideResponseList = ResponseList<UserDivide> & {
185
+ total_r: number;
186
+ total_rw: number;
187
+ };
188
+ interface ShareModel {
189
+ token: string;
190
+ access_mode: PermissionType;
191
+ password: string | null;
192
+ expire_delta: number | null;
193
+ }
194
+
195
+ interface NbClientParams {
196
+ host?: string;
197
+ version?: string;
198
+ }
199
+ interface NbRequestParams {
200
+ path: string;
201
+ headers?: Record<string, any>;
202
+ query?: Record<string, any>;
203
+ body?: any;
204
+ cache?: RequestCache;
205
+ }
206
+ interface NbAppState {
207
+ clientParams: NbClientParams;
208
+ requestParams: NbRequestParams;
209
+ authToken: Map<number, RequestAuthTokenParams> | null;
210
+ skipInterceptors: boolean;
211
+ }
212
+ interface ResponseItem<T> {
213
+ row: T;
214
+ }
215
+ interface ResponseList<T> {
216
+ rows: T[];
217
+ total: number;
218
+ current?: {
219
+ access_mode: PermissionType;
220
+ };
221
+ }
222
+ interface RequestBaseParams {
223
+ limit: number;
224
+ offset?: number;
225
+ order_by?: string;
226
+ order_direction?: OrderDirection;
227
+ }
228
+ declare enum OrderDirection {
229
+ DEFAULT = "",
230
+ ASC = "asc",
231
+ DESC = "desc"
232
+ }
233
+ type Lang = {
234
+ [key: string]: string;
235
+ };
236
+ declare enum EngineType {
237
+ WebSocket = "websocket",
238
+ PostMessage = "postmessage",
239
+ Empty = ""
240
+ }
241
+
242
+ type Interceptor<T = any> = {
243
+ fulfilled: (value: T) => T | Promise<T>;
244
+ rejected: (error: any) => any;
245
+ };
246
+
247
+ declare class TokenUpdate {
248
+ private authApiService;
249
+ isUpdating: boolean;
250
+ private tokenUpdateResolve;
251
+ constructor(authApiService: AuthApiService);
252
+ isTokenExpire(timestamp: number): boolean;
253
+ refreshToken(params: RequestAuthTokenParams): Promise<any>;
254
+ waitForTokenUpdate(): Promise<void>;
255
+ }
256
+
257
+ declare class Client {
258
+ state: NbAppState;
259
+ AuthApiService: AuthApiService;
260
+ ConnectionsApiService: ConnectionsApiService;
261
+ DiscoveryApiService: DiscoveryApiService;
262
+ DivideApiService: DivideApiService;
263
+ ExtensionsApiService: ExtensionsApiService;
264
+ ExtensionsExternalApiService: ExtensionsExternalApiService;
265
+ FcaApiService: FcaApiService;
266
+ GatewayApiService: GatewayApiService;
267
+ GroupApiService: GroupApiService;
268
+ LicenseApiService: LicenseApiService;
269
+ LinksApiService: LinksApiService;
270
+ LogstashApiService: LogstashApiService;
271
+ NotificationApiService: NotificationApiService;
272
+ RoleApiService: RoleApiService;
273
+ ShareApiService: ShareApiService;
274
+ StorageElementApiService: StorageElementApiService;
275
+ StorageFilesApiService: StorageFilesApiService;
276
+ StorageInstanceApiService: StorageInstanceApiService;
277
+ StorageShareApiService: StorageShareApiService;
278
+ StorageTrashApiService: StorageTrashApiService;
279
+ UserApiService: UserApiService;
280
+ VersionApiService: VersionApiService;
281
+ tokenUpdate: TokenUpdate;
282
+ rest: Rest;
283
+ requestInterceptors: Interceptor<RequestInit>[];
284
+ responseInterceptors: Interceptor<any>[];
285
+ constructor(clientParams: NbClientParams);
286
+ request: {
287
+ use: (fulfilled: (config: RequestInit) => RequestInit | Promise<RequestInit>, rejected: (error: any) => any) => void;
288
+ };
289
+ response: {
290
+ use: (fulfilled: (response: any) => any | Promise<any>, rejected: (error: any) => any) => void;
291
+ };
292
+ }
293
+
294
+ declare enum AccessRights {
295
+ LicenseRead = "license_read",// Просмотр
296
+ LicenseManage = "license_edit",// Управление лицензией
297
+ UsersRead = "users_read",// Просмотр
298
+ UsersCreate = "users_create",// Создание/редактирование
299
+ UsersActivate = "users_activate",// Активация/деактивация
300
+ GroupsRead = "groups_read",// Просмотр
301
+ GroupsCreate = "groups_create",// Создание/редактирование
302
+ RolesRead = "roles_read",// Просмотр списка
303
+ RolesCreate = "roles_create",// Создание/редактирование
304
+ Share = "share",// Шаринг доступа по ссылке
305
+ Divide = "divide",// Предоставление доступа
306
+ ExtensionsRead = "extensions_read",// Просмотр
307
+ ExtensionsManage = "extensions_write",// Управление расширениями
308
+ RestrictionShareRead = "restriction_share_read",// Просмотр
309
+ RestrictionShareWrite = "restriction_share_write",// Управление шарингом
310
+ RestrictionDivideRead = "restriction_divide_read",// Просмотр
311
+ RestrictionDivideWrite = "restriction_divide_write",// Управление доступами
312
+ ReadUserLogs = "read_user_logs",// Просмотр пользовательских логов
313
+ ReadSystemLogs = "read_system_logs",// Просмотр системных логов
314
+ ConnectionsRead = "connections_read",// Просмотр
315
+ ConnectionsDividing = "connections_dividing",// Предоставление доступа(поделиться)
316
+ ConnectionsYandexDisk = "connections_yandex_disk",// Yandex диск
317
+ ConnectionsSsh = "connections_ssh",// Ssh
318
+ ConnectionsMail = "connections_mail",// Почта
319
+ ConnectionsS3 = "connections_s3",// S3
320
+ ConnectionsDiscord = "connections_discord",// Discord
321
+ ConnectionsWebdav = "connections_webdav",// Webdav
322
+ ConnectionsNextcloud = "connections_nextcloud",// Nextcloud
323
+ ConnectionsNextbox = "connections_nextbox",// Nextbox
324
+ ConnectionsHttpProxy = "connections_http_proxy",// Http proxy
325
+ SystemInfoServiceList = "system_info_service_list",// Просмотр
326
+ SettingsRead = "settings_read",// Просмотр
327
+ SettingsWrite = "settings_write"
328
+ }
329
+ declare const CONNECTIONS_PERMISSION: AccessRights[];
330
+
331
+ interface User {
332
+ id: number;
333
+ create_date: string;
334
+ update_date: string;
335
+ last_login_date: string;
336
+ login: string;
337
+ password: string;
338
+ first_name: string;
339
+ middle_name: string;
340
+ last_name: string;
341
+ email: string;
342
+ auth_type: UserAuthType;
343
+ avatar_path: string;
344
+ home_path: string;
345
+ status: UserStatus;
346
+ type: UserType;
347
+ role_id: number | null;
348
+ }
349
+ type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name' | 'avatar_path'>;
350
+ declare enum UserAuthType {
351
+ Native = "native",
352
+ Ldap = "ldap",
353
+ Vk = "vk"
354
+ }
355
+ declare enum UserStatus {
356
+ Registering = "registering",
357
+ Activated = "activated",
358
+ Blocked = "blocked",
359
+ BlockedByLicense = "blocked_by_license"
360
+ }
361
+ declare enum UserType {
362
+ User = "user",
363
+ Guest = "guest",
364
+ Emperor = "emperor",
365
+ Anonymous = "anonymous"
366
+ }
367
+ interface UserSession {
368
+ create_date: string;
369
+ expire_in: string;
370
+ ip: string;
371
+ user_agent: string;
372
+ id: number;
373
+ is_current?: boolean;
374
+ }
375
+ interface UserToken {
376
+ id: number;
377
+ name: string;
378
+ expire_in: string;
379
+ create_date: string;
380
+ token?: string;
381
+ }
382
+ interface UserGroup {
383
+ id: number;
384
+ name: string;
385
+ description: string;
386
+ amount_users: number;
387
+ create_date: string;
388
+ owner_id: number;
389
+ owner: UserLabel;
390
+ update_date: string;
391
+ icon: string;
392
+ icon_color: string;
393
+ }
394
+ interface UserRole {
395
+ id: number;
396
+ name: string;
397
+ description: string;
398
+ create_date: string;
399
+ update_date: string;
400
+ is_default: boolean;
401
+ owner_id: number;
402
+ grant_access_all: boolean;
403
+ permissions_id?: number[];
404
+ }
405
+
406
+ interface AccessToken {
407
+ exp: number;
408
+ iat: number;
409
+ login: string;
410
+ user_id: number;
411
+ is_remember: boolean;
412
+ with_cookie: boolean;
413
+ grant_access_all: boolean;
414
+ user_type: UserType;
415
+ permissions: {
416
+ [key: string]: AccessRights[];
417
+ };
418
+ }
419
+
420
+ interface AuthToken {
421
+ access_token: string;
422
+ refresh_token: string;
423
+ }
424
+ interface AuthType {
425
+ classic: boolean;
426
+ basic: boolean;
427
+ ldap: boolean;
428
+ }
429
+
430
+ interface Connection {
431
+ id: number;
432
+ name: string;
433
+ type: ConnectionType;
434
+ address: string;
435
+ login: string;
436
+ password: string;
437
+ port: number;
438
+ root_path: string;
439
+ group_name: ConnectionGroup;
440
+ owner_id: number;
441
+ divide_id?: number;
442
+ access_mode?: PermissionType;
443
+ update_date: string;
444
+ create_date: string;
445
+ expire_in: string;
446
+ to_user_group_id?: number;
447
+ }
448
+ declare enum ConnectionGroup {
449
+ Storages = "storages_connections_group",
450
+ Webhooks = "webhooks_connections_group",
451
+ Unknown = "unknown_connections_group",
452
+ Proxy = "proxy_connections_group"
453
+ }
454
+ declare enum ConnectionType {
455
+ SSH = "ssh_connection",
456
+ YandexDisk = "yandex_disk",
457
+ Mail = "mail",
458
+ Discord = "discord",
459
+ Webdav = "webdav_connection",
460
+ Nextcloud = "nextcloud_connection",
461
+ NextBox = "nextbox_connection",
462
+ HttpProxy = "http_proxy_connection",
463
+ S3 = "s3_connection"
464
+ }
465
+
466
+ interface Discovery {
467
+ id: number;
468
+ create_date: string;
469
+ update_date: string;
470
+ active: boolean;
471
+ back_url: string;
472
+ front_url: string;
473
+ instance_number: number;
474
+ name: string;
475
+ route: null;
476
+ route_name: string;
477
+ with_swagger: boolean;
478
+ dynamic_config_path?: string;
479
+ version: string;
480
+ }
481
+
482
+ type SettingLang = string | Lang | null;
483
+ declare enum SettingControlType {
484
+ Text = "text",
485
+ String = "string",
486
+ Number = "number",
487
+ CheckBox = "checkbox",
488
+ Select = "select",
489
+ RadioList = "radio_list",
490
+ ConnectionChoose = "connection_choose",
491
+ MultiConnectionChoose = "multi_connection_choose"
492
+ }
493
+ interface Setting {
494
+ fields: SettingField[];
495
+ title?: SettingLang;
496
+ name?: string;
497
+ context?: string;
498
+ toggle_box?: boolean;
499
+ collapsed_box?: boolean;
500
+ activity_switch?: boolean;
501
+ }
502
+ interface SettingVariant {
503
+ label?: SettingLang;
504
+ value: any;
505
+ }
506
+ interface SettingField {
507
+ name: string;
508
+ value: any;
509
+ label?: SettingLang;
510
+ help?: SettingLang;
511
+ placeholder?: SettingLang;
512
+ view?: SettingFieldView;
513
+ disabled?: boolean;
514
+ control: {
515
+ type: SettingControlType;
516
+ filter?: Record<string, any>;
517
+ variants?: SettingVariant[];
518
+ };
519
+ }
520
+ type SettingFieldView = SettingViewConnectionChoose | SettingViewSelect | any;
521
+ interface SettingViewConnectionChoose {
522
+ id: number;
523
+ name: string;
524
+ owner_id: number;
525
+ }
526
+ interface SettingViewSelect {
527
+ show_clear?: boolean;
528
+ }
529
+ interface SettingValueField {
530
+ name: string;
531
+ value: any;
532
+ }
533
+ interface SettingValue {
534
+ name: string;
535
+ context?: string;
536
+ fields: SettingValueField[];
537
+ activity_switch?: boolean;
538
+ }
539
+
540
+ interface ExtensionDefault {
541
+ ext_value: string;
542
+ extension_meta_uniq_key: string;
543
+ icon_path: string;
544
+ devlocal?: boolean;
545
+ }
546
+ declare enum ExtensionType {
547
+ App = "app",
548
+ File = "file",
549
+ WorkDir = "work_dir"
550
+ }
551
+ declare enum ExtensionFileMode {
552
+ Read = "read",
553
+ ReadAndWrite = "read_and_write",
554
+ Write = "write"
555
+ }
556
+ interface Extension {
557
+ id: number;
558
+ create_date: string;
559
+ update_date: string;
560
+ with_settings?: boolean;
561
+ name: Lang;
562
+ devlocal?: boolean;
563
+ dev_frame_params?: {
564
+ engine: EngineType;
565
+ host?: string;
566
+ port?: number;
567
+ };
568
+ version: string;
569
+ latest_repo_version?: string;
570
+ description: Lang;
571
+ uniq_key: string;
572
+ icon: string;
573
+ type: ExtensionType;
574
+ path: string;
575
+ file?: {
576
+ mode: ExtensionFileMode;
577
+ ext: string[];
578
+ default_ext?: string;
579
+ index: string;
580
+ };
581
+ app?: {
582
+ menu: {
583
+ index: string;
584
+ icon: string;
585
+ label: Lang;
586
+ };
587
+ };
588
+ work_dir?: {
589
+ index: string;
590
+ };
591
+ settings?: SettingValue[];
592
+ settings_template?: Setting[];
593
+ }
594
+ interface ExtensionMetaPayload {
595
+ uniq_key: string;
596
+ }
597
+ interface ExtensionExternalInList {
598
+ id: number;
599
+ create_date: string;
600
+ update_date: string;
601
+ name: string;
602
+ description: string;
603
+ uniq_key: string;
604
+ version: string;
605
+ tags: string[];
606
+ links: string[];
607
+ }
608
+ interface ExtensionExternal extends ExtensionExternalInList {
609
+ versions: VersionExtension[];
610
+ images?: string[];
611
+ with_readme?: boolean;
612
+ }
613
+ interface VersionExtension {
614
+ version: string;
615
+ size: number;
616
+ }
617
+
618
+ interface License {
619
+ custom_max_users_count: number | null;
620
+ expire_in: string;
621
+ key: string | null;
622
+ plan: Tariff;
623
+ error?: LicenseError | string;
624
+ }
625
+ interface ChangeLicenseParams {
626
+ key: string;
627
+ domain: string;
628
+ }
629
+ declare enum Tariff {
630
+ Free = "free",
631
+ Business = "business",
632
+ Enterprise = "enterprise"
633
+ }
634
+ declare enum LicenseError {
635
+ NotActivated = "License not activated",
636
+ Blocked = "License blocked",
637
+ Expired = "License has been expired",
638
+ NotValid = "License not valid",
639
+ NotFound = "license file not found"
640
+ }
641
+
642
+ interface LockScreen {
643
+ enabled: boolean;
644
+ duration: number;
645
+ }
646
+
647
+ interface UserNotification {
648
+ id: number;
649
+ create_date: string;
650
+ update_date: string;
651
+ entity_type: NotificationEntityType;
652
+ action: NotificationAction;
653
+ title: string;
654
+ msg: string;
655
+ transition: boolean;
656
+ read: boolean;
657
+ style: NotificationStyle;
658
+ payload: NotificationPayload;
659
+ from_user_id?: number;
660
+ owner?: UserLabel;
661
+ }
662
+ declare enum NotificationEntityType {
663
+ Dir = "dir",
664
+ File = "file",
665
+ User = "user",
666
+ Other = "other",
667
+ WorkDir = "work_dir",
668
+ License = "license",
669
+ Extension = "extension",
670
+ Connection = "connection"
671
+ }
672
+ declare enum NotificationAction {
673
+ OpenSharing = "open_sharing",
674
+ ChangeSharing = "change_sharing",
675
+ CancelSharing = "cancel_sharing",
676
+ DivideDirAddFileToOwner = "divide_dir_add_file_to_owner",
677
+ DivideDirAddDirToOwner = "divide_dir_add_dir_to_owner",
678
+ DivideDirAddWorkDirToOwner = "divide_dir_add_work_dir_to_owner",
679
+ DivideConnectionAddFileToOwner = "divide_connection_add_file_to_owner",
680
+ DivideConnectionAddDirToOwner = "divide_connection_add_dir_to_owner",
681
+ CancelDivideDir = "cancel_divide_dir",
682
+ CancelDivideFile = "cancel_divide_file",
683
+ CancelDivideWorkDir = "cancel_divide_work_dir",
684
+ CancelDivideConnection = "cancel_divide_connection",
685
+ DeleteExtension = "delete_extension",
686
+ NewVersionExtension = "new_version_extension",
687
+ TransferData = "transfer_data",
688
+ AllowInternalAccessUser = "allow_internal_access_to_user",
689
+ BlockInternalAccessUser = "block_internal_access_to_user",
690
+ WaitInternalAccessUser = "wait_internal_access_to_user",
691
+ WaitInternalAccessUserCreate = "wait_internal_access_to_user_create",
692
+ AllowInternalAccessGroup = "allow_internal_access_to_group",
693
+ BlockInternalAccessGroup = "block_internal_access_to_group",
694
+ WaitInternalAccessGroup = "wait_internal_access_to_group",
695
+ WaitInternalAccessGroupCreate = "wait_internal_access_to_group_create",
696
+ AllowSharing = "allow_sharing",
697
+ BlockSharing = "block_sharing",
698
+ WaitSharing = "wait_sharing",
699
+ WaitSharingCreate = "wait_sharing_create",
700
+ Other = "other"
701
+ }
702
+ declare enum NotificationRowAction {
703
+ Read = "read",
704
+ Unread = "unread",
705
+ Delete = "delete"
706
+ }
707
+ declare enum NotificationStyle {
708
+ Plain = "plain",
709
+ Success = "success",
710
+ Info = "info",
711
+ Warning = "warning",
712
+ Error = "error"
713
+ }
714
+ type NotificationActionGroup = {
715
+ [key: string]: NotificationActionEnabledGroup;
716
+ };
717
+ interface NotificationActionEnabledGroup {
718
+ enabled_system: boolean;
719
+ enabled_mail: boolean;
720
+ }
721
+ type NotificationPayload = PayloadFile | any;
722
+ interface PayloadFile {
723
+ access_mode: PermissionType;
724
+ create_date: string;
725
+ id: number;
726
+ name: string;
727
+ owner_id: number;
728
+ path: string;
729
+ to_user_id: number;
730
+ type: StorageElementType;
731
+ update_date: string;
732
+ }
733
+
734
+ interface Permission {
735
+ group_name: Lang;
736
+ permissions: PermissionItem[];
737
+ }
738
+ interface PermissionItem {
739
+ id: number;
740
+ priority: number;
741
+ title: Lang;
742
+ }
743
+
744
+ declare enum ResponseType {
745
+ ArrayBuffer = "arraybuffer",
746
+ Blob = "blob",
747
+ Json = "json",
748
+ Text = "text"
749
+ }
750
+ declare enum RequestMethod {
751
+ GET = "GET",
752
+ POST = "POST",
753
+ PUT = "PUT",
754
+ PATCH = "PATCH",
755
+ DELETE = "DELETE"
756
+ }
757
+ declare enum RequestObserve {
758
+ Body = "body",
759
+ Response = "response"
760
+ }
761
+ interface HttpResponse<T> {
762
+ status: number;
763
+ statusText: string;
764
+ headers: Headers;
765
+ body: T;
766
+ }
767
+ interface HttpEvent<T> {
768
+ loaded?: number;
769
+ total?: number;
770
+ body?: HttpResponse<T>;
771
+ error?: any;
772
+ }
773
+ interface RequestConfig {
774
+ params?: Record<string, string>;
775
+ body?: any;
776
+ cache?: RequestCache;
777
+ headers?: HeadersInit;
778
+ observe?: RequestObserve;
779
+ responseType?: ResponseType;
780
+ signal?: AbortSignal | null;
781
+ onUploadProgress?: OnUploadProgress;
782
+ }
783
+ interface ProgressEvent {
784
+ loaded: number;
785
+ total: number;
786
+ }
787
+ type OnUploadProgress = (progressEvent: ProgressEvent) => void;
788
+
789
+ declare enum RestrictionSharing {
790
+ NONE = "none",
791
+ SOFT = "soft",
792
+ HARD = "hard"
793
+ }
794
+ interface Restriction {
795
+ sharing: RestrictionSharing;
796
+ divide: RestrictionSharing;
797
+ }
798
+
799
+ interface UsersLog {
800
+ create_date: string;
801
+ service_name: string;
802
+ user_login: string;
803
+ event_type: string;
804
+ action: string;
805
+ resource: string;
806
+ description: string;
807
+ }
808
+
809
+ interface StorageTrashElement {
810
+ content_type: StorageElementContentType;
811
+ del_group_id: number;
812
+ file_name_ext: string;
813
+ full_path: string;
814
+ name: string;
815
+ path: string;
816
+ size: number;
817
+ type: StorageElementType;
818
+ update_date: string;
819
+ version: VersionStorageTrashElement;
820
+ with_preview: boolean;
821
+ }
822
+ interface VersionStorageTrashElement {
823
+ create_date: string;
824
+ description: string;
825
+ id: string;
826
+ name: string | null;
827
+ size: number;
828
+ update_date: string;
829
+ user_id: number;
830
+ }
831
+ type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
832
+
833
+ declare const BASE_URL_V1 = "/api/v1";
834
+ declare const BASE_URL_V2 = "/api/v2";
835
+ declare const HOST: string;
836
+ declare class Rest {
837
+ private client;
838
+ private tokenUpdate;
839
+ constructor(client: Client, tokenUpdate: TokenUpdate);
840
+ get state(): NbAppState;
841
+ get(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
842
+ post(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
843
+ put(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
844
+ patch(path: string, body?: BodyInit | null, config?: RequestConfig): Promise<any>;
845
+ delete(path: string, params?: Record<string, any>, config?: RequestConfig): Promise<any>;
846
+ upload(path: string, body?: BodyInit | null, config?: RequestConfig): {
847
+ promise: Promise<any>;
848
+ abort: () => void;
849
+ };
850
+ request<T>(method: RequestMethod, path: string, config?: RequestConfig): Promise<T | HttpResponse<T> | HttpEvent<T>>;
851
+ changeBaseUrlVersion<T>(baseUrl: string, handler: () => Promise<T>): Promise<T>;
852
+ changeHost<T>(host: string, handler: () => Promise<T>): Promise<T>;
853
+ }
854
+
855
+ declare class AuthApiService {
856
+ private client;
857
+ constructor(client: Client);
858
+ info(): Promise<AuthType>;
859
+ login(data: RequestAuthSettingsParams): Promise<AuthToken>;
860
+ ldapLogin(data: RequestAuthSettingsParams): Promise<AuthToken>;
861
+ updateToken(data: RequestAuthTokenParams): Promise<AuthToken>;
862
+ logout(): Promise<void>;
863
+ }
864
+ interface RequestAuthSettingsParams {
865
+ login: string;
866
+ password: string;
867
+ is_remember: boolean;
868
+ }
869
+ interface RequestAuthTokenParams extends AuthToken {
870
+ with_cookie?: boolean;
871
+ path?: string;
872
+ }
873
+
874
+ declare class ConnectionsApiService {
875
+ private client;
876
+ constructor(client: Client);
877
+ list(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
878
+ get(id: number): Promise<ResponseItem<Connection>>;
879
+ update(id: number, data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
880
+ delete(id: number): Promise<void>;
881
+ create(data: ConnectionCreateParams): Promise<ResponseItem<Connection>>;
882
+ dashboard(params: RequestConnectionParams): Promise<ResponseList<Connection>>;
883
+ }
884
+ interface RequestConnectionParams extends RequestBaseParams {
885
+ id?: number[];
886
+ name?: string | null;
887
+ group_name?: ConnectionGroup;
888
+ is_divided?: boolean;
889
+ type?: string;
890
+ }
891
+ type ConnectionCreateParams = Omit<Connection, 'group_name'>;
892
+
893
+ declare class DiscoveryApiService {
894
+ private client;
895
+ constructor(client: Client);
896
+ discovery(params?: any): Promise<ResponseList<Discovery>>;
897
+ }
898
+
899
+ declare class DivideApiService {
900
+ private client;
901
+ constructor(client: Client);
902
+ divideDelete(service: DivideScope, id: number): Promise<void>;
903
+ divideDeleteAll(service: DivideScope, resource: DivideResourceType, access_mode: PermissionType, is_to_user_group: boolean): Promise<void>;
904
+ divideChange(service: DivideScope, id: number, access_mode: PermissionType): Promise<UserDivide>;
905
+ divideCreate(service: DivideScope, resource: DivideResourceType, id: number, access_mode: PermissionType, key: DivideMode): Promise<ResponseItem<UserDivide>>;
906
+ divideUsers(service: DivideScope, resource: DivideResourceType, params: RequestUserDivideParams): Promise<DivideResponseList>;
907
+ getRestriction(id: number): Promise<UnionRestriction>;
908
+ restrictionSize(key: string | number, modeKey: RestrictionModeKey): Promise<number>;
909
+ restrictions(params?: any): Promise<ResponseList<UserDivide>>;
910
+ restrictionsChange(token: number, data: {
911
+ status: any;
912
+ comment: string;
913
+ }): Promise<ResponseList<UserDivide>>;
914
+ private makeParam;
915
+ }
916
+
917
+ declare class ExtensionsApiService {
918
+ private client;
919
+ constructor(client: Client);
920
+ getSetting(uniqKey: string): Promise<SettingValue[]>;
921
+ setSetting(uniqKey: string, params: SettingValue[]): Promise<void>;
922
+ deleteSetting(uniqKey: string): Promise<void>;
923
+ get(id: number): Promise<ResponseItem<Extension>>;
924
+ getByKey(uniqKey: string): Promise<ResponseItem<Extension | null>>;
925
+ getDefault(ext_code?: string[]): Promise<ResponseList<ExtensionDefault>>;
926
+ setDefault(ext_code: string, ext_uniq_key: string): Promise<ExtensionDefault>;
927
+ checkUpdates(): Promise<void>;
928
+ updateVersion(id: number, version: string): Promise<Extension>;
929
+ list(params?: ExtensionListParams): Promise<ResponseList<Extension & {
930
+ with_settings: boolean;
931
+ }>>;
932
+ delete(id: number, name: string): Promise<void>;
933
+ upload(onProgress: OnUploadProgress, file: File): {
934
+ promise: Promise<HttpEvent<ResponseItem<Extension>>>;
935
+ abort: () => void;
936
+ };
937
+ install(uniq_key: string, version: string): Promise<any>;
938
+ }
939
+ interface ExtensionListParams extends RequestBaseParams {
940
+ search?: string | null;
941
+ uniq_key?: string[];
942
+ file_name_ext?: string;
943
+ type?: StorageElementType[];
944
+ ext_value?: string | null;
945
+ file_mode?: ExtensionFileMode[];
946
+ lang?: string;
947
+ }
948
+
949
+ declare class ExtensionsExternalApiService {
950
+ private client;
951
+ constructor(client: Client);
952
+ listExtensionsSite(params: ExtensionExternalListParams): Promise<ResponseList<ExtensionExternalInList>>;
953
+ extensionDetailSite(uniqKey: string): Promise<ExtensionExternal>;
954
+ extensionMarkdown(uniqKey: string, config: {
955
+ responseType: ResponseType;
956
+ }): Promise<string>;
957
+ }
958
+ interface ExtensionExternalListParams extends RequestBaseParams {
959
+ search_field?: string;
960
+ }
961
+
962
+ declare class StorageElementApiService {
963
+ private client;
964
+ private fcaApiService;
965
+ constructor(client: Client, fcaApiService: FcaApiService);
966
+ list(params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
967
+ info(params: {
968
+ path: string;
969
+ divide_id?: number;
970
+ file_version_id?: string;
971
+ }): Promise<StorageElement>;
972
+ combineInfo({ root, rootId, path, file_version_id, }: StorageRouteData): Promise<StorageElement>;
973
+ size(data: StorageItemSizeParams): Promise<number>;
974
+ move(params: StorageElementPasteParams, to: StorageRoot, from: StorageRoot): Promise<void>;
975
+ copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
976
+ pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
977
+ create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
978
+ delete(path: string, divide_id?: number): Promise<void>;
979
+ favorite(path: string): Promise<void>;
980
+ removeFavorite(path: string): Promise<void>;
981
+ createItem(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
982
+ createWorkDir(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
983
+ sizeWithSection(params?: {
984
+ owner_id: number;
985
+ with_trash: boolean;
986
+ }): Promise<SizeBySection[] | null>;
987
+ }
988
+ interface RequestStorageListParams extends RequestBaseParams {
989
+ search?: string;
990
+ is_favorite?: boolean;
991
+ is_divided?: boolean;
992
+ divide_id?: number | null;
993
+ path?: string;
994
+ min_size?: number | null;
995
+ max_size?: number | null;
996
+ type?: StorageElementType;
997
+ file_name_ext?: string[];
998
+ from_sharing_token?: string;
999
+ from_path?: string;
1000
+ from_sharing_password?: string;
1001
+ }
1002
+ interface StorageElementPasteParams {
1003
+ paths: StorageElementPaste[];
1004
+ overwrite: boolean;
1005
+ from_divide_id?: number | null;
1006
+ to_divide_id?: number | null;
1007
+ }
1008
+ type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
1009
+ is_work_dir?: boolean;
1010
+ };
1011
+ interface StorageItemSizeParams {
1012
+ paths: StorageItemSizePathParams[];
1013
+ is_divided?: boolean;
1014
+ is_favorite?: boolean;
1015
+ }
1016
+ interface StorageItemSizePathParams {
1017
+ path: string;
1018
+ divide_id?: number;
1019
+ }
1020
+
1021
+ declare class StorageFilesApiService {
1022
+ private client;
1023
+ constructor(client: Client);
1024
+ read(path: string, params: any): Promise<ResponseItem<any>>;
1025
+ replace(params: {
1026
+ path: string;
1027
+ divide_id?: number;
1028
+ }, data: any): Promise<ResponseItem<StorageElement>>;
1029
+ upload(onProgress: OnUploadProgress, file: File, path: string, divide_id?: number): {
1030
+ promise: Promise<HttpEvent<ResponseItem<StorageElement>>>;
1031
+ abort: () => void;
1032
+ };
1033
+ uploadNet(data: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
1034
+ }
1035
+ interface UploadNetRequestParams {
1036
+ path: string;
1037
+ url: string;
1038
+ overwrite?: boolean;
1039
+ divide_id?: number;
1040
+ connection_divide_id?: number;
1041
+ }
1042
+
1043
+ declare class FcaApiService {
1044
+ private client;
1045
+ constructor(client: Client);
1046
+ info(rootID: number, path: string): Promise<StorageElement>;
1047
+ list(rootID: number, params?: RequestStorageListParams): Promise<ResponseList<StorageElement>>;
1048
+ create(rootID: number, data: CreateStorageElementParams): Promise<any>;
1049
+ replace(rootID: number, path: string, data: any): Promise<ResponseItem<StorageElement>>;
1050
+ read(id: number, path: string): Promise<ResponseItem<any>>;
1051
+ upload(onProgress: OnUploadProgress, rootID: number, file: File, path?: string): {
1052
+ promise: Promise<HttpEvent<ResponseItem<StorageElement>>>;
1053
+ abort: () => void;
1054
+ };
1055
+ uploadNet(rootID: number, params: UploadNetRequestParams): Promise<ResponseItem<StorageElement>>;
1056
+ delete(rootID: number, path: string): Promise<void>;
1057
+ check(data: ConnectionCreateParams): Promise<void>;
1058
+ }
1059
+
1060
+ declare class GatewayApiService {
1061
+ private client;
1062
+ constructor(client: Client);
1063
+ settings(): Promise<Setting[]>;
1064
+ changeSettings(data: SettingValue[]): Promise<void>;
1065
+ queryInit(): Promise<QueryInitResponse>;
1066
+ }
1067
+ interface QueryInitResponse {
1068
+ license?: License;
1069
+ unread_notifications?: ResponseList<UserNotification> & {
1070
+ total_all: number;
1071
+ };
1072
+ extensions_apps?: ResponseList<Extension>;
1073
+ extensions_defaults: ResponseList<ExtensionDefault>;
1074
+ me?: User;
1075
+ cache_users: User[];
1076
+ lock_screen: LockScreen;
1077
+ restrictions?: Restriction;
1078
+ open_in_desktop_settings: {
1079
+ open_in_desktop_enabled: boolean;
1080
+ };
1081
+ inject_scripts?: string[];
1082
+ }
1083
+
1084
+ declare class GroupApiService {
1085
+ private client;
1086
+ constructor(client: Client);
1087
+ list(params: RequestUserGroupListParams): Promise<ResponseList<UserGroup>>;
1088
+ listUsers(id: number): Promise<ResponseList<User>>;
1089
+ create(data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
1090
+ update(id: number, data: CreateUserGroupParams): Promise<ResponseItem<UserGroup>>;
1091
+ delete(id: number): Promise<void>;
1092
+ }
1093
+ interface RequestUserGroupListParams extends RequestBaseParams {
1094
+ id?: number[];
1095
+ name?: string;
1096
+ description?: string;
1097
+ search_field?: string;
1098
+ }
1099
+ type CreateUserGroupParams = Pick<UserGroup, 'name' | 'description'> & {
1100
+ users?: number[];
1101
+ };
1102
+
1103
+ declare class LicenseApiService {
1104
+ private client;
1105
+ constructor(client: Client);
1106
+ info(): Promise<License>;
1107
+ create(data: ChangeLicenseParams): Promise<License>;
1108
+ check(): Promise<License>;
1109
+ delete(): Promise<void>;
1110
+ getHash(): Promise<{
1111
+ hash: string;
1112
+ }>;
1113
+ }
1114
+
1115
+ declare class LinksApiService {
1116
+ private client;
1117
+ constructor(client: Client);
1118
+ createShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
1119
+ updateShortLink(params: CutLinkRequest): Promise<CutLinkResponse>;
1120
+ }
1121
+ interface CutLinkRequest {
1122
+ entity_id: number;
1123
+ entity_type: string;
1124
+ full_url: string;
1125
+ reload_short_url?: boolean;
1126
+ }
1127
+ interface CutLinkResponse extends CutLinkRequest {
1128
+ full_url: string;
1129
+ short_url: string;
1130
+ }
1131
+
1132
+ declare class LogstashApiService {
1133
+ private client;
1134
+ constructor(client: Client);
1135
+ getUsersLogs(params: RequestUsersLogParams): Promise<ResponseList<UsersLog>>;
1136
+ getSystemLogs(path: string, start: number, end: number): Promise<HttpResponse<string>>;
1137
+ }
1138
+ interface RequestUsersLogParams extends RequestBaseParams {
1139
+ user_id?: string;
1140
+ search_field?: string;
1141
+ from_date?: string;
1142
+ to_date?: string;
1143
+ with_me?: boolean;
1144
+ }
1145
+
1146
+ declare class NotificationApiService {
1147
+ private client;
1148
+ constructor(client: Client);
1149
+ list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
1150
+ toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
1151
+ toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
1152
+ delete(id: number[]): Promise<void>;
1153
+ deleteAll(): Promise<void>;
1154
+ getPermission(): Promise<{
1155
+ enabled: boolean;
1156
+ }>;
1157
+ setPermission(permission: boolean): Promise<void>;
1158
+ getSubscription(): Promise<NotificationActionGroup>;
1159
+ setSubscription(data: NotificationActionGroup): Promise<void>;
1160
+ }
1161
+ interface RequestNotificationListParams extends RequestBaseParams {
1162
+ read?: boolean;
1163
+ search?: string;
1164
+ lang?: string;
1165
+ }
1166
+ type ResponseListNotification = ResponseList<UserNotification> & {
1167
+ total_all: number;
1168
+ };
1169
+
1170
+ declare class RoleApiService {
1171
+ private client;
1172
+ constructor(client: Client);
1173
+ list(params?: RequestUserRoleListParams): Promise<ResponseList<UserRole>>;
1174
+ get(id: number): Promise<ResponseItem<UserRole>>;
1175
+ getDefault(): Promise<ResponseItem<UserRole>>;
1176
+ create(data: CreateUserRoleParams): Promise<ResponseItem<UserRole>>;
1177
+ update(id: number, data: Partial<CreateUserRoleParams>): Promise<ResponseItem<UserRole>>;
1178
+ delete(id: number): Promise<void>;
1179
+ permissionList(): Promise<ResponseList<Permission>>;
1180
+ addPermission(id: number, ids: number[]): Promise<void>;
1181
+ deletePermission(id: number, ids: number[]): Promise<void>;
1182
+ }
1183
+ interface RequestUserRoleListParams extends RequestBaseParams {
1184
+ id?: number[];
1185
+ search_field?: string;
1186
+ }
1187
+ type CreateUserRoleParams = Pick<UserRole, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
1188
+
1189
+ declare class ShareApiService {
1190
+ private client;
1191
+ constructor(client: Client);
1192
+ info(path: string, share_token: string): Promise<ShareInfo>;
1193
+ checkPassword(password: string, share_token: string): Promise<any>;
1194
+ checkToken(share_token: string): Promise<any>;
1195
+ getRestriction(token: string): Promise<UnionRestriction>;
1196
+ restrictions(params?: RequestBaseParams): Promise<ResponseList<ShareInfo>>;
1197
+ restrictionsChange(token: string, data: {
1198
+ status: RestrictionStatus;
1199
+ comment: string;
1200
+ }): Promise<ResponseList<ShareInfo>>;
1201
+ }
1202
+
1203
+ declare class StorageInstanceApiService {
1204
+ private client;
1205
+ constructor(client: Client);
1206
+ instance(): Promise<ResponseList<StorageInstance>>;
1207
+ }
1208
+
1209
+ declare class StorageShareApiService {
1210
+ private client;
1211
+ constructor(client: Client);
1212
+ info(path: string): Promise<ShareInfo>;
1213
+ create(path: string, permissions_type: PermissionType): Promise<ShareInfo>;
1214
+ change(data: ShareModel): Promise<ShareInfo>;
1215
+ delete(path: string): Promise<void>;
1216
+ refresh(token: string): Promise<ShareInfo>;
1217
+ }
1218
+
1219
+ declare class StorageTrashApiService {
1220
+ private client;
1221
+ constructor(client: Client);
1222
+ list(params: RequestStorageListParams): Promise<ResponseList<StorageTrashElement>>;
1223
+ clear(item: StorageTrashItem): Promise<void>;
1224
+ clearAll(): Promise<void>;
1225
+ restore(del_groups: StorageTrashItem[]): Promise<void>;
1226
+ }
1227
+
1228
+ declare class UserApiService {
1229
+ private client;
1230
+ constructor(client: Client);
1231
+ list(params: RequestUserListParams): Promise<ResponseList<User>>;
1232
+ get(id: number): Promise<ResponseItem<User>>;
1233
+ create(data: CreateUserParams): Promise<ResponseItem<User>>;
1234
+ update(id: number, data: CreateUserParams): Promise<ResponseItem<User>>;
1235
+ delete(id: number, params?: {
1236
+ hard: boolean;
1237
+ }): Promise<void>;
1238
+ restore(id: number): Promise<void>;
1239
+ me(): Promise<ResponseItem<User>>;
1240
+ updateMe(data: CreateUserParams): Promise<ResponseItem<User>>;
1241
+ createToken(data: {
1242
+ name: string;
1243
+ expire_in: string | null;
1244
+ }): Promise<UserToken>;
1245
+ listToken(params: RequestBaseParams): Promise<ResponseList<UserToken>>;
1246
+ deleteToken(id: number): Promise<void>;
1247
+ changeMyPassword(data: {
1248
+ new_password: string;
1249
+ old_password: string;
1250
+ }): Promise<{
1251
+ success: boolean;
1252
+ }>;
1253
+ changeUsersPassword(id: number, data: {
1254
+ new_password: string;
1255
+ }): Promise<{
1256
+ success: boolean;
1257
+ }>;
1258
+ meUploadAvatar(file: Blob, fileName: string): Promise<{
1259
+ file_path: string;
1260
+ }>;
1261
+ meDeleteAvatar(): Promise<void>;
1262
+ meListSession(params: RequestBaseParams): Promise<ResponseList<UserSession>>;
1263
+ meDeleteSession(id?: number): Promise<void>;
1264
+ setRole(id: number, role_id?: number | null): Promise<void>;
1265
+ }
1266
+ interface RequestUserListParams extends RequestBaseParams {
1267
+ email?: string;
1268
+ first_name?: string;
1269
+ middle_name?: string;
1270
+ last_name?: string;
1271
+ login?: string;
1272
+ is_admin?: boolean;
1273
+ id?: number[];
1274
+ role_ids?: number[];
1275
+ statuses?: UserStatus[];
1276
+ search_field?: string;
1277
+ with_me?: boolean;
1278
+ type?: UserType;
1279
+ exclude_type?: UserType;
1280
+ exclude_ids?: number[];
1281
+ }
1282
+ type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
1283
+
1284
+ declare class VersionApiService {
1285
+ private client;
1286
+ constructor(client: Client);
1287
+ history(params: HistoryRequestParams): Promise<ResponseList<StorageElementHistory>>;
1288
+ versions(params: HistoryListRequestParams): Promise<ResponseList<StorageElementVersion>>;
1289
+ create(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
1290
+ edit(params: HistoryNote): Promise<ResponseItem<StorageElementVersion>>;
1291
+ delete(params: HistoryRequestParams): Promise<void>;
1292
+ size(params: HistoryRequestParams): Promise<number>;
1293
+ makeCurrent(params: HistoryRequestParams): Promise<void>;
1294
+ }
1295
+ type HistoryListRequestParams = HistoryRequestParams & RequestBaseParams;
1296
+ interface HistoryRequestParams {
1297
+ path: string;
1298
+ divide_id?: number | null;
1299
+ file_version_id?: string;
1300
+ }
1301
+
1302
+ declare const applyInterceptors: <T>(interceptors: {
1303
+ fulfilled: (arg: T) => T | Promise<T>;
1304
+ rejected?: (error: any) => T | Promise<T>;
1305
+ }[], arg: T) => Promise<T>;
1306
+
1307
+ declare function getCookieValue(name: string): string | null;
1308
+
1309
+ declare const makeUrlParams: (params: Record<string, any>) => URLSearchParams;
1310
+
1311
+ declare function normalizeHeaders(headers: Headers | [string, string][] | Record<string, string>): Record<string, string>;
1312
+
1313
+ 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 CutLinkRequest, 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, StorageElementCheckStatus, StorageElementContentType, type StorageElementHistory, StorageElementHistoryAction, type StorageElementPaste, type StorageElementPasteParams, StorageElementType, type StorageElementVersion, StorageFilesApiService, type StorageInstance, StorageInstanceApiService, type StorageItemSizeParams, type StorageItemSizePathParams, 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 };