2022-09-23 16:33:55 +08:00
|
|
|
import { ReqPage, CommonModel } from '.';
|
2022-09-22 16:16:04 +08:00
|
|
|
|
|
|
|
export namespace App {
|
2022-09-23 16:33:55 +08:00
|
|
|
export interface App extends CommonModel {
|
2022-09-22 16:16:04 +08:00
|
|
|
name: string;
|
|
|
|
icon: string;
|
|
|
|
key: string;
|
|
|
|
tags: Tag[];
|
2023-02-17 16:21:13 +08:00
|
|
|
shortDescZh: string;
|
|
|
|
shortDescEn: string;
|
2022-09-22 16:16:04 +08:00
|
|
|
author: string;
|
|
|
|
source: string;
|
|
|
|
type: string;
|
2023-05-15 22:40:05 +08:00
|
|
|
status: string;
|
2023-09-05 14:20:10 +08:00
|
|
|
limit: number;
|
2024-08-01 10:59:43 +08:00
|
|
|
website: string;
|
|
|
|
github: string;
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
|
|
|
|
2022-09-23 16:33:55 +08:00
|
|
|
export interface AppDTO extends App {
|
|
|
|
versions: string[];
|
2023-05-22 21:39:42 +08:00
|
|
|
installed: boolean;
|
2022-09-23 16:33:55 +08:00
|
|
|
}
|
|
|
|
|
2022-09-22 16:16:04 +08:00
|
|
|
export interface Tag {
|
|
|
|
key: string;
|
|
|
|
name: string;
|
2023-10-08 01:54:14 -05:00
|
|
|
sort: number;
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AppResPage {
|
|
|
|
total: number;
|
2023-05-22 21:39:42 +08:00
|
|
|
items: App.AppDTO[];
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
|
|
|
|
2023-03-14 13:54:42 +08:00
|
|
|
export interface AppUpdateRes {
|
|
|
|
version: string;
|
|
|
|
canUpdate: boolean;
|
|
|
|
}
|
|
|
|
|
2022-09-23 16:33:55 +08:00
|
|
|
export interface AppDetail extends CommonModel {
|
|
|
|
appId: string;
|
2022-09-22 16:16:04 +08:00
|
|
|
icon: string;
|
2022-09-23 16:33:55 +08:00
|
|
|
version: string;
|
2022-09-22 16:16:04 +08:00
|
|
|
readme: string;
|
2022-09-26 16:32:40 +08:00
|
|
|
params: AppParams;
|
2022-09-23 16:33:55 +08:00
|
|
|
dockerCompose: string;
|
2023-04-02 16:54:00 +08:00
|
|
|
image: string;
|
2023-11-03 15:39:38 +08:00
|
|
|
hostMode?: boolean;
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AppReq extends ReqPage {
|
2022-11-02 15:19:14 +08:00
|
|
|
name?: string;
|
|
|
|
tags?: string[];
|
|
|
|
type?: string;
|
2023-02-08 16:21:17 +08:00
|
|
|
recommend?: boolean;
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|
2022-09-26 16:32:40 +08:00
|
|
|
|
|
|
|
export interface AppParams {
|
|
|
|
formFields: FromField[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface FromField {
|
|
|
|
type: string;
|
|
|
|
labelZh: string;
|
|
|
|
labelEn: string;
|
|
|
|
required: boolean;
|
|
|
|
default: any;
|
|
|
|
envKey: string;
|
2022-10-07 15:49:39 +08:00
|
|
|
key?: string;
|
2023-03-06 14:18:05 +08:00
|
|
|
values?: ServiceParam[];
|
|
|
|
child?: FromFieldChild;
|
|
|
|
params?: FromParam[];
|
2023-03-30 16:47:47 +08:00
|
|
|
multiple?: boolean;
|
2023-03-06 14:18:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface FromFieldChild extends FromField {
|
|
|
|
services: App.AppService[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface FromParam {
|
|
|
|
type: string;
|
|
|
|
key: string;
|
|
|
|
value: string;
|
|
|
|
envKey: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ServiceParam {
|
|
|
|
label: '';
|
|
|
|
value: '';
|
2023-10-07 03:02:44 -05:00
|
|
|
from?: '';
|
2022-09-26 16:32:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AppInstall {
|
|
|
|
appDetailId: number;
|
|
|
|
params: any;
|
|
|
|
}
|
|
|
|
|
2022-11-28 13:50:53 +08:00
|
|
|
export interface AppInstallSearch extends ReqPage {
|
|
|
|
name?: string;
|
2023-01-16 15:30:24 +08:00
|
|
|
tags?: string[];
|
2023-02-09 17:18:24 +08:00
|
|
|
update?: boolean;
|
2023-01-16 15:30:24 +08:00
|
|
|
unused?: boolean;
|
2024-05-29 18:41:13 +08:00
|
|
|
sync?: boolean;
|
2022-11-28 13:50:53 +08:00
|
|
|
}
|
2022-11-08 14:34:41 +08:00
|
|
|
export interface ChangePort {
|
|
|
|
key: string;
|
|
|
|
name: string;
|
|
|
|
port: number;
|
|
|
|
}
|
|
|
|
|
2022-09-26 16:32:40 +08:00
|
|
|
export interface AppInstalled extends CommonModel {
|
2022-09-26 18:20:21 +08:00
|
|
|
name: string;
|
2023-10-07 21:50:16 -05:00
|
|
|
appId: number;
|
2022-09-26 16:32:40 +08:00
|
|
|
appDetailId: string;
|
2022-10-12 18:57:22 +08:00
|
|
|
env: string;
|
2022-09-26 16:32:40 +08:00
|
|
|
status: string;
|
|
|
|
description: string;
|
|
|
|
message: string;
|
|
|
|
icon: string;
|
2022-10-12 18:57:22 +08:00
|
|
|
canUpdate: boolean;
|
2023-05-22 17:10:51 +08:00
|
|
|
path: string;
|
2022-10-11 16:27:58 +08:00
|
|
|
app: App;
|
2022-09-26 16:32:40 +08:00
|
|
|
}
|
2022-09-26 18:20:21 +08:00
|
|
|
|
2024-06-03 15:41:45 +08:00
|
|
|
export interface AppInstallDto {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
appID: number;
|
|
|
|
appDetailID: number;
|
|
|
|
version: string;
|
|
|
|
status: string;
|
|
|
|
message: string;
|
|
|
|
httpPort: number;
|
|
|
|
httpsPort: number;
|
|
|
|
path: string;
|
|
|
|
canUpdate: boolean;
|
|
|
|
icon: string;
|
|
|
|
appName: string;
|
|
|
|
ready: number;
|
|
|
|
total: number;
|
|
|
|
appKey: string;
|
|
|
|
appType: string;
|
|
|
|
appStatus: string;
|
|
|
|
}
|
|
|
|
|
2023-08-23 22:44:14 +08:00
|
|
|
export interface AppInstalledInfo {
|
|
|
|
id: number;
|
|
|
|
key: string;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
2022-11-18 16:14:23 +08:00
|
|
|
export interface CheckInstalled {
|
|
|
|
name: string;
|
|
|
|
version: string;
|
|
|
|
isExist: boolean;
|
2022-11-22 22:47:38 +08:00
|
|
|
app: string;
|
|
|
|
status: string;
|
|
|
|
createdAt: string;
|
|
|
|
lastBackupAt: string;
|
|
|
|
appInstallId: number;
|
2022-11-23 16:59:06 +08:00
|
|
|
containerName: string;
|
2022-12-21 17:36:14 +08:00
|
|
|
installPath: string;
|
2023-08-24 18:20:15 +08:00
|
|
|
httpPort: number;
|
|
|
|
httpsPort: number;
|
2022-11-18 16:14:23 +08:00
|
|
|
}
|
|
|
|
|
2023-04-11 10:26:25 +08:00
|
|
|
export interface DatabaseConnInfo {
|
2024-05-30 15:13:21 +08:00
|
|
|
status: string;
|
2023-12-28 16:29:18 +08:00
|
|
|
username: string;
|
2023-04-11 10:26:25 +08:00
|
|
|
password: string;
|
2023-07-20 17:51:57 +08:00
|
|
|
privilege: boolean;
|
2024-01-29 16:34:40 +08:00
|
|
|
containerName: string;
|
2023-04-11 10:26:25 +08:00
|
|
|
serviceName: string;
|
2023-09-18 10:16:19 +08:00
|
|
|
systemIP: string;
|
2023-04-18 15:30:57 +08:00
|
|
|
port: number;
|
2023-04-11 10:26:25 +08:00
|
|
|
}
|
2022-12-01 19:25:02 +08:00
|
|
|
export interface AppInstallResource {
|
|
|
|
type: string;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
2022-09-26 18:20:21 +08:00
|
|
|
export interface AppInstalledOp {
|
|
|
|
installId: number;
|
|
|
|
operate: string;
|
2022-10-13 16:46:38 +08:00
|
|
|
backupId?: number;
|
2022-10-13 18:56:53 +08:00
|
|
|
detailId?: number;
|
2022-12-21 11:32:52 +08:00
|
|
|
forceDelete?: boolean;
|
|
|
|
deleteBackup?: boolean;
|
2022-09-26 18:20:21 +08:00
|
|
|
}
|
2022-10-07 15:49:39 +08:00
|
|
|
|
2023-10-27 15:13:25 +08:00
|
|
|
export interface AppInstalledSearch extends ReqPage {
|
2022-10-28 17:04:57 +08:00
|
|
|
type: string;
|
2023-02-22 19:19:10 +08:00
|
|
|
unused?: boolean;
|
2023-10-27 15:13:25 +08:00
|
|
|
all?: boolean;
|
2022-10-28 17:04:57 +08:00
|
|
|
}
|
|
|
|
|
2022-10-07 15:49:39 +08:00
|
|
|
export interface AppService {
|
|
|
|
label: string;
|
|
|
|
value: string;
|
2022-12-02 10:31:07 +08:00
|
|
|
config?: Object;
|
2023-10-07 03:02:44 -05:00
|
|
|
from?: string;
|
2022-10-07 15:49:39 +08:00
|
|
|
}
|
2022-10-12 18:57:22 +08:00
|
|
|
|
2022-10-13 18:56:53 +08:00
|
|
|
export interface VersionDetail {
|
|
|
|
version: string;
|
|
|
|
detailId: number;
|
|
|
|
}
|
2023-01-03 14:57:13 +08:00
|
|
|
|
|
|
|
export interface InstallParams {
|
2023-03-08 11:04:22 +08:00
|
|
|
labelZh: string;
|
|
|
|
labelEn: string;
|
|
|
|
value: any;
|
|
|
|
edit: boolean;
|
|
|
|
key: string;
|
|
|
|
rule: string;
|
|
|
|
type: string;
|
2023-03-22 15:38:30 +08:00
|
|
|
values?: any;
|
|
|
|
showValue?: string;
|
2023-04-02 16:54:00 +08:00
|
|
|
required?: boolean;
|
|
|
|
multiple?: boolean;
|
2023-01-03 14:57:13 +08:00
|
|
|
}
|
2023-05-17 15:46:29 +08:00
|
|
|
|
|
|
|
export interface AppConfig {
|
|
|
|
params: InstallParams[];
|
|
|
|
cpuQuota: number;
|
|
|
|
memoryLimit: number;
|
|
|
|
memoryUnit: string;
|
|
|
|
containerName: string;
|
|
|
|
allowPort: boolean;
|
2023-05-31 15:59:00 +08:00
|
|
|
dockerCompose: string;
|
2023-11-03 15:39:38 +08:00
|
|
|
hostMode?: boolean;
|
2023-05-17 15:46:29 +08:00
|
|
|
}
|
2023-07-06 18:48:22 +08:00
|
|
|
|
|
|
|
export interface IgnoredApp {
|
|
|
|
name: string;
|
|
|
|
detailID: number;
|
|
|
|
version: string;
|
|
|
|
icon: string;
|
|
|
|
}
|
2024-06-04 16:50:31 +08:00
|
|
|
|
|
|
|
export interface AppUpdateVersionReq {
|
|
|
|
appInstallID: number;
|
|
|
|
updateVersion?: string;
|
|
|
|
}
|
2022-09-22 16:16:04 +08:00
|
|
|
}
|