{
  "type": "object",
  "properties": {
    "documents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Document ID."
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original filename as uploaded."
          },
          "sourceType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source type, e.g. pdf or docx."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ingestion status, e.g. ready or processing."
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Project workspace the document belongs to, if any."
          },
          "chunkCount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Number of indexed chunks."
          },
          "sizeBytes": {
            "type": [
              "number",
              "null"
            ],
            "description": "File size in bytes."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upload timestamp, ISO 8601."
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "description": "Every document in the user's library, newest first. Empty when the library has no documents."
    }
  },
  "required": [
    "documents"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}