2022-11-02 15:19:14 +08:00
|
|
|
import { CommonModel, ReqPage } from '.';
|
2022-10-28 17:04:57 +08:00
|
|
|
|
2022-12-13 17:20:13 +08:00
|
|
|
export namespace Website {
|
|
|
|
export interface Website extends CommonModel {
|
2022-11-02 15:19:14 +08:00
|
|
|
primaryDomain: string;
|
|
|
|
type: string;
|
|
|
|
alias: string;
|
|
|
|
remark: string;
|
|
|
|
domains: string[];
|
|
|
|
appType: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
appInstallId?: number;
|
|
|
|
webSiteGroupId: number;
|
2022-11-02 15:19:14 +08:00
|
|
|
otherDomains: string;
|
2023-01-03 16:56:36 +08:00
|
|
|
defaultServer: boolean;
|
2023-03-09 17:50:47 +08:00
|
|
|
protocol: string;
|
2023-01-04 11:44:43 +08:00
|
|
|
autoRenew: boolean;
|
2022-11-02 15:19:14 +08:00
|
|
|
appinstall?: NewAppInstall;
|
2022-11-25 15:37:24 +08:00
|
|
|
webSiteSSL: SSL;
|
2023-04-04 18:54:04 +08:00
|
|
|
runtimeID: number;
|
2023-04-14 16:01:06 +08:00
|
|
|
rewrite: string;
|
2023-04-18 18:46:58 +08:00
|
|
|
user: string;
|
|
|
|
group: string;
|
2022-11-02 15:19:14 +08:00
|
|
|
}
|
|
|
|
|
2022-12-26 11:42:37 +08:00
|
|
|
export interface WebsiteDTO extends Website {
|
|
|
|
errorLogPath: string;
|
|
|
|
accessLogPath: string;
|
2022-12-26 18:32:13 +08:00
|
|
|
sitePath: string;
|
2023-03-09 17:50:47 +08:00
|
|
|
appName: string;
|
2023-04-10 16:24:26 +08:00
|
|
|
runtimeName: string;
|
2022-12-26 11:42:37 +08:00
|
|
|
}
|
|
|
|
|
2022-11-02 15:19:14 +08:00
|
|
|
export interface NewAppInstall {
|
|
|
|
name: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
appDetailId: number;
|
2022-11-02 15:19:14 +08:00
|
|
|
params: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface WebSiteSearch extends ReqPage {
|
|
|
|
name: string;
|
2022-12-30 16:13:13 +08:00
|
|
|
websiteGroupId: number;
|
2022-11-02 15:19:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface WebSiteDel {
|
|
|
|
id: number;
|
|
|
|
deleteApp: boolean;
|
|
|
|
deleteBackup: boolean;
|
2022-12-12 15:36:45 +08:00
|
|
|
forceDelete: boolean;
|
2022-11-02 15:19:14 +08:00
|
|
|
}
|
|
|
|
|
2022-10-28 17:04:57 +08:00
|
|
|
export interface WebSiteCreateReq {
|
|
|
|
primaryDomain: string;
|
|
|
|
type: string;
|
|
|
|
alias: string;
|
|
|
|
remark: string;
|
|
|
|
appType: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
appInstallId: number;
|
|
|
|
webSiteGroupId: number;
|
2022-10-28 17:04:57 +08:00
|
|
|
otherDomains: string;
|
2022-12-12 15:36:45 +08:00
|
|
|
proxy: string;
|
2023-04-12 21:52:30 +08:00
|
|
|
proxyType: string;
|
2022-10-28 17:04:57 +08:00
|
|
|
}
|
|
|
|
|
2022-11-08 17:21:13 +08:00
|
|
|
export interface WebSiteUpdateReq {
|
|
|
|
id: number;
|
|
|
|
primaryDomain: string;
|
|
|
|
remark: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
webSiteGroupId: number;
|
2022-12-30 10:31:54 +08:00
|
|
|
expireDate?: string;
|
2022-11-08 17:21:13 +08:00
|
|
|
}
|
|
|
|
|
2022-12-26 16:09:21 +08:00
|
|
|
export interface WebSiteOp {
|
|
|
|
id: number;
|
|
|
|
operate: string;
|
|
|
|
}
|
|
|
|
|
2022-12-30 17:39:17 +08:00
|
|
|
export interface WebSiteOpLog {
|
|
|
|
id: number;
|
|
|
|
operate: string;
|
|
|
|
logType: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface WebSiteLog {
|
|
|
|
enable: boolean;
|
|
|
|
content: string;
|
|
|
|
}
|
|
|
|
|
2022-11-03 17:06:48 +08:00
|
|
|
export interface Domain {
|
2022-11-03 18:02:07 +08:00
|
|
|
websiteId: number;
|
2022-11-03 17:06:48 +08:00
|
|
|
port: number;
|
|
|
|
id: number;
|
2022-11-03 18:02:07 +08:00
|
|
|
domain: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DomainCreate {
|
|
|
|
websiteId: number;
|
|
|
|
port: number;
|
|
|
|
domain: string;
|
2022-11-03 17:06:48 +08:00
|
|
|
}
|
2022-11-07 16:19:05 +08:00
|
|
|
|
2022-12-13 17:20:13 +08:00
|
|
|
export interface DomainDelete {
|
|
|
|
id: number;
|
|
|
|
}
|
|
|
|
|
2022-11-07 16:19:05 +08:00
|
|
|
export interface NginxConfigReq {
|
2022-11-08 15:42:31 +08:00
|
|
|
operate: string;
|
2022-11-07 16:19:05 +08:00
|
|
|
websiteId: number;
|
|
|
|
scope: string;
|
|
|
|
params?: any;
|
|
|
|
}
|
2022-11-08 15:42:31 +08:00
|
|
|
|
2022-12-13 18:54:46 +08:00
|
|
|
export interface NginxScopeReq {
|
|
|
|
websiteId: number;
|
|
|
|
scope: string;
|
|
|
|
}
|
|
|
|
|
2022-11-08 15:42:31 +08:00
|
|
|
export interface NginxParam {
|
|
|
|
name: string;
|
|
|
|
params: string[];
|
|
|
|
}
|
2022-11-10 17:44:38 +08:00
|
|
|
|
2022-12-01 00:41:50 +08:00
|
|
|
export interface NginxScopeConfig {
|
|
|
|
enable: boolean;
|
|
|
|
params: NginxParam[];
|
|
|
|
}
|
|
|
|
|
2022-11-10 17:44:38 +08:00
|
|
|
export interface DnsAccount extends CommonModel {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
authorization: Object;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DnsAccountCreate {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
authorization: Object;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DnsAccountUpdate {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
authorization: Object;
|
|
|
|
}
|
2022-11-11 17:41:39 +08:00
|
|
|
|
|
|
|
export interface SSL extends CommonModel {
|
2022-11-17 17:39:33 +08:00
|
|
|
primaryDomain: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
privateKey: string;
|
|
|
|
pem: string;
|
2022-11-17 17:39:33 +08:00
|
|
|
otherDomains: string;
|
2022-11-11 17:41:39 +08:00
|
|
|
certURL: string;
|
|
|
|
type: string;
|
|
|
|
issuerName: string;
|
|
|
|
expireDate: string;
|
|
|
|
startDate: string;
|
2023-01-03 18:37:57 +08:00
|
|
|
provider: string;
|
2023-01-04 14:26:22 +08:00
|
|
|
websites?: Website.Website[];
|
2023-03-21 14:42:50 +08:00
|
|
|
autoRenew: boolean;
|
2022-11-11 17:41:39 +08:00
|
|
|
}
|
|
|
|
|
2022-11-16 10:31:35 +08:00
|
|
|
export interface SSLCreate {
|
2022-11-17 17:39:33 +08:00
|
|
|
primaryDomain: string;
|
|
|
|
otherDomains: string;
|
2022-11-16 10:31:35 +08:00
|
|
|
provider: string;
|
|
|
|
acmeAccountId: number;
|
|
|
|
dnsAccountId: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SSLApply {
|
|
|
|
websiteId: number;
|
|
|
|
SSLId: number;
|
|
|
|
}
|
|
|
|
|
2022-11-17 17:39:33 +08:00
|
|
|
export interface SSLRenew {
|
|
|
|
SSLId: number;
|
|
|
|
}
|
|
|
|
|
2023-03-21 14:42:50 +08:00
|
|
|
export interface SSLUpdate {
|
|
|
|
id: number;
|
|
|
|
autoRenew: boolean;
|
|
|
|
}
|
|
|
|
|
2022-11-11 17:41:39 +08:00
|
|
|
export interface AcmeAccount extends CommonModel {
|
|
|
|
email: string;
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AcmeAccountCreate {
|
|
|
|
email: string;
|
|
|
|
}
|
2022-11-16 10:31:35 +08:00
|
|
|
|
|
|
|
export interface DNSResolveReq {
|
|
|
|
domains: string[];
|
|
|
|
acmeAccountId: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DNSResolve {
|
2022-11-25 00:08:44 +08:00
|
|
|
resolve: string;
|
2022-11-16 10:31:35 +08:00
|
|
|
value: string;
|
2022-11-25 00:08:44 +08:00
|
|
|
domain: string;
|
|
|
|
err: string;
|
2022-11-16 10:31:35 +08:00
|
|
|
}
|
2022-11-20 18:32:56 +08:00
|
|
|
|
|
|
|
export interface SSLReq {
|
|
|
|
name?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface HTTPSReq {
|
|
|
|
websiteId: number;
|
|
|
|
enable: boolean;
|
2022-11-24 17:50:47 +08:00
|
|
|
websiteSSLId?: number;
|
2022-11-20 18:32:56 +08:00
|
|
|
type: string;
|
2022-11-24 17:50:47 +08:00
|
|
|
certificate?: string;
|
|
|
|
privateKey?: string;
|
2022-12-28 16:07:43 +08:00
|
|
|
httpConfig: string;
|
2022-12-28 18:59:05 +08:00
|
|
|
SSLProtocol: string[];
|
|
|
|
algorithm: string;
|
2022-11-20 18:32:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface HTTPSConfig {
|
|
|
|
enable: boolean;
|
|
|
|
SSL: SSL;
|
2022-12-28 16:07:43 +08:00
|
|
|
httpConfig: string;
|
2022-12-28 18:59:05 +08:00
|
|
|
SSLProtocol: string[];
|
|
|
|
algorithm: string;
|
2022-11-20 18:32:56 +08:00
|
|
|
}
|
2022-12-04 17:45:54 +08:00
|
|
|
|
|
|
|
export interface CheckReq {
|
|
|
|
installIds?: number[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface CheckRes {
|
|
|
|
name: string;
|
|
|
|
status: string;
|
|
|
|
version: string;
|
|
|
|
appName: string;
|
|
|
|
}
|
2022-12-06 11:42:11 +08:00
|
|
|
|
|
|
|
export interface WafReq {
|
|
|
|
websiteId: number;
|
|
|
|
key: string;
|
|
|
|
rule: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface WafRes {
|
|
|
|
enable: boolean;
|
|
|
|
filePath: string;
|
|
|
|
content: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface WafUpdate {
|
|
|
|
enable: boolean;
|
|
|
|
websiteId: number;
|
|
|
|
key: string;
|
|
|
|
}
|
2022-12-22 10:30:32 +08:00
|
|
|
|
|
|
|
export interface DelReq {
|
|
|
|
id: number;
|
|
|
|
}
|
2022-12-23 11:08:28 +08:00
|
|
|
|
2022-12-28 11:37:04 +08:00
|
|
|
export interface NginxUpdate {
|
|
|
|
id: number;
|
|
|
|
content: string;
|
|
|
|
}
|
2023-01-03 16:56:36 +08:00
|
|
|
|
|
|
|
export interface DefaultServerUpdate {
|
|
|
|
id: number;
|
|
|
|
}
|
2023-04-06 00:09:58 +08:00
|
|
|
|
|
|
|
export interface PHPConfig {
|
|
|
|
params: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PHPConfigUpdate {
|
|
|
|
id: number;
|
|
|
|
params: any;
|
|
|
|
}
|
2023-04-12 14:48:30 +08:00
|
|
|
|
|
|
|
export interface PHPUpdate {
|
|
|
|
id: number;
|
|
|
|
content: string;
|
|
|
|
type: string;
|
|
|
|
}
|
2023-04-14 16:01:06 +08:00
|
|
|
|
|
|
|
export interface RewriteReq {
|
|
|
|
websiteID: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface RewriteRes {
|
|
|
|
content: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface RewriteUpdate {
|
|
|
|
websiteID: number;
|
|
|
|
name: string;
|
|
|
|
content: string;
|
|
|
|
}
|
2023-04-17 16:54:34 +08:00
|
|
|
|
|
|
|
export interface DirUpdate {
|
|
|
|
id: number;
|
|
|
|
siteDir: string;
|
|
|
|
}
|
2023-04-18 18:46:58 +08:00
|
|
|
|
|
|
|
export interface DirPermissionUpdate {
|
|
|
|
id: number;
|
|
|
|
user: string;
|
|
|
|
group: string;
|
|
|
|
}
|
2023-04-23 18:15:38 +08:00
|
|
|
|
|
|
|
export interface ProxyReq {
|
|
|
|
id: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ProxyConfig {
|
|
|
|
id: number;
|
|
|
|
operate: string;
|
|
|
|
enable: boolean;
|
|
|
|
cache: boolean;
|
|
|
|
cacheTime: number;
|
|
|
|
cacheUnit: string;
|
|
|
|
name: string;
|
|
|
|
modifier: string;
|
|
|
|
match: string;
|
|
|
|
proxyPass: string;
|
|
|
|
proxyHost: string;
|
|
|
|
filePath?: string;
|
|
|
|
replaces?: ProxReplace;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ProxReplace {
|
|
|
|
[key: string]: string;
|
|
|
|
}
|
2022-10-28 17:04:57 +08:00
|
|
|
}
|