nb-js-client 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/auth-api.service.d.ts +19 -0
- package/dist/api/connections-api.service.d.ts +12 -0
- package/dist/api/discovery-api.service.d.ts +8 -0
- package/dist/api/divide-api.service.d.ts +17 -0
- package/dist/api/extensions-api.service.d.ts +21 -0
- package/dist/api/extensions-external-api.service.d.ts +9 -0
- package/dist/api/fca-api.service.d.ts +14 -0
- package/dist/api/gateway-api.service.d.ts +9 -0
- package/dist/api/group-api.service.d.ts +11 -0
- package/dist/api/index.d.ts +18 -0
- package/dist/api/license-api.service.d.ts +13 -0
- package/dist/api/logstash-api.service.d.ts +8 -0
- package/dist/api/notifications-api.service.d.ts +17 -0
- package/dist/api/role-api.service.d.ts +15 -0
- package/dist/api/share-api.service.d.ts +14 -0
- package/dist/api/storage-element-api.service.d.ts +32 -0
- package/dist/api/storage-files-api.service.d.ts +13 -0
- package/dist/api/storage-share-api.service.d.ts +11 -0
- package/dist/api/storage-trash-api.service.d.ts +10 -0
- package/dist/api/user-api.service.d.ts +40 -0
- package/dist/bundle.cjs.js +1 -0
- package/dist/bundle.esm.js +1 -0
- package/dist/classes/client.d.ts +39 -0
- package/dist/classes/index.d.ts +2 -0
- package/dist/classes/rest.d.ts +13 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/send-request.d.ts +6 -0
- package/dist/index.d.ts +1051 -0
- package/dist/types/auth.d.ts +9 -0
- package/dist/types/base.d.ts +48 -0
- package/dist/types/connection.d.ts +45 -0
- package/dist/types/discovery.d.ts +15 -0
- package/dist/types/divide.d.ts +72 -0
- package/dist/types/extension.d.ts +93 -0
- package/dist/types/group.d.ts +23 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptor.d.ts +4 -0
- package/dist/types/license.d.ts +23 -0
- package/dist/types/lock-screen.d.ts +4 -0
- package/dist/types/notification.d.ts +85 -0
- package/dist/types/permission.d.ts +10 -0
- package/dist/types/query-init.d.ts +23 -0
- package/dist/types/restriction.d.ts +9 -0
- package/dist/types/role.d.ts +17 -0
- package/dist/types/setting.d.ts +57 -0
- package/dist/types/storage-trash.d.ts +14 -0
- package/dist/types/storage.d.ts +105 -0
- package/dist/types/user-log.d.ts +17 -0
- package/dist/types/user.d.ts +67 -0
- package/package.json +33 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface NbClientParams {
|
|
2
|
+
host: string;
|
|
3
|
+
version?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface NbRequestParams {
|
|
6
|
+
path: string;
|
|
7
|
+
headers?: Record<string, any>;
|
|
8
|
+
query?: Record<string, any>;
|
|
9
|
+
body?: any;
|
|
10
|
+
cache?: RequestCache;
|
|
11
|
+
}
|
|
12
|
+
export interface NbAppState {
|
|
13
|
+
clientParams: NbClientParams;
|
|
14
|
+
requestParams: NbRequestParams;
|
|
15
|
+
}
|
|
16
|
+
export interface ResponseItem<T> {
|
|
17
|
+
row: T;
|
|
18
|
+
}
|
|
19
|
+
export interface ResponseList<T> {
|
|
20
|
+
rows: T[];
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
export interface RequestBaseParams {
|
|
24
|
+
limit: number;
|
|
25
|
+
offset?: number;
|
|
26
|
+
order_by?: string;
|
|
27
|
+
order_direction?: OrderDirection;
|
|
28
|
+
}
|
|
29
|
+
export declare enum OrderDirection {
|
|
30
|
+
DEFAULT = "",
|
|
31
|
+
ASC = "asc",
|
|
32
|
+
DESC = "desc"
|
|
33
|
+
}
|
|
34
|
+
export type Lang = {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
export declare enum EngineType {
|
|
38
|
+
WebSocket = "websocket",
|
|
39
|
+
PostMessage = "postmessage",
|
|
40
|
+
Empty = ""
|
|
41
|
+
}
|
|
42
|
+
export declare enum StorageRoot {
|
|
43
|
+
my = "my",
|
|
44
|
+
fca = "fca",
|
|
45
|
+
divide = "divide",
|
|
46
|
+
share = "share",
|
|
47
|
+
favorite = "favorite"
|
|
48
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RequestBaseParams } from './base';
|
|
2
|
+
import { PermissionType } from './divide';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export interface Connection {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
type: ConnectionType;
|
|
8
|
+
address: string;
|
|
9
|
+
login: string;
|
|
10
|
+
password: string;
|
|
11
|
+
port: number;
|
|
12
|
+
root_path: string;
|
|
13
|
+
group_name: ConnectionGroup;
|
|
14
|
+
divide_id?: number;
|
|
15
|
+
access_mode?: PermissionType;
|
|
16
|
+
owner?: Pick<User, 'first_name' | 'last_name' | 'login' | 'middle_name'>;
|
|
17
|
+
update_date: string;
|
|
18
|
+
create_date: string;
|
|
19
|
+
expire_in: string;
|
|
20
|
+
to_user_group_name?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare enum ConnectionGroup {
|
|
23
|
+
Storages = "storages_connections_group",
|
|
24
|
+
Webhooks = "webhooks_connections_group",
|
|
25
|
+
Unknown = "unknown_connections_group",
|
|
26
|
+
Proxy = "proxy_connections_group"
|
|
27
|
+
}
|
|
28
|
+
export declare enum ConnectionType {
|
|
29
|
+
SSH = "ssh_connection",
|
|
30
|
+
YandexDisk = "yandex_disk",
|
|
31
|
+
Mail = "mail",
|
|
32
|
+
Discord = "discord",
|
|
33
|
+
Webdav = "webdav_connection",
|
|
34
|
+
Nextcloud = "nextcloud_connection",
|
|
35
|
+
NextBox = "nextbox_connection",
|
|
36
|
+
HttpProxy = "http_proxy_connection",
|
|
37
|
+
S3 = "s3_connection"
|
|
38
|
+
}
|
|
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'>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Discovery {
|
|
2
|
+
id: number;
|
|
3
|
+
create_date: string;
|
|
4
|
+
update_date: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
back_url: string;
|
|
7
|
+
front_url: string;
|
|
8
|
+
instance_number: number;
|
|
9
|
+
name: string;
|
|
10
|
+
route: null;
|
|
11
|
+
route_name: string;
|
|
12
|
+
with_swagger: boolean;
|
|
13
|
+
dynamic_config_path?: string;
|
|
14
|
+
version: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ResponseList } from './base';
|
|
2
|
+
import { StorageElementType } from './storage';
|
|
3
|
+
export declare enum DivideScope {
|
|
4
|
+
Storage = "/storage/element",
|
|
5
|
+
Connection = "/connections"
|
|
6
|
+
}
|
|
7
|
+
export type DivideResourceType = string | number;
|
|
8
|
+
export declare enum PermissionType {
|
|
9
|
+
CLOSE = "",
|
|
10
|
+
READ = "r",
|
|
11
|
+
WRITE = "rw"
|
|
12
|
+
}
|
|
13
|
+
export declare enum RestrictionStatus {
|
|
14
|
+
WAITING = "waiting",
|
|
15
|
+
APPROVED = "approved",
|
|
16
|
+
REJECTED = "rejected"
|
|
17
|
+
}
|
|
18
|
+
export declare enum RestrictionBooleanStatus {
|
|
19
|
+
TRUE = "true",
|
|
20
|
+
FALSE = "false"
|
|
21
|
+
}
|
|
22
|
+
export declare enum DivideMode {
|
|
23
|
+
User = "to_user_id",
|
|
24
|
+
Group = "to_user_group_id"
|
|
25
|
+
}
|
|
26
|
+
export interface ShareInfo extends DivideParams {
|
|
27
|
+
token: string;
|
|
28
|
+
access_mode: PermissionType;
|
|
29
|
+
expire_delta: number | null;
|
|
30
|
+
expire_in?: string;
|
|
31
|
+
with_password: boolean;
|
|
32
|
+
share_sub_type: StorageElementType;
|
|
33
|
+
create_date: string;
|
|
34
|
+
update_date: string;
|
|
35
|
+
owner_id: number;
|
|
36
|
+
resource: string;
|
|
37
|
+
}
|
|
38
|
+
export interface UserDivide extends DivideParams {
|
|
39
|
+
access_mode: PermissionType;
|
|
40
|
+
create_date: string;
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
owner_id: number;
|
|
44
|
+
resource: string;
|
|
45
|
+
to_user_group_id: number;
|
|
46
|
+
to_user_id: number;
|
|
47
|
+
type: StorageElementType;
|
|
48
|
+
update_date: string;
|
|
49
|
+
}
|
|
50
|
+
interface DivideParams {
|
|
51
|
+
restriction_status: RestrictionStatus;
|
|
52
|
+
moderator_id?: number;
|
|
53
|
+
comment: string;
|
|
54
|
+
}
|
|
55
|
+
export interface RequestUserDivideParams {
|
|
56
|
+
is_to_user_group: boolean;
|
|
57
|
+
access_mode?: PermissionType;
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
search_field?: string;
|
|
61
|
+
}
|
|
62
|
+
export type DivideResponseList = ResponseList<UserDivide> & {
|
|
63
|
+
total_r: number;
|
|
64
|
+
total_rw: number;
|
|
65
|
+
};
|
|
66
|
+
export interface ShareModel {
|
|
67
|
+
token: string;
|
|
68
|
+
access_mode: PermissionType;
|
|
69
|
+
password: string | null;
|
|
70
|
+
expire_delta: number | null;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { EngineType, Lang, RequestBaseParams } from './base';
|
|
2
|
+
import { Setting, SettingValue } from './setting';
|
|
3
|
+
import { StorageElementType } from './storage';
|
|
4
|
+
export interface ExtensionDefault {
|
|
5
|
+
ext_value: string;
|
|
6
|
+
extension_meta_uniq_key: string;
|
|
7
|
+
icon_path: string;
|
|
8
|
+
devlocal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare enum ExtensionType {
|
|
11
|
+
App = "app",
|
|
12
|
+
File = "file",
|
|
13
|
+
WorkDir = "work_dir"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ExtensionFileMode {
|
|
16
|
+
Read = "read",
|
|
17
|
+
ReadAndWrite = "read_and_write",
|
|
18
|
+
Write = "write"
|
|
19
|
+
}
|
|
20
|
+
export interface Extension {
|
|
21
|
+
id: number;
|
|
22
|
+
create_date: string;
|
|
23
|
+
update_date: string;
|
|
24
|
+
with_settings?: boolean;
|
|
25
|
+
name: Lang;
|
|
26
|
+
devlocal?: boolean;
|
|
27
|
+
dev_frame_params?: {
|
|
28
|
+
engine: EngineType;
|
|
29
|
+
host?: string;
|
|
30
|
+
port?: number;
|
|
31
|
+
};
|
|
32
|
+
version: string;
|
|
33
|
+
latest_repo_version?: string;
|
|
34
|
+
description: Lang;
|
|
35
|
+
uniq_key: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
type: ExtensionType;
|
|
38
|
+
path: string;
|
|
39
|
+
file?: {
|
|
40
|
+
mode: ExtensionFileMode;
|
|
41
|
+
ext: string[];
|
|
42
|
+
default_ext?: string;
|
|
43
|
+
index: string;
|
|
44
|
+
};
|
|
45
|
+
app?: {
|
|
46
|
+
menu: {
|
|
47
|
+
index: string;
|
|
48
|
+
icon: string;
|
|
49
|
+
label: Lang;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
work_dir?: {
|
|
53
|
+
index: string;
|
|
54
|
+
};
|
|
55
|
+
settings?: SettingValue[];
|
|
56
|
+
settings_template?: Setting[];
|
|
57
|
+
}
|
|
58
|
+
export interface ExtensionMetaPayload {
|
|
59
|
+
uniq_key: string;
|
|
60
|
+
}
|
|
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
|
+
export interface ExtensionExternalInList {
|
|
74
|
+
id: number;
|
|
75
|
+
create_date: string;
|
|
76
|
+
update_date: string;
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
uniq_key: string;
|
|
80
|
+
version: string;
|
|
81
|
+
tags: string[];
|
|
82
|
+
links: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface ExtensionExternal extends ExtensionExternalInList {
|
|
85
|
+
versions: VersionExtension[];
|
|
86
|
+
images?: string[];
|
|
87
|
+
with_readme?: boolean;
|
|
88
|
+
}
|
|
89
|
+
interface VersionExtension {
|
|
90
|
+
version: string;
|
|
91
|
+
size: number;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RequestBaseParams } from './base';
|
|
2
|
+
import { UserLabel } from './user';
|
|
3
|
+
export interface Group {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
amount_users: number;
|
|
8
|
+
create_date: string;
|
|
9
|
+
owner_id: number;
|
|
10
|
+
owner: UserLabel;
|
|
11
|
+
update_date: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
icon_color: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RequestGroupListParams extends RequestBaseParams {
|
|
16
|
+
id?: number[];
|
|
17
|
+
name?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
search_field?: string;
|
|
20
|
+
}
|
|
21
|
+
export type CreateGroupParams = Pick<Group, 'name' | 'description'> & {
|
|
22
|
+
users?: number[];
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './auth';
|
|
2
|
+
export * from './base';
|
|
3
|
+
export * from './connection';
|
|
4
|
+
export * from './discovery';
|
|
5
|
+
export * from './extension';
|
|
6
|
+
export * from './divide';
|
|
7
|
+
export * from './group';
|
|
8
|
+
export * from './license';
|
|
9
|
+
export * from './lock-screen';
|
|
10
|
+
export * from './notification';
|
|
11
|
+
export * from './permission';
|
|
12
|
+
export * from './query-init';
|
|
13
|
+
export * from './restriction';
|
|
14
|
+
export * from './role';
|
|
15
|
+
export * from './user';
|
|
16
|
+
export * from './user-log';
|
|
17
|
+
export * from './setting';
|
|
18
|
+
export * from './storage';
|
|
19
|
+
export * from './storage-trash';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface License {
|
|
2
|
+
custom_max_users_count: number | null;
|
|
3
|
+
expire_in: string;
|
|
4
|
+
key: string | null;
|
|
5
|
+
plan: Tariff;
|
|
6
|
+
error?: LicenseError | string;
|
|
7
|
+
}
|
|
8
|
+
export interface ChangeLicenseParams {
|
|
9
|
+
key: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
}
|
|
12
|
+
export declare enum Tariff {
|
|
13
|
+
Free = "free",
|
|
14
|
+
Business = "business",
|
|
15
|
+
Enterprise = "enterprise"
|
|
16
|
+
}
|
|
17
|
+
export declare enum LicenseError {
|
|
18
|
+
NotActivated = "License not activated",
|
|
19
|
+
Blocked = "License blocked",
|
|
20
|
+
Expired = "License has been expired",
|
|
21
|
+
NotValid = "License not valid",
|
|
22
|
+
NotFound = "license file not found"
|
|
23
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { RequestBaseParams, ResponseList } from './base';
|
|
2
|
+
import { PermissionType } from './divide';
|
|
3
|
+
import { StorageElementType } from './storage';
|
|
4
|
+
import { UserLabel } from './user';
|
|
5
|
+
export interface UserNotification {
|
|
6
|
+
id: number;
|
|
7
|
+
create_date: string;
|
|
8
|
+
update_date: string;
|
|
9
|
+
entity_type: NotificationEntityType;
|
|
10
|
+
action: NotificationAction;
|
|
11
|
+
title: string;
|
|
12
|
+
msg: string;
|
|
13
|
+
transition: boolean;
|
|
14
|
+
read: boolean;
|
|
15
|
+
style: NotificationStyle;
|
|
16
|
+
payload: NotificationPayload;
|
|
17
|
+
from_user_id?: number;
|
|
18
|
+
owner?: UserLabel;
|
|
19
|
+
}
|
|
20
|
+
export type RequestNotificationListParams = RequestBaseParams & {
|
|
21
|
+
read?: boolean;
|
|
22
|
+
search?: string;
|
|
23
|
+
};
|
|
24
|
+
export type ResponseListNotification = ResponseList<UserNotification> & {
|
|
25
|
+
total_all: number;
|
|
26
|
+
};
|
|
27
|
+
export declare enum NotificationEntityType {
|
|
28
|
+
Dir = "dir",
|
|
29
|
+
File = "file",
|
|
30
|
+
User = "user",
|
|
31
|
+
Other = "other",
|
|
32
|
+
WorkDir = "work_dir",
|
|
33
|
+
License = "license",
|
|
34
|
+
Extension = "extension",
|
|
35
|
+
Connection = "connection"
|
|
36
|
+
}
|
|
37
|
+
export declare enum NotificationAction {
|
|
38
|
+
OpenSharing = "open_sharing",
|
|
39
|
+
ChangeSharing = "change_sharing",
|
|
40
|
+
CancelSharing = "cancel_sharing",
|
|
41
|
+
DivideDirAddFileToOwner = "divide_dir_add_file_to_owner",
|
|
42
|
+
DivideDirAddDirToOwner = "divide_dir_add_dir_to_owner",
|
|
43
|
+
DivideDirAddWorkDirToOwner = "divide_dir_add_work_dir_to_owner",
|
|
44
|
+
DivideConnectionAddFileToOwner = "divide_connection_add_file_to_owner",
|
|
45
|
+
DivideConnectionAddDirToOwner = "divide_connection_add_dir_to_owner",
|
|
46
|
+
CancelDivideDir = "cancel_divide_dir",
|
|
47
|
+
CancelDivideFile = "cancel_divide_file",
|
|
48
|
+
CancelDivideWorkDir = "cancel_divide_work_dir",
|
|
49
|
+
CancelDivideConnection = "cancel_divide_connection",
|
|
50
|
+
DeleteExtension = "delete_extension",
|
|
51
|
+
NewVersionExtension = "new_version_extension",
|
|
52
|
+
Other = "other"
|
|
53
|
+
}
|
|
54
|
+
export declare enum NotificationRowAction {
|
|
55
|
+
Read = "read",
|
|
56
|
+
Unread = "unread",
|
|
57
|
+
Delete = "delete"
|
|
58
|
+
}
|
|
59
|
+
export declare enum NotificationStyle {
|
|
60
|
+
Plain = "plain",
|
|
61
|
+
Success = "success",
|
|
62
|
+
Info = "info",
|
|
63
|
+
Warning = "warning",
|
|
64
|
+
Error = "error"
|
|
65
|
+
}
|
|
66
|
+
export type NotificationActionGroup = {
|
|
67
|
+
[key: string]: NotificationActionEnabledGroup;
|
|
68
|
+
};
|
|
69
|
+
interface NotificationActionEnabledGroup {
|
|
70
|
+
enabled_system: boolean;
|
|
71
|
+
enabled_mail: boolean;
|
|
72
|
+
}
|
|
73
|
+
export type NotificationPayload = PayloadFile | any;
|
|
74
|
+
export interface PayloadFile {
|
|
75
|
+
access_mode: PermissionType;
|
|
76
|
+
create_date: string;
|
|
77
|
+
id: number;
|
|
78
|
+
name: string;
|
|
79
|
+
owner_id: number;
|
|
80
|
+
path: string;
|
|
81
|
+
to_user_id: number;
|
|
82
|
+
type: StorageElementType;
|
|
83
|
+
update_date: string;
|
|
84
|
+
}
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ResponseList } from './base';
|
|
2
|
+
import { Extension, ExtensionDefault } from './extension';
|
|
3
|
+
import { License } from './license';
|
|
4
|
+
import { LockScreen } from './lock-screen';
|
|
5
|
+
import { UserNotification } from './notification';
|
|
6
|
+
import { Restriction } from './restriction';
|
|
7
|
+
import { User } from './user';
|
|
8
|
+
export interface QueryInit {
|
|
9
|
+
license?: License;
|
|
10
|
+
unread_notifications?: ResponseList<UserNotification> & {
|
|
11
|
+
total_all: number;
|
|
12
|
+
};
|
|
13
|
+
extensions_apps?: ResponseList<Extension>;
|
|
14
|
+
extensions_defaults: ResponseList<ExtensionDefault>;
|
|
15
|
+
me?: User;
|
|
16
|
+
cache_users: User[];
|
|
17
|
+
lock_screen: LockScreen;
|
|
18
|
+
restrictions?: Restriction;
|
|
19
|
+
open_in_desktop_settings: {
|
|
20
|
+
open_in_desktop_enabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
inject_scripts?: string[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RequestBaseParams } from './base';
|
|
2
|
+
export interface Role {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
create_date: string;
|
|
7
|
+
update_date: string;
|
|
8
|
+
is_default: boolean;
|
|
9
|
+
owner_id: number;
|
|
10
|
+
grant_access_all: boolean;
|
|
11
|
+
permissions_id?: number[];
|
|
12
|
+
}
|
|
13
|
+
export interface RequestRoleListParams extends RequestBaseParams {
|
|
14
|
+
id?: number[];
|
|
15
|
+
search_field?: string;
|
|
16
|
+
}
|
|
17
|
+
export type CreateRoleParams = Pick<Role, 'name' | 'description' | 'grant_access_all' | 'is_default'>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Lang } from './base';
|
|
2
|
+
export type SettingLang = string | Lang | null;
|
|
3
|
+
export declare enum SettingControlType {
|
|
4
|
+
Text = "text",
|
|
5
|
+
String = "string",
|
|
6
|
+
Number = "number",
|
|
7
|
+
CheckBox = "checkbox",
|
|
8
|
+
Select = "select",
|
|
9
|
+
RadioList = "radio_list",
|
|
10
|
+
ConnectionChoose = "connection_choose",
|
|
11
|
+
MultiConnectionChoose = "multi_connection_choose"
|
|
12
|
+
}
|
|
13
|
+
export interface Setting {
|
|
14
|
+
fields: SettingField[];
|
|
15
|
+
title?: SettingLang;
|
|
16
|
+
name?: string;
|
|
17
|
+
context?: string;
|
|
18
|
+
toggle_box?: boolean;
|
|
19
|
+
collapsed_box?: boolean;
|
|
20
|
+
activity_switch?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SettingVariant {
|
|
23
|
+
label?: SettingLang;
|
|
24
|
+
value: any;
|
|
25
|
+
}
|
|
26
|
+
export interface SettingField {
|
|
27
|
+
name: string;
|
|
28
|
+
value: any;
|
|
29
|
+
label?: SettingLang;
|
|
30
|
+
help?: SettingLang;
|
|
31
|
+
placeholder?: SettingLang;
|
|
32
|
+
view?: SettingFieldView;
|
|
33
|
+
control: {
|
|
34
|
+
type: SettingControlType;
|
|
35
|
+
filter?: Record<string, any>;
|
|
36
|
+
variants?: SettingVariant[];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export type SettingFieldView = SettingViewConnectionChoose | SettingViewSelect | any;
|
|
40
|
+
export interface SettingViewConnectionChoose {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
owner_id: number;
|
|
44
|
+
}
|
|
45
|
+
export interface SettingViewSelect {
|
|
46
|
+
show_clear?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface SettingValueField {
|
|
49
|
+
name: string;
|
|
50
|
+
value: any;
|
|
51
|
+
}
|
|
52
|
+
export interface SettingValue {
|
|
53
|
+
name: string;
|
|
54
|
+
context?: string;
|
|
55
|
+
fields: SettingValueField[];
|
|
56
|
+
activity_switch?: boolean;
|
|
57
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StorageElementContentType, StorageElementType } from './storage';
|
|
2
|
+
export interface StorageTrashElement {
|
|
3
|
+
content_type: StorageElementContentType;
|
|
4
|
+
del_group_id: number;
|
|
5
|
+
file_name_ext: string;
|
|
6
|
+
full_path: string;
|
|
7
|
+
name: string;
|
|
8
|
+
path: string;
|
|
9
|
+
size: number;
|
|
10
|
+
type: StorageElementType;
|
|
11
|
+
update_date: string;
|
|
12
|
+
with_preview: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type StorageTrashItem = Pick<StorageTrashElement, 'del_group_id' | 'path'>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { RequestBaseParams } from './base';
|
|
2
|
+
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
|
+
export interface StorageElement {
|
|
19
|
+
name: string;
|
|
20
|
+
size: number;
|
|
21
|
+
shared: boolean;
|
|
22
|
+
full_path: string;
|
|
23
|
+
path: string;
|
|
24
|
+
type: StorageElementType;
|
|
25
|
+
file_name_ext: string;
|
|
26
|
+
content_type: StorageElementContentType;
|
|
27
|
+
update_date: string;
|
|
28
|
+
create_date: string;
|
|
29
|
+
with_preview: boolean;
|
|
30
|
+
is_favorite: boolean;
|
|
31
|
+
owner: User;
|
|
32
|
+
owner_id: number;
|
|
33
|
+
version?: StorageElementVersion;
|
|
34
|
+
divide_id?: number;
|
|
35
|
+
access_mode?: PermissionType;
|
|
36
|
+
to_user_group_name?: string;
|
|
37
|
+
created_by_extension?: string;
|
|
38
|
+
}
|
|
39
|
+
export type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
|
|
40
|
+
is_work_dir?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export declare enum StorageElementType {
|
|
43
|
+
Dir = "dir",
|
|
44
|
+
File = "file",
|
|
45
|
+
WorkDir = "work_dir"
|
|
46
|
+
}
|
|
47
|
+
export declare enum StorageElementContentType {
|
|
48
|
+
Any = "any",
|
|
49
|
+
Dir = "dir",
|
|
50
|
+
Code = "code",
|
|
51
|
+
Image = "image",
|
|
52
|
+
Audio = "audio",
|
|
53
|
+
Video = "video",
|
|
54
|
+
Text = "text",
|
|
55
|
+
Doc = "doc",
|
|
56
|
+
Xls = "xls",
|
|
57
|
+
Ppt = "ppt"
|
|
58
|
+
}
|
|
59
|
+
export interface StorageElementPaste {
|
|
60
|
+
from_path: string;
|
|
61
|
+
to_path: string;
|
|
62
|
+
}
|
|
63
|
+
export interface StorageElementPasteParams {
|
|
64
|
+
paths: StorageElementPaste[];
|
|
65
|
+
overwrite: boolean;
|
|
66
|
+
from_divide_id?: number | null;
|
|
67
|
+
to_divide_id?: number | null;
|
|
68
|
+
}
|
|
69
|
+
export interface StorageElementVersion {
|
|
70
|
+
id: string;
|
|
71
|
+
size: number;
|
|
72
|
+
user_id: number;
|
|
73
|
+
name: string;
|
|
74
|
+
description: string;
|
|
75
|
+
create_date: string;
|
|
76
|
+
update_date: string;
|
|
77
|
+
is_current_version: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface StorageElementHistory {
|
|
80
|
+
user_id: number;
|
|
81
|
+
action: StorageElementHistoryAction;
|
|
82
|
+
create_date: string;
|
|
83
|
+
}
|
|
84
|
+
export declare enum StorageElementHistoryAction {
|
|
85
|
+
Create = "create",
|
|
86
|
+
Update = "update",
|
|
87
|
+
Move = "move"
|
|
88
|
+
}
|
|
89
|
+
export interface StorageElementHistoryNote {
|
|
90
|
+
name: string;
|
|
91
|
+
description: string;
|
|
92
|
+
divide_id: number | null;
|
|
93
|
+
file_version_id: string;
|
|
94
|
+
path: string;
|
|
95
|
+
}
|
|
96
|
+
export interface RequestHistoryListParams extends RequestBaseParams {
|
|
97
|
+
path: string;
|
|
98
|
+
divide_id?: number | null;
|
|
99
|
+
}
|
|
100
|
+
export interface UploadNetRequestParams {
|
|
101
|
+
path: string;
|
|
102
|
+
url: string;
|
|
103
|
+
overwrite?: boolean;
|
|
104
|
+
divide_id?: number;
|
|
105
|
+
}
|