EFL TaskFlow · Socket.IORealtime API reference
REST API JSON

Socket.IO documentation

Generated from the shared contracts in @efl/shared — event names, payloads and acknowledgments cannot drift from the implementation.

Introduction

Available

EFL TaskFlow pushes realtime updates over Socket.IO. All writes go through the REST API (see /api/docs); the socket is a fan-out channel that tells clients what changed. PostgreSQL is always the source of truth.

Every event name, payload and acknowledgment on this page is generated from the typed registry in @efl/shared (packages/shared/src/realtime). The same data is available as JSON at /api/socket-docs-json. Sections marked "Planned" describe the agreed design and are not implemented yet.

Connection

Available
SettingValue
URLSame origin as the web app (dev: NEXT_PUBLIC_SOCKET_URL = http://localhost:4000)
Path/socket.io
Transportwebsocket only — long-polling is not supported on Vercel Functions
CredentialswithCredentials: true (the HttpOnly auth cookie travels with the handshake)
Namespace/ (default)

The web app connects with exactly these options (SOCKET_CLIENT_OPTIONS from @efl/shared):

Creating a connection
import { SOCKET_CLIENT_OPTIONS, type ClientToServerEvents, type ServerToClientEvents } from '@efl/shared';
import { io, type Socket } from 'socket.io-client';

// Production: same origin (no URL). Dev: NEXT_PUBLIC_SOCKET_URL=http://localhost:4000
const socket: Socket<ServerToClientEvents, ClientToServerEvents> = io(
  process.env.NEXT_PUBLIC_SOCKET_URL || undefined,
  { ...SOCKET_CLIENT_OPTIONS }, // copy: the client mutates its options, the constant is frozen
);

// SOCKET_CLIENT_OPTIONS =
//   {
//     "path": "/socket.io",
//     "withCredentials": true,
//     "transports": [
//       "websocket"
//     ],
//     "reconnectionDelay": 1000,
//     "reconnectionDelayMax": 10000
//   }

socket.on('connect', () => console.log('connected', socket.id));
socket.on('connect_error', (err) => console.warn('connect_error', err.message)); // retried automatically
socket.on('disconnect', (reason) => {
  if (reason === 'io server disconnect') socket.connect(); // server closed it: no automatic retry
});
  • connect — handshake succeeded; socket.id is set.
  • connect_error — handshake rejected or server unreachable; err.message describes it. The client retries automatically.
  • disconnect(reason) — "io server disconnect" (server closed it, no auto-retry: call socket.connect()), "io client disconnect" (you called disconnect()), "transport close" / "ping timeout" (network or Vercel function max duration reached — auto-retry).

Authentication

Available

Every connection must be authenticated. The handshake reads the HttpOnly efl_at access-token cookie set by POST /api/v1/auth/login (sent automatically with withCredentials: true). Tools without cookies may pass the access token as auth.token. auth.locale (en | vi | ja | zh) sets the language of ack error messages; default: the handshake Accept-Language. On success the server joins the socket to user:{userId}.

  • Missing, invalid or expired token → connect_error with err.message === "UNAUTHENTICATED" (err.data.code is the same). Nothing else is sent.
  • The access token lives 15 minutes; an already-connected socket stays connected after it expires. Only a new handshake (reconnect) checks it again.
  • On UNAUTHENTICATED: call POST /api/v1/auth/refresh once, then socket.connect(). If refresh fails, send the user to the sign-in page.

Namespaces

Available

Only the default namespace "/" is used. Scoping is done with rooms, not namespaces.

Rooms

Available
RoomPurposeWho joinsHow
user:{userId}Personal events: notifications, and task events for tasks assigned to the user (current or previous assignee)The authenticated userJoined automatically by the server on connect
workspace:{workspaceId}Workspace-wide events (projects, members)Workspace membersJoined automatically for every membership on connect
project:{projectId}Task and comment eventsUsers with an effective role on the projectClient emits subscription.join; the server checks access first

Clients can never join an arbitrary room: the server validates every join. Creating a workspace or accepting an invitation adds your sockets to the workspace room right away; being removed (or leaving) takes them out of the workspace room and all its project rooms, and deleting a project empties its room — across all instances via the Redis adapter.

Acknowledgments

Available

Every client→server event is acknowledged with the same contract. Clients wait at most ACK_TIMEOUT_MS (5000 ms).

packages/shared/src/realtime/acknowledgments/common.ack.ts
type Ack<T> =
  | { success: true; data: T; error: null; requestId: string }
  | { success: false; data: null; error: { code: ErrorCode; message: string }; requestId: string };

Error handling

Available

Error codes are shared with the REST API:

  • VALIDATION_ERROR
  • UNAUTHENTICATED
  • FORBIDDEN
  • NOT_FOUND
  • CONFLICT
  • VERSION_CONFLICT
  • PROJECT_ARCHIVED
  • OWNERSHIP_TRANSFER_REQUIRED
  • DEPENDENCY_CYCLE
  • RATE_LIMITED
  • INTERNAL_ERROR
  • Invalid payload → ack with VALIDATION_ERROR and the failing fields in error.message.
  • Unexpected server error → ack with INTERNAL_ERROR; details are logged server-side only.
  • No ack within the timeout → emitWithAck rejects; treat as a transient failure and retry or refetch.

Reconnection & sync

Available

The client reconnects automatically with exponential backoff (1 s → 10 s). On Vercel, connections are also closed when a function reaches its max duration, so reconnects are routine.

  • Missed events are never replayed. After every reconnect (each connect except the first of a socket) the web invalidates all active TanStack Query caches once — the refetch is authoritative — and re-joins the open project rooms (subscription.join on connect). Workspace and user rooms are re-joined by the server on connect.
  • Every server event carries an eventId; the web drops ids it has already seen (the resync can overlap with live events) and skips its own echoes by causationId. Task events also carry entity.version: an older version than the cached one is ignored.
  • Signing out, signing in and registering drop the socket (resetSocket) so the next connection handshakes with the new user’s cookie and never receives the previous user’s events.
  • While disconnected for more than ~2 s the app header shows a small "Reconnecting…" indicator; it hides on connect.
  • workspace.deleted and project.member.updated (effectiveRole null) are followed by the server removing your sockets from the affected rooms; the web navigates away with a toast if you were inside.

Authorization

Available

Room access uses the same permission rules as the REST API (effectiveProjectRole from @efl/shared). subscription.join answers NOT_FOUND both for a project that does not exist and for one you cannot see. Workspace events (project.*, member.*) go to every workspace member; private projects are announced too, but their details stay behind the REST API.

Redis adapter

Available

The API can run as many instances (Vercel scales functions horizontally). @socket.io/redis-adapter relays every room broadcast through Redis Pub/Sub so a socket connected to instance A receives events emitted on instance B.

  • Configured with REDIS_URL (Docker Redis in dev, Upstash in production).
  • Redis only carries transient messages — nothing is stored. Mutations are committed to PostgreSQL before events are emitted.
  • No delivery guarantee: a client offline at emit time misses the event and resyncs by refetching.

Client → Server events

system.ping

Client → Serversystem

Round-trip health check over the socket connection

Sends the client clock to the server and receives the server clock plus the id of the API instance that handled it. Useful to measure latency and to verify that the connection reaches a live instance.

Namespace
/
Required room
Connection-level (no room)
Authorization
Any connected socket.
Handled by
RealtimeGateway.handlePing (server-web/src/modules/realtime/presentation/realtime.gateway.ts)
Frontend behavior
Display latency in developer tools; no UI state changes.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "clientTime": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "description": "Client clock when the ping was sent (ISO 8601)"
    }
  },
  "required": [
    "clientTime"
  ]
}

Example payload

{
  "clientTime": "2026-11-15T09:00:00.000Z"
}

Acknowledgment schema

JSON Schema (output)
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "serverTime": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "Server clock when the ping was handled (ISO 8601)"
            },
            "instanceId": {
              "type": "string",
              "description": "Random id of the API instance that handled the ping (changes on restart)"
            }
          },
          "required": [
            "serverTime",
            "instanceId"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": false
        },
        "data": {
          "type": "null"
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "VALIDATION_ERROR",
                "UNAUTHENTICATED",
                "FORBIDDEN",
                "NOT_FOUND",
                "CONFLICT",
                "VERSION_CONFLICT",
                "PROJECT_ARCHIVED",
                "OWNERSHIP_TRANSFER_REQUIRED",
                "DEPENDENCY_CYCLE",
                "RATE_LIMITED",
                "INTERNAL_ERROR"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    }
  ]
}

Example acknowledgment

{
  "success": true,
  "data": {
    "serverTime": "2026-11-15T09:00:00.012Z",
    "instanceId": "a1b2c3d4"
  },
  "error": null,
  "requestId": "0193a1f2-7c3e-7d40-9b1a-2f4c5e6d7a8b"
}

Frontend snippet

import { ACK_TIMEOUT_MS } from '@efl/shared';
import { getSocket } from '@/shared/lib/socket';

const socket = getSocket();

try {
  const ack = await socket
    .timeout(ACK_TIMEOUT_MS)
    .emitWithAck('system.ping', {
      "clientTime": "2026-11-15T09:00:00.000Z"
    });

  if (!ack.success) {
    // ack.error.code is one of the shared ERROR_CODES
    console.error(ack.error.code, ack.error.message, ack.requestId);
  } else {
    console.log(ack.data);
  }
} catch {
  // No acknowledgment within ACK_TIMEOUT_MS (connection lost or server overloaded).
}

subscription.join

Client → Serversubscription

Start receiving events of one project

Joins the room `project:{id}` so task and comment events of that project reach this socket. Call it when a project page mounts and again after every reconnect (rooms are not restored automatically). Fails with NOT_FOUND when the caller has no effective role on the project — the same answer as for a project that does not exist.

Namespace
/
Required room
Connection-level (no room)
Authorization
Any effective project role (LEAD, MEMBER, VIEWER).
Handled by
RealtimeGateway.handleJoin (server-web/src/modules/realtime/presentation/realtime.gateway.ts)
Frontend behavior
Join in the project layout effect; leave on unmount. On NOT_FOUND, show the not-found page.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "const": "project",
      "description": "Only project rooms are joined explicitly; user/workspace rooms are automatic"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Project id"
    }
  },
  "required": [
    "scope",
    "id"
  ]
}

Example payload

{
  "scope": "project",
  "id": "0193a1f2-0000-7000-8000-0000000000a1"
}

Acknowledgment schema

JSON Schema (output)
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "room": {
              "type": "string",
              "description": "Joined room, e.g. project:{id}"
            }
          },
          "required": [
            "room"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": false
        },
        "data": {
          "type": "null"
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "VALIDATION_ERROR",
                "UNAUTHENTICATED",
                "FORBIDDEN",
                "NOT_FOUND",
                "CONFLICT",
                "VERSION_CONFLICT",
                "PROJECT_ARCHIVED",
                "OWNERSHIP_TRANSFER_REQUIRED",
                "DEPENDENCY_CYCLE",
                "RATE_LIMITED",
                "INTERNAL_ERROR"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    }
  ]
}

Example acknowledgment

{
  "success": true,
  "data": {
    "room": "project:0193a1f2-0000-7000-8000-0000000000a1"
  },
  "error": null,
  "requestId": "0193a1f2-7c3e-7d40-9b1a-2f4c5e6d7a8b"
}

Frontend snippet

import { ACK_TIMEOUT_MS } from '@efl/shared';
import { getSocket } from '@/shared/lib/socket';

const socket = getSocket();

try {
  const ack = await socket
    .timeout(ACK_TIMEOUT_MS)
    .emitWithAck('subscription.join', {
      "scope": "project",
      "id": "0193a1f2-0000-7000-8000-0000000000a1"
    });

  if (!ack.success) {
    // ack.error.code is one of the shared ERROR_CODES
    console.error(ack.error.code, ack.error.message, ack.requestId);
  } else {
    console.log(ack.data);
  }
} catch {
  // No acknowledgment within ACK_TIMEOUT_MS (connection lost or server overloaded).
}

subscription.leave

Client → Serversubscription

Stop receiving events of one project

Leaves the room `project:{id}`. Always succeeds, also when the socket was not in the room.

Namespace
/
Required room
project:{projectId}
Authorization
Any connected socket.
Handled by
RealtimeGateway.handleLeave (server-web/src/modules/realtime/presentation/realtime.gateway.ts)
Frontend behavior
Call from the cleanup of the effect that joined.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "const": "project",
      "description": "Only project rooms are joined explicitly; user/workspace rooms are automatic"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Project id"
    }
  },
  "required": [
    "scope",
    "id"
  ]
}

Example payload

{
  "scope": "project",
  "id": "0193a1f2-0000-7000-8000-0000000000a1"
}

Acknowledgment schema

JSON Schema (output)
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": true
        },
        "data": {
          "type": "null"
        },
        "error": {
          "type": "null"
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "const": false
        },
        "data": {
          "type": "null"
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "VALIDATION_ERROR",
                "UNAUTHENTICATED",
                "FORBIDDEN",
                "NOT_FOUND",
                "CONFLICT",
                "VERSION_CONFLICT",
                "PROJECT_ARCHIVED",
                "OWNERSHIP_TRANSFER_REQUIRED",
                "DEPENDENCY_CYCLE",
                "RATE_LIMITED",
                "INTERNAL_ERROR"
              ]
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "requestId": {
          "type": "string"
        }
      },
      "required": [
        "success",
        "data",
        "error",
        "requestId"
      ],
      "additionalProperties": false
    }
  ]
}

Example acknowledgment

{
  "success": true,
  "data": null,
  "error": null,
  "requestId": "0193a1f2-7c3e-7d40-9b1a-2f4c5e6d7a8b"
}

Frontend snippet

import { ACK_TIMEOUT_MS } from '@efl/shared';
import { getSocket } from '@/shared/lib/socket';

const socket = getSocket();

try {
  const ack = await socket
    .timeout(ACK_TIMEOUT_MS)
    .emitWithAck('subscription.leave', {
      "scope": "project",
      "id": "0193a1f2-0000-7000-8000-0000000000a1"
    });

  if (!ack.success) {
    // ack.error.code is one of the shared ERROR_CODES
    console.error(ack.error.code, ack.error.message, ack.requestId);
  } else {
    console.log(ack.data);
  }
} catch {
  // No acknowledgment within ACK_TIMEOUT_MS (connection lost or server overloaded).
}

Server → Client events

project.updated

Server → Clientproject

A project was created, edited, archived or unarchived

Sent to the whole workspace after any project change, including creation. `myRole`, `progress` and `taskCount` are omitted because they depend on the viewer — refetch the project or the list to get them.

Namespace
/
Delivered to
workspace:{workspaceId}
Authorization
Workspace members. Private projects are also announced; the REST API still hides them from users without access.
Emitted by
ProjectsService → RealtimePublisher (server-web/src/modules/projects)
Frontend behavior
Invalidate the workspace project list and that project; skip when causationId is your own pending mutation.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PLANNED",
            "ACTIVE",
            "ON_HOLD",
            "COMPLETED",
            "ARCHIVED"
          ]
        },
        "visibility": {
          "type": "string",
          "enum": [
            "WORKSPACE",
            "PRIVATE"
          ]
        },
        "color": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "gray",
                "primary",
                "secondary",
                "accent",
                "success",
                "warning",
                "danger"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "startDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "endDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "owner": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string",
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "email",
            "avatarUrl"
          ]
        },
        "archivedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "progress": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "taskCount": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "id",
        "workspaceId",
        "key",
        "name",
        "description",
        "status",
        "visibility",
        "color",
        "startDate",
        "endDate",
        "owner",
        "archivedAt",
        "createdAt",
        "updatedAt",
        "progress",
        "taskCount"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "project.updated",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "project",
    "id": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "data": {
    "id": "0193a1f2-0000-7000-8000-0000000000a1",
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "key": "WEB",
    "name": "Website redesign",
    "description": null,
    "status": "ACTIVE",
    "visibility": "WORKSPACE",
    "color": null,
    "startDate": "2026-11-01",
    "endDate": null,
    "owner": {
      "id": "0193a1f2-0000-7000-8000-0000000000b1",
      "name": "Alice Nguyen",
      "email": "[email protected]",
      "avatarUrl": null
    },
    "archivedAt": null,
    "createdAt": "2026-11-01T08:00:00.000Z",
    "updatedAt": "2026-11-16T09:00:00.000Z",
    "progress": 0.4,
    "taskCount": 10
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['project.updated'] = (payload) => {
    // Invalidate the workspace project list and that project; skip when causationId is your own pending mutation.
  };
  socket.on('project.updated', handler);
  return () => {
    socket.off('project.updated', handler); // always clean up listeners
  };
}, []);

project.deleted

Server → Clientproject

A project was deleted

Sent to the workspace after a project and all its tasks were deleted. Sockets in `project:{id}` are removed from that room.

Namespace
/
Delivered to
workspace:{workspaceId}
Authorization
Workspace members.
Emitted by
ProjectsService → RealtimePublisher (server-web/src/modules/projects)
Frontend behavior
Remove it from caches; if it is open, navigate to the workspace home with a toast.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "projectId"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "project.deleted",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "project",
    "id": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "data": {
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['project.deleted'] = (payload) => {
    // Remove it from caches; if it is open, navigate to the workspace home with a toast.
  };
  socket.on('project.deleted', handler);
  return () => {
    socket.off('project.deleted', handler); // always clean up listeners
  };
}, []);

member.joined

Server → Clientmember

Someone joined the workspace or their role changed

Sent when an invitation is accepted, and when a member’s workspace role changes (same payload, new role) — a transfer of ownership sends one for each of the two members.

Namespace
/
Delivered to
workspace:{workspaceId}
Authorization
Workspace members.
Emitted by
InvitationsService / WorkspacesService → RealtimePublisher (server-web/src/modules/workspaces)
Frontend behavior
Invalidate the member list; if it is you (role change), invalidate the workspace so permissions refresh.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string",
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "email",
            "avatarUrl"
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "OWNER",
            "ADMIN",
            "MEMBER",
            "VIEWER"
          ]
        }
      },
      "required": [
        "user",
        "role"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "member.joined",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "member",
    "id": "0193a1f2-0000-7000-8000-0000000000b2"
  },
  "data": {
    "user": {
      "id": "0193a1f2-0000-7000-8000-0000000000b2",
      "name": "Bob Tran",
      "email": "[email protected]",
      "avatarUrl": null
    },
    "role": "MEMBER"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['member.joined'] = (payload) => {
    // Invalidate the member list; if it is you (role change), invalidate the workspace so permissions refresh.
  };
  socket.on('member.joined', handler);
  return () => {
    socket.off('member.joined', handler); // always clean up listeners
  };
}, []);

member.removed

Server → Clientmember

Someone left or was removed from the workspace

Sent to the workspace (the removed user included) right before their sockets are taken out of the workspace and project rooms (BR-W4). Their open tasks in this workspace are unassigned.

Namespace
/
Delivered to
workspace:{workspaceId}
Authorization
Workspace members.
Emitted by
WorkspacesService → RealtimePublisher (server-web/src/modules/workspaces)
Frontend behavior
Invalidate the member list. If userId is you: drop the workspace from caches and go to /home with a toast.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "reason": {
          "type": "string",
          "enum": [
            "removed",
            "left"
          ],
          "description": "Removed by an admin, or left on their own"
        }
      },
      "required": [
        "userId",
        "reason"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "member.removed",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "member",
    "id": "0193a1f2-0000-7000-8000-0000000000b2"
  },
  "data": {
    "userId": "0193a1f2-0000-7000-8000-0000000000b2",
    "reason": "removed"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['member.removed'] = (payload) => {
    // Invalidate the member list. If userId is you: drop the workspace from caches and go to /home with a toast.
  };
  socket.on('member.removed', handler);
  return () => {
    socket.off('member.removed', handler); // always clean up listeners
  };
}, []);

workspace.deleted

Server → Clientworkspace

The workspace was deleted

Sent to the workspace right after it and everything in it were deleted (BR-W5). All sockets are then removed from the workspace room and from every project room of that workspace.

Namespace
/
Delivered to
workspace:{workspaceId}
Authorization
Workspace members.
Emitted by
WorkspacesService → RealtimePublisher (server-web/src/modules/workspaces)
Frontend behavior
Drop the workspace from caches; if you are inside it (and did not delete it yourself), go to /home with a toast.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "workspace.deleted",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "workspace",
    "id": "0193a1f2-0000-7000-8000-000000000001"
  },
  "data": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['workspace.deleted'] = (payload) => {
    // Drop the workspace from caches; if you are inside it (and did not delete it yourself), go to /home with a toast.
  };
  socket.on('workspace.deleted', handler);
  return () => {
    socket.off('workspace.deleted', handler); // always clean up listeners
  };
}, []);

project.member.updated

Server → Clientproject

A project member was added, changed role or removed

`role` is the explicit project role (null = removed); `effectiveRole` is what the user can do now (OWNER/ADMIN lead every project, WORKSPACE-visibility projects are open to all members). When `effectiveRole` is null the user’s sockets are taken out of `project:{projectId}` right after.

Namespace
/
Delivered to
project:{projectId} user:{userId}
Authorization
Users in the project room, and the affected user.
Emitted by
ProjectsService → RealtimePublisher (server-web/src/modules/projects)
Frontend behavior
Invalidate the project members list. If userId is you: refetch the project and the project list (your permissions changed); when effectiveRole is null and the project is open, go to the workspace home with a toast.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "userId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "role": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "LEAD",
                "MEMBER",
                "VIEWER"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "effectiveRole": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "LEAD",
                "MEMBER",
                "VIEWER"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "projectId",
        "userId",
        "role",
        "effectiveRole"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "project.member.updated",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "member",
    "id": "0193a1f2-0000-7000-8000-0000000000b2"
  },
  "data": {
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
    "userId": "0193a1f2-0000-7000-8000-0000000000b2",
    "role": "MEMBER",
    "effectiveRole": "MEMBER"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['project.member.updated'] = (payload) => {
    // Invalidate the project members list. If userId is you: refetch the project and the project list (your permissions changed); when effectiveRole is null and the project is open, go to the workspace home with a toast.
  };
  socket.on('project.member.updated', handler);
  return () => {
    socket.off('project.member.updated', handler); // always clean up listeners
  };
}, []);

task.created

Server → Clienttask

A task or subtask was created

Carries the full task as the API returns it. Subtasks have `parentTaskId` set — update the parent counters instead of adding a card.

Namespace
/
Delivered to
project:{projectId} user:{assigneeId} user:{previousAssigneeId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Insert into the task list cache (skip if causationId is your own pending mutation); for a subtask refresh the parent.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "task": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "projectId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "workspaceId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "key": {
              "type": "string"
            },
            "number": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "TODO",
                "IN_PROGRESS",
                "IN_REVIEW",
                "DONE",
                "CANCELLED"
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH",
                "URGENT"
              ]
            },
            "assignee": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "reporter": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentTaskId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "startDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dueDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scheduledDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "estimatedHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "actualHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "position": {
              "type": "string"
            },
            "completedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recurrence": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "frequency": {
                      "type": "string",
                      "enum": [
                        "DAILY",
                        "WEEKDAYS",
                        "WEEKLY",
                        "MONTHLY"
                      ]
                    },
                    "interval": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "weekdays": {
                      "maxItems": 7,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6
                      }
                    },
                    "monthDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "until": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "frequency",
                    "interval"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "primary",
                      "secondary",
                      "accent",
                      "success",
                      "warning",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ]
              }
            },
            "isOverdue": {
              "type": "boolean"
            },
            "subtaskCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "subtaskDoneCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "attachmentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "blockedByOpenCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "id",
            "projectId",
            "workspaceId",
            "key",
            "number",
            "title",
            "description",
            "status",
            "priority",
            "assignee",
            "reporter",
            "parentTaskId",
            "startDate",
            "dueDate",
            "scheduledDate",
            "estimatedHours",
            "actualHours",
            "position",
            "completedAt",
            "recurrence",
            "version",
            "labels",
            "isOverdue",
            "subtaskCount",
            "subtaskDoneCount",
            "commentCount",
            "attachmentCount",
            "blockedByOpenCount",
            "createdAt",
            "updatedAt"
          ]
        }
      },
      "required": [
        "task"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.created",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "task": {
      "id": "0193a1f2-0000-7000-8000-0000000000c1",
      "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
      "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
      "key": "WEB-12",
      "number": 12,
      "title": "Drag & drop between columns",
      "description": null,
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "assignee": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "reporter": {
        "id": "0193a1f2-0000-7000-8000-0000000000b1",
        "name": "Alice Nguyen",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentTaskId": null,
      "startDate": null,
      "dueDate": "2026-11-20T17:00:00.000Z",
      "scheduledDate": "2026-11-17",
      "estimatedHours": 3,
      "actualHours": null,
      "position": "a1",
      "completedAt": null,
      "recurrence": null,
      "version": 4,
      "labels": [
        {
          "id": "0193a1f2-0000-7000-8000-0000000000e1",
          "name": "frontend",
          "color": "success"
        }
      ],
      "isOverdue": false,
      "subtaskCount": 2,
      "subtaskDoneCount": 1,
      "commentCount": 3,
      "attachmentCount": 0,
      "blockedByOpenCount": 0,
      "createdAt": "2026-11-10T08:00:00.000Z",
      "updatedAt": "2026-11-16T09:00:00.000Z"
    }
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.created'] = (payload) => {
    // Insert into the task list cache (skip if causationId is your own pending mutation); for a subtask refresh the parent.
  };
  socket.on('task.created', handler);
  return () => {
    socket.off('task.created', handler); // always clean up listeners
  };
}, []);

task.updated

Server → Clienttask

Task fields, schedule or labels changed

Sent after PATCH /tasks/:id, PATCH /tasks/:id/schedule and PUT /tasks/:id/labels. `entity.version` equals `task.version`; ignore it when your cached version is already ≥.

Namespace
/
Delivered to
project:{projectId} user:{assigneeId} user:{previousAssigneeId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Replace the cached task when the version is newer; refresh the parent counters for subtasks.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "task": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "projectId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "workspaceId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "key": {
              "type": "string"
            },
            "number": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "TODO",
                "IN_PROGRESS",
                "IN_REVIEW",
                "DONE",
                "CANCELLED"
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH",
                "URGENT"
              ]
            },
            "assignee": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "reporter": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentTaskId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "startDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dueDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scheduledDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "estimatedHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "actualHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "position": {
              "type": "string"
            },
            "completedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recurrence": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "frequency": {
                      "type": "string",
                      "enum": [
                        "DAILY",
                        "WEEKDAYS",
                        "WEEKLY",
                        "MONTHLY"
                      ]
                    },
                    "interval": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "weekdays": {
                      "maxItems": 7,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6
                      }
                    },
                    "monthDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "until": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "frequency",
                    "interval"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "primary",
                      "secondary",
                      "accent",
                      "success",
                      "warning",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ]
              }
            },
            "isOverdue": {
              "type": "boolean"
            },
            "subtaskCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "subtaskDoneCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "attachmentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "blockedByOpenCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "id",
            "projectId",
            "workspaceId",
            "key",
            "number",
            "title",
            "description",
            "status",
            "priority",
            "assignee",
            "reporter",
            "parentTaskId",
            "startDate",
            "dueDate",
            "scheduledDate",
            "estimatedHours",
            "actualHours",
            "position",
            "completedAt",
            "recurrence",
            "version",
            "labels",
            "isOverdue",
            "subtaskCount",
            "subtaskDoneCount",
            "commentCount",
            "attachmentCount",
            "blockedByOpenCount",
            "createdAt",
            "updatedAt"
          ]
        },
        "changedFields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "API field names that changed, e.g. [\"status\", \"completedAt\"]"
        }
      },
      "required": [
        "task",
        "changedFields"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.updated",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "task": {
      "id": "0193a1f2-0000-7000-8000-0000000000c1",
      "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
      "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
      "key": "WEB-12",
      "number": 12,
      "title": "Drag & drop between columns",
      "description": null,
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "assignee": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "reporter": {
        "id": "0193a1f2-0000-7000-8000-0000000000b1",
        "name": "Alice Nguyen",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentTaskId": null,
      "startDate": null,
      "dueDate": "2026-11-20T17:00:00.000Z",
      "scheduledDate": "2026-11-17",
      "estimatedHours": 3,
      "actualHours": null,
      "position": "a1",
      "completedAt": null,
      "recurrence": null,
      "version": 4,
      "labels": [
        {
          "id": "0193a1f2-0000-7000-8000-0000000000e1",
          "name": "frontend",
          "color": "success"
        }
      ],
      "isOverdue": false,
      "subtaskCount": 2,
      "subtaskDoneCount": 1,
      "commentCount": 3,
      "attachmentCount": 0,
      "blockedByOpenCount": 0,
      "createdAt": "2026-11-10T08:00:00.000Z",
      "updatedAt": "2026-11-16T09:00:00.000Z"
    },
    "changedFields": [
      "status"
    ]
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.updated'] = (payload) => {
    // Replace the cached task when the version is newer; refresh the parent counters for subtasks.
  };
  socket.on('task.updated', handler);
  return () => {
    socket.off('task.updated', handler); // always clean up listeners
  };
}, []);

task.deleted

Server → Clienttask

A task was deleted (with its subtasks, comments and attachments)

Deleting a parent deletes its subtasks; one event is sent for the parent only.

Namespace
/
Delivered to
project:{projectId} user:{assigneeId} user:{previousAssigneeId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Remove it from caches; close its drawer with a toast if it is open.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "parentTaskId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "taskId",
        "parentTaskId"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.deleted",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1"
  },
  "data": {
    "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
    "parentTaskId": null
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.deleted'] = (payload) => {
    // Remove it from caches; close its drawer with a toast if it is open.
  };
  socket.on('task.deleted', handler);
  return () => {
    socket.off('task.deleted', handler); // always clean up listeners
  };
}, []);

task.assigned

Server → Clienttask

The assignee changed (or was cleared)

Sent after PATCH /tasks/:id/assignee, and when a member removed from the workspace is unassigned (BR-W4).

Namespace
/
Delivered to
project:{projectId} user:{assigneeId} user:{previousAssigneeId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Replace the cached task when the version is newer; invalidate My Day if you are the old or new assignee.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "task": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "projectId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "workspaceId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "key": {
              "type": "string"
            },
            "number": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "TODO",
                "IN_PROGRESS",
                "IN_REVIEW",
                "DONE",
                "CANCELLED"
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH",
                "URGENT"
              ]
            },
            "assignee": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "reporter": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentTaskId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "startDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dueDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scheduledDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "estimatedHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "actualHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "position": {
              "type": "string"
            },
            "completedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recurrence": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "frequency": {
                      "type": "string",
                      "enum": [
                        "DAILY",
                        "WEEKDAYS",
                        "WEEKLY",
                        "MONTHLY"
                      ]
                    },
                    "interval": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "weekdays": {
                      "maxItems": 7,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6
                      }
                    },
                    "monthDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "until": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "frequency",
                    "interval"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "primary",
                      "secondary",
                      "accent",
                      "success",
                      "warning",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ]
              }
            },
            "isOverdue": {
              "type": "boolean"
            },
            "subtaskCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "subtaskDoneCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "attachmentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "blockedByOpenCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "id",
            "projectId",
            "workspaceId",
            "key",
            "number",
            "title",
            "description",
            "status",
            "priority",
            "assignee",
            "reporter",
            "parentTaskId",
            "startDate",
            "dueDate",
            "scheduledDate",
            "estimatedHours",
            "actualHours",
            "position",
            "completedAt",
            "recurrence",
            "version",
            "labels",
            "isOverdue",
            "subtaskCount",
            "subtaskDoneCount",
            "commentCount",
            "attachmentCount",
            "blockedByOpenCount",
            "createdAt",
            "updatedAt"
          ]
        },
        "previousAssigneeId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "task",
        "previousAssigneeId"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.assigned",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "task": {
      "id": "0193a1f2-0000-7000-8000-0000000000c1",
      "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
      "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
      "key": "WEB-12",
      "number": 12,
      "title": "Drag & drop between columns",
      "description": null,
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "assignee": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "reporter": {
        "id": "0193a1f2-0000-7000-8000-0000000000b1",
        "name": "Alice Nguyen",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentTaskId": null,
      "startDate": null,
      "dueDate": "2026-11-20T17:00:00.000Z",
      "scheduledDate": "2026-11-17",
      "estimatedHours": 3,
      "actualHours": null,
      "position": "a1",
      "completedAt": null,
      "recurrence": null,
      "version": 4,
      "labels": [
        {
          "id": "0193a1f2-0000-7000-8000-0000000000e1",
          "name": "frontend",
          "color": "success"
        }
      ],
      "isOverdue": false,
      "subtaskCount": 2,
      "subtaskDoneCount": 1,
      "commentCount": 3,
      "attachmentCount": 0,
      "blockedByOpenCount": 0,
      "createdAt": "2026-11-10T08:00:00.000Z",
      "updatedAt": "2026-11-16T09:00:00.000Z"
    },
    "previousAssigneeId": null
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.assigned'] = (payload) => {
    // Replace the cached task when the version is newer; invalidate My Day if you are the old or new assignee.
  };
  socket.on('task.assigned', handler);
  return () => {
    socket.off('task.assigned', handler); // always clean up listeners
  };
}, []);

task.moved

Server → Clienttask

A card was dragged on the Kanban board (new status and/or position)

Sent after PATCH /tasks/:id/move. `task.position` is the new fractional index inside `task.status`; sort each column by position (byte order, like COLLATE "C"). A status change also sets or clears `completedAt` (BR-T1).

Namespace
/
Delivered to
project:{projectId} user:{assigneeId} user:{previousAssigneeId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
When the version is newer: remove the card from its old column and insert it into `task.status` at its position; update the task caches too.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "task": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "projectId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "workspaceId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "key": {
              "type": "string"
            },
            "number": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "TODO",
                "IN_PROGRESS",
                "IN_REVIEW",
                "DONE",
                "CANCELLED"
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH",
                "URGENT"
              ]
            },
            "assignee": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "reporter": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentTaskId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "startDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dueDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scheduledDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "estimatedHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "actualHours": {
              "type": [
                "number",
                "null"
              ]
            },
            "position": {
              "type": "string"
            },
            "completedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "recurrence": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "frequency": {
                      "type": "string",
                      "enum": [
                        "DAILY",
                        "WEEKDAYS",
                        "WEEKLY",
                        "MONTHLY"
                      ]
                    },
                    "interval": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "weekdays": {
                      "maxItems": 7,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6
                      }
                    },
                    "monthDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "until": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "frequency",
                    "interval"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "gray",
                      "primary",
                      "secondary",
                      "accent",
                      "success",
                      "warning",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ]
              }
            },
            "isOverdue": {
              "type": "boolean"
            },
            "subtaskCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "subtaskDoneCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "attachmentCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "blockedByOpenCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "id",
            "projectId",
            "workspaceId",
            "key",
            "number",
            "title",
            "description",
            "status",
            "priority",
            "assignee",
            "reporter",
            "parentTaskId",
            "startDate",
            "dueDate",
            "scheduledDate",
            "estimatedHours",
            "actualHours",
            "position",
            "completedAt",
            "recurrence",
            "version",
            "labels",
            "isOverdue",
            "subtaskCount",
            "subtaskDoneCount",
            "commentCount",
            "attachmentCount",
            "blockedByOpenCount",
            "createdAt",
            "updatedAt"
          ]
        },
        "previousStatus": {
          "type": "string",
          "enum": [
            "TODO",
            "IN_PROGRESS",
            "IN_REVIEW",
            "DONE",
            "CANCELLED"
          ]
        }
      },
      "required": [
        "task",
        "previousStatus"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.moved",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "task": {
      "id": "0193a1f2-0000-7000-8000-0000000000c1",
      "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
      "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
      "key": "WEB-12",
      "number": 12,
      "title": "Drag & drop between columns",
      "description": null,
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "assignee": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "reporter": {
        "id": "0193a1f2-0000-7000-8000-0000000000b1",
        "name": "Alice Nguyen",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentTaskId": null,
      "startDate": null,
      "dueDate": "2026-11-20T17:00:00.000Z",
      "scheduledDate": "2026-11-17",
      "estimatedHours": 3,
      "actualHours": null,
      "position": "a1",
      "completedAt": null,
      "recurrence": null,
      "version": 4,
      "labels": [
        {
          "id": "0193a1f2-0000-7000-8000-0000000000e1",
          "name": "frontend",
          "color": "success"
        }
      ],
      "isOverdue": false,
      "subtaskCount": 2,
      "subtaskDoneCount": 1,
      "commentCount": 3,
      "attachmentCount": 0,
      "blockedByOpenCount": 0,
      "createdAt": "2026-11-10T08:00:00.000Z",
      "updatedAt": "2026-11-16T09:00:00.000Z"
    },
    "previousStatus": "TODO"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.moved'] = (payload) => {
    // When the version is newer: remove the card from its old column and insert it into `task.status` at its position; update the task caches too.
  };
  socket.on('task.moved', handler);
  return () => {
    socket.off('task.moved', handler); // always clean up listeners
  };
}, []);

task.dependencies.changed

Server → Clienttask

A "blocked by" link was added or removed, or a blocker opened / finished

Sent after POST / DELETE /tasks/:id/dependencies (both tasks in `taskIds`) and after a task that blocks others enters or leaves DONE / CANCELLED (the blocker and its blocked tasks). `counts` carries the new `blockedByOpenCount` of the blocked tasks. Task versions do not change.

Namespace
/
Delivered to
project:{projectId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
DependenciesService / TasksService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Patch `blockedByOpenCount` on cached cards / tasks from `counts` (no version check) and refetch the open dependency lists of `taskIds`.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "taskIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "counts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "taskId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "blockedByOpenCount": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "taskId",
              "blockedByOpenCount"
            ]
          }
        }
      },
      "required": [
        "taskIds",
        "counts"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.dependencies.changed",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "taskIds": [
      "0193a1f2-0000-7000-8000-0000000000c1",
      "0193a1f2-0000-7000-8000-0000000000c2"
    ],
    "counts": [
      {
        "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
        "blockedByOpenCount": 1
      }
    ]
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.dependencies.changed'] = (payload) => {
    // Patch `blockedByOpenCount` on cached cards / tasks from `counts` (no version check) and refetch the open dependency lists of `taskIds`.
  };
  socket.on('task.dependencies.changed', handler);
  return () => {
    socket.off('task.dependencies.changed', handler); // always clean up listeners
  };
}, []);

task.time.changed

Server → Clienttask

A time entry of the task was started, stopped, logged or deleted

Sent after the timer / time-entry endpoints. Starting a timer also stops the user's running one, which emits this event for that other task too. Task versions do not change.

Namespace
/
Delivered to
project:{projectId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
TimeEntriesService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Refetch the time entries of `taskId` if they are loaded.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "taskId"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "task.time.changed",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "task",
    "id": "0193a1f2-0000-7000-8000-0000000000c1",
    "version": 4
  },
  "data": {
    "taskId": "0193a1f2-0000-7000-8000-0000000000c1"
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['task.time.changed'] = (payload) => {
    // Refetch the time entries of `taskId` if they are loaded.
  };
  socket.on('task.time.changed', handler);
  return () => {
    socket.off('task.time.changed', handler); // always clean up listeners
  };
}, []);

comment.created

Server → Clientcomment

A comment or reply was posted

Replies have `parentId` set (one level deep).

Namespace
/
Delivered to
project:{projectId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
CommentsService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Append to the task's comment cache if it is loaded; bump the task's commentCount.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "comment": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "taskId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "author": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "body": {
              "type": [
                "string",
                "null"
              ]
            },
            "editedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "deletedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "replyCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "taskId",
            "author",
            "parentId",
            "body",
            "editedAt",
            "deletedAt",
            "createdAt",
            "replyCount"
          ]
        }
      },
      "required": [
        "comment"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "comment.created",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "comment",
    "id": "0193a1f2-0000-7000-8000-0000000000d1"
  },
  "data": {
    "comment": {
      "id": "0193a1f2-0000-7000-8000-0000000000d1",
      "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
      "author": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentId": null,
      "body": "Pushed a fix for the drop target.",
      "editedAt": null,
      "deletedAt": null,
      "createdAt": "2026-11-16T09:00:00.000Z",
      "replyCount": 0
    }
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['comment.created'] = (payload) => {
    // Append to the task's comment cache if it is loaded; bump the task's commentCount.
  };
  socket.on('comment.created', handler);
  return () => {
    socket.off('comment.created', handler); // always clean up listeners
  };
}, []);

comment.updated

Server → Clientcomment

A comment was edited

`editedAt` is set.

Namespace
/
Delivered to
project:{projectId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
CommentsService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Replace the comment in the cache.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "comment": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "taskId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "author": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "parentId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "body": {
              "type": [
                "string",
                "null"
              ]
            },
            "editedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "deletedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "replyCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "taskId",
            "author",
            "parentId",
            "body",
            "editedAt",
            "deletedAt",
            "createdAt",
            "replyCount"
          ]
        }
      },
      "required": [
        "comment"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "comment.updated",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "comment",
    "id": "0193a1f2-0000-7000-8000-0000000000d1"
  },
  "data": {
    "comment": {
      "id": "0193a1f2-0000-7000-8000-0000000000d1",
      "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
      "author": {
        "id": "0193a1f2-0000-7000-8000-0000000000b2",
        "name": "Bob Tran",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "parentId": null,
      "body": "Pushed a fix for the drop target.",
      "editedAt": "2026-11-16T09:05:00.000Z",
      "deletedAt": null,
      "createdAt": "2026-11-16T09:00:00.000Z",
      "replyCount": 0
    }
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['comment.updated'] = (payload) => {
    // Replace the comment in the cache.
  };
  socket.on('comment.updated', handler);
  return () => {
    socket.off('comment.updated', handler); // always clean up listeners
  };
}, []);

comment.deleted

Server → Clientcomment

A comment was deleted

With replies it is soft-deleted (`soft: true`, body hidden, replies stay); otherwise the row is removed.

Namespace
/
Delivered to
project:{projectId}
Authorization
Sockets that joined the project room (any effective project role).
Emitted by
CommentsService → RealtimePublisher (server-web/src/modules/tasks)
Frontend behavior
Remove it (or show "comment deleted" when soft); decrement the task commentCount.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "commentId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "taskId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "soft": {
          "type": "boolean"
        }
      },
      "required": [
        "commentId",
        "taskId",
        "soft"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "comment.deleted",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
    "projectId": "0193a1f2-0000-7000-8000-0000000000a1"
  },
  "entity": {
    "type": "comment",
    "id": "0193a1f2-0000-7000-8000-0000000000d1"
  },
  "data": {
    "commentId": "0193a1f2-0000-7000-8000-0000000000d1",
    "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
    "soft": false
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['comment.deleted'] = (payload) => {
    // Remove it (or show "comment deleted" when soft); decrement the task commentCount.
  };
  socket.on('comment.deleted', handler);
  return () => {
    socket.off('comment.deleted', handler); // always clean up listeners
  };
}, []);

notification.created

Server → Clientnotification

You have a new notification

Sent only to the recipient, after the notification is stored. Created from domain events (assigned, comment on your task, reply, mention, invitation, added to a project) and by the daily deadline job (due soon, overdue). The actor is never notified about their own action; `dedupeKey` keeps one notification per (user, key).

Namespace
/
Delivered to
user:{userId}
Authorization
The recipient only.
Emitted by
NotificationsService → RealtimePublisher (server-web/src/modules/notifications)
Frontend behavior
Prepend it to the notification lists, set the unread badge to `unreadCount`, show a toast with a link.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "notification": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "type": {
              "type": "string",
              "enum": [
                "TASK_ASSIGNED",
                "TASK_DUE_SOON",
                "TASK_OVERDUE",
                "TASK_COMMENTED",
                "COMMENT_REPLIED",
                "COMMENT_MENTIONED",
                "WORKSPACE_INVITATION",
                "PROJECT_MEMBER_ADDED",
                "TASK_UNBLOCKED"
              ]
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": [
                "string",
                "null"
              ]
            },
            "data": {
              "type": "object",
              "properties": {
                "workspaceSlug": {
                  "type": "string"
                },
                "workspaceName": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "projectName": {
                  "type": "string"
                },
                "taskId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "taskKey": {
                  "type": "string"
                },
                "commentId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "invitationToken": {
                  "type": "string"
                },
                "reminder": {
                  "type": "string",
                  "enum": [
                    "due-12h",
                    "due-1h"
                  ]
                }
              }
            },
            "workspaceId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "actor": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "readAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "id",
            "type",
            "title",
            "body",
            "data",
            "workspaceId",
            "actor",
            "readAt",
            "createdAt"
          ]
        },
        "unreadCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "notification",
        "unreadCount"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "notification.created",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "notification",
    "id": "0193a1f2-0000-7000-8000-0000000000f1"
  },
  "data": {
    "notification": {
      "id": "0193a1f2-0000-7000-8000-0000000000f1",
      "type": "TASK_ASSIGNED",
      "title": "Alice Nguyen assigned you WEB-12",
      "body": "Drag & drop between columns",
      "data": {
        "workspaceSlug": "efl",
        "projectId": "0193a1f2-0000-7000-8000-0000000000a1",
        "taskId": "0193a1f2-0000-7000-8000-0000000000c1",
        "taskKey": "WEB-12"
      },
      "workspaceId": "0193a1f2-0000-7000-8000-000000000001",
      "actor": {
        "id": "0193a1f2-0000-7000-8000-0000000000b1",
        "name": "Alice Nguyen",
        "email": "[email protected]",
        "avatarUrl": null
      },
      "readAt": null,
      "createdAt": "2026-11-16T09:00:00.000Z"
    },
    "unreadCount": 3
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['notification.created'] = (payload) => {
    // Prepend it to the notification lists, set the unread badge to `unreadCount`, show a toast with a link.
  };
  socket.on('notification.created', handler);
  return () => {
    socket.off('notification.created', handler); // always clean up listeners
  };
}, []);

notification.read

Server → Clientnotification

Notifications were marked as read

Keeps every open tab of the same user in sync after "read" or "mark all as read". Mark-all spans every workspace, so its `scope.workspaceId` is the nil UUID (00000000-0000-0000-0000-000000000000) — do not use the scope for this event.

Namespace
/
Delivered to
user:{userId}
Authorization
The recipient only.
Emitted by
NotificationsService → RealtimePublisher (server-web/src/modules/notifications)
Frontend behavior
Mark the ids (or all) read in cached lists and set the unread badge to `unreadCount`.

Payload schema

JSON Schema (input)
{
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "UUIDv7, dedupe key — drop events already seen"
    },
    "event": {
      "type": "string"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actorId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "User who caused it; null for system jobs"
    },
    "causationId": {
      "description": "X-Client-Mutation-Id of the originating request, to skip your own echo",
      "type": [
        "string",
        "null"
      ]
    },
    "scope": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "projectId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "workspaceId"
      ]
    },
    "entity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "workspace",
            "task",
            "comment",
            "project",
            "member",
            "notification"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "notificationIds": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "unreadCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "notificationIds",
        "unreadCount"
      ]
    }
  },
  "required": [
    "eventId",
    "event",
    "occurredAt",
    "actorId",
    "causationId",
    "scope",
    "entity",
    "data"
  ]
}

Example payload

{
  "eventId": "0193a1f2-7c3e-7d40-9b1a-000000000e01",
  "event": "notification.read",
  "occurredAt": "2026-11-16T09:00:00.000Z",
  "actorId": "0193a1f2-0000-7000-8000-0000000000b1",
  "causationId": "m-42",
  "scope": {
    "workspaceId": "0193a1f2-0000-7000-8000-000000000001"
  },
  "entity": {
    "type": "notification",
    "id": "0193a1f2-0000-7000-8000-0000000000f1"
  },
  "data": {
    "notificationIds": [
      "0193a1f2-0000-7000-8000-0000000000f1"
    ],
    "unreadCount": 2
  }
}

Frontend snippet

import type { ServerToClientEvents } from '@efl/shared';
import { useEffect } from 'react';
import { getSocket } from '@/shared/lib/socket';

useEffect(() => {
  const socket = getSocket();
  const handler: ServerToClientEvents['notification.read'] = (payload) => {
    // Mark the ids (or all) read in cached lists and set the unread badge to `unreadCount`.
  };
  socket.on('notification.read', handler);
  return () => {
    socket.off('notification.read', handler); // always clean up listeners
  };
}, []);