{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-enrichment-run-schema.json",
  "title": "EnrichmentRun",
  "description": "An enrichment run is a post-mapping analysis pass (e.g. quality scoring, transcript\nclassification) over a completed mapping run. `data` is enrichment-type-specific.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-mapping-api-openapi.yml#/components/schemas/EnrichmentRun",
  "type": "object",
  "required": [
    "enrichmentId",
    "runId",
    "jobId",
    "enrichmentType",
    "status"
  ],
  "properties": {
    "enrichmentId": {
      "type": "string",
      "format": "uuid"
    },
    "runId": {
      "type": "string",
      "format": "uuid"
    },
    "jobId": {
      "type": "string",
      "format": "uuid"
    },
    "enrichmentType": {
      "type": "string",
      "description": "Type identifier (e.g. `quality_scoring`)."
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "completed",
        "failed"
      ]
    },
    "data": {
      "type": "object",
      "description": "Type-specific enrichment payload. For `quality_scoring`, contains per-aspect scores\nand overall verdict. Shape varies by `enrichmentType` — consult docs for each type.\n",
      "additionalProperties": true
    },
    "error": {
      "type": "string",
      "description": "Error message if `status` is `failed`."
    },
    "completedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}