{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/evidence-index.schema.json",
  "title": "evidence/index.json",
  "description": "Every stored evidence file of the workspace, current files first and replaced versions after, each with its checksum, whether the file itself is in the export and which part carries it.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "evidenceItemId": {
        "type": "string",
        "format": "uuid"
      },
      "versionId": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "versionNumber": {
        "type": [
          "integer",
          "null"
        ]
      },
      "current": {
        "type": "boolean"
      },
      "fileName": {
        "type": "string"
      },
      "sizeBytes": {
        "type": [
          "integer",
          "null"
        ]
      },
      "sha256": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^[0-9a-f]{64}$"
      },
      "mimeType": {
        "type": [
          "string",
          "null"
        ]
      },
      "path": {
        "type": [
          "string",
          "null"
        ]
      },
      "part": {
        "type": [
          "integer",
          "null"
        ],
        "minimum": 1
      },
      "included": {
        "type": "boolean"
      },
      "reason": {
        "type": "string",
        "enum": [
          "missing",
          "unreadable",
          "integrity_mismatch"
        ]
      }
    },
    "required": [
      "evidenceItemId",
      "versionId",
      "versionNumber",
      "current",
      "fileName",
      "sizeBytes",
      "sha256",
      "mimeType",
      "path",
      "part",
      "included"
    ],
    "additionalProperties": false
  }
}
