/** * Event Handler Discovery Plugin for VytchesDDD DI System * * This plugin enables automatic discovery and registration of event handlers * that are decorated with the @EventHandler decorator and have DI integration enabled. */ interface IHandlerDiscoveryPlugin { readonly name: string; isAvailable(): boolean; discoverHandlers(assemblies?: unknown[]): Promise | HandlerInfo[]; } interface HandlerInfo { type: string; messageType: unknown; handlerType: unknown; metadata: Record; } /** * Plugin for automatic discovery and registration of event handlers. * Integrates with VytchesDDD DI system to auto-register @EventHandler classes. * * @public * @stable * @since 0.22.0 */ export declare class EventDiscoveryPlugin implements IHandlerDiscoveryPlugin { readonly name = "Event"; /** * Check if the events package is available. * This method allows the DI system to conditionally load this plugin. */ isAvailable(): boolean; /** * Discover all event handlers that are ready for DI registration. * * @param assemblies - Optional list of modules/assemblies to scan * @returns Promise List of discovered event handlers */ discoverHandlers(assemblies?: unknown[]): Promise; /** * Scan a specific assembly/module for event handlers. * * @param assembly - Module or assembly to scan * @returns Promise Event handlers found in the assembly */ private scanAssemblyForEventHandlers; /** * Check if a value is an event handler class. * * @param value - Value to check * @returns boolean True if the value is an event handler class */ private isEventHandlerClass; /** * Check if a class is marked for DI auto-registration. * * @param target - The handler class to inspect * @returns boolean True if the handler is pending DI registration */ private isEventHandlerPendingDIRegistration; /** * Get DI metadata from an event handler class. * * @param target - The handler class to inspect * @returns DIHandlerMetadata | undefined The DI metadata, or undefined if none exists */ private getEventHandlerDIMetadata; } /** * Pre-configured event discovery plugin instance. * Ready for immediate use with DI systems. * * @public * @stable * @since 0.22.0 */ export declare const eventDiscoveryPlugin: EventDiscoveryPlugin; export {};