{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-session-event-schema.json",
  "title": "SessionEvent",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-sessions-api-openapi.yml#/components/schemas/SessionEvent",
  "type": "object",
  "required": [
    "seq",
    "kind",
    "ts",
    "sender_device_id",
    "turn_id",
    "client_event_id",
    "payload"
  ],
  "properties": {
    "seq": {
      "type": "integer",
      "minimum": 1,
      "description": "Server-assigned, dense per session."
    },
    "kind": {
      "type": "string",
      "maxLength": 64,
      "description": "Client-defined; the server itself emits `control` and `lease_transferred`."
    },
    "ts": {
      "type": "integer",
      "description": "Client clock, milliseconds since the Unix epoch."
    },
    "sender_device_id": {
      "type": "string",
      "format": "uuid"
    },
    "turn_id": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 128
    },
    "client_event_id": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 128
    },
    "payload": {
      "type": "object",
      "additionalProperties": true,
      "description": "Opaque to the server; `{ hide: base64 }` in E2E sessions."
    }
  }
}