{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/mcpgate/main/json-schema/mcpgate-message-out-schema.json",
  "title": "MessageOut",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mcpgate-api-openapi.json#/components/schemas/MessageOut",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id"
    },
    "direction": {
      "type": "string",
      "enum": [
        "customer→staff",
        "staff→customer"
      ],
      "title": "Direction"
    },
    "author_id": {
      "type": "string",
      "title": "Author Id"
    },
    "body": {
      "type": "string",
      "title": "Body"
    },
    "ts": {
      "type": "string",
      "format": "date-time",
      "title": "Ts"
    },
    "customer_read_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Customer Read At"
    },
    "staff_read_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Staff Read At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "session_id",
    "direction",
    "author_id",
    "body",
    "ts"
  ]
}