import * as plugins from '../plugins.js';
import type { IDomain, IService, IServiceDomainRoute } from '../types.js';
type TExternalGatewayDomainRoute = Pick<IServiceDomainRoute, 'name' | 'sourceProfileRef'>;
type TGatewayDomainView = plugins.servezoneInterfaces.data.IGatewayDomain & {
    manageUrl?: string;
};
type TGatewayDnsRecordView = plugins.servezoneInterfaces.data.IGatewayDnsRecord & {
    manageUrl?: string;
};
type TGatewayClientRouteView = plugins.servezoneInterfaces.data.IGatewayClientRoute & {
    manageUrl?: string;
};
export declare class ExternalGatewayManager {
    private oneboxRef;
    private database;
    constructor(oneboxRef: any);
    init(): Promise<void>;
    syncServiceRoutes(): Promise<void>;
    private deleteStaleServiceRoutes;
    isConfigured(): Promise<boolean>;
    syncDomains(): Promise<IDomain[]>;
    getGatewayDomains(): Promise<TGatewayDomainView[]>;
    getGatewayDnsRecords(): Promise<TGatewayDnsRecordView[]>;
    getGatewayClientRoutes(): Promise<TGatewayClientRouteView[]>;
    syncServiceRoute(service: IService, domainRoutesArg?: TExternalGatewayDomainRoute[]): Promise<void>;
    private syncServicePublicRoutes;
    deleteServicePublicRoutes(service: {
        id?: number;
        name?: string;
        publicPortMappings?: IService['publicPortMappings'];
    }): Promise<void>;
    private deleteGatewayRouteRef;
    syncAdminUiRoute(): Promise<void>;
    deleteAdminUiRoute(domain: string): Promise<void>;
    private syncGatewayRoute;
    deleteServiceRoute(service: {
        id?: number;
        name?: string;
        domain?: string;
    }): Promise<void>;
    importCertificateForDomain(domain: string): Promise<boolean>;
    private getConfig;
    private getMode;
    private requireConfig;
    private normalizeUrl;
    private parsePort;
    private getStoredGatewayClientId;
    private getGatewayClientFromToken;
    private buildGatewayClientOwnership;
    private buildGatewayClientRouteRefOwnership;
    private publicRouteRef;
    private publicRouteOwnershipKey;
    private isStalePublicRoute;
    private getServicePublicRouteRefs;
    private normalizeServicePortConfig;
    private getServiceDomainRoutes;
    private getAdminUiRoute;
    private isAdminUiRecord;
    private shouldPreserveUnconfiguredAdminUiRecord;
    private buildRoute;
    private routeName;
    private buildManageUrl;
    private fireDcRouterRequest;
}
export {};
