import '../lib/signal-polyfill.js'; import { Client } from '../client/client.js'; import { RequestOptions } from '../client/types.js'; type Event = { id: string; timestamp: number; encoding: string; channel: string; } & ({ name: 'notifications/new'; data: { id: string; }; } | { name: 'notifications/read'; data: { id: string; client_id: string; }; } | { name: 'notifications/read/all'; data: { client_id: string; }; } | { name: 'notifications/seen/all'; data: { client_id: string; }; } | { name: 'notifications/unread'; data: { id: string; client_id: string; }; } | { name: 'notifications/delete'; data: { id: string; client_id: string | null; }; }); type IterableEventSource = { [Symbol.asyncIterator](): Iterator; forEach(cb: (node: TNode, index: number) => void | boolean | Promise): Promise; close(): void; }; export type Listener = (options?: RequestOptions) => IterableEventSource; type ListenerOptions = { apiKey: string; socketURL?: string; }; export declare function getSessionId(): string; export declare function createListener(client: InstanceType, options: ListenerOptions): Listener; export {};