{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": ["discord"]
    },
    "configured": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": ["disconnected", "ready", "attention"]
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "server": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "icon": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["id", "name", "icon"]
        },
        {
          "type": "null"
        }
      ]
    },
    "issue": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "connectedAt": {
      "default": 0,
      "type": "number"
    }
  },
  "required": [
    "provider",
    "configured",
    "status",
    "revision",
    "server",
    "issue",
    "connectedAt"
  ]
}
