@veltdev/types
Version:
Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.
99 lines (82 loc) • 2.73 kB
TypeScript
// @ts-nocheck
import { Observable } from "rxjs";
import { PresenceUser } from "../data/presence-user.data.model";
import { GetPresenceDataResponse, PresenceEventTypesMap } from "../data/presence-events.data.model";
import { PresenceRequestQuery } from "../data/presence-actions.data.model";
export declare class PresenceElement {
/**
* Subscribe to a list of all online users who are either active or inactive on the current document.
*
* Returns Observable<PresenceUser[] | null>.
* @deprecated This method is deprecated. Use `getData` method instead.
*/
getOnlineUsersOnCurrentDocument: () => Observable<PresenceUser[] | null>;
/**
* To set inactivity time (Default value is 5 minutes)
* @param time inactivity time in milliseconds
*/
setInactivityTime: (time: number) => void;
/**
* Enables follow along mode globally
* @param options {FollowOptions: {useHistoryAPI: boolean, onNavigate: (url: PageInfo) => void}}}
*/
enableFollowAlongMode: (useHistoryAPI: boolean) => any;
/**
* To disable follow along mode
*/
disableFollowAlongMode: () => any;
/**
* To enable adding self to the presence list
*/
enableSelf: () => void;
/**
* To disable adding self to the presence list
*/
disableSelf: () => void;
/**
* To get the presence data
*/
getData: (query?: PresenceRequestQuery) => Observable<GetPresenceDataResponse>;
/**
* Subscribe to presence events
*/
on: <T extends keyof PresenceEventTypesMap>(action: T) => Observable<PresenceEventTypesMap[T]>;
constructor();
/**
* Subscribe to a list of all online users who are either active or inactive on the current document.
*
* Returns Observable<PresenceUser[] | null>.
* @deprecated This method is deprecated. Use `getData` method instead.
*/
private _getOnlineUsersOnCurrentDocument;
/**
* To set inactivity time (Default value is 5 minutes)
* @param time inactivity time in milliseconds
*/
private _setInactivityTime;
/**
* Enables follow along mode globally
* @param options {FollowOptions: {useHistoryAPI: boolean, onNavigate: (url: PageInfo) => void}}}
*/
private _enableFollowAlongMode;
/**
* To disable follow along mode
*/
private _disableFollowAlongMode;
/**
* To enable adding self to the presence list
*/
private _enableSelf;
/**
* To disable adding self to the presence list
*/
private _disableSelf;
/**
* To get the presence data
*/
private _getData;
/**
* Subscribe to presence events
*/
private _on;
}