{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snipara-com/json-schema/snipara-com-lifecycle-review-page-schema.json",
  "title": "LifecycleReviewPage",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snipara-com-openapi.json#/components/schemas/LifecycleReviewPage",
  "properties": {
    "version": {
      "type": "string",
      "title": "Version",
      "default": "knowledge_lifecycle_review.v1"
    },
    "job_id": {
      "type": "string",
      "title": "Job Id"
    },
    "batches": {
      "items": {
        "$ref": "#/$defs/LifecycleReviewBatch"
      },
      "type": "array",
      "title": "Batches"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    },
    "mutation_allowed": {
      "type": "boolean",
      "title": "Mutation Allowed",
      "default": false
    },
    "visibility_policy": {
      "type": "string",
      "title": "Visibility Policy",
      "default": "current_project_owned_records_only"
    }
  },
  "type": "object",
  "required": [
    "job_id",
    "batches",
    "next_cursor"
  ],
  "$defs": {
    "LifecycleReviewBatch": {
      "properties": {
        "receipt_id": {
          "type": "string",
          "maxLength": 200,
          "title": "Receipt Id"
        },
        "received_at": {
          "type": "string",
          "format": "date-time",
          "title": "Received At"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/LifecycleReviewItem"
          },
          "type": "array",
          "title": "Items"
        },
        "omitted_items": {
          "type": "integer",
          "title": "Omitted Items"
        }
      },
      "type": "object",
      "required": [
        "receipt_id",
        "received_at",
        "items",
        "omitted_items"
      ],
      "title": "LifecycleReviewBatch"
    },
    "LifecycleReviewItem": {
      "properties": {
        "record_id": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1,
          "title": "Record Id"
        },
        "classification": {
          "type": "string",
          "enum": [
            "confirmed",
            "outdated",
            "contradicted",
            "unsupported",
            "conflicting"
          ],
          "title": "Classification"
        },
        "action": {
          "type": "string",
          "enum": [
            "retain",
            "archive",
            "supersede",
            "restore"
          ],
          "title": "Action"
        },
        "disposition": {
          "type": "string",
          "enum": [
            "proposed",
            "needs_human",
            "needs_evidence",
            "needs_parent_review",
            "needs_shared_review"
          ],
          "title": "Disposition"
        },
        "rationale": {
          "type": "string",
          "maxLength": 1000,
          "title": "Rationale"
        },
        "cited_evidence_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 100,
          "title": "Cited Evidence Ids"
        },
        "human_approved": {
          "type": "boolean",
          "title": "Human Approved",
          "default": false
        },
        "details_withheld": {
          "type": "boolean",
          "title": "Details Withheld",
          "default": true
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "record_id",
        "classification",
        "action",
        "disposition",
        "rationale",
        "cited_evidence_ids"
      ],
      "title": "LifecycleReviewItem"
    }
  }
}