feat(external-gateway): add gateway client domain and DNS record support for dcrouter integration
This commit is contained in:
@@ -57,3 +57,40 @@ export interface IDnsRecord {
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface IGatewayDomain {
|
||||
id?: string;
|
||||
name: string;
|
||||
source?: 'dcrouter' | 'provider';
|
||||
authoritative?: boolean;
|
||||
providerId?: string;
|
||||
serviceCount?: number;
|
||||
managePath?: string;
|
||||
manageUrl?: string;
|
||||
capabilities?: {
|
||||
canCreateSubdomains: boolean;
|
||||
canManageDnsRecords: boolean;
|
||||
canIssueCertificates: boolean;
|
||||
canHostEmail: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IGatewayDnsRecord {
|
||||
id: string;
|
||||
domainId: string;
|
||||
domainName?: string;
|
||||
name: string;
|
||||
type: string;
|
||||
value: string;
|
||||
ttl: number;
|
||||
source: string;
|
||||
status: 'active' | 'missing';
|
||||
gatewayClientType: 'onebox' | 'cloudly' | 'custom';
|
||||
gatewayClientId: string;
|
||||
appId: string;
|
||||
hostname: string;
|
||||
routeId?: string;
|
||||
serviceName?: string;
|
||||
managePath?: string;
|
||||
manageUrl?: string;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ export interface ISettings {
|
||||
cloudflareZoneId: string;
|
||||
dcrouterGatewayUrl: string;
|
||||
dcrouterGatewayApiToken: string;
|
||||
dcrouterGatewayClientId: string;
|
||||
/** @deprecated Use dcrouterGatewayClientId. */
|
||||
dcrouterWorkHosterId: string;
|
||||
dcrouterTargetHost: string;
|
||||
dcrouterTargetPort: number;
|
||||
|
||||
@@ -56,3 +56,16 @@ export interface IReq_SyncDns extends plugins.typedrequestInterfaces.implementsT
|
||||
records: data.IDnsRecord[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetGatewayDnsRecords extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetGatewayDnsRecords
|
||||
> {
|
||||
method: 'getGatewayDnsRecords';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
records: data.IGatewayDnsRecord[];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,3 +40,16 @@ export interface IReq_SyncDomains extends plugins.typedrequestInterfaces.impleme
|
||||
domains: data.IDomainDetail[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetGatewayDomains extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetGatewayDomains
|
||||
> {
|
||||
method: 'getGatewayDomains';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
domains: data.IGatewayDomain[];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user