{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "key": "any",
      "record": {
        "nullable": [
          "result",
          "winner",
          "endReason"
        ],
        "properties": {
          "black": {
            "ref": "#player",
            "type": "ref"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "endReason": {
            "maxLength": 32,
            "type": "string"
          },
          "pgn": {
            "maxLength": 100000,
            "type": "string"
          },
          "playedAt": {
            "format": "datetime",
            "type": "string"
          },
          "rated": {
            "type": "boolean"
          },
          "result": {
            "knownValues": [
              "1-0",
              "0-1",
              "1/2-1/2"
            ],
            "maxLength": 8,
            "type": "string"
          },
          "timeControl": {
            "description": "Minutes+increment in seconds, like 5+3, or correspondence.",
            "maxLength": 32,
            "type": "string"
          },
          "url": {
            "format": "uri",
            "type": "string"
          },
          "white": {
            "ref": "#player",
            "type": "ref"
          },
          "winner": {
            "knownValues": [
              "white",
              "black",
              "draw"
            ],
            "maxLength": 8,
            "type": "string"
          }
        },
        "required": [
          "white",
          "black",
          "pgn",
          "url",
          "playedAt",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "player": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "description": "A Bluesky handle, or name@server on the fediverse.",
          "maxLength": 300,
          "type": "string"
        }
      },
      "required": [
        "handle"
      ],
      "type": "object"
    }
  },
  "description": "A finished chess game from chessk.ing, copied by one of its players into their own repository. The record key is the chessk.ing game id.",
  "id": "ing.chessk.game",
  "lexicon": 1,
  "revision": 1
}
