{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Info4Bot Fact Record v1 — proposed contract",
  "type": "object",
  "required": [
    "id",
    "category",
    "headline",
    "summary",
    "claims",
    "sources",
    "published_at",
    "observed_at",
    "verification",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "subcategory": {
      "type": [
        "string",
        "null"
      ]
    },
    "headline": {
      "type": "string"
    },
    "summary": {
      "type": "string",
      "description": "Concis, factuel, sans bruit rédactionnel"
    },
    "claims": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "text",
          "source_ids"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "support": {
            "enum": [
              "direct",
              "indirect",
              "disputed",
              "unverified"
            ]
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "url",
          "source_type",
          "accessed_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "source_type": {
            "type": "string"
          },
          "accessed_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "rights": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "observed_at": {
      "type": "string",
      "format": "date-time"
    },
    "verified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "verification": {
      "enum": [
        "verified",
        "partially_verified",
        "contested",
        "unverified",
        "stale"
      ]
    },
    "status": {
      "enum": [
        "published",
        "draft",
        "retracted",
        "corrected"
      ]
    },
    "confidence": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    },
    "jurisdiction": {
      "type": [
        "string",
        "null"
      ]
    },
    "valid_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "supersedes": {
      "type": [
        "string",
        "null"
      ]
    },
    "entities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "contradictions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "translations": {
      "type": "object"
    },
    "estimated_tokens_saved": {
      "type": [
        "integer",
        "null"
      ]
    },
    "content_hash": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": true
}