{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "quest": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "tracker": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "record": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "observedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "release": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "account": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "updatedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "actor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "const": "admitted"
              },
              "code": {
                "type": "null"
              },
              "reason": {
                "type": "null"
              },
              "member": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "attempt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              }
            },
            "required": [
              "quest",
              "tracker",
              "record",
              "observedAt",
              "release",
              "account",
              "createdAt",
              "updatedAt",
              "actor",
              "state",
              "code",
              "reason",
              "member",
              "attempt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "quest": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "tracker": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "record": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "observedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "release": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "account": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "updatedAt": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8640000000000000
              },
              "actor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "const": "skipped"
              },
              "code": {
                "type": "string",
                "minLength": 1
              },
              "reason": {
                "type": "string"
              },
              "window": {
                "type": "string",
                "enum": ["tracker", "quest"]
              },
              "enrollment": {
                "type": "string"
              },
              "member": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attempt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "quest",
              "tracker",
              "record",
              "observedAt",
              "release",
              "account",
              "createdAt",
              "updatedAt",
              "actor",
              "state",
              "code",
              "reason",
              "member",
              "attempt"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["items", "nextCursor"]
}
