{
  "$ref": "#/definitions/DocumentIngestionResult",
  "definitions": {
    "DocumentIngestionResult": {
      "type": "object",
      "properties": {
        "document": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "hash": {
              "type": "string"
            },
            "sourcePath": {
              "type": "string"
            },
            "mime": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "properties": {},
              "additionalProperties": {}
            },
            "ingestedAt": {
              "type": "number"
            },
            "sizeBytes": {
              "type": "number"
            },
            "chunks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "docId": {
                    "type": "string"
                  },
                  "positionStart": {
                    "type": "number"
                  },
                  "positionEnd": {
                    "type": "number"
                  },
                  "page": {
                    "type": "number"
                  },
                  "content": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "embeddingId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "id",
                  "docId",
                  "positionStart",
                  "positionEnd",
                  "content",
                  "metadata"
                ],
                "additionalProperties": false
              },
              "default": []
            }
          },
          "required": [
            "id",
            "hash",
            "metadata",
            "ingestedAt",
            "sizeBytes"
          ],
          "additionalProperties": false
        },
        "chunkCount": {
          "type": "integer",
          "minimum": 0
        },
        "entities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "document",
        "chunkCount"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}