UNPKG

open-collaboration-server

Version:

Open Collaboration Server implementation, part of the Open Collaboration Tools project

42 lines 1.11 kB
import { Channel, TransportChannel } from './channel.js'; import * as protocol from 'open-collaboration-protocol'; export declare class Room { id: string; host: Peer; guests: Peer[]; clock: number; constructor(id: string, host: Peer, guests: Peer[]); get peers(): Peer[]; getPeer(id: string): Peer | undefined; removeGuest(id: string): void; } export interface User { id: string; name: string; email?: string; authProvider?: string; } export declare function isUser(obj: unknown): obj is User; export declare const PeerInfo: unique symbol; export interface PeerInfo { jwt: string; user: User; host: boolean; channel: TransportChannel; client: string; publicKey: string; supportedCompression: string[]; } export interface Peer extends protocol.Disposable { jwt: string; id: string; client: string; host: boolean; user: User; channel: Channel; room: Room; onDispose: protocol.Event<void>; toProtocol(): protocol.Peer; } export type Permissions = Record<string, string>; //# sourceMappingURL=types.d.ts.map