{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openfutureforum.github.io/executive-intelligence-index/schema/review.schema.json",
  "title": "Review",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "review_id",
    "batch_id",
    "record_ids",
    "review_type",
    "reviewer_type",
    "review_date",
    "decisions",
    "publication_recommendation",
    "provenance"
  ],
  "properties": {
    "review_id": {
      "type": "string",
      "minLength": 1
    },
    "batch_id": {
      "type": "string",
      "minLength": 1
    },
    "record_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "review_type": {
      "type": "string",
      "minLength": 1
    },
    "reviewer_type": {
      "type": "string",
      "minLength": 1
    },
    "named_human_reviewer": {
      "type": [
        "string",
        "null"
      ]
    },
    "review_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "decisions": {
      "type": "array",
      "items": {}
    },
    "corrections": {
      "type": "array",
      "items": {}
    },
    "disagreements": {
      "type": "array",
      "items": {}
    },
    "unresolved_issues": {
      "type": "array",
      "items": {}
    },
    "rights_review": {
      "type": "object"
    },
    "publication_recommendation": {
      "type": "string",
      "minLength": 1
    },
    "workflow_status": {
      "$ref": "common.schema.json#/$defs/workflowStatus"
    },
    "machine_review_status": {
      "$ref": "common.schema.json#/$defs/machineReviewStatus"
    },
    "human_review_status": {
      "$ref": "common.schema.json#/$defs/humanReviewStatus"
    },
    "reviewed_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "reviewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "provenance": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "common.schema.json#/$defs/provenance"
      }
    },
    "revision_history": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/revision"
      }
    }
  }
}
