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.
- package/dist/api/auth-api.service.d.ts +12 -11
- package/dist/api/connections-api.service.d.ts +9 -1
- package/dist/api/divide-api.service.d.ts +3 -1
- package/dist/api/extensions-api.service.d.ts +11 -2
- package/dist/api/extensions-external-api.service.d.ts +7 -2
- package/dist/api/fca-api.service.d.ts +6 -2
- package/dist/api/gateway-api.service.d.ts +18 -2
- package/dist/api/group-api.service.d.ts +13 -4
- package/dist/api/index.d.ts +6 -2
- package/dist/api/links-api.service.d.ts +17 -0
- package/dist/api/logstash-api.service.d.ts +9 -2
- package/dist/api/notification-api.service.d.ts +24 -0
- package/dist/api/role-api.service.d.ts +14 -9
- package/dist/api/share-api.service.d.ts +2 -1
- package/dist/api/storage-element-api.service.d.ts +34 -10
- package/dist/api/storage-files-api.service.d.ts +9 -2
- package/dist/api/storage-instance-api.service.d.ts +7 -0
- package/dist/api/storage-trash-api.service.d.ts +2 -1
- package/dist/api/user-api.service.d.ts +18 -1
- package/dist/api/version-api.service.d.ts +19 -0
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.esm.js +1 -1
- package/dist/classes/client.d.ts +25 -33
- package/dist/classes/http-event.d.ts +24 -0
- package/dist/classes/http-response.d.ts +14 -0
- package/dist/classes/rest.d.ts +12 -7
- package/dist/classes/token-update.d.ts +2 -2
- package/dist/index.d.ts +600 -407
- package/dist/tools/get-cookie-value.d.ts +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/normalize-headers.d.ts +1 -0
- package/dist/types/auth.d.ts +0 -2
- package/dist/types/base.d.ts +7 -3
- package/dist/types/connection.d.ts +2 -11
- package/dist/types/divide.d.ts +11 -1
- package/dist/types/extension.d.ts +1 -14
- package/dist/types/index.d.ts +3 -3
- package/dist/types/notification.d.ts +13 -8
- package/dist/types/request.d.ts +43 -0
- package/dist/types/setting.d.ts +1 -0
- package/dist/types/storage-trash.d.ts +11 -0
- package/dist/types/storage.d.ts +22 -39
- package/dist/types/user-log.d.ts +0 -8
- package/dist/types/user.d.ts +23 -17
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getCookieValue(name: string): string | null;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeHeaders(headers: Headers | [string, string][] | Record<string, string>): Record<string, string>;
|
package/dist/types/auth.d.ts
CHANGED
package/dist/types/base.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequestAuthTokenParams } from '../api';
|
|
2
|
+
import { PermissionType } from './divide';
|
|
2
3
|
export interface NbClientParams {
|
|
3
4
|
host?: string;
|
|
4
|
-
version?:
|
|
5
|
+
version?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface NbRequestParams {
|
|
7
8
|
path: string;
|
|
@@ -13,7 +14,7 @@ export interface NbRequestParams {
|
|
|
13
14
|
export interface NbAppState {
|
|
14
15
|
clientParams: NbClientParams;
|
|
15
16
|
requestParams: NbRequestParams;
|
|
16
|
-
authToken: Map<number,
|
|
17
|
+
authToken: Map<number, RequestAuthTokenParams> | null;
|
|
17
18
|
skipInterceptors: boolean;
|
|
18
19
|
}
|
|
19
20
|
export interface ResponseItem<T> {
|
|
@@ -22,6 +23,9 @@ export interface ResponseItem<T> {
|
|
|
22
23
|
export interface ResponseList<T> {
|
|
23
24
|
rows: T[];
|
|
24
25
|
total: number;
|
|
26
|
+
current?: {
|
|
27
|
+
access_mode: PermissionType;
|
|
28
|
+
};
|
|
25
29
|
}
|
|
26
30
|
export interface RequestBaseParams {
|
|
27
31
|
limit: number;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { RequestBaseParams } from './base';
|
|
2
1
|
import { PermissionType } from './divide';
|
|
3
|
-
import { User } from './user';
|
|
4
2
|
export interface Connection {
|
|
5
3
|
id: number;
|
|
6
4
|
name: string;
|
|
@@ -11,13 +9,13 @@ export interface Connection {
|
|
|
11
9
|
port: number;
|
|
12
10
|
root_path: string;
|
|
13
11
|
group_name: ConnectionGroup;
|
|
12
|
+
owner_id: number;
|
|
14
13
|
divide_id?: number;
|
|
15
14
|
access_mode?: PermissionType;
|
|
16
|
-
owner?: Pick<User, 'first_name' | 'last_name' | 'login' | 'middle_name'>;
|
|
17
15
|
update_date: string;
|
|
18
16
|
create_date: string;
|
|
19
17
|
expire_in: string;
|
|
20
|
-
|
|
18
|
+
to_user_group_id?: number;
|
|
21
19
|
}
|
|
22
20
|
export declare enum ConnectionGroup {
|
|
23
21
|
Storages = "storages_connections_group",
|
|
@@ -36,10 +34,3 @@ export declare enum ConnectionType {
|
|
|
36
34
|
HttpProxy = "http_proxy_connection",
|
|
37
35
|
S3 = "s3_connection"
|
|
38
36
|
}
|
|
39
|
-
export interface RequestConnectionParams extends RequestBaseParams {
|
|
40
|
-
name?: string | null;
|
|
41
|
-
group_name?: ConnectionGroup;
|
|
42
|
-
is_divided?: boolean;
|
|
43
|
-
type?: string;
|
|
44
|
-
}
|
|
45
|
-
export type ConnectionCreateParams = Omit<Connection, 'group_name'>;
|
package/dist/types/divide.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResponseList } from './base';
|
|
2
|
-
import { StorageElementType } from './storage';
|
|
2
|
+
import { StorageElement, StorageElementType } from './storage';
|
|
3
3
|
export declare enum DivideScope {
|
|
4
4
|
Storage = "/storage/element",
|
|
5
5
|
Connection = "/connections"
|
|
@@ -24,6 +24,7 @@ export declare enum DivideMode {
|
|
|
24
24
|
Group = "to_user_group_id"
|
|
25
25
|
}
|
|
26
26
|
export interface ShareInfo extends DivideParams {
|
|
27
|
+
id: number;
|
|
27
28
|
token: string;
|
|
28
29
|
access_mode: PermissionType;
|
|
29
30
|
expire_delta: number | null;
|
|
@@ -34,6 +35,10 @@ export interface ShareInfo extends DivideParams {
|
|
|
34
35
|
update_date: string;
|
|
35
36
|
owner_id: number;
|
|
36
37
|
resource: string;
|
|
38
|
+
file_info: StorageElement;
|
|
39
|
+
short_url: string;
|
|
40
|
+
}
|
|
41
|
+
export interface UnionRestriction extends UserDivide, ShareInfo {
|
|
37
42
|
}
|
|
38
43
|
export interface UserDivide extends DivideParams {
|
|
39
44
|
access_mode: PermissionType;
|
|
@@ -46,6 +51,11 @@ export interface UserDivide extends DivideParams {
|
|
|
46
51
|
to_user_id: number;
|
|
47
52
|
type: StorageElementType;
|
|
48
53
|
update_date: string;
|
|
54
|
+
file_info: StorageElement;
|
|
55
|
+
}
|
|
56
|
+
export declare enum RestrictionModeKey {
|
|
57
|
+
Divide = "divide",
|
|
58
|
+
Share = "share"
|
|
49
59
|
}
|
|
50
60
|
interface DivideParams {
|
|
51
61
|
restriction_status: RestrictionStatus;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EngineType, Lang
|
|
1
|
+
import { EngineType, Lang } from './base';
|
|
2
2
|
import { Setting, SettingValue } from './setting';
|
|
3
|
-
import { StorageElementType } from './storage';
|
|
4
3
|
export interface ExtensionDefault {
|
|
5
4
|
ext_value: string;
|
|
6
5
|
extension_meta_uniq_key: string;
|
|
@@ -58,18 +57,6 @@ export interface Extension {
|
|
|
58
57
|
export interface ExtensionMetaPayload {
|
|
59
58
|
uniq_key: string;
|
|
60
59
|
}
|
|
61
|
-
export interface ExtensionListParams extends RequestBaseParams {
|
|
62
|
-
search?: string | null;
|
|
63
|
-
uniq_key?: string[];
|
|
64
|
-
file_name_ext?: string;
|
|
65
|
-
type?: StorageElementType[];
|
|
66
|
-
ext_value?: string | null;
|
|
67
|
-
file_mode?: ExtensionFileMode[];
|
|
68
|
-
lang?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface ExtensionExternalListParams extends RequestBaseParams {
|
|
71
|
-
search_field?: string;
|
|
72
|
-
}
|
|
73
60
|
export interface ExtensionExternalInList {
|
|
74
61
|
id: number;
|
|
75
62
|
create_date: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
export * from './access-rights';
|
|
2
|
+
export * from './access-token';
|
|
1
3
|
export * from './auth';
|
|
2
4
|
export * from './base';
|
|
3
5
|
export * from './connection';
|
|
4
6
|
export * from './discovery';
|
|
5
7
|
export * from './extension';
|
|
6
8
|
export * from './divide';
|
|
7
|
-
export * from './group';
|
|
8
9
|
export * from './license';
|
|
9
10
|
export * from './lock-screen';
|
|
10
11
|
export * from './notification';
|
|
11
12
|
export * from './permission';
|
|
12
|
-
export * from './
|
|
13
|
+
export * from './request';
|
|
13
14
|
export * from './restriction';
|
|
14
|
-
export * from './role';
|
|
15
15
|
export * from './user';
|
|
16
16
|
export * from './user-log';
|
|
17
17
|
export * from './setting';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RequestBaseParams, ResponseList } from './base';
|
|
2
1
|
import { PermissionType } from './divide';
|
|
3
2
|
import { StorageElementType } from './storage';
|
|
4
3
|
import { UserLabel } from './user';
|
|
@@ -17,13 +16,6 @@ export interface UserNotification {
|
|
|
17
16
|
from_user_id?: number;
|
|
18
17
|
owner?: UserLabel;
|
|
19
18
|
}
|
|
20
|
-
export type RequestNotificationListParams = RequestBaseParams & {
|
|
21
|
-
read?: boolean;
|
|
22
|
-
search?: string;
|
|
23
|
-
};
|
|
24
|
-
export type ResponseListNotification = ResponseList<UserNotification> & {
|
|
25
|
-
total_all: number;
|
|
26
|
-
};
|
|
27
19
|
export declare enum NotificationEntityType {
|
|
28
20
|
Dir = "dir",
|
|
29
21
|
File = "file",
|
|
@@ -49,6 +41,19 @@ export declare enum NotificationAction {
|
|
|
49
41
|
CancelDivideConnection = "cancel_divide_connection",
|
|
50
42
|
DeleteExtension = "delete_extension",
|
|
51
43
|
NewVersionExtension = "new_version_extension",
|
|
44
|
+
TransferData = "transfer_data",
|
|
45
|
+
AllowInternalAccessUser = "allow_internal_access_to_user",
|
|
46
|
+
BlockInternalAccessUser = "block_internal_access_to_user",
|
|
47
|
+
WaitInternalAccessUser = "wait_internal_access_to_user",
|
|
48
|
+
WaitInternalAccessUserCreate = "wait_internal_access_to_user_create",
|
|
49
|
+
AllowInternalAccessGroup = "allow_internal_access_to_group",
|
|
50
|
+
BlockInternalAccessGroup = "block_internal_access_to_group",
|
|
51
|
+
WaitInternalAccessGroup = "wait_internal_access_to_group",
|
|
52
|
+
WaitInternalAccessGroupCreate = "wait_internal_access_to_group_create",
|
|
53
|
+
AllowSharing = "allow_sharing",
|
|
54
|
+
BlockSharing = "block_sharing",
|
|
55
|
+
WaitSharing = "wait_sharing",
|
|
56
|
+
WaitSharingCreate = "wait_sharing_create",
|
|
52
57
|
Other = "other"
|
|
53
58
|
}
|
|
54
59
|
export declare enum NotificationRowAction {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum ResponseType {
|
|
2
|
+
ArrayBuffer = "arraybuffer",
|
|
3
|
+
Blob = "blob",
|
|
4
|
+
Json = "json",
|
|
5
|
+
Text = "text"
|
|
6
|
+
}
|
|
7
|
+
export declare enum RequestMethod {
|
|
8
|
+
GET = "GET",
|
|
9
|
+
POST = "POST",
|
|
10
|
+
PUT = "PUT",
|
|
11
|
+
PATCH = "PATCH",
|
|
12
|
+
DELETE = "DELETE"
|
|
13
|
+
}
|
|
14
|
+
export declare enum RequestObserve {
|
|
15
|
+
Body = "body",
|
|
16
|
+
Response = "response"
|
|
17
|
+
}
|
|
18
|
+
export interface HttpResponse<T> {
|
|
19
|
+
status: number;
|
|
20
|
+
statusText: string;
|
|
21
|
+
headers: Headers;
|
|
22
|
+
body: T;
|
|
23
|
+
}
|
|
24
|
+
export interface HttpEvent<T> {
|
|
25
|
+
loaded?: number;
|
|
26
|
+
total?: number;
|
|
27
|
+
body?: HttpResponse<T>;
|
|
28
|
+
error?: any;
|
|
29
|
+
}
|
|
30
|
+
export interface RequestConfig {
|
|
31
|
+
params?: Record<string, string>;
|
|
32
|
+
body?: any;
|
|
33
|
+
cache?: RequestCache;
|
|
34
|
+
headers?: HeadersInit;
|
|
35
|
+
observe?: RequestObserve;
|
|
36
|
+
responseType?: ResponseType;
|
|
37
|
+
onUploadProgress?: OnUploadProgress;
|
|
38
|
+
}
|
|
39
|
+
export interface ProgressEvent {
|
|
40
|
+
loaded: number;
|
|
41
|
+
total: number;
|
|
42
|
+
}
|
|
43
|
+
export type OnUploadProgress = (progressEvent: ProgressEvent) => void;
|
package/dist/types/setting.d.ts
CHANGED
|
@@ -9,6 +9,17 @@ export interface StorageTrashElement {
|
|
|
9
9
|
size: number;
|
|
10
10
|
type: StorageElementType;
|
|
11
11
|
update_date: string;
|
|
12
|
+
version: VersionStorageTrashElement;
|
|
12
13
|
with_preview: boolean;
|
|
13
14
|
}
|
|
15
|
+
interface VersionStorageTrashElement {
|
|
16
|
+
create_date: string;
|
|
17
|
+
description: string;
|
|
18
|
+
id: string;
|
|
19
|
+
name: string | null;
|
|
20
|
+
size: number;
|
|
21
|
+
update_date: string;
|
|
22
|
+
user_id: number;
|
|
23
|
+
}
|
|
14
24
|
export type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
|
|
25
|
+
export {};
|
package/dist/types/storage.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import { RequestBaseParams } from './base';
|
|
2
1
|
import { PermissionType } from './divide';
|
|
3
|
-
import { User } from './user';
|
|
4
|
-
export interface RequestStorageListParams extends RequestBaseParams {
|
|
5
|
-
search?: string;
|
|
6
|
-
is_favorite?: boolean;
|
|
7
|
-
is_divided?: boolean;
|
|
8
|
-
divide_id?: number | null;
|
|
9
|
-
path?: string;
|
|
10
|
-
min_size?: number | null;
|
|
11
|
-
max_size?: number | null;
|
|
12
|
-
type?: StorageElementType;
|
|
13
|
-
file_name_ext?: string[];
|
|
14
|
-
from_sharing_token?: string;
|
|
15
|
-
from_path?: string;
|
|
16
|
-
from_sharing_password?: string;
|
|
17
|
-
}
|
|
18
2
|
export interface StorageElement {
|
|
19
3
|
name: string;
|
|
20
4
|
size: number;
|
|
@@ -28,17 +12,13 @@ export interface StorageElement {
|
|
|
28
12
|
create_date: string;
|
|
29
13
|
with_preview: boolean;
|
|
30
14
|
is_favorite: boolean;
|
|
31
|
-
owner: User;
|
|
32
15
|
owner_id: number;
|
|
33
16
|
version?: StorageElementVersion;
|
|
34
17
|
divide_id?: number;
|
|
35
18
|
access_mode?: PermissionType;
|
|
36
|
-
|
|
19
|
+
to_user_group_id?: number;
|
|
37
20
|
created_by_extension?: string;
|
|
38
21
|
}
|
|
39
|
-
export type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
|
|
40
|
-
is_work_dir?: boolean;
|
|
41
|
-
};
|
|
42
22
|
export declare enum StorageElementType {
|
|
43
23
|
Dir = "dir",
|
|
44
24
|
File = "file",
|
|
@@ -79,11 +59,10 @@ export interface StorageElementPaste {
|
|
|
79
59
|
from_path: string;
|
|
80
60
|
to_path: string;
|
|
81
61
|
}
|
|
82
|
-
export interface
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
to_divide_id?: number | null;
|
|
62
|
+
export interface StorageElementHistory {
|
|
63
|
+
user_id: number;
|
|
64
|
+
action: StorageElementHistoryAction;
|
|
65
|
+
create_date: string;
|
|
87
66
|
}
|
|
88
67
|
export interface StorageElementVersion {
|
|
89
68
|
id: string;
|
|
@@ -95,30 +74,34 @@ export interface StorageElementVersion {
|
|
|
95
74
|
update_date: string;
|
|
96
75
|
is_current_version: boolean;
|
|
97
76
|
}
|
|
98
|
-
export interface StorageElementHistory {
|
|
99
|
-
user_id: number;
|
|
100
|
-
action: StorageElementHistoryAction;
|
|
101
|
-
create_date: string;
|
|
102
|
-
}
|
|
103
77
|
export declare enum StorageElementHistoryAction {
|
|
104
78
|
Create = "create",
|
|
105
79
|
Update = "update",
|
|
106
80
|
Move = "move"
|
|
107
81
|
}
|
|
108
|
-
export interface
|
|
82
|
+
export interface HistoryNote {
|
|
109
83
|
name: string;
|
|
110
84
|
description: string;
|
|
111
85
|
divide_id: number | null;
|
|
112
86
|
file_version_id: string;
|
|
113
87
|
path: string;
|
|
114
88
|
}
|
|
115
|
-
export interface
|
|
116
|
-
path: string;
|
|
117
|
-
divide_id?: number | null;
|
|
118
|
-
}
|
|
119
|
-
export interface UploadNetRequestParams {
|
|
89
|
+
export interface RequestVersionsSizeParams {
|
|
120
90
|
path: string;
|
|
121
|
-
url: string;
|
|
122
|
-
overwrite?: boolean;
|
|
123
91
|
divide_id?: number;
|
|
124
92
|
}
|
|
93
|
+
export interface StorageInstance {
|
|
94
|
+
disk_id: string;
|
|
95
|
+
disk_size: number;
|
|
96
|
+
free_size: number;
|
|
97
|
+
instance_number: number;
|
|
98
|
+
quota_size_config: number;
|
|
99
|
+
quota_size_setting: number;
|
|
100
|
+
used_size: number;
|
|
101
|
+
}
|
|
102
|
+
export interface SizeBySection {
|
|
103
|
+
content_type: string;
|
|
104
|
+
size: number;
|
|
105
|
+
count: number;
|
|
106
|
+
label: string;
|
|
107
|
+
}
|
package/dist/types/user-log.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RequestBaseParams } from './base';
|
|
2
1
|
export interface UsersLog {
|
|
3
2
|
create_date: string;
|
|
4
3
|
service_name: string;
|
|
@@ -8,10 +7,3 @@ export interface UsersLog {
|
|
|
8
7
|
resource: string;
|
|
9
8
|
description: string;
|
|
10
9
|
}
|
|
11
|
-
export interface RequestUsersLogParams extends RequestBaseParams {
|
|
12
|
-
user_id?: string;
|
|
13
|
-
search_field?: string;
|
|
14
|
-
from_date?: string;
|
|
15
|
-
to_date?: string;
|
|
16
|
-
with_me?: boolean;
|
|
17
|
-
}
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RequestBaseParams } from './base';
|
|
2
1
|
export interface User {
|
|
3
2
|
id: number;
|
|
4
3
|
create_date: string;
|
|
@@ -17,7 +16,7 @@ export interface User {
|
|
|
17
16
|
type: UserType;
|
|
18
17
|
role_id: number | null;
|
|
19
18
|
}
|
|
20
|
-
export type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name'>;
|
|
19
|
+
export type UserLabel = Pick<User, 'login' | 'email' | 'first_name' | 'middle_name' | 'last_name' | 'avatar_path'>;
|
|
21
20
|
export declare enum UserAuthType {
|
|
22
21
|
Native = "native",
|
|
23
22
|
Ldap = "ldap"
|
|
@@ -49,19 +48,26 @@ export interface UserToken {
|
|
|
49
48
|
create_date: string;
|
|
50
49
|
token?: string;
|
|
51
50
|
}
|
|
52
|
-
export interface
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
export interface UserGroup {
|
|
52
|
+
id: number;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
amount_users: number;
|
|
56
|
+
create_date: string;
|
|
57
|
+
owner_id: number;
|
|
58
|
+
owner: UserLabel;
|
|
59
|
+
update_date: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
icon_color: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UserRole {
|
|
64
|
+
id: number;
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
create_date: string;
|
|
68
|
+
update_date: string;
|
|
69
|
+
is_default: boolean;
|
|
70
|
+
owner_id: number;
|
|
71
|
+
grant_access_all: boolean;
|
|
72
|
+
permissions_id?: number[];
|
|
66
73
|
}
|
|
67
|
-
export type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
|