/** * Topic Subscriber for iframe communication * Manages subscriptions to topics and receives events from the host window */ import type { TopicDefinition, TopicSubscriptionCallback } from "./types"; export declare class TopicSubscriber { private subscriptions; private topics; private origin; private debug; private useGlobalDebug; private boundHandleMessage; private subscriptionIdCounter; private mockMode; private detectionTimeout; constructor(options?: { origin?: string; debug?: boolean; }); private initDetection; private switchToMockMode; private isDebugEnabled; /** * Request the list of available topics from the host */ private requestTopics; /** * Subscribe to a topic with a callback * Returns a subscription ID that can be used to unsubscribe */ subscribe(topic: string, callback: TopicSubscriptionCallback): string; /** * Unsubscribe from a topic using subscription ID */ unsubscribe(topic: string, subscriptionId: string): boolean; /** * Unsubscribe all callbacks for a topic */ unsubscribeAll(topic: string): number; /** * Get list of available topics */ getTopics(): Promise; /** * Notify host about subscription changes */ private notifySubscription; /** * Handle incoming messages from host */ private handleMessage; /** * Handle incoming topic event and dispatch to callbacks */ private handleTopicEvent; /** * Cleanup and destroy the subscriber */ destroy(): void; }