{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/guestgraph-io/json-schema/guestgraph-io-subscription-state-schema.json",
  "title": "SubscriptionState",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/guestgraph-io-apaleo-openapi.yml#/components/schemas/SubscriptionState",
  "type": "object",
  "required": [
    "state",
    "eventTypes"
  ],
  "properties": {
    "state": {
      "description": "ACTIVE when Apaleo holds a subscription for this connection; REMOVED when an operator asked for none; MISSING when there is none and nobody asked, which is a fault; UNKNOWN before the first read.\n",
      "type": "string",
      "enum": [
        "ACTIVE",
        "MISSING",
        "REMOVED",
        "UNKNOWN"
      ]
    },
    "id": {
      "description": "Apaleo's id for the subscription, when there is one",
      "type": [
        "string",
        "null"
      ]
    },
    "eventTypes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "checkedAt": {
      "description": "When this was last read from or written to Apaleo",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}