{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://compo.kluchna24.ru/poster_engine/content_batch.schema.json",
  "title": "COMPO Content Batch Snapshot",
  "type": "object",
  "additionalProperties": false,
  "required": ["batch_id", "snapshot_ref", "items", "ordering", "mutation_allowed", "publication_allowed"],
  "properties": {
    "batch_id": {"type": "string", "pattern": "^batch-[a-z0-9-]+$"},
    "snapshot_ref": {"type": "string", "pattern": "^snapshot://"},
    "items": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/item"}},
    "ordering": {"type": "string", "enum": ["source_order", "due_at", "manual", "unknown"]},
    "unresolved_questions": {"type": "array", "items": {"type": "string"}},
    "mutation_allowed": {"const": false},
    "publication_allowed": {"const": false}
  },
  "$defs": {"item": {"type": "object", "additionalProperties": false, "required": ["item_id", "source_ref", "brief", "status"], "properties": {"item_id": {"type": "string"}, "source_ref": {"type": "string", "pattern": "^hermes-item-"}, "brief": {"type": "string"}, "channel": {"type": "string"}, "sequence": {"type": "integer", "minimum": 1}, "status": {"type": "string", "enum": ["ready", "needs_clarification", "skipped"]}}}}
}
