{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-chronology-extraction-status-schema.json",
  "title": "ChronologyExtractionStatus",
  "description": "How far the automatic extraction has got across the whole matter.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-chronology-api-openapi.yml#/components/schemas/ChronologyExtractionStatus",
  "properties": {
    "documents": {
      "items": {
        "$ref": "#/$defs/DocumentExtractionState"
      },
      "type": "array",
      "title": "Documents",
      "description": "Per-document state, for every document extraction has touched."
    },
    "totalDocuments": {
      "type": "integer",
      "title": "Totaldocuments",
      "description": "Finished documents in the matter."
    },
    "completedDocuments": {
      "type": "integer",
      "title": "Completeddocuments",
      "description": "Documents whose extraction succeeded."
    },
    "pendingDocuments": {
      "type": "integer",
      "title": "Pendingdocuments",
      "description": "Documents still waiting, including ones extraction has not reached yet and therefore has no per-document row for."
    },
    "failedDocuments": {
      "type": "integer",
      "title": "Faileddocuments",
      "description": "Documents whose extraction failed."
    },
    "isExtractionComplete": {
      "type": "boolean",
      "title": "Isextractioncomplete",
      "description": "True when nothing is outstanding and the matter had something to extract."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "documents",
    "totalDocuments",
    "completedDocuments",
    "pendingDocuments",
    "failedDocuments",
    "isExtractionComplete"
  ],
  "$defs": {
    "DocumentExtractionState": {
      "properties": {
        "documentId": {
          "type": "string",
          "title": "Documentid",
          "description": "The `doc_` document."
        },
        "documentName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Documentname",
          "description": "Its filename."
        },
        "status": {
          "type": "string",
          "title": "Status",
          "description": "`pending`, `in_progress`, `completed`, `failed` or `skipped`. Deliberately NOT one of the five operation statuses: this is per-document bookkeeping under a capability that publishes no operation, and mapping it would put a sixth spelling of 'running' into the contract."
        },
        "eventsExtracted": {
          "type": "integer",
          "title": "Eventsextracted",
          "description": "How many events came out of this document."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "documentId",
        "status",
        "eventsExtracted"
      ],
      "title": "DocumentExtractionState",
      "description": "Where one document's chronology extraction got to."
    }
  }
}