{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "conversation.send-message result",
  "type": "object",
  "required": ["conversationId", "messageId", "message"],
  "properties": {
    "conversationId": { "type": "string", "minLength": 1 },
    "conversationCreated": { "type": "boolean" },
    "messageId": { "type": "string", "minLength": 1 },
    "assistantMessageId": { "type": ["string", "null"] },
    "assistantModel": { "type": ["string", "null"] },
    "assistantMessage": { "type": ["object", "null"], "additionalProperties": true },
    "usedFallback": { "type": ["boolean", "null"] },
    "message": {
      "type": "object",
      "required": ["id", "conversationId", "content", "role", "sequence", "createdAt"],
      "properties": {
        "id": { "type": "string", "minLength": 1 },
        "conversationId": { "type": "string", "minLength": 1 },
        "content": { "type": "string" },
        "role": { "type": "string", "enum": ["user", "assistant", "system"] },
        "userId": { "type": ["string", "null"] },
        "sequence": { "type": "integer", "minimum": 0 },
        "createdAt": { "type": "string" },
        "metadata": { "type": "object", "additionalProperties": true }
      },
      "additionalProperties": true
    },
    "sequence": { "type": "integer" },
    "title": { "type": ["string", "null"] },
    "metadata": { "type": "object", "additionalProperties": true }
  },
  "additionalProperties": true
}
