feat: websocket rooms (#515)

This commit is contained in:
Philip Okugbe
2024-11-28 18:53:29 +00:00
committed by GitHub
parent d97baf5824
commit a16d5d1bf4
5 changed files with 79 additions and 33 deletions

View File

@ -2,12 +2,14 @@ import { SpaceTreeNode } from "@/features/page/tree/types.ts";
export type InvalidateEvent = {
operation: "invalidate";
spaceId: string;
entity: Array<string>;
id?: string;
};
export type UpdateEvent = {
operation: "updateOne";
spaceId: string;
entity: Array<string>;
id: string;
payload: Partial<any>;
@ -15,6 +17,7 @@ export type UpdateEvent = {
export type DeleteEvent = {
operation: "deleteOne";
spaceId: string;
entity: Array<string>;
id: string;
payload?: Partial<any>;
@ -22,6 +25,7 @@ export type DeleteEvent = {
export type AddTreeNodeEvent = {
operation: "addTreeNode";
spaceId: string;
payload: {
parentId: string;
index: number;
@ -31,6 +35,7 @@ export type AddTreeNodeEvent = {
export type MoveTreeNodeEvent = {
operation: "moveTreeNode";
spaceId: string;
payload: {
id: string;
parentId: string;
@ -41,6 +46,7 @@ export type MoveTreeNodeEvent = {
export type DeleteTreeNodeEvent = {
operation: "deleteTreeNode";
spaceId: string;
payload: {
node: SpaceTreeNode
}