1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 17:29:17 +08:00

250 lines
5.0 KiB
Go
Raw Normal View History

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;
appinstall?: NewAppInstall;
2022-11-25 15:37:24 +08:00
webSiteSSL: SSL;
2022-11-02 15:19:14 +08:00
}
export interface WebsiteDTO extends Website {
errorLogPath: string;
accessLogPath: string;
}
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-11-30 10:34:44 +08:00
export interface WebSiteRecover {
websiteName: string;
type: string;
backupName: string;
}
export interface WebsiteRecoverByUpload {
websiteName: string;
type: string;
fileDir: string;
fileName: string;
}
2022-11-30 10:34:44 +08:00
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;
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-11-08 17:21:13 +08:00
}
2022-12-26 16:09:21 +08:00
export interface WebSiteOp {
id: number;
operate: string;
}
2022-10-28 17:04:57 +08:00
export interface Group extends CommonModel {
name: string;
2022-11-02 15:19:14 +08:00
default: boolean;
2022-10-28 17:04:57 +08:00
}
2022-11-02 18:18:20 +08:00
export interface GroupOp {
name: string;
id?: number;
2022-11-25 18:59:49 +08:00
default: boolean;
2022-11-02 18:18:20 +08:00
}
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-12-01 00:41:50 +08:00
export interface NginxScopeConfig {
enable: boolean;
params: NginxParam[];
}
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 {
primaryDomain: string;
2022-11-11 17:41:39 +08:00
privateKey: string;
pem: string;
otherDomains: string;
2022-11-11 17:41:39 +08:00
certURL: string;
type: string;
issuerName: string;
expireDate: string;
startDate: string;
}
2022-11-16 10:31:35 +08:00
export interface SSLCreate {
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;
}
export interface SSLRenew {
SSLId: number;
}
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-11-20 18:32:56 +08:00
}
export interface HTTPSConfig {
enable: boolean;
SSL: SSL;
}
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
export interface BackupReq {
id: number;
}
2022-10-28 17:04:57 +08:00
}