mirror of
https://github.com/docmost/docmost.git
synced 2025-11-16 23:31:12 +10:00
feat: websocket rooms (#515)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user