import { IridescentEnv, Branch, Operation } from './Interfaces'; import { Member } from './Longpoll'; export declare type Message = { kind: 'selections'; path: string; selections: ReadonlyArray; from: string; } | { kind: 'operations'; operations: ReadonlyArray; } | { kind: 'sha'; sha: string; }; declare type EveryMessage = { kind: 'intro'; peer: Peer; } | Message; export interface Peer extends Member { readonly color: string; readonly sha: string; } export default class Presence { private readonly iridescentEnv; private readonly events; private readonly branch; private readonly longpoll; private readonly connections; private readonly peers; private viewer_?; private readonly siteId; constructor(iridescentEnv: IridescentEnv, branch: Branch, siteId: string); start(): Promise; private onLongpollMessage; private handleJoin; private handleNegotiation; private createConnectionToSite; disconnect(): void; private disconnectPeers; addEventListener(name: string, callback: Function): void; listen(callback: (data: object) => void): void; send(message: EveryMessage, siteId?: string): void; readonly viewer: Member | undefined; } export {};