{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peoplescourt-ai/json-schema/peoplescourt-ai-canonical-case-event-page-schema.json",
  "title": "CanonicalCaseEventPage",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peoplescourt-ai-notifications-api-openapi.yml#/components/schemas/CanonicalCaseEventPage",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "caseId",
    "events",
    "nextCursor",
    "hasMore"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "case-event-page-v1"
    },
    "caseId": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CanonicalCaseEvent"
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "hasMore": {
      "type": "boolean"
    }
  },
  "$defs": {
    "CanonicalCaseEvent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "id",
        "cursor",
        "type",
        "occurredAt"
      ],
      "properties": {
        "schemaVersion": {
          "type": "string",
          "const": "case-event-v1"
        },
        "id": {
          "type": "string"
        },
        "cursor": {
          "type": "string",
          "description": "Opaque cursor identifying a position in the case event stream. Never interpret or compare cursor text."
        },
        "label": {
          "type": "string",
          "description": "Party-facing label for the event."
        },
        "type": {
          "type": "string"
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}