{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aicdapi-com/json-schema/aicdapi-com-source-status-list-envelope-schema.json",
  "title": "SourceStatusListEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aicdapi-com-sources-api-openapi.yml#/components/schemas/SourceStatusListEnvelope",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicSourceStatus"
      }
    },
    "meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "PaginationMeta": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "limit",
        "returned",
        "nextCursor"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "const": 10
        },
        "returned": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the next page, or null when traversal is complete."
        }
      }
    },
    "PublicSourceStatus": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "jurisdictionName",
        "publicBodyName",
        "sourceTypeLabel",
        "status",
        "agendaTextEvidence",
        "lastSuccessfulCheckAt"
      ],
      "properties": {
        "jurisdictionName": {
          "type": "string"
        },
        "publicBodyName": {
          "type": "string"
        },
        "sourceTypeLabel": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "healthy",
            "stale",
            "failing",
            "unsupported",
            "unknown"
          ]
        },
        "agendaTextEvidence": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "readable",
            "no_text_layer",
            null
          ]
        },
        "lastSuccessfulCheckAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "officialSourceUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "ResponseMeta": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "pagination": {
          "$ref": "#/$defs/PaginationMeta"
        }
      }
    }
  }
}