import { ReflagContext } from './context'; import { Logger } from './logger'; export type EventSourceLike = { addEventListener: (type: string, cb: (event: any) => void) => void; close: () => void; }; export type EventSourceFactory = (url: string) => EventSourceLike; export type PubSubMessage = { name?: string; event?: string; channel?: string; data?: any; [key: string]: any; }; export declare class AblySSEChannel { private channels; private sseBaseUrl; private messageHandler; private eventSourceFactory?; private publishableKey?; private sdkVersion?; private path; private context?; private credentials?; private isOpen; private eventSource; private retryInterval; private logger; constructor(channels: string[], sseBaseUrl: string, messageHandler: (message: PubSubMessage) => void, logger: Logger, eventSourceFactory?: EventSourceFactory | undefined, publishableKey?: string | undefined, sdkVersion?: string | undefined, path?: string, context?: ReflagContext | undefined, credentials?: RequestCredentials | undefined); private onMessage; private onOpen; private onError; private createEventSource; connect(): Promise; disconnect(): void; open(options?: { retryInterval?: number; retryCount?: number; }): void; close(): void; isActive(): boolean; isConnected(): boolean; } export declare function openAblySSEChannel({ channel, channels, callback, sseBaseUrl, logger, eventSourceFactory, publishableKey, sdkVersion, path, context, credentials, }: { channel?: string; channels?: string[]; callback: (req: PubSubMessage) => void; logger: Logger; sseBaseUrl: string; eventSourceFactory?: EventSourceFactory; publishableKey?: string; sdkVersion?: string; path?: string; context?: ReflagContext; credentials?: RequestCredentials; }): AblySSEChannel; export declare function closeAblySSEChannel(channel: AblySSEChannel): void; //# sourceMappingURL=sse.d.ts.map