import { oObject } from '../o-object.js'; import { oNotificationEvent } from './events/o-notification-event.js'; import { EventFilter, NotificationHandler, Subscription } from './interfaces/notification-types.js'; /** * Abstract notification manager - transport agnostic * NO dependencies on libp2p, HTTP, or any specific transport * * Subclasses implement setupListeners() to wire up transport-specific events */ export declare abstract class oNotificationManager extends oObject { private eventTarget; private subscriptions; constructor(); /** * Subscribe to a notification event * * @param eventType - The event type to subscribe to (e.g., "node:connected", "child:joined") * @param handler - The handler function to call when event is emitted * @param filter - Optional filter to apply to events * @returns Subscription handle */ on(eventType: string, handler: NotificationHandler, filter?: EventFilter): Subscription; /** * Unsubscribe from a notification event */ off(subscription: Subscription): void; /** * Emit a notification event */ emit(event: oNotificationEvent): void; /** * Check if an event matches a filter */ protected matchesFilter(event: oNotificationEvent, filter: EventFilter): boolean; /** * Get all active subscriptions for an event type */ getSubscriptions(eventType?: string): Subscription[]; /** * Get count of active subscriptions */ getSubscriptionCount(eventType?: string): number; /** * Subclasses must implement this to wire up transport-specific listeners * This is where libp2p/HTTP/WebSocket events get connected */ protected abstract setupListeners(): void | Promise; /** * Initialize the notification manager * Calls setupListeners() to wire up transport events */ initialize(): Promise; /** * Cleanup all subscriptions */ teardown(): Promise; } //# sourceMappingURL=o-notification.manager.d.ts.map