import { BehaviorSubject, Observable } from 'rxjs'; import type { Patch } from './rxUtils'; import { Call } from '../Call'; import type { OwnUserResponse } from '../gen/coordinator'; export declare class StreamVideoWriteableStateStore { /** * A store keeping data of a successfully connected user over WS to the coordinator server. */ connectedUserSubject: BehaviorSubject; /** * A list of {@link Call} objects created/tracked by this client. */ callsSubject: BehaviorSubject; constructor(); /** * The currently connected user. */ get connectedUser(): OwnUserResponse | undefined; /** * Sets the currently connected user. * * @internal * @param user the user to set as connected. */ setConnectedUser: (user: Patch) => OwnUserResponse | undefined; /** * A list of {@link Call} objects created/tracked by this client. */ get calls(): Call[]; /** * Sets the list of {@link Call} objects created/tracked by this client. * @param calls */ setCalls: (calls: Patch) => Call[]; /** * Adds a {@link Call} object to the list of {@link Call} objects created/tracked by this client. * * @param call the call to add. */ registerCall: (call: Call) => void; /** * Registers a {@link Call} object if it doesn't exist, otherwise updates it. * * @param call the call to register or update. */ registerOrUpdateCall: (call: Call) => void | Call[]; /** * Removes a {@link Call} object from the list of {@link Call} objects created/tracked by this client. * * @param call the call to remove */ unregisterCall: (call: Call) => Call[]; /** * Finds a {@link Call} object in the list of {@link Call} objects created/tracked by this client. * * @param type the type of call to find. * @param id the id of the call to find. */ findCall: (type: string, id: string) => Call | undefined; } /** * A reactive store that exposes state variables in a reactive manner. * You can subscribe to changes of the different state variables. * This central store contains all the state variables related to [`StreamVideoClient`](./StreamVideClient.md) and [`Call`](./Call.md). */ export declare class StreamVideoReadOnlyStateStore { /** * Data describing a user successfully connected over WS to coordinator server. */ connectedUser$: Observable; /** * A list of {@link Call} objects created/tracked by this client. */ calls$: Observable; constructor(store: StreamVideoWriteableStateStore); /** * The current user connected over WS to the backend. */ get connectedUser(): OwnUserResponse | undefined; /** * A list of {@link Call} objects created/tracked by this client. */ get calls(): Call[]; }