import type { BindingGrant, CallerBindingConfig, ExportedServiceDefinition } from './types.js'; export declare class ServiceBindingRegistry { private services; private callerBindings; private grants; private mocks; private callerMocks; /** * Register an exported service. */ registerService(service: ExportedServiceDefinition): void; /** * Unregister an exported service. */ unregisterService(name: string): boolean; /** * Retrieve an exported service by name. */ getService(name: string): ExportedServiceDefinition | undefined; /** * Check if an exported service is registered. */ hasService(name: string): boolean; /** * Update service runtime status (e.g. running or stopped). */ setServiceStatus(name: string, status: 'running' | 'stopped'): void; /** * Map a caller's named binding to a target service. */ setCallerBinding(caller: string, bindingName: string, config: CallerBindingConfig): void; /** * Retrieve a caller's named binding configuration. */ getCallerBinding(caller: string, bindingName: string): CallerBindingConfig | undefined; /** * Add an authorization grant from caller to target. */ addGrant(grant: BindingGrant): void; /** * Remove an authorization grant. */ removeGrant(caller: string, target: string): boolean; /** * Check if a caller is authorized to invoke a target service. */ isCallerAuthorized(caller: string, target: string): boolean; /** * Check if a caller is authorized to invoke a target service and specific operation. */ isAuthorized(caller: string, target: string, operation?: string): boolean; /** * Get list of allowed operations for caller on target. */ getAllowedOperations(caller: string, target: string): string[] | undefined; /** * Explicitly substitute a bound service with a mock instance. */ registerMock(bindingName: string, mock: any, caller?: string): void; /** * Retrieve registered mock for binding. */ getMock(bindingName: string, caller?: string): any | undefined; /** * Remove mock substitution. */ removeMock(bindingName: string, caller?: string): void; /** * Clear all registered mocks. */ clearMocks(): void; /** * Return all registered services. */ getAllServices(): ExportedServiceDefinition[]; /** * Return all authorization grants. */ getAllGrants(): BindingGrant[]; /** * Return all caller binding mappings. */ getAllBindings(): Array<{ caller: string; bindingName: string; config: CallerBindingConfig; }>; /** * Reset the entire registry. */ clear(): void; }