import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId'; import MuteStates from './MuteStates'; import { ParticipantId, ParticipantListMarkers } from './Participant'; /** * Комната */ export interface Room { id: number; /** * name of this room */ name: string; /** * count of participants (read/write, optional) */ participantCount: number; /** * ids of all participants (read/write, optional) */ participantIds: ExternalParticipantId[]; /** * ids of participants to be added to this room (read/write, optional) */ addParticipantIds?: ExternalParticipantId[]; /** * ids of participants to be removed from this room (read/write, optional) */ removeParticipantIds?: ExternalParticipantId[]; /** * if participant requested then contains first chunk of participants in this rooms * (if client fails to support chunks, then contains all participant in this room) * (read, optional) */ participants?: ExternalParticipantListChunk; /** * if this room is active (read/write, optional) */ active?: boolean; /** * global (room-wide) mute state, if any */ muteStates?: MuteStates; /** * pinned participant in the room, if any */ pinnedParticipantId?: ExternalParticipantId; /** * room timer */ countdownSec?: number; timeoutMs?: number; } /** * Initial rooms state */ export interface Rooms { rooms: Room[]; /** * current room id of participant. if undefined then the participant is in the main call */ roomId?: number; } /** * Обновление комнат */ export interface RoomsUpdate { rooms?: Room[]; roomIds?: number[]; deactivated?: boolean; } /** * Информация об обновлении комнаты */ export interface RoomParticipantUpdate { roomId: number | null; /** * total number of participants in the room */ participantCount: number; /** * ids of added participants, always present (if any) so participants would be able * to identify their presence in particular room */ addedParticipantIds?: ExternalParticipantId[]; /** * optional, data for added participants */ addedParticipants?: ExternalParticipant[]; /** * optional, depending on the context may contain either markers * for all (sorted) lists available or be empty (if client fails to support chunked participants) */ removedParticipantMarkers?: ParticipantListMarkers[]; removedParticipantIds?: ExternalParticipantId[]; } /** * ID комнаты */ export type IRoomId = number | null; export interface RoomUrlSharingInfo { sharedUrl: string; initiatorId: ParticipantId; }