import type { Duplexer } from '@wix/duplexer-js'; import type { SubscriptionHandler, SubscriptionErrorHandler } from '@wix/realtime-common/types'; export interface SubscriptionEntry { channelName: string; channelResourceId?: string; maybeCrossAppId?: string; siteId?: string; socketAppId?: string; channelEmitter?: ReturnType['subscribe']>; removeListeners: () => void; cancelled?: boolean; onSubscribed?: SubscriptionHandler; onSubscriptionError?: SubscriptionErrorHandler; } export declare class SubscriptionManager { private subscriptionsBySubId; private socketKeyToSubscriptionIds; set(id: string, entry: SubscriptionEntry): void; get(id: string): SubscriptionEntry | undefined; delete(id: string): void; findByChannel(channelName: string, channelResourceId?: string): [string, SubscriptionEntry][]; deleteAndStillHasRemainingOnChannel(socketAppId: string, siteId: string, subscriptionIdToDelete: string, channelName: string, resourceId?: string): boolean; hasSubscriptionsForSocket(socketAppId: string, siteId: string): boolean; getSubscriptionIdsBySocket(socketAppId: string, siteId: string): string[]; removeAll(): void; private addToSocketIndex; private removeFromSocketIndex; }