import { Canvas } from '../../interfaces/canvas'; /** * The client that communicates with the daga-server over WebSockets. * * Use this to create and join rooms. * @public */ export declare class CollabClient { #private; /** * The WebSocket URL of the daga-server. */ readonly dagaServer: string; readonly userId: string; readonly clientId: string; constructor(dagaServer: string, userId: string); /** * Creates and joins a room. The given canvas becomes collaborative, starting * with its current model. * * Returns a Promise that resolves with the new room's locator once joined. * @public */ createAndJoinRoom(canvas: Canvas): Promise; /** * Joins the room with the given locator. The given canvas becomes collaborative, * **replacing** its current model with the room's model. * * Returns a Promise that resolves once the room has been joined and loaded into * the canvas. You should hide or lock the canvas until it resolves, since any * user inputs before then will be overwritten. * @public */ joinRoom(canvas: Canvas, locator: string): Promise; }