mirror of
https://github.com/docmost/docmost.git
synced 2026-07-11 13:44:55 +10:00
30 lines
660 B
TypeScript
30 lines
660 B
TypeScript
export const WS_CACHE_TTL_MS = 30_000;
|
|
export const WS_SPACE_RESTRICTION_CACHE_PREFIX = 'ws:space-restrictions:';
|
|
|
|
export function getSpaceRoomName(spaceId: string): string {
|
|
return `space-${spaceId}`;
|
|
}
|
|
|
|
export function getUserRoomName(userId: string): string {
|
|
return `user-${userId}`;
|
|
}
|
|
|
|
export const TREE_EVENTS = new Set([
|
|
'updateOne',
|
|
'addTreeNode',
|
|
'moveTreeNode',
|
|
'deleteTreeNode',
|
|
'refetchRootTreeNodeEvent',
|
|
]);
|
|
|
|
export function getBaseRoomName(pageId: string): string {
|
|
return `base-${pageId}`;
|
|
}
|
|
|
|
export const BASE_INBOUND_EVENTS = new Set([
|
|
'base:subscribe',
|
|
'base:unsubscribe',
|
|
'base:presence',
|
|
'base:presence:leave',
|
|
]);
|