import * as plugins from '../plugins.js'; import type { ISourceProfile, INetworkTarget, IRouteMetadata, IRoute, IRouteSecurity } from '../../dist_ts_interfaces/data/route-management.js'; export declare class ReferenceResolver { private profiles; private targets; initialize(): Promise; createProfile(data: { name: string; description?: string; security: IRouteSecurity; extendsProfiles?: string[]; createdBy: string; }): Promise; updateProfile(id: string, patch: Partial>): Promise<{ affectedRouteIds: string[]; }>; deleteProfile(id: string, force: boolean, storedRoutes?: Map): Promise<{ success: boolean; message?: string; }>; getProfile(id: string): ISourceProfile | undefined; getProfileByName(name: string): ISourceProfile | undefined; listProfiles(): ISourceProfile[]; resolveSourceProfileSecurity(profileId: string): IRouteSecurity | null; getProfileUsage(storedRoutes: Map): Map>; getProfileUsageForId(profileId: string, storedRoutes: Map): Array<{ id: string; routeName: string; }>; createTarget(data: { name: string; description?: string; host: string | string[]; port: number; createdBy: string; }): Promise; updateTarget(id: string, patch: Partial>): Promise<{ affectedRouteIds: string[]; }>; deleteTarget(id: string, force: boolean, storedRoutes?: Map): Promise<{ success: boolean; message?: string; }>; getTarget(id: string): INetworkTarget | undefined; getTargetByName(name: string): INetworkTarget | undefined; listTargets(): INetworkTarget[]; getTargetUsageForId(targetId: string, storedRoutes: Map): Array<{ id: string; routeName: string; }>; /** * Resolve references for a single route. * Resolves source binding display names and/or network target references. * Source profile security is resolved at apply time by SourcePolicyCompiler. * Returns the resolved route and updated metadata. */ resolveRoute(route: plugins.smartproxy.IRouteConfig, metadata?: IRouteMetadata): { route: plugins.smartproxy.IRouteConfig; metadata: IRouteMetadata; }; findRoutesByProfileRef(profileId: string): Promise; findRoutesByTargetRef(targetId: string): Promise; findRoutesByProfileRefSync(profileId: string, storedRoutes: Map): string[]; findRoutesByTargetRefSync(targetId: string, storedRoutes: Map): string[]; private resolveRouteSourceBindings; private metadataUsesSourceProfile; private getSourceProfileRefsFromMetadata; private resolveSourceProfile; /** * Merge two IRouteSecurity objects. * `override` values take precedence over `base` values. * For ipAllowList/ipBlockList: union arrays and deduplicate. * For scalar/object fields: override wins if present. */ private mergeSecurityFields; private cloneSecurityFields; private loadProfiles; private loadTargets; private persistProfile; private persistTarget; private clearProfileRefsOnRoutes; private clearSourceProfileFromMetadata; private clearTargetRefsOnRoutes; }