import { IModuleLink, ISODATE, SemanticVersion, UUID } from '../SimpleTypes'; /** * Statuses that reveal the current level of activity for a LiveSync session */ export declare enum ClientSessionStatus { ACTIVE = "ACTIVE", AWAY = "AWAY", BUSY = "BUSY", FINISHED = "FINISHED", IDLE = "IDLE" } export declare const ClientConnectionVersion: SemanticVersion; /** * Data related to a LiveSync connection event involving a LiveSync client */ export interface IClientConnectionEvent { id: UUID; /** * The ID associated with the actual WebSocket connection */ client_id: string; /** * The ID of the master node */ node_id: UUID; /** * The ID associated with the worker process that manages the connection */ worker_id: string; /** * An optional IP address that the client connected from */ ip_address: string; /** * The User associated with the LiveSync connection */ user: IModuleLink; /** * The status of the connection event */ status: ClientSessionStatus; /** * The time, in milliseconds, that the event occurred */ timestamp: number; /** * The version for the schema of the connection data */ version: SemanticVersion; session_id?: UUID; } export interface IClientConnectedEvent extends IClientConnectionEvent { /** * The ModuleLink that was supplied with the client's connection settings */ connection_module: IModuleLink; } export interface IClientDisconnectedEvent extends IClientConnectionEvent { } /** * Used to represent the current connection status of a User * * @api /connections/current */ export interface IUserConnectionStatus { user_id: UUID; connection_started: ISODATE; connection_status: ClientSessionStatus; } export declare type UserConnectionStatuses = IUserConnectionStatus[];