{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aimeat-io/json-schema/aimeat-io-content-facts-schema.json",
  "title": "ContentFacts",
  "description": "What the content class pipeline keeps about one item (src/services/content/types.ts). The technical facts need no model; description, classes and entities are there only when the owner turned those steps on.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aimeat-io-contentclasses-api-openapi.yml#/components/schemas/ContentFacts",
  "type": "object",
  "required": [
    "source",
    "sourceId",
    "technical",
    "stages",
    "readFrom",
    "updatedAt"
  ],
  "properties": {
    "source": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "memory"
          ]
        },
        "owner": {
          "type": "string"
        },
        "key": {
          "type": "string"
        }
      }
    },
    "sourceId": {
      "type": "string"
    },
    "textKey": {
      "type": "string",
      "description": "The stored file holding the item's text."
    },
    "technical": {
      "type": "object",
      "description": "kind, mimeType, size, contentHash, and per kind pdf, image, video or text facts, and ai (the declared AI marks and the EU AI Act marking).",
      "additionalProperties": true
    },
    "description": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "altText": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "provenanceId": {
          "type": "string"
        },
        "at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "classes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "by": {
            "type": "string",
            "enum": [
              "model",
              "owner",
              "rule"
            ]
          },
          "decisionId": {
            "type": "string"
          }
        }
      }
    },
    "entities": {
      "type": "object",
      "description": "Per content class id, the JSON-LD entity extracted with that class's properties.",
      "additionalProperties": true
    },
    "stages": {
      "type": "object",
      "additionalProperties": true
    },
    "readFrom": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}