{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/country-context-review-public-export.schema.json",
  "title": "Country Context Review Public Candidate",
  "description": "2.0.27-wip synthetic reviewer-workspace record contract.",
  "type": "object",
  "required": [
    "$schema",
    "record_type",
    "schema_version",
    "release",
    "version",
    "synthetic_fixture",
    "non_evidentiary",
    "truth_boundary",
    "public_candidate_id",
    "source_private_record",
    "submission_id",
    "fixture_state",
    "country_slug",
    "proposal_id",
    "audit_id",
    "claim_id",
    "candidate_state",
    "public_identity",
    "consented_content",
    "consent_snapshot",
    "excluded_private_fields",
    "history_references",
    "publication_gate",
    "one_reviewer_scope_limit",
    "extensions"
  ],
  "properties": {
    "$schema": {
      "const": "https://iarpg.com/country-context-review-public-export.schema.json"
    },
    "record_type": {
      "const": "iarpg-country-context-review-public-export"
    },
    "schema_version": {
      "const": "1.0"
    },
    "release": {
      "const": "IARPG-OPS-2"
    },
    "version": {
      "const": "2.0.27-wip"
    },
    "synthetic_fixture": {
      "const": true
    },
    "non_evidentiary": {
      "const": true
    },
    "truth_boundary": {
      "type": "string",
      "minLength": 40
    },
    "public_candidate_id": {
      "type": "string"
    },
    "source_private_record": {
      "type": "string"
    },
    "submission_id": {
      "type": "string"
    },
    "fixture_state": {
      "enum": [
        "attributable",
        "pseudonymous",
        "confidential",
        "non-public",
        "incomplete-consent",
        "withdrawn",
        "corrected",
        "appealed"
      ]
    },
    "country_slug": {
      "const": "senegal"
    },
    "proposal_id": {
      "const": "country-context-senegal-2026-07-22"
    },
    "audit_id": {
      "const": "country-context-audit-senegal-2026-07-23"
    },
    "claim_id": {
      "const": "claim-senegal-01"
    },
    "candidate_state": {
      "enum": [
        "candidate-only",
        "blocked",
        "withdrawn"
      ]
    },
    "public_identity": {
      "type": "object"
    },
    "consented_content": {
      "type": "object"
    },
    "consent_snapshot": {
      "type": "object",
      "required": [
        "participation",
        "quotation",
        "paraphrase",
        "attribution",
        "private_retention",
        "anonymization",
        "publication",
        "withdrawal_contact",
        "deletion_request_handling"
      ],
      "properties": {
        "participation": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "quotation": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "paraphrase": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "attribution": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "private_retention": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "anonymization": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "publication": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "withdrawal_contact": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        },
        "deletion_request_handling": {
          "enum": [
            "allow",
            "deny",
            "unanswered",
            "withdrawn",
            "not-applicable"
          ]
        }
      },
      "additionalProperties": false
    },
    "excluded_private_fields": {
      "type": "array",
      "minItems": 9,
      "items": {
        "type": "string"
      }
    },
    "history_references": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "publication_gate": {
      "type": "object",
      "required": [
        "state",
        "publishable",
        "blockers"
      ],
      "properties": {
        "state": {
          "enum": [
            "blocked",
            "candidate-only",
            "withdrawn"
          ]
        },
        "publishable": {
          "const": false
        },
        "blockers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        }
      },
      "additionalProperties": false
    },
    "one_reviewer_scope_limit": {
      "type": "string"
    },
    "extensions": {
      "type": "object"
    }
  },
  "additionalProperties": false
}
