{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/term-app/json-schema/term-app-obligation-item-schema.json",
  "title": "obligationItem",
  "description": "One obligation row over the existing state machines; an unsettled state never reads as satisfied.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/term-app-openapi.json#/components/schemas/obligationItem",
  "type": "object",
  "required": [
    "kind",
    "id",
    "state",
    "createdAt"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "ask",
        "scoring",
        "feedback"
      ]
    },
    "id": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "received",
        "review-needed",
        "solved",
        "scoring-due",
        "settled",
        "unknown"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "nextActor": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "asker",
        "declarer",
        "operator",
        null
      ]
    },
    "declaredReviewTarget": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Only a challenge's declared scoring instant; questions and feedback stay null."
    },
    "overdue": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "null when no review target is declared."
    },
    "bounty": {
      "type": [
        "integer",
        "null"
      ]
    },
    "links": {
      "type": "object"
    }
  }
}