{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "leaderboard": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "period": {
      "type": "object",
      "properties": {
        "start": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 8640000000000000
            },
            {
              "type": "null"
            }
          ]
        },
        "end": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 8640000000000000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["start", "end"]
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "amount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "at": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "quest": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reverses": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "type": "boolean"
          }
        },
        "required": ["id", "amount", "kind", "at", "quest", "reverses"]
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["leaderboard", "period", "items", "nextCursor"]
}
