feat(external-gateway): add gateway client domain and DNS record support for dcrouter integration

This commit is contained in:
2026-05-09 11:58:51 +00:00
parent 7fe63541b3
commit 5e04001790
22 changed files with 488 additions and 38 deletions
+37
View File
@@ -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;
}
+2
View File
@@ -7,6 +7,8 @@ export interface ISettings {
cloudflareZoneId: string;
dcrouterGatewayUrl: string;
dcrouterGatewayApiToken: string;
dcrouterGatewayClientId: string;
/** @deprecated Use dcrouterGatewayClientId. */
dcrouterWorkHosterId: string;
dcrouterTargetHost: string;
dcrouterTargetPort: number;
+13
View File
@@ -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[];
};
}
+13
View File
@@ -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[];
};
}