{
  "openapi": "3.1.1",
  "info": {
    "title": "ClashKing API",
    "version": "0.1.0-rc.4",
    "description": "### Clash of Clans Based API 👑\n\n- No Auth Required, Free to Use\n- Please credit if using these stats in your project, Creator Code: ClashKing\n- Not perfect, stats are collected by polling the Official API\n- [ClashKing Discord](https://discord.gg/mCQkUBpUta) | [API Developers](https://discord.gg/clashapi)\n\nThis content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see [Supercell's Fan Content Policy](https://supercell.com/fan-content-policy)"
  },
  "servers": [
    {
      "url": "https://api.clashk.ing"
    }
  ],
  "paths": {
    "/clan/{clan_tag}/join-leave": {
      "get": {
        "operationId": "getLegacyClanJoinLeave",
        "summary": "Get legacy clan join and leave history",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_stamp_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "tag",
                          "th",
                          "time",
                          "clan",
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/cwl/{clan_tag}/{season}": {
      "get": {
        "operationId": "getLegacyCwlSeason",
        "summary": "Get a legacy CWL season with stored wars",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "season": {
                      "type": "string"
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "clanLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "small",
                              "large",
                              "medium"
                            ],
                            "additionalProperties": false
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "townHallLevel": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "name",
                                "townHallLevel"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "clanLevel",
                          "badgeUrls",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "warTags": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string"
                                    },
                                    "teamSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacksPerMember": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "battleModifier": {
                                      "type": "string"
                                    },
                                    "preparationStartTime": {
                                      "type": "string"
                                    },
                                    "startTime": {
                                      "type": "string"
                                    },
                                    "endTime": {
                                      "type": "string"
                                    },
                                    "clan": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tag": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "townhallLevel": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "mapPosition": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "attacks": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "attackerTag": {
                                                      "type": "string"
                                                    },
                                                    "defenderTag": {
                                                      "type": "string"
                                                    },
                                                    "stars": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "destructionPercentage": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "order": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "duration": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "attackerTag",
                                                    "defenderTag",
                                                    "stars",
                                                    "destructionPercentage",
                                                    "order",
                                                    "duration"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "opponentAttacks": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "bestOpponentAttack": {
                                                "type": "object",
                                                "properties": {
                                                  "attackerTag": {
                                                    "type": "string"
                                                  },
                                                  "defenderTag": {
                                                    "type": "string"
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "order": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "duration": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "attackerTag",
                                                  "defenderTag",
                                                  "stars",
                                                  "destructionPercentage",
                                                  "order",
                                                  "duration"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "tag",
                                              "name",
                                              "townhallLevel",
                                              "mapPosition"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "opponent": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tag": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "townhallLevel": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "mapPosition": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "attacks": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "attackerTag": {
                                                      "type": "string"
                                                    },
                                                    "defenderTag": {
                                                      "type": "string"
                                                    },
                                                    "stars": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "destructionPercentage": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "order": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "duration": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "attackerTag",
                                                    "defenderTag",
                                                    "stars",
                                                    "destructionPercentage",
                                                    "order",
                                                    "duration"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "opponentAttacks": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "bestOpponentAttack": {
                                                "type": "object",
                                                "properties": {
                                                  "attackerTag": {
                                                    "type": "string"
                                                  },
                                                  "defenderTag": {
                                                    "type": "string"
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "order": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "duration": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "attackerTag",
                                                  "defenderTag",
                                                  "stars",
                                                  "destructionPercentage",
                                                  "order",
                                                  "duration"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "tag",
                                              "name",
                                              "townhallLevel",
                                              "mapPosition"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "warStartTime": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "season": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "teamSize",
                                    "preparationStartTime",
                                    "endTime",
                                    "clan",
                                    "opponent"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tag"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "warTags"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "state",
                    "season",
                    "clans",
                    "rounds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/cwl/{clan_tag}/group": {
      "get": {
        "operationId": "getLegacyCurrentCwlGroup",
        "summary": "Get the current legacy CWL group",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string"
                            },
                            "season": {
                              "type": "string"
                            },
                            "clans": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "clanLevel": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "badgeUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "small",
                                      "large",
                                      "medium"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "members": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "townHallLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "townHallLevel"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "clanLevel",
                                  "badgeUrls",
                                  "members"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "warTags": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "warTags"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "state",
                            "season",
                            "clans",
                            "rounds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "data"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/player/{player_tag}/join-leave": {
      "get": {
        "operationId": "getLegacyPlayerJoinLeave",
        "summary": "Get legacy player join and leave history",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "player_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time_stamp_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "tag",
                          "th",
                          "time",
                          "clan",
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/player/{player_tag}/warhits": {
      "get": {
        "operationId": "getLegacyPlayerWarHits",
        "summary": "Get legacy player war attacks and defenses",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "player_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "war_data": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "teamSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacksPerMember": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "battleModifier": {
                                "type": "string"
                              },
                              "preparationStartTime": {
                                "type": "string"
                              },
                              "startTime": {
                                "type": "string"
                              },
                              "endTime": {
                                "type": "string"
                              },
                              "clan": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "badgeUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "small",
                                      "large",
                                      "medium"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "clanLevel": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "attacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "members": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "townhallLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "mapPosition": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "attackerTag": {
                                                "type": "string"
                                              },
                                              "defenderTag": {
                                                "type": "string"
                                              },
                                              "stars": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "destructionPercentage": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "order": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "duration": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "attackerTag",
                                              "defenderTag",
                                              "stars",
                                              "destructionPercentage",
                                              "order",
                                              "duration"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "opponentAttacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "bestOpponentAttack": {
                                          "type": "object",
                                          "properties": {
                                            "attackerTag": {
                                              "type": "string"
                                            },
                                            "defenderTag": {
                                              "type": "string"
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "duration": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "attackerTag",
                                            "defenderTag",
                                            "stars",
                                            "destructionPercentage",
                                            "order",
                                            "duration"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "townhallLevel",
                                        "mapPosition"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "badgeUrls",
                                  "clanLevel",
                                  "attacks",
                                  "stars",
                                  "destructionPercentage"
                                ],
                                "additionalProperties": false
                              },
                              "opponent": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "badgeUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "small",
                                      "large",
                                      "medium"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "clanLevel": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "attacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "members": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "townhallLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "mapPosition": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "attackerTag": {
                                                "type": "string"
                                              },
                                              "defenderTag": {
                                                "type": "string"
                                              },
                                              "stars": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "destructionPercentage": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "order": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "duration": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "attackerTag",
                                              "defenderTag",
                                              "stars",
                                              "destructionPercentage",
                                              "order",
                                              "duration"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "opponentAttacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "bestOpponentAttack": {
                                          "type": "object",
                                          "properties": {
                                            "attackerTag": {
                                              "type": "string"
                                            },
                                            "defenderTag": {
                                              "type": "string"
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "duration": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "attackerTag",
                                            "defenderTag",
                                            "stars",
                                            "destructionPercentage",
                                            "order",
                                            "duration"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "townhallLevel",
                                        "mapPosition"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "badgeUrls",
                                  "clanLevel",
                                  "attacks",
                                  "stars",
                                  "destructionPercentage"
                                ],
                                "additionalProperties": false
                              },
                              "warStartTime": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "season": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "state",
                              "teamSize",
                              "preparationStartTime",
                              "endTime",
                              "clan",
                              "opponent"
                            ],
                            "additionalProperties": false
                          },
                          "member_data": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attackerTag": {
                                      "type": "string"
                                    },
                                    "defenderTag": {
                                      "type": "string"
                                    },
                                    "stars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "destructionPercentage": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "duration": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "attackerTag",
                                    "defenderTag",
                                    "stars",
                                    "destructionPercentage",
                                    "order",
                                    "duration"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "opponentAttacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "bestOpponentAttack": {
                                "type": "object",
                                "properties": {
                                  "attackerTag": {
                                    "type": "string"
                                  },
                                  "defenderTag": {
                                    "type": "string"
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "duration": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "attackerTag",
                                  "defenderTag",
                                  "stars",
                                  "destructionPercentage",
                                  "order",
                                  "duration"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          },
                          "attacks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "attackerTag": {
                                  "type": "string"
                                },
                                "defenderTag": {
                                  "type": "string"
                                },
                                "stars": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "destructionPercentage": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "duration": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "fresh": {
                                  "type": "boolean"
                                },
                                "defender": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                },
                                "attacker": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                },
                                "attack_order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "attackerTag",
                                "defenderTag",
                                "stars",
                                "destructionPercentage",
                                "order",
                                "duration",
                                "fresh",
                                "attack_order"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "defenses": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "attackerTag": {
                                  "type": "string"
                                },
                                "defenderTag": {
                                  "type": "string"
                                },
                                "stars": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "destructionPercentage": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "duration": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "fresh": {
                                  "type": "boolean"
                                },
                                "defender": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                },
                                "attacker": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                },
                                "attack_order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "attackerTag",
                                "defenderTag",
                                "stars",
                                "destructionPercentage",
                                "order",
                                "duration",
                                "fresh",
                                "attack_order"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "war_data",
                          "member_data",
                          "attacks",
                          "defenses"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/achievements/check": {
      "post": {
        "operationId": "checkExpoAchievements",
        "summary": "Check and list Expo achievements",
        "tags": [
          "Achievements"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object"
                  },
                  {
                    "type": "array"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "asset_url": {
                            "type": "string"
                          },
                          "repeatable": {
                            "type": "boolean"
                          },
                          "earned_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "asset_url",
                          "repeatable",
                          "earned_count"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/activity/guild-summary": {
      "get": {
        "operationId": "guildSummary",
        "summary": "guildSummary",
        "tags": [
          "Activity & Inactivity"
        ],
        "security": [],
        "parameters": [
          {
            "name": "guild_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "inactive_threshold_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "guild_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "total_clans": {
                      "type": "integer"
                    },
                    "total_members": {
                      "type": "integer"
                    },
                    "total_active_members": {
                      "type": "integer"
                    },
                    "total_inactive_members": {
                      "type": "integer"
                    },
                    "overall_activity_rate": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_donations_sent": {
                      "type": "integer"
                    },
                    "total_donations_received": {
                      "type": "integer"
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "total_members": {
                            "type": "integer"
                          },
                          "active_members": {
                            "type": "integer"
                          },
                          "inactive_members": {
                            "type": "integer"
                          },
                          "activity_rate": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_donations_sent": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_donations_received": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "total_donations_sent": {
                            "type": "integer"
                          },
                          "total_donations_received": {
                            "type": "integer"
                          },
                          "average_trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "clan_tag",
                          "clan_name",
                          "total_members",
                          "active_members",
                          "inactive_members",
                          "activity_rate",
                          "average_donations_sent",
                          "average_donations_received",
                          "total_donations_sent",
                          "total_donations_received",
                          "average_trophies"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "guild_id",
                    "total_clans",
                    "total_members",
                    "total_active_members",
                    "total_inactive_members",
                    "overall_activity_rate",
                    "total_donations_sent",
                    "total_donations_received",
                    "clans"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/admin/tracking/summary": {
      "get": {
        "operationId": "adminTrackingSummary",
        "summary": "Get tracking health summary",
        "tags": [
          "Admin Tracking"
        ],
        "security": [
          {
            "CloudflareAccess": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Requested-With",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "const": "XMLHttpRequest"
            },
            "description": "Required with Cloudflare Access; not required for a valid bot bearer token."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generated_at": {
                      "type": "string"
                    },
                    "stale_after_seconds": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "processes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "script": {
                            "type": "string"
                          },
                          "run_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "interval_start": {
                            "type": "string"
                          },
                          "interval_end": {
                            "type": "string"
                          },
                          "process_started_at": {
                            "type": "string"
                          },
                          "ram_bytes": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "uptime_seconds": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "goroutines": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "heap_objects": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "gc_cycles": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "health": {
                            "type": "object",
                            "properties": {
                              "healthy": {
                                "type": "boolean"
                              },
                              "reported_healthy": {
                                "type": "boolean"
                              },
                              "stale": {
                                "type": "boolean"
                              },
                              "observed_at": {
                                "type": "string"
                              },
                              "age_seconds": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stale_after_seconds": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "healthy",
                              "reported_healthy",
                              "stale",
                              "observed_at",
                              "age_seconds",
                              "stale_after_seconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "script",
                          "run_id",
                          "interval_start",
                          "interval_end",
                          "process_started_at",
                          "ram_bytes",
                          "uptime_seconds",
                          "goroutines",
                          "heap_objects",
                          "gc_cycles",
                          "health"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "script": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "run_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "interval_start": {
                            "type": "string"
                          },
                          "interval_end": {
                            "type": "string"
                          },
                          "interval_duration_seconds": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "last_success": {
                            "type": "string"
                          },
                          "latest_error": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "message": {
                                    "type": "string"
                                  },
                                  "timestamp": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "message",
                                  "timestamp"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "request_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "requests_per_second": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "error_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "error_rate": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_request_latency_ms": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "write_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "writes_per_second": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "processing_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_processing_duration_ms": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "queue_depth": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "database": {
                            "type": "object",
                            "properties": {
                              "batch_count": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "rows_requested": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "rows_affected": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "average_store_duration_ms": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "batch_count",
                              "rows_requested",
                              "rows_affected",
                              "average_store_duration_ms"
                            ],
                            "additionalProperties": false
                          },
                          "targets": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "target_count": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "current_cycle": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "processed_targets": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "targets_per_second": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "completion_percentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "estimated_seconds_remaining": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "estimated_loop_completion": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "target_count",
                                  "current_cycle",
                                  "processed_targets",
                                  "targets_per_second",
                                  "completion_percentage"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "health": {
                            "type": "object",
                            "properties": {
                              "healthy": {
                                "type": "boolean"
                              },
                              "reported_healthy": {
                                "type": "boolean"
                              },
                              "stale": {
                                "type": "boolean"
                              },
                              "observed_at": {
                                "type": "string"
                              },
                              "age_seconds": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stale_after_seconds": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "healthy",
                              "reported_healthy",
                              "stale",
                              "observed_at",
                              "age_seconds",
                              "stale_after_seconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "script",
                          "domain",
                          "run_id",
                          "interval_start",
                          "interval_end",
                          "interval_duration_seconds",
                          "latest_error",
                          "request_count",
                          "requests_per_second",
                          "error_count",
                          "error_rate",
                          "average_request_latency_ms",
                          "write_count",
                          "writes_per_second",
                          "processing_count",
                          "average_processing_duration_ms",
                          "queue_depth",
                          "database",
                          "targets",
                          "health"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "generated_at",
                    "stale_after_seconds",
                    "processes",
                    "domains"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "admin-or-bot"
      }
    },
    "/v2/admin/tracking/timeseries": {
      "get": {
        "operationId": "adminTrackingTimeseries",
        "summary": "Get tracking timeseries",
        "tags": [
          "Admin Tracking"
        ],
        "security": [
          {
            "CloudflareAccess": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "15m",
                "1h",
                "6h",
                "24h"
              ]
            }
          },
          {
            "name": "script",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Requested-With",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "const": "XMLHttpRequest"
            },
            "description": "Required with Cloudflare Access; not required for a valid bot bearer token."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generated_at": {
                      "type": "string"
                    },
                    "window": {
                      "type": "string",
                      "enum": [
                        "15m",
                        "1h",
                        "6h",
                        "24h"
                      ]
                    },
                    "start": {
                      "type": "string"
                    },
                    "end": {
                      "type": "string"
                    },
                    "bucket_seconds": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "max_points_per_series": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "processes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "script": {
                            "type": "string"
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "timestamp": {
                                  "type": "string"
                                },
                                "observed_at": {
                                  "type": "string"
                                },
                                "ram_bytes": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "uptime_seconds": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "goroutines": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "heap_objects": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "gc_cycles": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "timestamp",
                                "observed_at",
                                "ram_bytes",
                                "uptime_seconds",
                                "goroutines",
                                "heap_objects",
                                "gc_cycles"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "script",
                          "points"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "script": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "timestamp": {
                                  "type": "string"
                                },
                                "observed_at": {
                                  "type": "string"
                                },
                                "interval_duration_seconds": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "request_count": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "requests_per_second": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "error_count": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "error_rate": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "average_request_latency_ms": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "write_count": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "writes_per_second": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "processing_count": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "average_processing_duration_ms": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "queue_depth": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "database": {
                                  "type": "object",
                                  "properties": {
                                    "batch_count": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "rows_requested": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "rows_affected": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "average_store_duration_ms": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "batch_count",
                                    "rows_requested",
                                    "rows_affected",
                                    "average_store_duration_ms"
                                  ],
                                  "additionalProperties": false
                                },
                                "targets": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "target_count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "current_cycle": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "processed_targets": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "targets_per_second": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "completion_percentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "estimated_seconds_remaining": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "estimated_loop_completion": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "target_count",
                                        "current_cycle",
                                        "processed_targets",
                                        "targets_per_second",
                                        "completion_percentage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reported_healthy": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "timestamp",
                                "observed_at",
                                "interval_duration_seconds",
                                "request_count",
                                "requests_per_second",
                                "error_count",
                                "error_rate",
                                "average_request_latency_ms",
                                "write_count",
                                "writes_per_second",
                                "processing_count",
                                "average_processing_duration_ms",
                                "queue_depth",
                                "database",
                                "targets",
                                "reported_healthy"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "script",
                          "domain",
                          "points"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "generated_at",
                    "window",
                    "start",
                    "end",
                    "bucket_seconds",
                    "max_points_per_series",
                    "processes",
                    "domains"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "admin-or-bot"
      }
    },
    "/v2/app/announcements": {
      "get": {
        "operationId": "listAppAnnouncements",
        "summary": "List application announcements for the bot",
        "tags": [
          "Mobile App"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "",
                "draft",
                "scheduled",
                "published",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "subtitle": {
                            "type": "string"
                          },
                          "body": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "scheduled",
                              "published",
                              "archived"
                            ]
                          },
                          "target": {
                            "type": "string",
                            "enum": [
                              "all",
                              "ios",
                              "android"
                            ]
                          },
                          "banner_image_url": {
                            "type": "string"
                          },
                          "html_object_key": {
                            "type": "string"
                          },
                          "html_url": {
                            "type": "string"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          },
                          "min_app_version": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "subtitle",
                          "status",
                          "target",
                          "starts_at",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      },
      "post": {
        "operationId": "createAppAnnouncement",
        "summary": "Create an application announcement",
        "tags": [
          "Mobile App"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "subtitle": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "scheduled",
                      "published",
                      "archived"
                    ]
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "all",
                      "ios",
                      "android"
                    ]
                  },
                  "banner_image_url": {
                    "type": "string"
                  },
                  "html_object_key": {
                    "type": "string"
                  },
                  "html_url": {
                    "type": "string"
                  },
                  "starts_at": {
                    "type": "string"
                  },
                  "ends_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_app_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "title",
                  "subtitle"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "subtitle": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "scheduled",
                        "published",
                        "archived"
                      ]
                    },
                    "target": {
                      "type": "string",
                      "enum": [
                        "all",
                        "ios",
                        "android"
                      ]
                    },
                    "banner_image_url": {
                      "type": "string"
                    },
                    "html_object_key": {
                      "type": "string"
                    },
                    "html_url": {
                      "type": "string"
                    },
                    "starts_at": {
                      "type": "string"
                    },
                    "ends_at": {
                      "type": "string"
                    },
                    "min_app_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "subtitle",
                    "status",
                    "target",
                    "starts_at",
                    "created_at",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "415": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/app/announcements/{announcementId}": {
      "get": {
        "operationId": "getExpoAnnouncement",
        "summary": "Get one app announcement",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "parameters": [
          {
            "name": "announcementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "subtitle": {
                          "type": "string"
                        },
                        "banner_image_url": {
                          "type": "string"
                        },
                        "body_blocks": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "heading"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "paragraph"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "bullet_list"
                                    ]
                                  },
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "type",
                                  "items"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "caption": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "url"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "presentation_type": {
                          "type": "string",
                          "enum": [
                            "article",
                            "story"
                          ]
                        },
                        "story_url": {
                          "type": "string"
                        },
                        "show_on_home": {
                          "type": "boolean"
                        },
                        "pinned_on_home": {
                          "type": "boolean"
                        },
                        "target_route": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "expired"
                          ]
                        },
                        "published_at": {
                          "type": "string"
                        },
                        "starts_at": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "version",
                        "title",
                        "subtitle",
                        "body_blocks",
                        "presentation_type",
                        "show_on_home",
                        "pinned_on_home",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "item"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/app/announcements/{id}": {
      "delete": {
        "operationId": "archiveAppAnnouncement",
        "summary": "Archive an application announcement",
        "tags": [
          "Mobile App"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "subtitle": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "scheduled",
                        "published",
                        "archived"
                      ]
                    },
                    "target": {
                      "type": "string",
                      "enum": [
                        "all",
                        "ios",
                        "android"
                      ]
                    },
                    "banner_image_url": {
                      "type": "string"
                    },
                    "html_object_key": {
                      "type": "string"
                    },
                    "html_url": {
                      "type": "string"
                    },
                    "starts_at": {
                      "type": "string"
                    },
                    "ends_at": {
                      "type": "string"
                    },
                    "min_app_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "subtitle",
                    "status",
                    "target",
                    "starts_at",
                    "created_at",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "415": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      },
      "put": {
        "operationId": "updateAppAnnouncement",
        "summary": "Update an application announcement",
        "tags": [
          "Mobile App"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "subtitle": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "scheduled",
                      "published",
                      "archived"
                    ]
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "all",
                      "ios",
                      "android"
                    ]
                  },
                  "banner_image_url": {
                    "type": "string"
                  },
                  "html_object_key": {
                    "type": "string"
                  },
                  "html_url": {
                    "type": "string"
                  },
                  "starts_at": {
                    "type": "string"
                  },
                  "ends_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_app_version": {
                    "type": "string"
                  }
                },
                "required": [
                  "title",
                  "subtitle"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "subtitle": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "scheduled",
                        "published",
                        "archived"
                      ]
                    },
                    "target": {
                      "type": "string",
                      "enum": [
                        "all",
                        "ios",
                        "android"
                      ]
                    },
                    "banner_image_url": {
                      "type": "string"
                    },
                    "html_object_key": {
                      "type": "string"
                    },
                    "html_url": {
                      "type": "string"
                    },
                    "starts_at": {
                      "type": "string"
                    },
                    "ends_at": {
                      "type": "string"
                    },
                    "min_app_version": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "subtitle",
                    "status",
                    "target",
                    "starts_at",
                    "created_at",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "415": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/app/announcements/active": {
      "get": {
        "operationId": "listExpoActiveAnnouncements",
        "summary": "List active app announcements",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ios",
                "android",
                "all"
              ]
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "subtitle": {
                              "type": "string"
                            },
                            "banner_image_url": {
                              "type": "string"
                            },
                            "body_blocks": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "heading"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "paragraph"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "bullet_list"
                                        ]
                                      },
                                      "items": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "items"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "caption": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "presentation_type": {
                              "type": "string",
                              "enum": [
                                "article",
                                "story"
                              ]
                            },
                            "story_url": {
                              "type": "string"
                            },
                            "show_on_home": {
                              "type": "boolean"
                            },
                            "pinned_on_home": {
                              "type": "boolean"
                            },
                            "target_route": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "live",
                                "expired"
                              ]
                            },
                            "published_at": {
                              "type": "string"
                            },
                            "starts_at": {
                              "type": "string"
                            },
                            "ends_at": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "version",
                            "title",
                            "subtitle",
                            "body_blocks",
                            "presentation_type",
                            "show_on_home",
                            "pinned_on_home",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "subtitle": {
                            "type": "string"
                          },
                          "banner_image_url": {
                            "type": "string"
                          },
                          "body_blocks": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "heading"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "paragraph"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "bullet_list"
                                      ]
                                    },
                                    "items": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "items"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "image"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "caption": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "url"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "presentation_type": {
                            "type": "string",
                            "enum": [
                              "article",
                              "story"
                            ]
                          },
                          "story_url": {
                            "type": "string"
                          },
                          "show_on_home": {
                            "type": "boolean"
                          },
                          "pinned_on_home": {
                            "type": "boolean"
                          },
                          "target_route": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "live",
                              "expired"
                            ]
                          },
                          "published_at": {
                            "type": "string"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "version",
                          "title",
                          "subtitle",
                          "body_blocks",
                          "presentation_type",
                          "show_on_home",
                          "pinned_on_home",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "item",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/app/config": {
      "get": {
        "operationId": "getAppConfig",
        "summary": "Get public app feature flags and native minimum-version policy",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "rollout_percentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "min_app_version": {
                            "type": "string"
                          },
                          "platforms": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "android",
                                "ios",
                                "web"
                              ]
                            }
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "enabled",
                          "rollout_percentage",
                          "platforms"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "updates": {
                      "type": "object",
                      "properties": {
                        "ios": {
                          "type": "object",
                          "properties": {
                            "minimum_version": {
                              "type": "string"
                            },
                            "store_url": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "minimum_version",
                            "store_url",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        "android": {
                          "type": "object",
                          "properties": {
                            "minimum_version": {
                              "type": "string"
                            },
                            "store_url": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "minimum_version",
                            "store_url",
                            "message"
                          ],
                          "additionalProperties": false
                        },
                        "web": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "ios",
                        "android",
                        "web"
                      ],
                      "additionalProperties": false
                    },
                    "generated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "flags",
                    "updates",
                    "generated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/app/discohook-resolve": {
      "get": {
        "operationId": "dashboardDiscohookResolve",
        "summary": "Resolve a Discohook share URL",
        "tags": [
          "Dashboard"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "payload": {}
                      },
                      "required": [
                        "payload"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "resolvedUrl": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "resolvedUrl"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/app/posts": {
      "get": {
        "operationId": "listExpoPosts",
        "summary": "List published app posts",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ios",
                "android",
                "all"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "subtitle": {
                            "type": "string"
                          },
                          "banner_image_url": {
                            "type": "string"
                          },
                          "body_blocks": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "heading"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "paragraph"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "bullet_list"
                                      ]
                                    },
                                    "items": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "items"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "image"
                                      ]
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "caption": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "url"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "presentation_type": {
                            "type": "string",
                            "enum": [
                              "article",
                              "story"
                            ]
                          },
                          "story_url": {
                            "type": "string"
                          },
                          "show_on_home": {
                            "type": "boolean"
                          },
                          "pinned_on_home": {
                            "type": "boolean"
                          },
                          "target_route": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "live",
                              "expired"
                            ]
                          },
                          "published_at": {
                            "type": "string"
                          },
                          "starts_at": {
                            "type": "string"
                          },
                          "ends_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "version",
                          "title",
                          "subtitle",
                          "body_blocks",
                          "presentation_type",
                          "show_on_home",
                          "pinned_on_home",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_offset": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "has_more",
                    "next_offset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/app/updates/manifest": {
      "get": {
        "operationId": "getExpoAppUpdateManifest",
        "summary": "Resolve an Expo Updates manifest for an installation cohort",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "multipart/mixed": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/discord": {
      "post": {
        "operationId": "expoAuthDiscord",
        "summary": "expoAuthDiscord",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "redirect_uri",
                  "code_verifier",
                  "device_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "refresh_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/email": {
      "post": {
        "operationId": "expoAuthEmail",
        "summary": "expoAuthEmail",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "device_name": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password",
                  "device_id",
                  "device_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "refresh_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/export": {
      "get": {
        "operationId": "getExpoPrivacyExport",
        "summary": "Request the current user's privacy export",
        "tags": [
          "App Authentication"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                      }
                    },
                    "player_links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "bookmarks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "recent_searches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "legacy_search_settings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "discord_sessions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "notification_accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "notification_devices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "notification_preferences": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "saved_bases": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "billing_subscription": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    },
                    "subscription_entitlements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
                        }
                      }
                    }
                  },
                  "required": [
                    "account",
                    "player_links",
                    "bookmarks",
                    "recent_searches",
                    "legacy_search_settings",
                    "discord_sessions",
                    "notification_accounts",
                    "notification_devices",
                    "notification_preferences",
                    "saved_bases",
                    "billing_subscription",
                    "subscription_entitlements"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/auth/forgot-password": {
      "post": {
        "operationId": "expoAuthForgotPassword",
        "summary": "Request an Expo password reset",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "reset_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/me": {
      "delete": {
        "operationId": "deleteExpoAuthMe",
        "summary": "Delete the current Expo user",
        "tags": [
          "App Authentication"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "message",
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      },
      "get": {
        "operationId": "getExpoAuthMe",
        "summary": "Get the current Expo user",
        "tags": [
          "App Authentication"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "avatar_url": {
                      "type": "string"
                    },
                    "auth_methods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "is_admin": {
                      "type": "boolean"
                    },
                    "account_summary": {
                      "type": "object",
                      "properties": {
                        "follower_count": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "follower_count"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "user_id",
                    "username",
                    "avatar_url",
                    "auth_methods",
                    "account_summary"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/auth/refresh": {
      "post": {
        "operationId": "expoAuthRefresh",
        "summary": "Refresh an Expo native authentication session",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refresh_token": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "refresh_token",
                  "device_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "access_token",
                    "refresh_token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/register": {
      "post": {
        "operationId": "expoAuthRegister",
        "summary": "Register an email-backed Expo account",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "device_name": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password",
                  "username",
                  "device_id",
                  "device_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "verification_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/resend-verification": {
      "post": {
        "operationId": "expoAuthResendVerification",
        "summary": "Resend an Expo email verification",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "verification_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/reset-password": {
      "post": {
        "operationId": "expoAuthResetPassword",
        "summary": "expoAuthResetPassword",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "reset_code": {
                    "type": "string"
                  },
                  "new_password": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "device_name": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "reset_code",
                  "new_password",
                  "device_id",
                  "device_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "refresh_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/verify-email-code": {
      "post": {
        "operationId": "expoAuthVerifyEmail",
        "summary": "expoAuthVerifyEmail",
        "tags": [
          "App Authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "refresh_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/discord": {
      "post": {
        "operationId": "expoAuthWebDiscord",
        "summary": "expoAuthWebDiscord",
        "tags": [
          "Web Authentication"
        ],
        "security": [],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "redirect_uri",
                  "code_verifier",
                  "device_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/email": {
      "post": {
        "operationId": "expoAuthWebEmail",
        "summary": "expoAuthWebEmail",
        "tags": [
          "Web Authentication"
        ],
        "security": [],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "device_name": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password",
                  "device_id",
                  "device_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/logout": {
      "post": {
        "operationId": "expoAuthWebLogout",
        "summary": "Clear the Expo web refresh session",
        "tags": [
          "Web Authentication"
        ],
        "security": [
          {
            "WebRefreshCookie": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/refresh": {
      "post": {
        "operationId": "expoAuthWebRefresh",
        "summary": "Refresh an Expo web authentication session",
        "tags": [
          "Web Authentication"
        ],
        "security": [
          {
            "WebRefreshCookie": []
          }
        ],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "access_token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/reset-password": {
      "post": {
        "operationId": "expoAuthWebResetPassword",
        "summary": "expoAuthWebResetPassword",
        "tags": [
          "Web Authentication"
        ],
        "security": [],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "reset_code": {
                    "type": "string"
                  },
                  "new_password": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "device_name": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "reset_code",
                  "new_password",
                  "device_id",
                  "device_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/auth/web/verify-email-code": {
      "post": {
        "operationId": "expoAuthWebVerifyEmail",
        "summary": "expoAuthWebVerifyEmail",
        "tags": [
          "Web Authentication"
        ],
        "security": [],
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Must exactly match a configured web origin."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "avatar_url": {
                          "type": "string"
                        },
                        "auth_methods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_admin": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "user_id",
                        "username",
                        "avatar_url",
                        "auth_methods"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "access_token",
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/bases/{baseId}/downloaders/{userId}": {
      "post": {
        "operationId": "recordBaseDownload",
        "summary": "Record one unique trusted Bot base downloader",
        "tags": [
          "Bases Bot Integration"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "baseId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "userId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "downloadCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "baseId",
                    "userId",
                    "downloadCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/bases/{baseId}/finalize": {
      "post": {
        "operationId": "finalizeLegacyBase",
        "summary": "Finalize a converted legacy base after the Discord edit succeeds",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "channelId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "serverId",
                  "channelId",
                  "description"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "baseId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "serverId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "channelId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "baseId",
                    "serverId",
                    "channelId",
                    "description"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/bases/{baseId}/images/{position}": {
      "post": {
        "operationId": "stageLegacyBaseImage",
        "summary": "Copy and idempotently stage one Discord base attachment",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "position",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "sourceUrl"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "baseId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "imageUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "baseId",
                    "position",
                    "imageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/bases/{baseId}/votes/{voterId}": {
      "delete": {
        "operationId": "removeBaseVote",
        "summary": "Idempotently remove a trusted Bot base vote",
        "tags": [
          "Bases Bot Integration"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "voterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "x-clashking-auth": "bot"
      },
      "put": {
        "operationId": "upsertBaseVote",
        "summary": "Atomically record or change a trusted Bot base vote",
        "tags": [
          "Bases Bot Integration"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "voterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "direction"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "baseId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "voterId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "up",
                        "down"
                      ]
                    }
                  },
                  "required": [
                    "baseId",
                    "voterId",
                    "direction"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/bases/legacy/{messageId}": {
      "get": {
        "operationId": "resolveLegacyBase",
        "summary": "Resolve a legacy base by Discord message ID",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "messageId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "serverId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{1,20}$",
                          "description": "Discord snowflake as an unsigned decimal string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "channelId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{1,20}$",
                          "description": "Discord snowflake as an unsigned decimal string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "baseLink": {
                      "type": "string"
                    },
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "messageId",
                    "serverId",
                    "channelId",
                    "baseLink",
                    "images",
                    "description"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "bot"
      }
    },
    "/v2/bases/personal": {
      "get": {
        "operationId": "getPersonalBases",
        "summary": "List the authenticated user's saved and historically downloaded bases",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$",
                            "description": "Base ID as a decimal string; never convert it to a JavaScript number."
                          },
                          "baseLink": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "discordMessageUrl": {
                            "type": "string"
                          },
                          "downloadCount": {
                            "type": "integer"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "downvotes": {
                            "type": "integer"
                          },
                          "kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "war",
                                  "legend"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "saved": {
                            "type": "boolean"
                          },
                          "savedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "downloadedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "baseLink",
                          "images",
                          "description",
                          "createdAt",
                          "serverId",
                          "channelId",
                          "messageId",
                          "discordMessageUrl",
                          "downloadCount",
                          "upvotes",
                          "downvotes",
                          "kind",
                          "saved",
                          "savedAt",
                          "downloadedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/bases/personal/{baseId}": {
      "delete": {
        "operationId": "unsavePersonalBase",
        "summary": "Unsave one shared base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "description": "Base ID as a decimal string; never convert it to a JavaScript number."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$",
                            "description": "Base ID as a decimal string; never convert it to a JavaScript number."
                          },
                          "baseLink": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "discordMessageUrl": {
                            "type": "string"
                          },
                          "downloadCount": {
                            "type": "integer"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "downvotes": {
                            "type": "integer"
                          },
                          "kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "war",
                                  "legend"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "saved": {
                            "type": "boolean"
                          },
                          "savedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "downloadedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "baseLink",
                          "images",
                          "description",
                          "createdAt",
                          "serverId",
                          "channelId",
                          "messageId",
                          "discordMessageUrl",
                          "downloadCount",
                          "upvotes",
                          "downvotes",
                          "kind",
                          "saved",
                          "savedAt",
                          "downloadedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      },
      "put": {
        "operationId": "savePersonalBase",
        "summary": "Save or relabel one shared base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "description": "Base ID as a decimal string; never convert it to a JavaScript number."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "war",
                          "legend"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$",
                            "description": "Base ID as a decimal string; never convert it to a JavaScript number."
                          },
                          "baseLink": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "discordMessageUrl": {
                            "type": "string"
                          },
                          "downloadCount": {
                            "type": "integer"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "downvotes": {
                            "type": "integer"
                          },
                          "kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "war",
                                  "legend"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "saved": {
                            "type": "boolean"
                          },
                          "savedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "downloadedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "baseLink",
                          "images",
                          "description",
                          "createdAt",
                          "serverId",
                          "channelId",
                          "messageId",
                          "discordMessageUrl",
                          "downloadCount",
                          "upvotes",
                          "downvotes",
                          "kind",
                          "saved",
                          "savedAt",
                          "downloadedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/bases/personal/older-than-90-days": {
      "delete": {
        "operationId": "deleteOldPersonalBases",
        "summary": "Unsave bases saved more than 90 days ago",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$",
                            "description": "Base ID as a decimal string; never convert it to a JavaScript number."
                          },
                          "baseLink": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "discordMessageUrl": {
                            "type": "string"
                          },
                          "downloadCount": {
                            "type": "integer"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "downvotes": {
                            "type": "integer"
                          },
                          "kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "war",
                                  "legend"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "saved": {
                            "type": "boolean"
                          },
                          "savedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "downloadedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "baseLink",
                          "images",
                          "description",
                          "createdAt",
                          "serverId",
                          "channelId",
                          "messageId",
                          "discordMessageUrl",
                          "downloadCount",
                          "upvotes",
                          "downvotes",
                          "kind",
                          "saved",
                          "savedAt",
                          "downloadedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/billing/stripe/checkout": {
      "post": {
        "operationId": "dashboardBillingCheckout",
        "summary": "Create a Stripe Checkout session",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string"
                  }
                },
                "required": [
                  "serverId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/billing/stripe/portal": {
      "post": {
        "operationId": "dashboardBillingPortal",
        "summary": "Create a Stripe customer portal session",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/billing/stripe/webhook": {
      "post": {
        "operationId": "billingStripeWebhook",
        "summary": "Process an independently verified Stripe webhook",
        "tags": [
          "Billing"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/billing/subscription": {
      "get": {
        "operationId": "getExpoBillingSubscription",
        "summary": "Get the current Expo subscription status",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "checkoutEnabled": {
                      "type": "boolean"
                    },
                    "bookmarkNotificationsLimit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "rosterAssistantMonthlyCreditUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "assignedServerId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rosterAssistantSpentUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "rosterAssistantRemainingUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "provider",
                    "status",
                    "active",
                    "checkoutEnabled",
                    "bookmarkNotificationsLimit",
                    "rosterAssistantMonthlyCreditUsd",
                    "assignedServerId",
                    "rosterAssistantSpentUsd",
                    "rosterAssistantRemainingUsd"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user",
        "x-clashking-operation-aliases": [
          "dashboardBillingSubscription",
          "getExpoBillingSubscription"
        ]
      }
    },
    "/v2/billing/subscription/assignment": {
      "put": {
        "operationId": "dashboardBillingAssignment",
        "summary": "Assign subscription roster assistant credit",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "serverId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/billing/usage": {
      "get": {
        "operationId": "dashboardBillingUsage",
        "summary": "Get monthly roster assistant usage",
        "tags": [
          "Billing"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "serverId": {
                      "type": "string"
                    },
                    "serverSpentUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "serverLimitUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "userSpentUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "userLimitUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "globalFreeAvailable": {
                      "type": "boolean"
                    },
                    "subscriptionActive": {
                      "type": "boolean"
                    },
                    "assignedSubscriberCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "paidLimitUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "paidSpentUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "paidRemainingUsd": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "resetsAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "serverId",
                    "serverSpentUsd",
                    "serverLimitUsd",
                    "userSpentUsd",
                    "userLimitUsd",
                    "globalFreeAvailable",
                    "subscriptionActive",
                    "assignedSubscriberCount",
                    "paidLimitUsd",
                    "paidSpentUsd",
                    "paidRemainingUsd",
                    "resetsAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/cdn/upload": {
      "post": {
        "operationId": "dashboardCdnUpload",
        "summary": "Upload a file to the ClashKing CDN",
        "tags": [
          "Other"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "filename"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/clan/{clanTag}/history/changes": {
      "get": {
        "operationId": "getExpoClanChanges",
        "summary": "Get clan change history",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "previous": {
                            "$ref": "#/components/schemas/Schema_f09cdd234f458632_0"
                          },
                          "current": {
                            "$ref": "#/components/schemas/Schema_f09cdd234f458632_0"
                          }
                        },
                        "required": [
                          "time",
                          "type",
                          "previous",
                          "current"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanHistory",
          "getExpoClanChanges"
        ]
      }
    },
    "/v2/clan/{clanTag}/history/leaderboards": {
      "get": {
        "operationId": "getExpoClanLeaderboardHistory",
        "summary": "Get clan leaderboard history",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clanPoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "builderBasePoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capitalPoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "members": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "isCountry": {
                                "type": "boolean"
                              },
                              "countryCode": {
                                "type": "string"
                              },
                              "localizedName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "isCountry"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "date",
                          "rank",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/clan/{clanTag}/history/leaderboards/summary": {
      "get": {
        "operationId": "getExpoClanLeaderboardSummary",
        "summary": "Get clan leaderboard history summary",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "after": {
                            "type": "string"
                          },
                          "before": {
                            "type": "string"
                          },
                          "daysInTop200": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "bestRank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "peakPoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "after",
                          "before",
                          "daysInTop200",
                          "bestRank",
                          "peakPoints"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "seasons"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/clan/{clanTag}/history/legends": {
      "get": {
        "operationId": "getExpoClanLegendHistory",
        "summary": "Get clan legend history",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenseWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "tag",
                          "name",
                          "trophies",
                          "attackWins",
                          "defenseWins",
                          "rank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/clan/{clanTag}/history/legends/summary": {
      "get": {
        "operationId": "getExpoClanLegendSummary",
        "summary": "Get clan legend history summary",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "after": {
                            "type": "string"
                          },
                          "before": {
                            "type": "string"
                          },
                          "playerCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "after",
                          "before",
                          "playerCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "topFinishes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenseWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "tag",
                          "name",
                          "trophies",
                          "attackWins",
                          "defenseWins",
                          "rank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "seasons",
                    "topFinishes"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanLegendSummary",
          "getExpoClanLegendSummary"
        ]
      }
    },
    "/v2/clan/{clanTag}/join-leave": {
      "get": {
        "operationId": "getExpoClanJoinLeave",
        "summary": "Get clan join and leave history",
        "tags": [
          "Clan"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "tag"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "time",
                          "type",
                          "tag"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "available": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "uniquePlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "available"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user",
        "x-clashking-operation-aliases": [
          "botClanJoinLeave",
          "getExpoClanJoinLeave"
        ]
      }
    },
    "/v2/clan/{clanTag}/records": {
      "get": {
        "operationId": "getExpoClanRecords",
        "summary": "Get clan records",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clanPoints": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "time": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "time"
                      ],
                      "additionalProperties": false
                    },
                    "warWinStreak": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "time": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "value",
                        "time"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanRecords",
          "getExpoClanRecords"
        ]
      }
    },
    "/v2/clan/{clanTag}/warlog": {
      "get": {
        "operationId": "getExpoClanWarlog",
        "summary": "Get a clan war log through ClashKing",
        "tags": [
          "Clan"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "result": {
                            "type": "string",
                            "enum": [
                              "win",
                              "lose",
                              "tie"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "cwl",
                              "random",
                              "friendly"
                            ]
                          },
                          "endTime": {
                            "type": "string"
                          },
                          "teamSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attacksPerMember": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "result",
                          "type",
                          "endTime",
                          "teamSize",
                          "attacksPerMember",
                          "clan",
                          "opponent"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user",
        "x-clashking-operation-aliases": [
          "botClanWarLog",
          "getExpoClanWarlog"
        ]
      }
    },
    "/v2/clan/{clanTag}/wars": {
      "get": {
        "operationId": "getExpoClanWars",
        "summary": "Get stored clan wars",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string"
                          },
                          "teamSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attacksPerMember": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "battleModifier": {
                            "type": "string"
                          },
                          "preparationStartTime": {
                            "type": "string"
                          },
                          "startTime": {
                            "type": "string"
                          },
                          "endTime": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "large",
                                  "medium"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage",
                              "members"
                            ],
                            "additionalProperties": false
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "large",
                                  "medium"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage",
                              "members"
                            ],
                            "additionalProperties": false
                          },
                          "warStartTime": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "teamSize",
                          "preparationStartTime",
                          "endTime",
                          "clan",
                          "opponent"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanWars",
          "getExpoClanWars"
        ]
      }
    },
    "/v2/clan/{tag}/cached": {
      "get": {
        "operationId": "botClanCached",
        "summary": "Get cached clan profile",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "tag": {
                          "type": "string"
                        },
                        "badgeUrls": {
                          "type": "object",
                          "properties": {
                            "small": {
                              "type": "string"
                            },
                            "medium": {
                              "type": "string"
                            },
                            "large": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "small",
                            "medium",
                            "large"
                          ],
                          "additionalProperties": false
                        },
                        "description": {
                          "type": "string"
                        },
                        "clanLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "clanPoints": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "capitalGoldTotal": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "location": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "isCountry": {
                              "type": "boolean"
                            },
                            "countryCode": {
                              "type": "string"
                            },
                            "localizedName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "isCountry"
                          ],
                          "additionalProperties": false
                        },
                        "warLeague": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "capitalLeague": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "publicWarLog": {
                          "type": "boolean"
                        },
                        "warWins": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "warWinStreak": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "memberCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "troopsDonated": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "troopsReceived": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "lastActive": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townHallLevel"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "name",
                        "tag",
                        "badgeUrls",
                        "description",
                        "clanLevel",
                        "clanPoints",
                        "capitalGoldTotal",
                        "warLeague",
                        "publicWarLog",
                        "warWins",
                        "warWinStreak",
                        "memberCount",
                        "troopsDonated",
                        "troopsReceived",
                        "members"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/clan/{tag}/rankings": {
      "get": {
        "operationId": "botClanRankings",
        "summary": "Get clan rankings",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tag": {
                      "type": "string"
                    },
                    "badge": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "homeVillage": {
                      "type": "object",
                      "properties": {
                        "points": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "placements": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locationId": {
                                "type": "string"
                              },
                              "rank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "points": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "locationId",
                              "rank",
                              "points"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "points",
                        "placements"
                      ],
                      "additionalProperties": false
                    },
                    "builderBase": {
                      "type": "object",
                      "properties": {
                        "points": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "placements": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locationId": {
                                "type": "string"
                              },
                              "rank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "points": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "locationId",
                              "rank",
                              "points"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "points",
                        "placements"
                      ],
                      "additionalProperties": false
                    },
                    "clanCapital": {
                      "type": "object",
                      "properties": {
                        "points": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "placements": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locationId": {
                                "type": "string"
                              },
                              "rank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "points": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "locationId",
                              "rank",
                              "points"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "points",
                        "placements"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "name",
                    "tag",
                    "badge",
                    "homeVillage",
                    "builderBase",
                    "clanCapital"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/clan/search": {
      "get": {
        "operationId": "dashboardClanSearch",
        "summary": "Search clans by name or tag",
        "tags": [
          "Clan"
        ],
        "security": [],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "NaN"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "Infinity"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "-Infinity"
                    ]
                  }
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "warLeagueIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "NaN"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "Infinity"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "-Infinity"
                    ]
                  }
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "clanLevel[min]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "clanLevel[max]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "members[min]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "members[max]",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "badge": {
                            "type": "string"
                          },
                          "clanLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "isCountry": {
                                "type": "boolean"
                              },
                              "countryCode": {
                                "type": "string"
                              },
                              "localizedName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "isCountry"
                            ],
                            "additionalProperties": false
                          },
                          "warLeague": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "members": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "tag",
                          "clanLevel",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "hasMore",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/config/public": {
      "get": {
        "operationId": "publicConfig",
        "summary": "publicConfig",
        "tags": [
          "Configuration"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sentry_dsn_mobile": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "sentry_dsn_mobile"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts": {
      "get": {
        "operationId": "getExpoGlobalCounts",
        "summary": "Get global ClashKing counts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "players_in_war": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "clans_in_war": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_join_leaves": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "players_in_legends": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "player_count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "clan_count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "wars_stored": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "players_in_war",
                    "clans_in_war",
                    "total_join_leaves",
                    "players_in_legends",
                    "player_count",
                    "clan_count",
                    "wars_stored"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botCounts",
          "getExpoGlobalCounts"
        ]
      }
    },
    "/v2/counts/clans/capital-leagues": {
      "get": {
        "operationId": "getExpoClanCapitalLeagueCounts",
        "summary": "getExpoClanCapitalLeagueCounts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cwl_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league_tier_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts/clans/cwl-leagues": {
      "get": {
        "operationId": "getExpoCwlLeagueCounts",
        "summary": "getExpoCwlLeagueCounts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cwl_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league_tier_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts/clans/locations": {
      "get": {
        "operationId": "getExpoClanLocationCounts",
        "summary": "getExpoClanLocationCounts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cwl_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league_tier_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts/players/builder-halls": {
      "get": {
        "operationId": "getExpoPlayerBuilderhallCounts",
        "summary": "Builder Hall counts are unavailable (501)",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "501": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "not_implemented"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "enum": [
                        "Builder Hall counts are not implemented"
                      ]
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts/players/league-tiers": {
      "get": {
        "operationId": "getExpoPlayerLeagueTierCounts",
        "summary": "getExpoPlayerLeagueTierCounts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cwl_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league_tier_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/counts/players/town-halls": {
      "get": {
        "operationId": "getExpoPlayerTownhallCounts",
        "summary": "getExpoPlayerTownhallCounts",
        "tags": [
          "Counts"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cwl_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league_tier_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/cwl/{clanTag}/seasons": {
      "get": {
        "operationId": "getExpoClanCwlSeasons",
        "summary": "Get clan CWL seasons",
        "tags": [
          "War & CWL"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "warSize": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warLeague": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "stars": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "destruction": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rounds": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "won": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "tied": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "lost": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "won",
                                  "tied",
                                  "lost"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "state",
                          "warSize",
                          "warLeague",
                          "rank",
                          "stars",
                          "destruction",
                          "rounds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botCwlSeasons",
          "getExpoClanCwlSeasons"
        ]
      }
    },
    "/v2/cwl/{tag}/group": {
      "get": {
        "operationId": "getStoredCwlGroup",
        "summary": "Get a stored CWL group for a clan and optional exact season",
        "tags": [
          "War & CWL"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "season": {
                      "type": "string"
                    },
                    "warLeague": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "clanLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "small",
                              "large",
                              "medium"
                            ],
                            "additionalProperties": false
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "townHallLevel": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "tag",
                                "name",
                                "townHallLevel"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "clanLevel",
                          "badgeUrls",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "warTags": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string"
                                    },
                                    "teamSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacksPerMember": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "battleModifier": {
                                      "type": "string"
                                    },
                                    "preparationStartTime": {
                                      "type": "string"
                                    },
                                    "startTime": {
                                      "type": "string"
                                    },
                                    "endTime": {
                                      "type": "string"
                                    },
                                    "clan": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tag": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "townhallLevel": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "mapPosition": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "attacks": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "attackerTag": {
                                                      "type": "string"
                                                    },
                                                    "defenderTag": {
                                                      "type": "string"
                                                    },
                                                    "stars": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "destructionPercentage": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "order": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "duration": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "attackerTag",
                                                    "defenderTag",
                                                    "stars",
                                                    "destructionPercentage",
                                                    "order",
                                                    "duration"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "opponentAttacks": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "bestOpponentAttack": {
                                                "type": "object",
                                                "properties": {
                                                  "attackerTag": {
                                                    "type": "string"
                                                  },
                                                  "defenderTag": {
                                                    "type": "string"
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "order": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "duration": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "attackerTag",
                                                  "defenderTag",
                                                  "stars",
                                                  "destructionPercentage",
                                                  "order",
                                                  "duration"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "tag",
                                              "name",
                                              "townhallLevel",
                                              "mapPosition"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage",
                                        "members"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "opponent": {
                                      "type": "object",
                                      "properties": {
                                        "tag": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "members": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "tag": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "townhallLevel": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "mapPosition": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "attacks": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "attackerTag": {
                                                      "type": "string"
                                                    },
                                                    "defenderTag": {
                                                      "type": "string"
                                                    },
                                                    "stars": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "destructionPercentage": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "order": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "duration": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "attackerTag",
                                                    "defenderTag",
                                                    "stars",
                                                    "destructionPercentage",
                                                    "order",
                                                    "duration"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "opponentAttacks": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "bestOpponentAttack": {
                                                "type": "object",
                                                "properties": {
                                                  "attackerTag": {
                                                    "type": "string"
                                                  },
                                                  "defenderTag": {
                                                    "type": "string"
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "order": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "duration": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "attackerTag",
                                                  "defenderTag",
                                                  "stars",
                                                  "destructionPercentage",
                                                  "order",
                                                  "duration"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "tag",
                                              "name",
                                              "townhallLevel",
                                              "mapPosition"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "tag",
                                        "name",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage",
                                        "members"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "warStartTime": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "season": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "teamSize",
                                    "preparationStartTime",
                                    "endTime",
                                    "clan",
                                    "opponent",
                                    "season"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tag"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "warTags"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "state",
                    "season",
                    "warLeague",
                    "clans",
                    "rounds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botCwlGroup",
          "getStoredCwlGroup"
        ]
      }
    },
    "/v2/cwl/{tag}/ranking-history": {
      "get": {
        "operationId": "botCwlRankingHistory",
        "summary": "Get clan CWL ranking history",
        "tags": [
          "War & CWL"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clanTag": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "cwlLeagueId": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "state": {
                            "type": "string"
                          },
                          "warSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rounds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "warTags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "warTags"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "clanTag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "badgeToken": {
                                "type": "string"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townHallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townHallLevel"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "clanTag",
                              "name",
                              "clanLevel",
                              "badgeToken",
                              "members"
                            ],
                            "additionalProperties": false
                          },
                          "standing": {
                            "type": "object",
                            "properties": {
                              "clanTag": {
                                "type": "string"
                              },
                              "season": {
                                "type": "string"
                              },
                              "cwlLeagueId": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "warSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "wins": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "losses": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "ties": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "warsFinished": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "totalClansInGroup": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "groupRank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "globalRank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "updatedAt": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "clanTag",
                              "season",
                              "cwlLeagueId",
                              "warSize",
                              "stars",
                              "destruction",
                              "wins",
                              "losses",
                              "ties",
                              "warsFinished",
                              "totalClansInGroup",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "season",
                          "state",
                          "rounds",
                          "clan"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "clanTag",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/dates/current": {
      "get": {
        "operationId": "dashboardCurrentDates",
        "summary": "Get current Clash event dates",
        "tags": [
          "Dates"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "season": {
                      "type": "string"
                    },
                    "raid": {
                      "type": "string"
                    },
                    "legend": {
                      "type": "string"
                    },
                    "clan-games": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "season",
                    "raid",
                    "legend",
                    "clan-games"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/dates/raid-weekends": {
      "get": {
        "operationId": "dashboardRaidWeekendDates",
        "summary": "Get raid weekend date identifiers",
        "tags": [
          "Dates"
        ],
        "security": [],
        "parameters": [
          {
            "name": "number_of_weeks",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/dates/season-raid-dates": {
      "get": {
        "operationId": "dashboardSeasonRaidDates",
        "summary": "Get raid weekend dates within a season",
        "tags": [
          "Dates"
        ],
        "security": [],
        "parameters": [
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/dates/season-start-end": {
      "get": {
        "operationId": "dashboardSeasonBounds",
        "summary": "Get season start and end timestamps",
        "tags": [
          "Dates"
        ],
        "security": [],
        "parameters": [
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gold_pass_season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "season_start": {
                      "type": "string"
                    },
                    "season_end": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "season_start",
                    "season_end"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/dates/seasons": {
      "get": {
        "operationId": "dashboardSeasonDates",
        "summary": "Get season date identifiers",
        "tags": [
          "Dates"
        ],
        "security": [],
        "parameters": [
          {
            "name": "number_of_seasons",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "as_text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/enums": {
      "get": {
        "operationId": "enumCatalog",
        "summary": "enumCatalog",
        "tags": [
          "Enums"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role_types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "role_modes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "log_types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "countdown_types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role_types",
                    "role_modes",
                    "log_types",
                    "countdown_types"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/enums/countdown-types": {
      "get": {
        "operationId": "enumCountdownTypes",
        "summary": "enumCountdownTypes",
        "tags": [
          "Enums"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "values",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/enums/log-types": {
      "get": {
        "operationId": "enumLogTypes",
        "summary": "enumLogTypes",
        "tags": [
          "Enums"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "values",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/enums/role-modes": {
      "get": {
        "operationId": "enumRoleModes",
        "summary": "enumRoleModes",
        "tags": [
          "Enums"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "values",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/enums/role-types": {
      "get": {
        "operationId": "enumRoleTypes",
        "summary": "enumRoleTypes",
        "tags": [
          "Enums"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "value",
                          "description",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "values",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/exports/war/cwl-summary": {
      "get": {
        "operationId": "downloadExpoCwlSummary",
        "summary": "Download a CWL summary workbook",
        "tags": [
          "Other"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/exports/war/player-stats": {
      "post": {
        "operationId": "downloadExpoPlayerWarStats",
        "summary": "Download a player war-statistics workbook",
        "tags": [
          "Other"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "player_tag": {
                    "type": "string"
                  },
                  "timestamp_start": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "timestamp_end": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "limit": {
                    "type": "integer"
                  }
                },
                "required": [
                  "player_tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/guild/{guildId}": {
      "get": {
        "operationId": "dashboardGuild",
        "summary": "Get one Discord guild",
        "tags": [
          "Other"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "guildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "owner_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "features": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "member_count": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "banner": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "premium_tier": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "boost_count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "icon",
                    "owner_id",
                    "features",
                    "member_count",
                    "description",
                    "banner",
                    "premium_tier",
                    "boost_count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/guilds": {
      "get": {
        "operationId": "dashboardGuilds",
        "summary": "List Dashboard-accessible Discord guilds",
        "tags": [
          "Other"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "icon": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "owner": {
                        "type": "boolean"
                      },
                      "permissions": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "features": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "has_bot": {
                        "type": "boolean"
                      },
                      "member_count": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "delegated": {
                        "type": "boolean"
                      },
                      "last_command_at": {
                        "type": "string"
                      },
                      "inactive": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "icon",
                      "owner",
                      "permissions",
                      "role",
                      "features",
                      "has_bot",
                      "delegated",
                      "inactive"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/health": {
      "get": {
        "operationId": "workerHealth",
        "summary": "Worker liveness only; does not check database or provider readiness",
        "tags": [
          "Health"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "runtime": {
                      "type": "string",
                      "enum": [
                        "cloudflare-worker"
                      ]
                    },
                    "version": {
                      "type": "string",
                      "enum": [
                        "0.1.0-rc.17"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "runtime",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/home/activity": {
      "post": {
        "operationId": "homeActivity",
        "summary": "Get account home activity",
        "tags": [
          "Activity & Inactivity"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string"
                  },
                  "mappings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_tag": {
                          "type": "string"
                        },
                        "clan_tag": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "player_tag",
                        "clan_tag"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "limit": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "account_id",
                  "mappings"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "join_leave"
                            ]
                          },
                          "timestamp": {
                            "type": "string"
                          },
                          "event_type": {
                            "type": "string"
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "timestamp",
                          "event_type",
                          "player_tag",
                          "clan_tag"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/initialization": {
      "post": {
        "operationId": "initializeMobileAccount",
        "summary": "Initialize mobile account data",
        "tags": [
          "Mobile App"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "player_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "clan_tags": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "player_tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "players": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "legends_by_season": {
                            "type": "object",
                            "additionalProperties": false
                          },
                          "legend_eos_ranking": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "season": {
                                  "type": "string"
                                },
                                "tag": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "expLevel": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "trophies": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "attackWins": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "defenseWins": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "rank": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "clan": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "badgeUrls": {
                                      "type": "object",
                                      "properties": {
                                        "small": {
                                          "type": "string"
                                        },
                                        "medium": {
                                          "type": "string"
                                        },
                                        "large": {
                                          "type": "string"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "leagueTier": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "iconUrls": {
                                      "type": "object",
                                      "properties": {
                                        "tiny": {
                                          "type": "string"
                                        },
                                        "small": {
                                          "type": "string"
                                        },
                                        "medium": {
                                          "type": "string"
                                        },
                                        "large": {
                                          "type": "string"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "season",
                                "tag",
                                "name",
                                "expLevel",
                                "trophies",
                                "attackWins",
                                "defenseWins",
                                "rank"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "rankings": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "homeVillage": {
                                "type": "object",
                                "properties": {
                                  "points": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "globalRank": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "localRank": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "locationId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "locationName": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "countryCode": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "points",
                                  "globalRank",
                                  "localRank",
                                  "locationId",
                                  "locationName",
                                  "countryCode"
                                ],
                                "additionalProperties": false
                              },
                              "builderBase": {
                                "type": "object",
                                "properties": {
                                  "points": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "globalRank": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "localRank": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "locationId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "locationName": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "countryCode": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "points",
                                  "globalRank",
                                  "localRank",
                                  "locationId",
                                  "locationName",
                                  "countryCode"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "homeVillage",
                              "builderBase"
                            ],
                            "additionalProperties": false
                          },
                          "war_data": {
                            "anyOf": [
                              {
                                "type": "object",
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "clan_tag": {
                                    "type": "string"
                                  },
                                  "isInWar": {
                                    "type": "boolean"
                                  },
                                  "isInCwl": {
                                    "type": "boolean"
                                  },
                                  "war_info": {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string"
                                      },
                                      "currentWarInfo": {
                                        "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_4"
                                      },
                                      "bypass": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "state"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "league_info": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "clans": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "badgeUrls": {
                                                  "anyOf": [
                                                    {
                                                      "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "clanLevel": {
                                                  "type": "integer"
                                                },
                                                "members": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "tag": {
                                                        "type": "string"
                                                      },
                                                      "townHallLevel": {
                                                        "type": "integer"
                                                      },
                                                      "avgMapPosition": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgOpponentPosition": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgAttackOrder": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgTownHallLevel": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgOpponentTownHallLevel": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgAttackerPosition": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgDefenseOrder": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "avgAttackerTownHallLevel": {
                                                        "anyOf": [
                                                          {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "attackLowerTHLevel": {
                                                        "type": "integer"
                                                      },
                                                      "attackUpperTHLevel": {
                                                        "type": "integer"
                                                      },
                                                      "defenseLowerTHLevel": {
                                                        "type": "integer"
                                                      },
                                                      "defenseUpperTHLevel": {
                                                        "type": "integer"
                                                      },
                                                      "attacks": {
                                                        "type": "object",
                                                        "properties": {
                                                          "stars": {
                                                            "type": "integer"
                                                          },
                                                          "3_stars": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "2_stars": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "1_star": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "0_star": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "total_destruction": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "attack_count": {
                                                            "type": "integer"
                                                          },
                                                          "missed_attacks": {
                                                            "type": "integer"
                                                          }
                                                        },
                                                        "required": [
                                                          "stars",
                                                          "3_stars",
                                                          "2_stars",
                                                          "1_star",
                                                          "0_star",
                                                          "total_destruction",
                                                          "attack_count",
                                                          "missed_attacks"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      "defense": {
                                                        "type": "object",
                                                        "properties": {
                                                          "stars": {
                                                            "type": "integer"
                                                          },
                                                          "3_stars": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "2_stars": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "1_star": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "0_star": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                              "type": "integer"
                                                            }
                                                          },
                                                          "total_destruction": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "defense_count": {
                                                            "type": "integer"
                                                          },
                                                          "missed_defenses": {
                                                            "type": "integer"
                                                          }
                                                        },
                                                        "required": [
                                                          "stars",
                                                          "3_stars",
                                                          "2_stars",
                                                          "1_star",
                                                          "0_star",
                                                          "total_destruction",
                                                          "defense_count",
                                                          "missed_defenses"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "name",
                                                      "tag",
                                                      "townHallLevel",
                                                      "avgMapPosition",
                                                      "avgOpponentPosition",
                                                      "avgAttackOrder",
                                                      "avgTownHallLevel",
                                                      "avgOpponentTownHallLevel",
                                                      "avgAttackerPosition",
                                                      "avgDefenseOrder",
                                                      "avgAttackerTownHallLevel",
                                                      "attackLowerTHLevel",
                                                      "attackUpperTHLevel",
                                                      "defenseLowerTHLevel",
                                                      "defenseUpperTHLevel",
                                                      "attacks",
                                                      "defense"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "warLeague": {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "iconUrls": {
                                                      "type": "object",
                                                      "properties": {
                                                        "small": {
                                                          "type": "string"
                                                        },
                                                        "medium": {
                                                          "type": "string"
                                                        },
                                                        "tiny": {
                                                          "type": "string"
                                                        },
                                                        "large": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "total_stars": {
                                                  "type": "integer"
                                                },
                                                "attack_count": {
                                                  "type": "integer"
                                                },
                                                "missed_attacks": {
                                                  "type": "integer"
                                                },
                                                "total_destruction": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "total_destruction_inflicted": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "wars_played": {
                                                  "type": "integer"
                                                },
                                                "rank": {
                                                  "type": "integer"
                                                },
                                                "town_hall_levels": {
                                                  "type": "object",
                                                  "additionalProperties": {
                                                    "type": "integer"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "clanLevel",
                                                "members",
                                                "name",
                                                "tag",
                                                "total_stars",
                                                "attack_count",
                                                "missed_attacks",
                                                "total_destruction",
                                                "total_destruction_inflicted",
                                                "wars_played",
                                                "rank",
                                                "town_hall_levels"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "rounds": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "warTags": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "warTags"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "season": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "state": {
                                            "type": "string"
                                          },
                                          "tag": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "war_league": {
                                            "type": "string"
                                          },
                                          "iconUrls": {
                                            "type": "object",
                                            "properties": {
                                              "small": {
                                                "type": "string"
                                              },
                                              "medium": {
                                                "type": "string"
                                              },
                                              "tiny": {
                                                "type": "string"
                                              },
                                              "large": {
                                                "type": "string"
                                              }
                                            },
                                            "additionalProperties": false
                                          },
                                          "total_stars": {
                                            "type": "integer"
                                          },
                                          "total_destruction": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "clans",
                                          "rounds",
                                          "state",
                                          "total_stars",
                                          "total_destruction"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "war_league_infos": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "attacksPerMember": {
                                          "anyOf": [
                                            {
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "battleModifier": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "clan": {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "endTime": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "opponent": {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "preparationStartTime": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "startTime": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "state": {
                                          "type": "string"
                                        },
                                        "teamSize": {
                                          "anyOf": [
                                            {
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "war_tag": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "war_tag"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "currentWarInfo": {
                                    "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_4"
                                  }
                                },
                                "required": [
                                  "clan_tag",
                                  "isInWar",
                                  "isInCwl",
                                  "war_info",
                                  "league_info",
                                  "war_league_infos"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "legends_by_season",
                          "legend_eos_ranking",
                          "rankings",
                          "war_data"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "players_basic": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_17"
                      }
                    },
                    "clans": {
                      "type": "object",
                      "properties": {
                        "clan_details": {
                          "type": "object",
                          "additionalProperties": {
                            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_25"
                          }
                        },
                        "clan_stats": {
                          "type": "object",
                          "additionalProperties": false
                        },
                        "war_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "clan_tag": {
                                "type": "string"
                              },
                              "isInWar": {
                                "type": "boolean"
                              },
                              "isInCwl": {
                                "type": "boolean"
                              },
                              "war_info": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string"
                                  },
                                  "currentWarInfo": {
                                    "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_4"
                                  },
                                  "bypass": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "state"
                                ],
                                "additionalProperties": false
                              },
                              "league_info": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "clans": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "badgeUrls": {
                                              "anyOf": [
                                                {
                                                  "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "clanLevel": {
                                              "type": "integer"
                                            },
                                            "members": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "tag": {
                                                    "type": "string"
                                                  },
                                                  "townHallLevel": {
                                                    "type": "integer"
                                                  },
                                                  "avgMapPosition": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgOpponentPosition": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgAttackOrder": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgTownHallLevel": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgOpponentTownHallLevel": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgAttackerPosition": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgDefenseOrder": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "avgAttackerTownHallLevel": {
                                                    "anyOf": [
                                                      {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "attackLowerTHLevel": {
                                                    "type": "integer"
                                                  },
                                                  "attackUpperTHLevel": {
                                                    "type": "integer"
                                                  },
                                                  "defenseLowerTHLevel": {
                                                    "type": "integer"
                                                  },
                                                  "defenseUpperTHLevel": {
                                                    "type": "integer"
                                                  },
                                                  "attacks": {
                                                    "type": "object",
                                                    "properties": {
                                                      "stars": {
                                                        "type": "integer"
                                                      },
                                                      "3_stars": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "2_stars": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "1_star": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "0_star": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "total_destruction": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "attack_count": {
                                                        "type": "integer"
                                                      },
                                                      "missed_attacks": {
                                                        "type": "integer"
                                                      }
                                                    },
                                                    "required": [
                                                      "stars",
                                                      "3_stars",
                                                      "2_stars",
                                                      "1_star",
                                                      "0_star",
                                                      "total_destruction",
                                                      "attack_count",
                                                      "missed_attacks"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  "defense": {
                                                    "type": "object",
                                                    "properties": {
                                                      "stars": {
                                                        "type": "integer"
                                                      },
                                                      "3_stars": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "2_stars": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "1_star": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "0_star": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                          "type": "integer"
                                                        }
                                                      },
                                                      "total_destruction": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "defense_count": {
                                                        "type": "integer"
                                                      },
                                                      "missed_defenses": {
                                                        "type": "integer"
                                                      }
                                                    },
                                                    "required": [
                                                      "stars",
                                                      "3_stars",
                                                      "2_stars",
                                                      "1_star",
                                                      "0_star",
                                                      "total_destruction",
                                                      "defense_count",
                                                      "missed_defenses"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "tag",
                                                  "townHallLevel",
                                                  "avgMapPosition",
                                                  "avgOpponentPosition",
                                                  "avgAttackOrder",
                                                  "avgTownHallLevel",
                                                  "avgOpponentTownHallLevel",
                                                  "avgAttackerPosition",
                                                  "avgDefenseOrder",
                                                  "avgAttackerTownHallLevel",
                                                  "attackLowerTHLevel",
                                                  "attackUpperTHLevel",
                                                  "defenseLowerTHLevel",
                                                  "defenseUpperTHLevel",
                                                  "attacks",
                                                  "defense"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "tag": {
                                              "type": "string"
                                            },
                                            "warLeague": {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "iconUrls": {
                                                  "type": "object",
                                                  "properties": {
                                                    "small": {
                                                      "type": "string"
                                                    },
                                                    "medium": {
                                                      "type": "string"
                                                    },
                                                    "tiny": {
                                                      "type": "string"
                                                    },
                                                    "large": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "name"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "total_stars": {
                                              "type": "integer"
                                            },
                                            "attack_count": {
                                              "type": "integer"
                                            },
                                            "missed_attacks": {
                                              "type": "integer"
                                            },
                                            "total_destruction": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "total_destruction_inflicted": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "wars_played": {
                                              "type": "integer"
                                            },
                                            "rank": {
                                              "type": "integer"
                                            },
                                            "town_hall_levels": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "integer"
                                              }
                                            }
                                          },
                                          "required": [
                                            "clanLevel",
                                            "members",
                                            "name",
                                            "tag",
                                            "total_stars",
                                            "attack_count",
                                            "missed_attacks",
                                            "total_destruction",
                                            "total_destruction_inflicted",
                                            "wars_played",
                                            "rank",
                                            "town_hall_levels"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "rounds": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "warTags": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          "required": [
                                            "warTags"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "season": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "state": {
                                        "type": "string"
                                      },
                                      "tag": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "war_league": {
                                        "type": "string"
                                      },
                                      "iconUrls": {
                                        "type": "object",
                                        "properties": {
                                          "small": {
                                            "type": "string"
                                          },
                                          "medium": {
                                            "type": "string"
                                          },
                                          "tiny": {
                                            "type": "string"
                                          },
                                          "large": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "total_stars": {
                                        "type": "integer"
                                      },
                                      "total_destruction": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "clans",
                                      "rounds",
                                      "state",
                                      "total_stars",
                                      "total_destruction"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "war_league_infos": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attacksPerMember": {
                                      "anyOf": [
                                        {
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "battleModifier": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "clan": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "endTime": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "opponent": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "preparationStartTime": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "startTime": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "state": {
                                      "type": "string"
                                    },
                                    "teamSize": {
                                      "anyOf": [
                                        {
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "war_tag": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "war_tag"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "clan_tag",
                              "isInWar",
                              "isInCwl",
                              "war_info",
                              "league_info",
                              "war_league_infos"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "capital_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "clan_tag": {
                                "type": "string"
                              },
                              "history": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_33"
                                }
                              }
                            },
                            "required": [
                              "clan_tag",
                              "history"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "war_log_data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "clan_tag": {
                                "type": "string"
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_34"
                                }
                              }
                            },
                            "required": [
                              "clan_tag",
                              "items"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "clan_war_stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "clan_tag": {
                                "type": "string"
                              },
                              "players": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "stats": {
                                      "type": "object",
                                      "properties": {
                                        "all": {
                                          "type": "object",
                                          "properties": {
                                            "warsCounts": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "starsCount": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "starsCountDef": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "byEnemyTownhall": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "byEnemyTownhallDef": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "warsCounts",
                                            "totalAttacks",
                                            "totalDefenses",
                                            "missedAttacks",
                                            "missedDefenses",
                                            "starsCount",
                                            "starsCountDef",
                                            "byEnemyTownhall",
                                            "byEnemyTownhallDef"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "random": {
                                          "type": "object",
                                          "properties": {
                                            "warsCounts": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "starsCount": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "starsCountDef": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "byEnemyTownhall": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "byEnemyTownhallDef": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "warsCounts",
                                            "totalAttacks",
                                            "totalDefenses",
                                            "missedAttacks",
                                            "missedDefenses",
                                            "starsCount",
                                            "starsCountDef",
                                            "byEnemyTownhall",
                                            "byEnemyTownhallDef"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "cwl": {
                                          "type": "object",
                                          "properties": {
                                            "warsCounts": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "starsCount": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "starsCountDef": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "byEnemyTownhall": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "byEnemyTownhallDef": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "warsCounts",
                                            "totalAttacks",
                                            "totalDefenses",
                                            "missedAttacks",
                                            "missedDefenses",
                                            "starsCount",
                                            "starsCountDef",
                                            "byEnemyTownhall",
                                            "byEnemyTownhallDef"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "friendly": {
                                          "type": "object",
                                          "properties": {
                                            "warsCounts": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "totalDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedAttacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "missedDefenses": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "starsCount": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "starsCountDef": {
                                              "type": "object",
                                              "properties": {
                                                "0": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "1": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "2": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "3": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "0",
                                                "1",
                                                "2",
                                                "3"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "byEnemyTownhall": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "byEnemyTownhallDef": {
                                              "type": "object",
                                              "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                  "averageStars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "averageDestruction": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "count": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "starsCount": {
                                                    "type": "object",
                                                    "properties": {
                                                      "0": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "1": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "2": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "3": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "0",
                                                      "1",
                                                      "2",
                                                      "3"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "averageStars",
                                                  "averageDestruction",
                                                  "count",
                                                  "starsCount"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "warsCounts",
                                            "totalAttacks",
                                            "totalDefenses",
                                            "missedAttacks",
                                            "missedDefenses",
                                            "starsCount",
                                            "starsCountDef",
                                            "byEnemyTownhall",
                                            "byEnemyTownhallDef"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "all",
                                        "random",
                                        "cwl",
                                        "friendly"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "timeRange": {
                                      "type": "object",
                                      "properties": {
                                        "start": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "end": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "start",
                                        "end"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "wars": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "war_data": {
                                            "type": "object",
                                            "properties": {
                                              "state": {
                                                "type": "string"
                                              },
                                              "teamSize": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "attacksPerMember": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "battleModifier": {
                                                "type": "string"
                                              },
                                              "preparationStartTime": {
                                                "type": "string"
                                              },
                                              "startTime": {
                                                "type": "string"
                                              },
                                              "endTime": {
                                                "type": "string"
                                              },
                                              "clan": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "tag": {
                                                    "type": "string"
                                                  },
                                                  "badgeUrls": {
                                                    "type": "object",
                                                    "properties": {
                                                      "small": {
                                                        "type": "string"
                                                      },
                                                      "large": {
                                                        "type": "string"
                                                      },
                                                      "medium": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "small",
                                                      "large",
                                                      "medium"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  "clanLevel": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "attacks": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "tag",
                                                  "badgeUrls",
                                                  "clanLevel",
                                                  "attacks",
                                                  "stars",
                                                  "destructionPercentage"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "opponent": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "tag": {
                                                    "type": "string"
                                                  },
                                                  "badgeUrls": {
                                                    "type": "object",
                                                    "properties": {
                                                      "small": {
                                                        "type": "string"
                                                      },
                                                      "large": {
                                                        "type": "string"
                                                      },
                                                      "medium": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "small",
                                                      "large",
                                                      "medium"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  "clanLevel": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "attacks": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "stars": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  "destructionPercentage": {
                                                    "anyOf": [
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "NaN"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "Infinity"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "-Infinity"
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "tag",
                                                  "badgeUrls",
                                                  "clanLevel",
                                                  "attacks",
                                                  "stars",
                                                  "destructionPercentage"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "warStartTime": {
                                                "type": "string"
                                              },
                                              "tag": {
                                                "type": "string"
                                              },
                                              "type": {
                                                "type": "string"
                                              },
                                              "war_id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "state",
                                              "teamSize",
                                              "preparationStartTime",
                                              "endTime",
                                              "clan",
                                              "opponent",
                                              "type",
                                              "war_id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "members": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "townhallLevel": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "mapPosition": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "opponentAttacks": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "attacks": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "attackerTag": {
                                                        "type": "string"
                                                      },
                                                      "defenderTag": {
                                                        "type": "string"
                                                      },
                                                      "stars": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "destructionPercentage": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "order": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "duration": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "attacker": {
                                                        "type": "object",
                                                        "properties": {
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "tag": {
                                                            "type": "string"
                                                          },
                                                          "townhallLevel": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "mapPosition": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "opponentAttacks": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name",
                                                          "tag",
                                                          "townhallLevel",
                                                          "mapPosition",
                                                          "opponentAttacks"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      "defender": {
                                                        "type": "object",
                                                        "properties": {
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "tag": {
                                                            "type": "string"
                                                          },
                                                          "townhallLevel": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "mapPosition": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "opponentAttacks": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name",
                                                          "tag",
                                                          "townhallLevel",
                                                          "mapPosition",
                                                          "opponentAttacks"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      "attack_order": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "fresh": {
                                                        "type": "boolean"
                                                      },
                                                      "war_type": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "attackerTag",
                                                      "defenderTag",
                                                      "stars",
                                                      "destructionPercentage",
                                                      "order",
                                                      "duration",
                                                      "attacker",
                                                      "attack_order",
                                                      "fresh",
                                                      "war_type"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "defenses": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "attackerTag": {
                                                        "type": "string"
                                                      },
                                                      "defenderTag": {
                                                        "type": "string"
                                                      },
                                                      "stars": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "destructionPercentage": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "order": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "duration": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "attacker": {
                                                        "type": "object",
                                                        "properties": {
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "tag": {
                                                            "type": "string"
                                                          },
                                                          "townhallLevel": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "mapPosition": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "opponentAttacks": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name",
                                                          "tag",
                                                          "townhallLevel",
                                                          "mapPosition",
                                                          "opponentAttacks"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      "defender": {
                                                        "type": "object",
                                                        "properties": {
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "tag": {
                                                            "type": "string"
                                                          },
                                                          "townhallLevel": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "mapPosition": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          },
                                                          "opponentAttacks": {
                                                            "anyOf": [
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "NaN"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "Infinity"
                                                                ]
                                                              },
                                                              {
                                                                "type": "string",
                                                                "enum": [
                                                                  "-Infinity"
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "name",
                                                          "tag",
                                                          "townhallLevel",
                                                          "mapPosition",
                                                          "opponentAttacks"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      "attack_order": {
                                                        "anyOf": [
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "NaN"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "Infinity"
                                                            ]
                                                          },
                                                          {
                                                            "type": "string",
                                                            "enum": [
                                                              "-Infinity"
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      "fresh": {
                                                        "type": "boolean"
                                                      },
                                                      "war_type": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "attackerTag",
                                                      "defenderTag",
                                                      "stars",
                                                      "destructionPercentage",
                                                      "order",
                                                      "duration",
                                                      "attacker",
                                                      "attack_order",
                                                      "fresh",
                                                      "war_type"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "tag",
                                                "townhallLevel",
                                                "mapPosition",
                                                "opponentAttacks",
                                                "attacks",
                                                "defenses"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "missedAttacks": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "missedDefenses": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "war_data",
                                          "members",
                                          "missedAttacks",
                                          "missedDefenses"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "tag",
                                    "townhallLevel",
                                    "stats",
                                    "timeRange",
                                    "wars"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "wars": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "war_data": {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string"
                                        },
                                        "teamSize": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacksPerMember": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "battleModifier": {
                                          "type": "string"
                                        },
                                        "preparationStartTime": {
                                          "type": "string"
                                        },
                                        "startTime": {
                                          "type": "string"
                                        },
                                        "endTime": {
                                          "type": "string"
                                        },
                                        "clan": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "tag": {
                                              "type": "string"
                                            },
                                            "badgeUrls": {
                                              "type": "object",
                                              "properties": {
                                                "small": {
                                                  "type": "string"
                                                },
                                                "large": {
                                                  "type": "string"
                                                },
                                                "medium": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "small",
                                                "large",
                                                "medium"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "clanLevel": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "attacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "tag",
                                            "badgeUrls",
                                            "clanLevel",
                                            "attacks",
                                            "stars",
                                            "destructionPercentage"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "opponent": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "tag": {
                                              "type": "string"
                                            },
                                            "badgeUrls": {
                                              "type": "object",
                                              "properties": {
                                                "small": {
                                                  "type": "string"
                                                },
                                                "large": {
                                                  "type": "string"
                                                },
                                                "medium": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "small",
                                                "large",
                                                "medium"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "clanLevel": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "attacks": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "tag",
                                            "badgeUrls",
                                            "clanLevel",
                                            "attacks",
                                            "stars",
                                            "destructionPercentage"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "warStartTime": {
                                          "type": "string"
                                        },
                                        "tag": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string"
                                        },
                                        "war_id": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "teamSize",
                                        "preparationStartTime",
                                        "endTime",
                                        "clan",
                                        "opponent",
                                        "type",
                                        "war_id"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "members": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "tag": {
                                            "type": "string"
                                          },
                                          "townhallLevel": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "mapPosition": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "opponentAttacks": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "attacks": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "attackerTag": {
                                                  "type": "string"
                                                },
                                                "defenderTag": {
                                                  "type": "string"
                                                },
                                                "stars": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "destructionPercentage": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "order": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "duration": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "attacker": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "tag": {
                                                      "type": "string"
                                                    },
                                                    "townhallLevel": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "mapPosition": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "opponentAttacks": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "tag",
                                                    "townhallLevel",
                                                    "mapPosition",
                                                    "opponentAttacks"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "defender": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "tag": {
                                                      "type": "string"
                                                    },
                                                    "townhallLevel": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "mapPosition": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "opponentAttacks": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "tag",
                                                    "townhallLevel",
                                                    "mapPosition",
                                                    "opponentAttacks"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "attack_order": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "fresh": {
                                                  "type": "boolean"
                                                },
                                                "war_type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "attackerTag",
                                                "defenderTag",
                                                "stars",
                                                "destructionPercentage",
                                                "order",
                                                "duration",
                                                "attacker",
                                                "attack_order",
                                                "fresh",
                                                "war_type"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "defenses": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "attackerTag": {
                                                  "type": "string"
                                                },
                                                "defenderTag": {
                                                  "type": "string"
                                                },
                                                "stars": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "destructionPercentage": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "order": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "duration": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "attacker": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "tag": {
                                                      "type": "string"
                                                    },
                                                    "townhallLevel": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "mapPosition": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "opponentAttacks": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "tag",
                                                    "townhallLevel",
                                                    "mapPosition",
                                                    "opponentAttacks"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "defender": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "tag": {
                                                      "type": "string"
                                                    },
                                                    "townhallLevel": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "mapPosition": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "opponentAttacks": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "NaN"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "Infinity"
                                                          ]
                                                        },
                                                        {
                                                          "type": "string",
                                                          "enum": [
                                                            "-Infinity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "tag",
                                                    "townhallLevel",
                                                    "mapPosition",
                                                    "opponentAttacks"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "attack_order": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "fresh": {
                                                  "type": "boolean"
                                                },
                                                "war_type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "attackerTag",
                                                "defenderTag",
                                                "stars",
                                                "destructionPercentage",
                                                "order",
                                                "duration",
                                                "attacker",
                                                "attack_order",
                                                "fresh",
                                                "war_type"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "tag",
                                          "townhallLevel",
                                          "mapPosition",
                                          "opponentAttacks",
                                          "attacks",
                                          "defenses"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "war_data",
                                    "members"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "clan_tag",
                              "players",
                              "wars"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "cwl_data": {
                          "type": "array",
                          "items": {
                            "not": {}
                          }
                        }
                      },
                      "required": [
                        "clan_details",
                        "clan_stats",
                        "war_data",
                        "capital_data",
                        "war_log_data",
                        "clan_war_stats",
                        "cwl_data"
                      ],
                      "additionalProperties": false
                    },
                    "war_stats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "townhallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "stats": {
                            "type": "object",
                            "properties": {
                              "all": {
                                "type": "object",
                                "properties": {
                                  "warsCounts": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "starsCount": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "starsCountDef": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "byEnemyTownhall": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "byEnemyTownhallDef": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "warsCounts",
                                  "totalAttacks",
                                  "totalDefenses",
                                  "missedAttacks",
                                  "missedDefenses",
                                  "starsCount",
                                  "starsCountDef",
                                  "byEnemyTownhall",
                                  "byEnemyTownhallDef"
                                ],
                                "additionalProperties": false
                              },
                              "random": {
                                "type": "object",
                                "properties": {
                                  "warsCounts": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "starsCount": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "starsCountDef": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "byEnemyTownhall": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "byEnemyTownhallDef": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "warsCounts",
                                  "totalAttacks",
                                  "totalDefenses",
                                  "missedAttacks",
                                  "missedDefenses",
                                  "starsCount",
                                  "starsCountDef",
                                  "byEnemyTownhall",
                                  "byEnemyTownhallDef"
                                ],
                                "additionalProperties": false
                              },
                              "cwl": {
                                "type": "object",
                                "properties": {
                                  "warsCounts": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "starsCount": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "starsCountDef": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "byEnemyTownhall": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "byEnemyTownhallDef": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "warsCounts",
                                  "totalAttacks",
                                  "totalDefenses",
                                  "missedAttacks",
                                  "missedDefenses",
                                  "starsCount",
                                  "starsCountDef",
                                  "byEnemyTownhall",
                                  "byEnemyTownhallDef"
                                ],
                                "additionalProperties": false
                              },
                              "friendly": {
                                "type": "object",
                                "properties": {
                                  "warsCounts": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "totalDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedAttacks": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "missedDefenses": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "starsCount": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "starsCountDef": {
                                    "type": "object",
                                    "properties": {
                                      "0": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "1": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "2": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "3": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "0",
                                      "1",
                                      "2",
                                      "3"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "byEnemyTownhall": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "byEnemyTownhallDef": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "averageStars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "averageDestruction": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "count": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "starsCount": {
                                          "type": "object",
                                          "properties": {
                                            "0": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "1": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "2": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "3": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "0",
                                            "1",
                                            "2",
                                            "3"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "averageStars",
                                        "averageDestruction",
                                        "count",
                                        "starsCount"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "warsCounts",
                                  "totalAttacks",
                                  "totalDefenses",
                                  "missedAttacks",
                                  "missedDefenses",
                                  "starsCount",
                                  "starsCountDef",
                                  "byEnemyTownhall",
                                  "byEnemyTownhallDef"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "all",
                              "random",
                              "cwl",
                              "friendly"
                            ],
                            "additionalProperties": false
                          },
                          "timeRange": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "end": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "start",
                              "end"
                            ],
                            "additionalProperties": false
                          },
                          "wars": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "war_data": {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string"
                                    },
                                    "teamSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacksPerMember": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "battleModifier": {
                                      "type": "string"
                                    },
                                    "preparationStartTime": {
                                      "type": "string"
                                    },
                                    "startTime": {
                                      "type": "string"
                                    },
                                    "endTime": {
                                      "type": "string"
                                    },
                                    "clan": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "tag": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "tag",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "opponent": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "tag": {
                                          "type": "string"
                                        },
                                        "badgeUrls": {
                                          "type": "object",
                                          "properties": {
                                            "small": {
                                              "type": "string"
                                            },
                                            "large": {
                                              "type": "string"
                                            },
                                            "medium": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "small",
                                            "large",
                                            "medium"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "clanLevel": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "attacks": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "tag",
                                        "badgeUrls",
                                        "clanLevel",
                                        "attacks",
                                        "stars",
                                        "destructionPercentage"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "warStartTime": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "war_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "teamSize",
                                    "preparationStartTime",
                                    "endTime",
                                    "clan",
                                    "opponent",
                                    "type",
                                    "war_id"
                                  ],
                                  "additionalProperties": false
                                },
                                "members": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string"
                                      },
                                      "tag": {
                                        "type": "string"
                                      },
                                      "townhallLevel": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "mapPosition": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "opponentAttacks": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "attacks": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "attackerTag": {
                                              "type": "string"
                                            },
                                            "defenderTag": {
                                              "type": "string"
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "duration": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "attacker": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "townhallLevel": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "mapPosition": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "opponentAttacks": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "tag",
                                                "townhallLevel",
                                                "mapPosition",
                                                "opponentAttacks"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "defender": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "townhallLevel": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "mapPosition": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "opponentAttacks": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "tag",
                                                "townhallLevel",
                                                "mapPosition",
                                                "opponentAttacks"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "attack_order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "fresh": {
                                              "type": "boolean"
                                            },
                                            "war_type": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "attackerTag",
                                            "defenderTag",
                                            "stars",
                                            "destructionPercentage",
                                            "order",
                                            "duration",
                                            "attacker",
                                            "attack_order",
                                            "fresh",
                                            "war_type"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "defenses": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "attackerTag": {
                                              "type": "string"
                                            },
                                            "defenderTag": {
                                              "type": "string"
                                            },
                                            "stars": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "destructionPercentage": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "duration": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "attacker": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "townhallLevel": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "mapPosition": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "opponentAttacks": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "tag",
                                                "townhallLevel",
                                                "mapPosition",
                                                "opponentAttacks"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "defender": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "tag": {
                                                  "type": "string"
                                                },
                                                "townhallLevel": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "mapPosition": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "opponentAttacks": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "NaN"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "Infinity"
                                                      ]
                                                    },
                                                    {
                                                      "type": "string",
                                                      "enum": [
                                                        "-Infinity"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "tag",
                                                "townhallLevel",
                                                "mapPosition",
                                                "opponentAttacks"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "attack_order": {
                                              "anyOf": [
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "NaN"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "Infinity"
                                                  ]
                                                },
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "-Infinity"
                                                  ]
                                                }
                                              ]
                                            },
                                            "fresh": {
                                              "type": "boolean"
                                            },
                                            "war_type": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "attackerTag",
                                            "defenderTag",
                                            "stars",
                                            "destructionPercentage",
                                            "order",
                                            "duration",
                                            "attacker",
                                            "attack_order",
                                            "fresh",
                                            "war_type"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "tag",
                                      "townhallLevel",
                                      "mapPosition",
                                      "opponentAttacks",
                                      "attacks",
                                      "defenses"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "missedAttacks": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "missedDefenses": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "war_data",
                                "members",
                                "missedAttacks",
                                "missedDefenses"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "name",
                          "tag",
                          "townhallLevel",
                          "stats",
                          "timeRange",
                          "wars"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clan_tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total_players": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "total_clans": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "fetch_time": {
                          "type": "string"
                        },
                        "user_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "total_players",
                        "total_clans",
                        "fetch_time",
                        "user_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "players",
                    "players_basic",
                    "clans",
                    "war_stats",
                    "clan_tags",
                    "metadata"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/leaderboard/{leagueTierId}/trophy-buckets": {
      "get": {
        "operationId": "getTrophyBuckets",
        "summary": "Get current trophy buckets for a league tier",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "leagueTierId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "league_tier_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bucket": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "players": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "bucket",
                          "players",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "league_tier_id",
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/leaderboard/{locationId}/clan/capital-gold": {
      "get": {
        "operationId": "botClanCapitalLeaderboard",
        "summary": "Get clan capital-gold leaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "location_id": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "badge_url": {
                            "type": "string"
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          },
                          "donations": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_wins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_gold_total": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_win_streak": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "badge_url",
                          "badgeUrls",
                          "war_win_streak"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/leaderboard/{locationId}/clan/donations": {
      "get": {
        "operationId": "getExpoClanDonationsLeaderboard",
        "summary": "getExpoClanDonationsLeaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "location_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "kind": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "badge_url": {
                            "type": "string"
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "large"
                            ],
                            "additionalProperties": false
                          },
                          "donations": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_wins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_gold_total": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_win_streak": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "badge_url",
                          "badgeUrls",
                          "war_win_streak"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanDonationsLeaderboard",
          "getExpoClanDonationsLeaderboard"
        ]
      }
    },
    "/v2/leaderboard/{locationId}/clan/war-wins": {
      "get": {
        "operationId": "getExpoClanWarWinsLeaderboard",
        "summary": "getExpoClanWarWinsLeaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "location_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "kind": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "badge_url": {
                            "type": "string"
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "large"
                            ],
                            "additionalProperties": false
                          },
                          "donations": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_wins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_gold_total": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_win_streak": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "badge_url",
                          "badgeUrls",
                          "war_win_streak"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanWarWinsLeaderboard",
          "getExpoClanWarWinsLeaderboard"
        ]
      }
    },
    "/v2/leaderboard/clan/win-streak": {
      "get": {
        "operationId": "getExpoClanWinStreakLeaderboard",
        "summary": "Get the clan win streak leaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "location_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "kind": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "badge_url": {
                            "type": "string"
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "large"
                            ],
                            "additionalProperties": false
                          },
                          "donations": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_wins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capital_gold_total": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "war_win_streak": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "badge_url",
                          "badgeUrls",
                          "war_win_streak"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botClanWinStreakLeaderboard",
          "getExpoClanWinStreakLeaderboard"
        ]
      }
    },
    "/v2/leaderboard/cwl/{leagueId}": {
      "get": {
        "operationId": "botCwlLeaderboard",
        "summary": "Get CWL leaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_size",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "season": {
                      "type": "string"
                    },
                    "cwlLeagueId": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "warSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clanTag": {
                            "type": "string"
                          },
                          "season": {
                            "type": "string"
                          },
                          "cwlLeagueId": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "warSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "stars": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "destruction": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "wins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "losses": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "ties": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "warsFinished": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "totalClansInGroup": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "groupRank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "globalRank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "clanTag",
                          "season",
                          "cwlLeagueId",
                          "warSize",
                          "stars",
                          "destruction",
                          "wins",
                          "losses",
                          "ties",
                          "warsFinished",
                          "totalClansInGroup",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "season",
                    "cwlLeagueId",
                    "warSize",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/leaderboard/history/{leaderboardType}/{locationId}/{date}": {
      "get": {
        "operationId": "getExpoLeaderboardHistory",
        "summary": "Get a historical leaderboard snapshot",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "leaderboardType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "player_home_trophies",
                        "player_builder_base_trophies",
                        "clan_home_points",
                        "clan_builder_base_points",
                        "clan_capital_points"
                      ]
                    },
                    "locationId": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "expLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenseWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "builderBaseTrophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "builderBaseBattleWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "large"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls"
                            ],
                            "additionalProperties": false
                          },
                          "league": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "leagueTier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "builderBaseLeague": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "large"
                            ],
                            "additionalProperties": false
                          },
                          "clanLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clanPoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "builderBasePoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "capitalPoints": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "members": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "isCountry": {
                                "type": "boolean"
                              },
                              "countryCode": {
                                "type": "string"
                              },
                              "localizedName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "isCountry"
                            ],
                            "additionalProperties": false
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "previousRank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "rank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "type",
                    "locationId",
                    "date",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/leaderboard/league/{leagueTierId}": {
      "get": {
        "operationId": "getExpoLeagueLeaderboard",
        "summary": "Get the ranked league leaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "leagueTierId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "league_tier_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "townhall_level": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "leagueGroupId": {
                            "type": "string"
                          },
                          "league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "badge": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "badge"
                            ],
                            "additionalProperties": false
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badge": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "tag",
                              "badge"
                            ],
                            "additionalProperties": false
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "country_code": {
                            "type": "string"
                          },
                          "country_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "rank",
                          "tag",
                          "name",
                          "leagueGroupId",
                          "townhall_level",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "generated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botLeagueLeaderboard",
          "getExpoLeagueLeaderboard"
        ]
      }
    },
    "/v2/leaderboard/townhalls/{townhallLevel}": {
      "get": {
        "operationId": "getExpoTownhallLeaderboard",
        "summary": "Get the town hall leaderboard",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "townhallLevel",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "league_tier_id": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "townhall_level": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "leagueGroupId": {
                            "type": "string"
                          },
                          "league_id": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "league": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "badge": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "badge"
                            ],
                            "additionalProperties": false
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badge": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "tag",
                              "badge"
                            ],
                            "additionalProperties": false
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "country_code": {
                            "type": "string"
                          },
                          "country_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "rank",
                          "tag",
                          "name",
                          "leagueGroupId",
                          "townhall_level",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "generated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botTownHallLeaderboard",
          "getExpoTownhallLeaderboard"
        ]
      }
    },
    "/v2/legends/days": {
      "post": {
        "operationId": "getLegendDaySummaries",
        "summary": "Get one Legend day's trophy summaries for up to 100 players",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "day",
                  "tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "attackTrophies": {
                            "type": "integer"
                          },
                          "defenseTrophies": {
                            "type": "integer"
                          },
                          "netTrophies": {
                            "type": "integer"
                          },
                          "attacks": {
                            "type": "integer"
                          },
                          "defenses": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "tag",
                          "attackTrophies",
                          "defenseTrophies",
                          "netTrophies",
                          "attacks",
                          "defenses"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/legends/history/{season}": {
      "get": {
        "operationId": "botLegendSeason",
        "summary": "Get Legend season history",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "expLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenseWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "leagueTier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "season",
                          "tag",
                          "name",
                          "expLevel",
                          "trophies",
                          "attackWins",
                          "defenseWins",
                          "rank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/legends/ranks": {
      "post": {
        "operationId": "getLegendRanks",
        "summary": "Get current Legend ranks for up to 100 players",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "trophies": {
                            "type": "integer"
                          },
                          "globalRank": {
                            "type": "integer"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "tag",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              },
                              "isCountry": {
                                "type": "boolean"
                              },
                              "countryCode": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "isCountry"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "trophies",
                          "globalRank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/legends/ranks/history": {
      "post": {
        "operationId": "getHistoricalLegendRanks",
        "summary": "Get one daily Legend rank snapshot for up to 100 players",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "day",
                  "tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "trophies": {
                            "type": "integer"
                          },
                          "globalRank": {
                            "type": "integer"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "tag",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              },
                              "isCountry": {
                                "type": "boolean"
                              },
                              "countryCode": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "isCountry"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "trophies",
                          "globalRank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/legends/trophy-buckets": {
      "get": {
        "operationId": "getLegendTrophyBuckets",
        "summary": "Get current Legend trophy buckets",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "minimumTrophies": {
                            "type": "integer"
                          },
                          "maximumTrophies": {
                            "type": "integer"
                          },
                          "playerCount": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "minimumTrophies",
                          "maximumTrophies",
                          "playerCount"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/legends/trophy-buckets/{day}": {
      "get": {
        "operationId": "getHistoricalLegendTrophyBuckets",
        "summary": "Get historical Legend trophy buckets",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "minimumTrophies": {
                            "type": "integer"
                          },
                          "maximumTrophies": {
                            "type": "integer"
                          },
                          "playerCount": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "minimumTrophies",
                          "maximumTrophies",
                          "playerCount"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/links/{userId}": {
      "get": {
        "operationId": "listExpoLinks",
        "summary": "List a user's linked Clash accounts",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "user_id": {
                            "type": "string"
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "order_index": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "is_verified": {
                            "type": "boolean"
                          },
                          "hidden": {
                            "type": "boolean"
                          },
                          "added_at": {
                            "type": "string"
                          },
                          "verified_at": {
                            "type": "string"
                          },
                          "last_login": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "user_id",
                          "player_tag",
                          "order_index",
                          "is_verified",
                          "hidden",
                          "added_at",
                          "last_login"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "botAccounts",
          "dashboardLinksList",
          "listExpoLinks"
        ]
      },
      "post": {
        "operationId": "addExpoLink",
        "summary": "Link a Clash account to a user",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "player_tag": {
                    "type": "string"
                  },
                  "api_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "player_tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "townHallLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "is_verified": {
                          "type": "boolean"
                        },
                        "hidden": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "townHallLevel",
                        "is_verified",
                        "hidden"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "conflict"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "townHallLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "is_verified": {
                          "type": "boolean"
                        },
                        "hidden": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "townHallLevel",
                        "is_verified",
                        "hidden"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "addExpoLink",
          "botLinkAccount",
          "dashboardLinksAdd"
        ]
      }
    },
    "/v2/links/{userId}/{playerTag}": {
      "delete": {
        "operationId": "removeExpoLink",
        "summary": "Remove a linked Clash account",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "botUnlinkAccount",
          "dashboardLinksRemove",
          "removeExpoLink"
        ]
      },
      "patch": {
        "operationId": "updateExpoLinkVisibility",
        "summary": "Update linked-account visibility",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hidden": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "hidden"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "order_index": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "is_verified": {
                      "type": "boolean"
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "added_at": {
                      "type": "string"
                    },
                    "verified_at": {
                      "type": "string"
                    },
                    "last_login": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "user_id",
                    "player_tag",
                    "order_index",
                    "is_verified",
                    "hidden",
                    "added_at",
                    "last_login"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "dashboardLinksVisibility",
          "updateExpoLinkVisibility"
        ]
      }
    },
    "/v2/links/{userId}/{playerTag}/upgrade-preferences": {
      "get": {
        "operationId": "getExpoUpgradePreferences",
        "summary": "Get saved upgrade preferences",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string"
                    },
                    "preferences": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Schema_00c373bb92a8faf6_0"
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_tag",
                    "preferences",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      },
      "patch": {
        "operationId": "patchExpoUpgradePreferences",
        "summary": "Update saved upgrade preferences",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "preferences": {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/Schema_e27a3de76765204b_0"
                    }
                  }
                },
                "required": [
                  "preferences"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string"
                    },
                    "preferences": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Schema_00c373bb92a8faf6_0"
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_tag",
                    "preferences",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/{userId}/{playerTag}/upgrades": {
      "get": {
        "operationId": "getExpoUpgrades",
        "summary": "Get saved upgrade state",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Schema_f18bc5b3778ee643_0"
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_tag",
                    "data",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      },
      "put": {
        "operationId": "putExpoUpgrades",
        "summary": "Replace saved upgrade state",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/Schema_7d0628ce0008d723_0"
                    }
                  }
                },
                "required": [
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/Schema_f18bc5b3778ee643_0"
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_tag",
                    "data",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/{userId}/bookmarks": {
      "get": {
        "operationId": "listExpoBookmarks",
        "summary": "List a user's bookmarks",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "player",
                "clan"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "player",
                              "clan"
                            ]
                          },
                          "tag": {
                            "type": "string"
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "order_index": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "tag",
                          "order_index",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      },
      "post": {
        "operationId": "addExpoBookmark",
        "summary": "Create a bookmark",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "player",
                      "clan"
                    ]
                  },
                  "tag": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "player",
                        "clan"
                      ]
                    },
                    "tag": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "order_index": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "tag",
                    "order_index",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/{userId}/bookmarks/{type}/{tag}": {
      "delete": {
        "operationId": "deleteExpoBookmark",
        "summary": "Delete a bookmark",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "player",
                "clan"
              ]
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/{userId}/bookmarks/order": {
      "put": {
        "operationId": "orderExpoBookmarks",
        "summary": "Reorder bookmarks",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "player",
                      "clan"
                    ]
                  },
                  "ordered_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "type",
                  "ordered_tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/{userId}/order": {
      "put": {
        "operationId": "orderExpoLinks",
        "summary": "Reorder linked Clash accounts",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ordered_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ordered_tags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "dashboardLinksOrder",
          "orderExpoLinks"
        ]
      }
    },
    "/v2/links/{userId}/searches": {
      "get": {
        "operationId": "listExpoRecentSearches",
        "summary": "List recent searches",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "players": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "large"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "league": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tag",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "badgeUrls": {
                            "type": "object",
                            "properties": {
                              "small": {
                                "type": "string"
                              },
                              "medium": {
                                "type": "string"
                              },
                              "large": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "large"
                            ],
                            "additionalProperties": false
                          },
                          "members": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tag",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "players",
                    "clans"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/links/server/{serverId}": {
      "delete": {
        "operationId": "deleteServerLink",
        "summary": "Delete a link only after Clash confirms the player is gone",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "playerTag",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "user_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    }
                  },
                  "required": [
                    "message",
                    "player_tag",
                    "user_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "serverLinks",
        "summary": "List linked accounts for Discord server members",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "user_id": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "avatar_url": {
                            "type": "string"
                          },
                          "linked_accounts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "player_tag": {
                                  "type": "string"
                                },
                                "player_name": {
                                  "type": "string"
                                },
                                "town_hall": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "is_verified": {
                                  "type": "boolean"
                                },
                                "added_at": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "player_tag",
                                "is_verified",
                                "added_at"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "account_count": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "user_id",
                          "username",
                          "display_name",
                          "avatar_url",
                          "linked_accounts",
                          "account_count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "position"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total_members": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "filtered_members": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "members_with_links": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_linked_accounts": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "verified_accounts": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "members",
                    "roles",
                    "total_members",
                    "filtered_members",
                    "members_with_links",
                    "total_linked_accounts",
                    "verified_accounts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botServerLinks",
          "serverLinks"
        ]
      },
      "post": {
        "operationId": "createServerLink",
        "summary": "Link a server member account under the server token and canonical ownership policies",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "playerTag": {
                    "type": "string"
                  },
                  "userID": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "api_token": {
                    "type": "string",
                    "maxLength": 128
                  }
                },
                "required": [
                  "playerTag",
                  "userID"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "user_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    }
                  },
                  "required": [
                    "message",
                    "player_tag",
                    "user_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/links/shared": {
      "post": {
        "operationId": "sharedLinksLookup",
        "summary": "Look up visible shared player links",
        "tags": [
          "Links"
        ],
        "security": [
          {
            "DeveloperToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "discord_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    }
                  },
                  "player_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "is_verified": {
                            "type": "boolean"
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "user_id": {
                            "type": "string",
                            "pattern": "^\\d{1,20}$",
                            "description": "Discord snowflake as an unsigned decimal string"
                          }
                        },
                        "required": [
                          "is_verified",
                          "player_tag",
                          "user_id"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "developer"
      }
    },
    "/v2/media/{filename}": {
      "get": {
        "operationId": "mediaFile",
        "summary": "Stream an explicitly public R2 media object",
        "tags": [
          "Media"
        ],
        "security": [],
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:base|giveaway|embed)_[a-z0-9_-]+[.][a-z0-9]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/notifications/accounts/{tag}": {
      "put": {
        "operationId": "putExpoNotificationAccount",
        "summary": "Enable or disable notifications for one verified owned account",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "tag",
                    "enabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/notifications/devices": {
      "delete": {
        "operationId": "deleteExpoNotificationDevice",
        "summary": "Unregister an Expo push-notification device",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "device_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sandbox",
                "production"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      },
      "post": {
        "operationId": "registerExpoNotificationDevice",
        "summary": "Register an Expo push-notification device",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "device_id": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "fcm"
                    ]
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "ios",
                      "android"
                    ]
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "sandbox",
                      "production"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "app_version": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "authorization_status": {
                    "type": "string",
                    "enum": [
                      "authorized",
                      "provisional",
                      "denied",
                      "not_determined"
                    ]
                  }
                },
                "required": [
                  "token",
                  "platform",
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "device_id": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "environment": {
                      "type": "string"
                    },
                    "authorization_status": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "last_seen_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "device_id",
                    "provider",
                    "platform",
                    "environment",
                    "authorization_status",
                    "enabled",
                    "last_seen_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/notifications/preferences": {
      "get": {
        "operationId": "getExpoNotificationPreferences",
        "summary": "Get user notification preferences",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warAttacksEnabled": {
                      "type": "boolean"
                    },
                    "warStateEnabled": {
                      "type": "boolean"
                    },
                    "warRemindersEnabled": {
                      "type": "boolean"
                    },
                    "raidRemindersEnabled": {
                      "type": "boolean"
                    },
                    "eventsEnabled": {
                      "type": "boolean"
                    },
                    "announcementsEnabled": {
                      "type": "boolean"
                    },
                    "monthlySupportEnabled": {
                      "type": "boolean"
                    },
                    "legendDefensesEnabled": {
                      "type": "boolean"
                    },
                    "reminderTimings": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "raidReminderTimings": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "tag",
                          "enabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "warAttacksEnabled",
                    "warStateEnabled",
                    "warRemindersEnabled",
                    "raidRemindersEnabled",
                    "eventsEnabled",
                    "announcementsEnabled",
                    "monthlySupportEnabled",
                    "legendDefensesEnabled",
                    "reminderTimings",
                    "raidReminderTimings",
                    "accounts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      },
      "put": {
        "operationId": "putExpoNotificationPreferences",
        "summary": "Replace Expo notification preferences",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warAttacksEnabled": {
                    "type": "boolean"
                  },
                  "warStateEnabled": {
                    "type": "boolean"
                  },
                  "warRemindersEnabled": {
                    "type": "boolean"
                  },
                  "raidRemindersEnabled": {
                    "type": "boolean"
                  },
                  "eventsEnabled": {
                    "type": "boolean"
                  },
                  "announcementsEnabled": {
                    "type": "boolean"
                  },
                  "monthlySupportEnabled": {
                    "type": "boolean"
                  },
                  "legendDefensesEnabled": {
                    "type": "boolean"
                  },
                  "reminderTimings": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "raidReminderTimings": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "warAttacksEnabled",
                  "warStateEnabled",
                  "warRemindersEnabled",
                  "raidRemindersEnabled",
                  "eventsEnabled",
                  "announcementsEnabled",
                  "monthlySupportEnabled",
                  "legendDefensesEnabled",
                  "reminderTimings",
                  "raidReminderTimings"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warAttacksEnabled": {
                      "type": "boolean"
                    },
                    "warStateEnabled": {
                      "type": "boolean"
                    },
                    "warRemindersEnabled": {
                      "type": "boolean"
                    },
                    "raidRemindersEnabled": {
                      "type": "boolean"
                    },
                    "eventsEnabled": {
                      "type": "boolean"
                    },
                    "announcementsEnabled": {
                      "type": "boolean"
                    },
                    "monthlySupportEnabled": {
                      "type": "boolean"
                    },
                    "legendDefensesEnabled": {
                      "type": "boolean"
                    },
                    "reminderTimings": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "raidReminderTimings": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "tag",
                          "enabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "warAttacksEnabled",
                    "warStateEnabled",
                    "warRemindersEnabled",
                    "raidRemindersEnabled",
                    "eventsEnabled",
                    "announcementsEnabled",
                    "monthlySupportEnabled",
                    "legendDefensesEnabled",
                    "reminderTimings",
                    "raidReminderTimings",
                    "accounts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/player/{playerTag}/battlelog/history": {
      "get": {
        "operationId": "getPlayerBattlelogHistory",
        "summary": "Get stored player battle history",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "battleMode": {
                            "type": "string",
                            "enum": [
                              "farming",
                              "ranked",
                              "legend"
                            ]
                          },
                          "battleTime": {
                            "type": "string"
                          },
                          "stars": {
                            "type": "integer"
                          },
                          "destructionPercentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "lootedResources": {
                            "type": "object",
                            "properties": {
                              "gold": {
                                "type": "integer"
                              },
                              "elixir": {
                                "type": "integer"
                              },
                              "darkElixir": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "gold",
                              "elixir",
                              "darkElixir"
                            ],
                            "additionalProperties": false
                          },
                          "shareCode": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "familyId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*$",
                                "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "battleMode",
                          "battleTime",
                          "stars",
                          "destructionPercentage",
                          "duration",
                          "lootedResources",
                          "shareCode",
                          "familyId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/cwl/history": {
      "get": {
        "operationId": "getExpoPlayerCwlHistory",
        "summary": "Get player CWL history",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "teamSize": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "medium",
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "warLeague": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "wars": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "won": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "lost": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "tied": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "won",
                                      "lost",
                                      "tied"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalStars": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "placement": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "group": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "global": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "group",
                                      "global"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "warLeague",
                              "wars",
                              "totalStars",
                              "placement"
                            ],
                            "additionalProperties": false
                          },
                          "attacks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "warTag": {
                                  "type": "string"
                                },
                                "round": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "opponent": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "defender": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townHallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townHallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                },
                                "stars": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "destructionPercentage": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "duration": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "warTag",
                                "round",
                                "opponent",
                                "defender",
                                "stars",
                                "destructionPercentage",
                                "order",
                                "duration"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "placement": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "clan": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "group": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "clan",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "missedAttacks": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "season",
                          "townHallLevel",
                          "teamSize",
                          "clan",
                          "attacks",
                          "placement",
                          "missedAttacks"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botPlayerCwlHistory",
          "getExpoPlayerCwlHistory"
        ]
      }
    },
    "/v2/player/{playerTag}/history/changes": {
      "get": {
        "operationId": "getExpoPlayerChanges",
        "summary": "Get player change history",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "type": {
                            "type": "string"
                          },
                          "item": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "previous": {
                            "$ref": "#/components/schemas/Schema_fa6dda04f2ee2e67_0"
                          },
                          "current": {
                            "$ref": "#/components/schemas/Schema_fa6dda04f2ee2e67_0"
                          }
                        },
                        "required": [
                          "time",
                          "townhall_level",
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botPlayerHistory",
          "getExpoPlayerChanges"
        ]
      }
    },
    "/v2/player/{playerTag}/history/stats": {
      "get": {
        "operationId": "getPlayerStatHistory",
        "summary": "Get positive player activity changes",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "donated",
                "received",
                "clan_games",
                "capital_gold_donated"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "eventTime": {
                            "type": "string"
                          },
                          "clanTag": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "statType": {
                            "type": "string",
                            "enum": [
                              "donated",
                              "received",
                              "clan_games",
                              "capital_gold_donated"
                            ]
                          },
                          "previousValue": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "currentValue": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "delta": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "eventTime",
                          "clanTag",
                          "statType",
                          "previousValue",
                          "currentValue",
                          "delta"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/join-leave": {
      "get": {
        "operationId": "getExpoPlayerJoinLeave",
        "summary": "Get player join and leave history",
        "tags": [
          "Player"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "tag"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "time",
                          "type",
                          "tag"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "available": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "uniquePlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "available"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/player/{playerTag}/join-leave/shared": {
      "get": {
        "operationId": "getPlayerJoinLeaveShared",
        "summary": "Get the time two players shared clans",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "tag"
                            ],
                            "additionalProperties": false
                          },
                          "minutes": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "clan",
                          "minutes"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/join-leave/totals": {
      "get": {
        "operationId": "getExpoPlayerJoinLeaveTotals",
        "summary": "Get player join and leave totals",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "tag"
                            ],
                            "additionalProperties": false
                          },
                          "visits": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "minutes": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "clan",
                          "visits",
                          "minutes"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/leaderboard-history/{leaderboardType}": {
      "get": {
        "operationId": "getPlayerTypedLeaderboardHistory",
        "summary": "Get a player's official leaderboard history",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leaderboardType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "player_home_trophies",
                "player_builder_base_trophies"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "player_home_trophies",
                        "player_builder_base_trophies"
                      ]
                    },
                    "playerTag": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "locationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "details": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "expLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attackWins": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "defenseWins": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "builderBaseTrophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "builderBaseBattleWins": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "clan": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "badgeUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "large"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "badgeUrls"
                                ],
                                "additionalProperties": false
                              },
                              "league": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "iconUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      },
                                      "tiny": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              "leagueTier": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "iconUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      },
                                      "tiny": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              "builderBaseLeague": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "iconUrls": {
                                    "type": "object",
                                    "properties": {
                                      "small": {
                                        "type": "string"
                                      },
                                      "medium": {
                                        "type": "string"
                                      },
                                      "tiny": {
                                        "type": "string"
                                      },
                                      "large": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "clanPoints": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "builderBasePoints": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "capitalPoints": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "members": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "location": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "isCountry": {
                                    "type": "boolean"
                                  },
                                  "countryCode": {
                                    "type": "string"
                                  },
                                  "localizedName": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "isCountry"
                                ],
                                "additionalProperties": false
                              },
                              "rank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "previousRank": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "rank"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "date",
                          "locationId",
                          "name",
                          "rank",
                          "details"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "type",
                    "playerTag",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/league/history": {
      "get": {
        "operationId": "getPlayerLeagueHistory",
        "summary": "Get a player's Ranked and completed Legend history",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "ranked"
                                ]
                              },
                              "seasonId": {
                                "type": "string"
                              },
                              "leagueGroupId": {
                                "type": "string"
                              },
                              "league": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "maxBattles": {
                                "type": "integer"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "attackLosses": {
                                "type": "integer"
                              },
                              "attackStars": {
                                "type": "integer"
                              },
                              "attackWins": {
                                "type": "integer"
                              },
                              "defenseLosses": {
                                "type": "integer"
                              },
                              "defenseStars": {
                                "type": "integer"
                              },
                              "defenseWins": {
                                "type": "integer"
                              },
                              "leagueTrophies": {
                                "type": "integer"
                              },
                              "placement": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mode",
                              "seasonId",
                              "leagueGroupId",
                              "league",
                              "maxBattles",
                              "tag",
                              "name",
                              "townHallLevel",
                              "attackLosses",
                              "attackStars",
                              "attackWins",
                              "defenseLosses",
                              "defenseStars",
                              "defenseWins",
                              "leagueTrophies",
                              "placement"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "legend"
                                ]
                              },
                              "season": {
                                "type": "string"
                              },
                              "league": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "trophies": {
                                "type": "integer"
                              },
                              "attackWins": {
                                "type": "integer"
                              },
                              "defenseWins": {
                                "type": "integer"
                              },
                              "rank": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mode",
                              "season",
                              "league",
                              "trophies",
                              "attackWins",
                              "defenseWins",
                              "rank"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/legend/{day}/battlelog": {
      "get": {
        "operationId": "getLegendBattlelog",
        "summary": "Get one player's Legend-day battles",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "day": {
                      "type": "string"
                    },
                    "attackTrophies": {
                      "type": "integer"
                    },
                    "defenseTrophies": {
                      "type": "integer"
                    },
                    "trophies": {
                      "type": "integer"
                    },
                    "attacks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "type": "integer"
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townHallLevel"
                            ],
                            "additionalProperties": false
                          },
                          "stars": {
                            "type": "integer"
                          },
                          "destructionPercentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "shareCode": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "familyId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*$",
                                "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "trophies": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "time",
                          "townHallLevel",
                          "opponent",
                          "stars",
                          "destructionPercentage",
                          "duration",
                          "shareCode",
                          "familyId",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "defenses": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "time": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "type": "integer"
                              },
                              "opponent": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "townHallLevel": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "townHallLevel"
                                ],
                                "additionalProperties": false
                              },
                              "stars": {
                                "type": "integer"
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "duration": {
                                "type": "integer"
                              },
                              "shareCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "familyId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[1-9][0-9]*$",
                                    "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "trophies": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "time",
                              "townHallLevel",
                              "opponent",
                              "stars",
                              "destructionPercentage",
                              "duration",
                              "shareCode",
                              "familyId",
                              "trophies"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "trophies": {
                                "type": "integer"
                              },
                              "automatic": {
                                "type": "boolean",
                                "enum": [
                                  true
                                ]
                              }
                            },
                            "required": [
                              "trophies",
                              "automatic"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "tag",
                    "day",
                    "attackTrophies",
                    "defenseTrophies",
                    "trophies",
                    "attacks",
                    "defenses"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/legend/series": {
      "get": {
        "operationId": "getLegendPlayerDailySeries",
        "summary": "Get one player's daily Legend trophy series",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string"
                          },
                          "attackTrophies": {
                            "type": "integer"
                          },
                          "defenseTrophies": {
                            "type": "integer"
                          },
                          "trophies": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "day",
                          "attackTrophies",
                          "defenseTrophies",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "tag",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/ranked/{season}/group": {
      "get": {
        "operationId": "getPlayerRankedGroup",
        "summary": "Get a player's ranked season group",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "season": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "group": {
                          "type": "null"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "placement": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "town_hall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "maximum_battle_count": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "group_tag": {
                                "type": "string"
                              },
                              "league_tier_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "tag",
                              "placement",
                              "league_trophies",
                              "town_hall",
                              "maximum_battle_count"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tag",
                        "season",
                        "group",
                        "members"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "season": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "group_tag": {
                          "type": "string"
                        },
                        "league_tier_id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "player": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "tag": {
                              "type": "string"
                            },
                            "placement": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "league_trophies": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "town_hall": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "maximum_battle_count": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "group_tag": {
                              "type": "string"
                            },
                            "league_tier_id": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "tag",
                            "placement",
                            "league_trophies",
                            "town_hall",
                            "maximum_battle_count"
                          ],
                          "additionalProperties": false
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "placement": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "town_hall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "maximum_battle_count": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "group_tag": {
                                "type": "string"
                              },
                              "league_tier_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "tag",
                              "placement",
                              "league_trophies",
                              "town_hall",
                              "maximum_battle_count"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "count": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "season",
                        "group_tag",
                        "league_tier_id",
                        "player",
                        "members",
                        "count"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/ranked/{seasonId}/battlelog": {
      "get": {
        "operationId": "getRankedBattlelog",
        "summary": "Get one player's Ranked tournament battles",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "seasonId": {
                      "type": "string"
                    },
                    "leagueGroupId": {
                      "type": "string"
                    },
                    "league": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "maxBattles": {
                      "type": "integer"
                    },
                    "registeredAttacks": {
                      "type": "integer"
                    },
                    "registeredDefenses": {
                      "type": "integer"
                    },
                    "attackTrophies": {
                      "type": "integer"
                    },
                    "defenseTrophies": {
                      "type": "integer"
                    },
                    "trophies": {
                      "type": "integer"
                    },
                    "attacks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "type": "integer"
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townHallLevel"
                            ],
                            "additionalProperties": false
                          },
                          "stars": {
                            "type": "integer"
                          },
                          "destructionPercentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "shareCode": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "familyId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*$",
                                "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "trophies": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "time",
                          "townHallLevel",
                          "opponent",
                          "stars",
                          "destructionPercentage",
                          "duration",
                          "shareCode",
                          "familyId",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "defenses": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "time": {
                                "type": "string"
                              },
                              "townHallLevel": {
                                "type": "integer"
                              },
                              "opponent": {
                                "type": "object",
                                "properties": {
                                  "tag": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "townHallLevel": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "tag",
                                  "name",
                                  "townHallLevel"
                                ],
                                "additionalProperties": false
                              },
                              "stars": {
                                "type": "integer"
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "duration": {
                                "type": "integer"
                              },
                              "shareCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "familyId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[1-9][0-9]*$",
                                    "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "trophies": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "time",
                              "townHallLevel",
                              "opponent",
                              "stars",
                              "destructionPercentage",
                              "duration",
                              "shareCode",
                              "familyId",
                              "trophies"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "trophies": {
                                "type": "integer"
                              },
                              "automatic": {
                                "type": "boolean",
                                "enum": [
                                  true
                                ]
                              }
                            },
                            "required": [
                              "trophies",
                              "automatic"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "tag",
                    "seasonId",
                    "leagueGroupId",
                    "league",
                    "maxBattles",
                    "registeredAttacks",
                    "registeredDefenses",
                    "attackTrophies",
                    "defenseTrophies",
                    "trophies",
                    "attacks",
                    "defenses"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{playerTag}/timers": {
      "get": {
        "operationId": "getExpoPlayerTimers",
        "summary": "Get player timers",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "war",
                              "cwl",
                              "capital"
                            ]
                          },
                          "expiresAt": {
                            "type": "string"
                          },
                          "warTag": {
                            "type": "string"
                          },
                          "clans": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "expiresAt",
                          "clans"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botPlayerTimers",
          "getExpoPlayerTimers"
        ]
      }
    },
    "/v2/player/{playerTag}/war/stats": {
      "get": {
        "operationId": "getExpoPlayerWarStats",
        "summary": "Get player war statistics",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "teamSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attacksPerMember": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "preparationStartTime": {
                            "type": "string"
                          },
                          "startTime": {
                            "type": "string"
                          },
                          "endTime": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "medium",
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "medium",
                                  "large"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          },
                          "type": {
                            "type": "string"
                          },
                          "player": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          },
                          "attacks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "stars": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "destructionPercentage": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "duration": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "fresh": {
                                  "type": "boolean"
                                },
                                "player": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "stars",
                                "destructionPercentage",
                                "order",
                                "duration",
                                "fresh",
                                "player"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "defenses": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "stars": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "destructionPercentage": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "duration": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "fresh": {
                                  "type": "boolean"
                                },
                                "player": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "stars",
                                "destructionPercentage",
                                "order",
                                "duration",
                                "fresh",
                                "player"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "teamSize",
                          "attacksPerMember",
                          "preparationStartTime",
                          "endTime",
                          "clan",
                          "opponent",
                          "type",
                          "player",
                          "attacks",
                          "defenses"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botPlayerWarStats",
          "getExpoPlayerWarStats"
        ]
      }
    },
    "/v2/player/{tag}/legend-history": {
      "get": {
        "operationId": "botPlayerLegendHistory",
        "summary": "Get player Legend history",
        "tags": [
          "Leaderboard"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "expLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenseWins": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "leagueTier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "iconUrls": {
                                "type": "object",
                                "properties": {
                                  "tiny": {
                                    "type": "string"
                                  },
                                  "small": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "season",
                          "tag",
                          "name",
                          "expLevel",
                          "trophies",
                          "attackWins",
                          "defenseWins",
                          "rank"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{tag}/rankings": {
      "get": {
        "operationId": "botPlayerRankings",
        "summary": "Get player rankings",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "homeVillage": {
                      "type": "object",
                      "properties": {
                        "trophies": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "globalRank": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "localRank": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "builderBase": {
                      "type": "object",
                      "properties": {
                        "trophies": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "globalRank": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "localRank": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "isCountry": {
                          "type": "boolean"
                        },
                        "countryCode": {
                          "type": "string"
                        },
                        "localizedName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "isCountry"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "tag"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/{tag}/war/attacks": {
      "get": {
        "operationId": "botPlayerWarAttacks",
        "summary": "Get player war attacks",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "cwl",
                "random",
                "friendly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "war_id": {
                            "type": "string"
                          },
                          "warEndTime": {
                            "type": "string"
                          },
                          "warType": {
                            "type": "string"
                          },
                          "warSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackingClanTag": {
                            "type": "string"
                          },
                          "defendingClanTag": {
                            "type": "string"
                          },
                          "attackerTag": {
                            "type": "string"
                          },
                          "attackerName": {
                            "type": "string"
                          },
                          "defenderTag": {
                            "type": "string"
                          },
                          "defenderName": {
                            "type": "string"
                          },
                          "attackerTownhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenderTownhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackerMapPosition": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "defenderMapPosition": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "stars": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "destructionPercentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "duration": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attackOrder": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "battleModifier": {
                            "type": "string"
                          },
                          "side": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "war_id",
                          "warEndTime",
                          "warType",
                          "warSize",
                          "attackingClanTag",
                          "defendingClanTag",
                          "attackerTag",
                          "attackerName",
                          "defenderTag",
                          "defenderName",
                          "attackerTownhall",
                          "defenderTownhall",
                          "attackerMapPosition",
                          "defenderMapPosition",
                          "stars",
                          "destructionPercentage",
                          "duration",
                          "attackOrder",
                          "battleModifier",
                          "side"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/player/search": {
      "get": {
        "operationId": "searchExpoPlayers",
        "summary": "Search players for the Expo app",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagueIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "townhallLevels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "leagueTier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "badge": {
                                "type": "string"
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "tag"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "name",
                          "tag",
                          "townHallLevel"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "limit",
                        "hasMore",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/public-config": {
      "get": {
        "operationId": "mobilePublicConfig",
        "summary": "mobilePublicConfig",
        "tags": [
          "Mobile App"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sentry_dsn": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "sentry_dsn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/public/rosters/{publicShareId}": {
      "get": {
        "operationId": "dashboardPublicRoster",
        "summary": "Get a public roster snapshot",
        "tags": [
          "Public Rosters"
        ],
        "security": [],
        "parameters": [
          {
            "name": "publicShareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "minTownhall": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxTownhall": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string"
                    },
                    "clanName": {
                      "type": "string"
                    },
                    "clanTag": {
                      "type": "string"
                    },
                    "clanBadgeUrl": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "playerTag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "townhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "refreshedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currentClanName": {
                            "type": "string"
                          },
                          "currentClanTag": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "playerTag",
                          "name",
                          "townhall",
                          "refreshedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "updatedAt",
                    "members"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/ranked/{seasonId}/groups/{leagueGroupId}": {
      "get": {
        "operationId": "getRankedLeagueGroup",
        "summary": "Get one Ranked league group",
        "tags": [
          "Player"
        ],
        "security": [],
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagueGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leagueGroupId": {
                      "type": "string"
                    },
                    "seasonId": {
                      "type": "string"
                    },
                    "league": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "maxBattles": {
                      "type": "integer"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "townHallLevel": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "attackLosses": {
                            "type": "integer"
                          },
                          "attackStars": {
                            "type": "integer"
                          },
                          "attackWins": {
                            "type": "integer"
                          },
                          "defenseLosses": {
                            "type": "integer"
                          },
                          "defenseStars": {
                            "type": "integer"
                          },
                          "defenseWins": {
                            "type": "integer"
                          },
                          "leagueTrophies": {
                            "type": "integer"
                          },
                          "placement": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "townHallLevel",
                          "attackLosses",
                          "attackStars",
                          "attackWins",
                          "defenseLosses",
                          "defenseStars",
                          "defenseWins",
                          "leagueTrophies",
                          "placement"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "leagueGroupId",
                    "seasonId",
                    "league",
                    "maxBattles",
                    "members"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/roster-automation": {
      "post": {
        "operationId": "dashboardCreateRosterAutomation",
        "summary": "Create roster automation",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roster_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "action_type": {
                    "type": "string"
                  },
                  "trigger_type": {
                    "type": "string"
                  },
                  "scheduled_at": {
                    "type": "string"
                  },
                  "discord_channel_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "ping_type": {
                        "type": "string",
                        "enum": [
                          "signup_reminder",
                          "missing"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "action_type",
                  "scheduled_at"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "automation_id": {
                      "type": "string"
                    },
                    "rule": {
                      "type": "object",
                      "properties": {
                        "automation_id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "roster_id": {
                          "type": "string"
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "action_type": {
                          "type": "string"
                        },
                        "trigger_type": {
                          "type": "string"
                        },
                        "scheduled_at": {
                          "type": "string"
                        },
                        "discord_channel_id": {
                          "type": "string"
                        },
                        "options": {
                          "type": "object",
                          "properties": {
                            "ping_type": {
                              "type": "string",
                              "enum": [
                                "signup_reminder",
                                "missing"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "executed": {
                          "type": "boolean"
                        },
                        "executed_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "last_triggered_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "execution_status": {
                          "type": "string"
                        },
                        "last_missed_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "automation_id",
                        "server_id",
                        "action_type",
                        "trigger_type",
                        "scheduled_at",
                        "active",
                        "executed",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "automation_id",
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster-automation/{automationId}": {
      "delete": {
        "operationId": "dashboardDeleteRosterAutomation",
        "summary": "Delete roster automation",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "patch": {
        "operationId": "dashboardUpdateRosterAutomation",
        "summary": "Update roster automation",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roster_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "action_type": {
                    "type": "string"
                  },
                  "trigger_type": {
                    "type": "string"
                  },
                  "scheduled_at": {
                    "type": "string"
                  },
                  "discord_channel_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "ping_type": {
                        "type": "string",
                        "enum": [
                          "signup_reminder",
                          "missing"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "rule": {
                      "type": "object",
                      "properties": {
                        "automation_id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "roster_id": {
                          "type": "string"
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "action_type": {
                          "type": "string"
                        },
                        "trigger_type": {
                          "type": "string"
                        },
                        "scheduled_at": {
                          "type": "string"
                        },
                        "discord_channel_id": {
                          "type": "string"
                        },
                        "options": {
                          "type": "object",
                          "properties": {
                            "ping_type": {
                              "type": "string",
                              "enum": [
                                "signup_reminder",
                                "missing"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "executed": {
                          "type": "boolean"
                        },
                        "executed_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "last_triggered_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "execution_status": {
                          "type": "string"
                        },
                        "last_missed_at": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "automation_id",
                        "server_id",
                        "action_type",
                        "trigger_type",
                        "scheduled_at",
                        "active",
                        "executed",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster-automation/list": {
      "get": {
        "operationId": "dashboardListRosterAutomations",
        "summary": "List roster automation",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roster_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "automation_id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "action_type": {
                            "type": "string"
                          },
                          "trigger_type": {
                            "type": "string"
                          },
                          "scheduled_at": {
                            "type": "string"
                          },
                          "discord_channel_id": {
                            "type": "string"
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "ping_type": {
                                "type": "string",
                                "enum": [
                                  "signup_reminder",
                                  "missing"
                                ]
                              }
                            },
                            "additionalProperties": false
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "executed": {
                            "type": "boolean"
                          },
                          "executed_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "last_triggered_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "execution_status": {
                            "type": "string"
                          },
                          "last_missed_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "automation_id",
                          "server_id",
                          "action_type",
                          "trigger_type",
                          "scheduled_at",
                          "active",
                          "executed",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "automation_id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "action_type": {
                            "type": "string"
                          },
                          "trigger_type": {
                            "type": "string"
                          },
                          "scheduled_at": {
                            "type": "string"
                          },
                          "discord_channel_id": {
                            "type": "string"
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "ping_type": {
                                "type": "string",
                                "enum": [
                                  "signup_reminder",
                                  "missing"
                                ]
                              }
                            },
                            "additionalProperties": false
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "executed": {
                            "type": "boolean"
                          },
                          "executed_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "last_triggered_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "execution_status": {
                            "type": "string"
                          },
                          "last_missed_at": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "automation_id",
                          "server_id",
                          "action_type",
                          "trigger_type",
                          "scheduled_at",
                          "active",
                          "executed",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "roster_id": {
                      "type": "string"
                    },
                    "group_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "items",
                    "rules",
                    "count",
                    "server_id",
                    "roster_id",
                    "group_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster-group": {
      "post": {
        "operationId": "dashboardCreateRosterGroup",
        "summary": "Create a roster group",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "alias": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_accounts_per_user": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_signups": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "group_id": {
                      "type": "string"
                    },
                    "group": {
                      "type": "object",
                      "properties": {
                        "group_id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "max_accounts_per_user": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "rosters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "server_id": {
                                "type": "string"
                              },
                              "alias": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "roster_type": {
                                "type": "string",
                                "enum": [
                                  "clan",
                                  "family"
                                ]
                              },
                              "signup_scope": {
                                "type": "string",
                                "enum": [
                                  "clan-only",
                                  "family-wide"
                                ]
                              },
                              "clan_tag": {
                                "type": "string"
                              },
                              "clan_name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clan_badge": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "type": "string"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "townhall": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "trophies": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "current_clan": {
                                      "type": "string"
                                    },
                                    "current_clan_tag": {
                                      "type": "string"
                                    },
                                    "league_id": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "league_name": {
                                      "type": "string"
                                    },
                                    "hero_level_sum": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "max_percent": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "war_pref": {
                                      "type": "boolean"
                                    },
                                    "discord": {
                                      "type": "string"
                                    },
                                    "discord_username": {
                                      "type": "string"
                                    },
                                    "discord_avatar_url": {
                                      "type": "string"
                                    },
                                    "last_online": {
                                      "type": "string"
                                    },
                                    "refreshed_at": {
                                      "type": "string"
                                    },
                                    "hitrate": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "added_at": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "last_updated": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "is_in_family": {
                                      "type": "boolean"
                                    },
                                    "member_status": {
                                      "type": "string"
                                    },
                                    "error_details": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "answers": {}
                                  },
                                  "required": [
                                    "name",
                                    "tag",
                                    "townhall",
                                    "hero_level_sum"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "min_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "min_signups": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_accounts_per_user": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 2147483647
                              },
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "sort": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "columnId": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "columnId",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "webhook_id": {
                                "type": "string"
                              },
                              "message_id": {
                                "type": "string"
                              },
                              "image": {
                                "type": "string"
                              },
                              "event_start_time": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_days": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_day_of_month": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "signup_questions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "boolean",
                                        "single_select"
                                      ]
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "options": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "type",
                                    "required",
                                    "order"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "revision": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "server_id",
                              "alias",
                              "roster_type",
                              "signup_scope",
                              "members",
                              "columns",
                              "sort",
                              "created_at",
                              "updated_at",
                              "revision"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "group_id",
                        "server_id",
                        "name",
                        "description",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "group_id",
                    "group"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster-group/{groupId}": {
      "delete": {
        "operationId": "dashboardDeleteRosterGroup",
        "summary": "Delete a roster group",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "affected_rosters": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "affected_rosters"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "dashboardGetRosterGroup",
        "summary": "Get a roster group",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "group": {
                      "type": "object",
                      "properties": {
                        "group_id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "max_accounts_per_user": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "rosters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "server_id": {
                                "type": "string"
                              },
                              "alias": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "roster_type": {
                                "type": "string",
                                "enum": [
                                  "clan",
                                  "family"
                                ]
                              },
                              "signup_scope": {
                                "type": "string",
                                "enum": [
                                  "clan-only",
                                  "family-wide"
                                ]
                              },
                              "clan_tag": {
                                "type": "string"
                              },
                              "clan_name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clan_badge": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "type": "string"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "townhall": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "trophies": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "current_clan": {
                                      "type": "string"
                                    },
                                    "current_clan_tag": {
                                      "type": "string"
                                    },
                                    "league_id": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "league_name": {
                                      "type": "string"
                                    },
                                    "hero_level_sum": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "max_percent": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "war_pref": {
                                      "type": "boolean"
                                    },
                                    "discord": {
                                      "type": "string"
                                    },
                                    "discord_username": {
                                      "type": "string"
                                    },
                                    "discord_avatar_url": {
                                      "type": "string"
                                    },
                                    "last_online": {
                                      "type": "string"
                                    },
                                    "refreshed_at": {
                                      "type": "string"
                                    },
                                    "hitrate": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "added_at": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "last_updated": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "is_in_family": {
                                      "type": "boolean"
                                    },
                                    "member_status": {
                                      "type": "string"
                                    },
                                    "error_details": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "answers": {}
                                  },
                                  "required": [
                                    "name",
                                    "tag",
                                    "townhall",
                                    "hero_level_sum"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "min_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "min_signups": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_accounts_per_user": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 2147483647
                              },
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "sort": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "columnId": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "columnId",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "webhook_id": {
                                "type": "string"
                              },
                              "message_id": {
                                "type": "string"
                              },
                              "image": {
                                "type": "string"
                              },
                              "event_start_time": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_days": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_day_of_month": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "signup_questions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "boolean",
                                        "single_select"
                                      ]
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "options": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "type",
                                    "required",
                                    "order"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "revision": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "server_id",
                              "alias",
                              "roster_type",
                              "signup_scope",
                              "members",
                              "columns",
                              "sort",
                              "created_at",
                              "updated_at",
                              "revision"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "group_id",
                        "server_id",
                        "name",
                        "description",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "group"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "dashboardUpdateRosterGroup",
        "summary": "Update a roster group",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "alias": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_accounts_per_user": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_signups": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "group": {
                      "type": "object",
                      "properties": {
                        "group_id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "max_accounts_per_user": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "rosters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "server_id": {
                                "type": "string"
                              },
                              "alias": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "roster_type": {
                                "type": "string",
                                "enum": [
                                  "clan",
                                  "family"
                                ]
                              },
                              "signup_scope": {
                                "type": "string",
                                "enum": [
                                  "clan-only",
                                  "family-wide"
                                ]
                              },
                              "clan_tag": {
                                "type": "string"
                              },
                              "clan_name": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clan_badge": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "type": "string"
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    },
                                    "townhall": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "trophies": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "current_clan": {
                                      "type": "string"
                                    },
                                    "current_clan_tag": {
                                      "type": "string"
                                    },
                                    "league_id": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "league_name": {
                                      "type": "string"
                                    },
                                    "hero_level_sum": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "max_percent": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "war_pref": {
                                      "type": "boolean"
                                    },
                                    "discord": {
                                      "type": "string"
                                    },
                                    "discord_username": {
                                      "type": "string"
                                    },
                                    "discord_avatar_url": {
                                      "type": "string"
                                    },
                                    "last_online": {
                                      "type": "string"
                                    },
                                    "refreshed_at": {
                                      "type": "string"
                                    },
                                    "hitrate": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "added_at": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "last_updated": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "is_in_family": {
                                      "type": "boolean"
                                    },
                                    "member_status": {
                                      "type": "string"
                                    },
                                    "error_details": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "answers": {}
                                  },
                                  "required": [
                                    "name",
                                    "tag",
                                    "townhall",
                                    "hero_level_sum"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "min_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_th": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "min_signups": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_accounts_per_user": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 2147483647
                              },
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "sort": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "columnId": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "columnId",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "webhook_id": {
                                "type": "string"
                              },
                              "message_id": {
                                "type": "string"
                              },
                              "image": {
                                "type": "string"
                              },
                              "event_start_time": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_days": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "recurrence_day_of_month": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "signup_questions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "boolean",
                                        "single_select"
                                      ]
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "options": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "type",
                                    "required",
                                    "order"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "created_at": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string"
                              },
                              "revision": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "server_id",
                              "alias",
                              "roster_type",
                              "signup_scope",
                              "members",
                              "columns",
                              "sort",
                              "created_at",
                              "updated_at",
                              "revision"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "group_id",
                        "server_id",
                        "name",
                        "description",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "group"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster-group/list": {
      "get": {
        "operationId": "dashboardListRosterGroups",
        "summary": "List roster groups",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "group_id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "alias": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "max_accounts_per_user": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "min_signups": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "rosters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "server_id": {
                                  "type": "string"
                                },
                                "alias": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "roster_type": {
                                  "type": "string",
                                  "enum": [
                                    "clan",
                                    "family"
                                  ]
                                },
                                "signup_scope": {
                                  "type": "string",
                                  "enum": [
                                    "clan-only",
                                    "family-wide"
                                  ]
                                },
                                "clan_tag": {
                                  "type": "string"
                                },
                                "clan_name": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "clan_badge": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "group_id": {
                                  "type": "string"
                                },
                                "members": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string"
                                      },
                                      "tag": {
                                        "type": "string"
                                      },
                                      "townhall": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "trophies": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "current_clan": {
                                        "type": "string"
                                      },
                                      "current_clan_tag": {
                                        "type": "string"
                                      },
                                      "league_id": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "league_name": {
                                        "type": "string"
                                      },
                                      "hero_level_sum": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "max_percent": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "war_pref": {
                                        "type": "boolean"
                                      },
                                      "discord": {
                                        "type": "string"
                                      },
                                      "discord_username": {
                                        "type": "string"
                                      },
                                      "discord_avatar_url": {
                                        "type": "string"
                                      },
                                      "last_online": {
                                        "type": "string"
                                      },
                                      "refreshed_at": {
                                        "type": "string"
                                      },
                                      "hitrate": {
                                        "anyOf": [
                                          {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "added_at": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "last_updated": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "is_in_family": {
                                        "type": "boolean"
                                      },
                                      "member_status": {
                                        "type": "string"
                                      },
                                      "error_details": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "answers": {}
                                    },
                                    "required": [
                                      "name",
                                      "tag",
                                      "townhall",
                                      "hero_level_sum"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "min_th": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "max_th": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "min_signups": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "max_accounts_per_user": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2147483647
                                },
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "sort": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "columnId": {
                                        "type": "string"
                                      },
                                      "direction": {
                                        "type": "string",
                                        "enum": [
                                          "asc",
                                          "desc"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "columnId",
                                      "direction"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "webhook_id": {
                                  "type": "string"
                                },
                                "message_id": {
                                  "type": "string"
                                },
                                "image": {
                                  "type": "string"
                                },
                                "event_start_time": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "recurrence_days": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "recurrence_day_of_month": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "signup_questions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text",
                                          "boolean",
                                          "single_select"
                                        ]
                                      },
                                      "required": {
                                        "type": "boolean"
                                      },
                                      "options": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "order": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "type",
                                      "required",
                                      "order"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "created_at": {
                                  "type": "string"
                                },
                                "updated_at": {
                                  "type": "string"
                                },
                                "revision": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "server_id",
                                "alias",
                                "roster_type",
                                "signup_scope",
                                "members",
                                "columns",
                                "sort",
                                "created_at",
                                "updated_at",
                                "revision"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "group_id",
                          "server_id",
                          "name",
                          "description",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster": {
      "post": {
        "operationId": "dashboardCreateRoster",
        "summary": "Create a dashboard roster",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "max_accounts_per_user": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "server_id": {
                    "type": "string"
                  },
                  "alias": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "roster_type": {
                    "type": "string",
                    "enum": [
                      "clan",
                      "family"
                    ]
                  },
                  "signup_scope": {
                    "type": "string",
                    "enum": [
                      "clan-only",
                      "family-wide"
                    ]
                  },
                  "clan_tag": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "members": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "tag": {
                          "type": "string"
                        },
                        "townhall": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "trophies": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "current_clan": {
                          "type": "string"
                        },
                        "current_clan_tag": {
                          "type": "string"
                        },
                        "league_id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "league_name": {
                          "type": "string"
                        },
                        "hero_level_sum": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_percent": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "war_pref": {
                          "type": "boolean"
                        },
                        "discord": {
                          "type": "string"
                        },
                        "discord_username": {
                          "type": "string"
                        },
                        "discord_avatar_url": {
                          "type": "string"
                        },
                        "last_online": {
                          "type": "string"
                        },
                        "refreshed_at": {
                          "type": "string"
                        },
                        "answers": {}
                      },
                      "required": [
                        "tag"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "alias",
                  "roster_type",
                  "signup_scope"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "roster_id": {
                      "type": "string"
                    },
                    "roster": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "roster_type": {
                          "type": "string",
                          "enum": [
                            "clan",
                            "family"
                          ]
                        },
                        "signup_scope": {
                          "type": "string",
                          "enum": [
                            "clan-only",
                            "family-wide"
                          ]
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "clan_name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clan_badge": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "townhall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "current_clan": {
                                "type": "string"
                              },
                              "current_clan_tag": {
                                "type": "string"
                              },
                              "league_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_name": {
                                "type": "string"
                              },
                              "hero_level_sum": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_percent": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "war_pref": {
                                "type": "boolean"
                              },
                              "discord": {
                                "type": "string"
                              },
                              "discord_username": {
                                "type": "string"
                              },
                              "discord_avatar_url": {
                                "type": "string"
                              },
                              "last_online": {
                                "type": "string"
                              },
                              "refreshed_at": {
                                "type": "string"
                              },
                              "hitrate": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "added_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_updated": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_in_family": {
                                "type": "boolean"
                              },
                              "member_status": {
                                "type": "string"
                              },
                              "error_details": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers": {}
                            },
                            "required": [
                              "name",
                              "tag",
                              "townhall",
                              "hero_level_sum"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "min_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_accounts_per_user": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "webhook_id": {
                          "type": "string"
                        },
                        "message_id": {
                          "type": "string"
                        },
                        "image": {
                          "type": "string"
                        },
                        "event_start_time": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_days": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_day_of_month": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "signup_questions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "boolean",
                                  "single_select"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "order": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "order"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "revision": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "alias",
                        "roster_type",
                        "signup_scope",
                        "members",
                        "columns",
                        "sort",
                        "created_at",
                        "updated_at",
                        "revision"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "roster_id",
                    "roster"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{rosterId}": {
      "delete": {
        "operationId": "dashboardDeleteRoster",
        "summary": "Delete a roster or clear its members",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "members_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "dashboardGetRoster",
        "summary": "Get a dashboard roster",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roster": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "roster_type": {
                          "type": "string",
                          "enum": [
                            "clan",
                            "family"
                          ]
                        },
                        "signup_scope": {
                          "type": "string",
                          "enum": [
                            "clan-only",
                            "family-wide"
                          ]
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "clan_name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clan_badge": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "townhall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "current_clan": {
                                "type": "string"
                              },
                              "current_clan_tag": {
                                "type": "string"
                              },
                              "league_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_name": {
                                "type": "string"
                              },
                              "hero_level_sum": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_percent": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "war_pref": {
                                "type": "boolean"
                              },
                              "discord": {
                                "type": "string"
                              },
                              "discord_username": {
                                "type": "string"
                              },
                              "discord_avatar_url": {
                                "type": "string"
                              },
                              "last_online": {
                                "type": "string"
                              },
                              "refreshed_at": {
                                "type": "string"
                              },
                              "hitrate": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "added_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_updated": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_in_family": {
                                "type": "boolean"
                              },
                              "member_status": {
                                "type": "string"
                              },
                              "error_details": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers": {}
                            },
                            "required": [
                              "name",
                              "tag",
                              "townhall",
                              "hero_level_sum"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "min_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_accounts_per_user": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "webhook_id": {
                          "type": "string"
                        },
                        "message_id": {
                          "type": "string"
                        },
                        "image": {
                          "type": "string"
                        },
                        "event_start_time": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_days": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_day_of_month": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "signup_questions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "boolean",
                                  "single_select"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "order": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "order"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "revision": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "alias",
                        "roster_type",
                        "signup_scope",
                        "members",
                        "columns",
                        "sort",
                        "created_at",
                        "updated_at",
                        "revision"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "roster"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "dashboardUpdateRoster",
        "summary": "Update a dashboard roster",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alias": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "roster_type": {
                    "type": "string",
                    "enum": [
                      "clan",
                      "family"
                    ]
                  },
                  "signup_scope": {
                    "type": "string",
                    "enum": [
                      "clan-only",
                      "family-wide"
                    ]
                  },
                  "clan_tag": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_th": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_th": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "min_signups": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_accounts_per_user": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "sort": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "columnId": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "asc",
                            "desc"
                          ]
                        }
                      },
                      "required": [
                        "columnId",
                        "direction"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "webhook_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "image": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "event_start_time": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recurrence_days": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recurrence_day_of_month": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "signup_questions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "boolean",
                            "single_select"
                          ]
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "order": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "type",
                        "required",
                        "order"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "roster": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "roster_type": {
                          "type": "string",
                          "enum": [
                            "clan",
                            "family"
                          ]
                        },
                        "signup_scope": {
                          "type": "string",
                          "enum": [
                            "clan-only",
                            "family-wide"
                          ]
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "clan_name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clan_badge": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "townhall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "current_clan": {
                                "type": "string"
                              },
                              "current_clan_tag": {
                                "type": "string"
                              },
                              "league_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_name": {
                                "type": "string"
                              },
                              "hero_level_sum": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_percent": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "war_pref": {
                                "type": "boolean"
                              },
                              "discord": {
                                "type": "string"
                              },
                              "discord_username": {
                                "type": "string"
                              },
                              "discord_avatar_url": {
                                "type": "string"
                              },
                              "last_online": {
                                "type": "string"
                              },
                              "refreshed_at": {
                                "type": "string"
                              },
                              "hitrate": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "added_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_updated": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_in_family": {
                                "type": "boolean"
                              },
                              "member_status": {
                                "type": "string"
                              },
                              "error_details": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers": {}
                            },
                            "required": [
                              "name",
                              "tag",
                              "townhall",
                              "hero_level_sum"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "min_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_accounts_per_user": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "webhook_id": {
                          "type": "string"
                        },
                        "message_id": {
                          "type": "string"
                        },
                        "image": {
                          "type": "string"
                        },
                        "event_start_time": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_days": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_day_of_month": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "signup_questions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "boolean",
                                  "single_select"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "order": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "order"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "revision": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "alias",
                        "roster_type",
                        "signup_scope",
                        "members",
                        "columns",
                        "sort",
                        "created_at",
                        "updated_at",
                        "revision"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{rosterId}/clone": {
      "post": {
        "operationId": "dashboardCloneRoster",
        "summary": "Clone a dashboard roster",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_alias": {
                    "type": "string"
                  },
                  "copy_members": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "new_alias"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "new_roster_id": {
                      "type": "string"
                    },
                    "new_alias": {
                      "type": "string"
                    },
                    "target_server_id": {
                      "type": "string"
                    },
                    "source_server_id": {
                      "type": "string"
                    },
                    "members_copied": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "roster": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "roster_type": {
                          "type": "string",
                          "enum": [
                            "clan",
                            "family"
                          ]
                        },
                        "signup_scope": {
                          "type": "string",
                          "enum": [
                            "clan-only",
                            "family-wide"
                          ]
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "clan_name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clan_badge": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "tag": {
                                "type": "string"
                              },
                              "townhall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "current_clan": {
                                "type": "string"
                              },
                              "current_clan_tag": {
                                "type": "string"
                              },
                              "league_id": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "league_name": {
                                "type": "string"
                              },
                              "hero_level_sum": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "max_percent": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "war_pref": {
                                "type": "boolean"
                              },
                              "discord": {
                                "type": "string"
                              },
                              "discord_username": {
                                "type": "string"
                              },
                              "discord_avatar_url": {
                                "type": "string"
                              },
                              "last_online": {
                                "type": "string"
                              },
                              "refreshed_at": {
                                "type": "string"
                              },
                              "hitrate": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "added_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_updated": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_in_family": {
                                "type": "boolean"
                              },
                              "member_status": {
                                "type": "string"
                              },
                              "error_details": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers": {}
                            },
                            "required": [
                              "name",
                              "tag",
                              "townhall",
                              "hero_level_sum"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "min_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_th": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "min_signups": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_accounts_per_user": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 2147483647
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "webhook_id": {
                          "type": "string"
                        },
                        "message_id": {
                          "type": "string"
                        },
                        "image": {
                          "type": "string"
                        },
                        "event_start_time": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_days": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "recurrence_day_of_month": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "signup_questions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "boolean",
                                  "single_select"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "order": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "order"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "revision": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "alias",
                        "roster_type",
                        "signup_scope",
                        "members",
                        "columns",
                        "sort",
                        "created_at",
                        "updated_at",
                        "revision"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "new_roster_id",
                    "new_alias",
                    "target_server_id",
                    "source_server_id",
                    "members_copied",
                    "roster"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{rosterId}/members": {
      "post": {
        "operationId": "dashboardManageRosterMembers",
        "summary": "Add, remove, or update roster members",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "members": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "tag": {
                          "type": "string"
                        },
                        "townhall": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "trophies": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "current_clan": {
                          "type": "string"
                        },
                        "current_clan_tag": {
                          "type": "string"
                        },
                        "league_id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "league_name": {
                          "type": "string"
                        },
                        "hero_level_sum": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_percent": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "war_pref": {
                          "type": "boolean"
                        },
                        "discord": {
                          "type": "string"
                        },
                        "discord_username": {
                          "type": "string"
                        },
                        "discord_avatar_url": {
                          "type": "string"
                        },
                        "last_online": {
                          "type": "string"
                        },
                        "refreshed_at": {
                          "type": "string"
                        },
                        "answers": {}
                      },
                      "required": [
                        "tag"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "add": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "tag": {
                          "type": "string"
                        },
                        "townhall": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "trophies": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "current_clan": {
                          "type": "string"
                        },
                        "current_clan_tag": {
                          "type": "string"
                        },
                        "league_id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "league_name": {
                          "type": "string"
                        },
                        "hero_level_sum": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_percent": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "war_pref": {
                          "type": "boolean"
                        },
                        "discord": {
                          "type": "string"
                        },
                        "discord_username": {
                          "type": "string"
                        },
                        "discord_avatar_url": {
                          "type": "string"
                        },
                        "last_online": {
                          "type": "string"
                        },
                        "refreshed_at": {
                          "type": "string"
                        },
                        "answers": {}
                      },
                      "required": [
                        "tag"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "operation": {
                    "type": "string",
                    "enum": [
                      "add",
                      "remove",
                      "update"
                    ]
                  },
                  "player_tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{rosterId}/members/{memberTag}": {
      "delete": {
        "operationId": "dashboardRemoveRosterMember",
        "summary": "Remove a roster member",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "patch": {
        "operationId": "dashboardUpdateRosterMember",
        "summary": "Update a roster member",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {}
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{rosterId}/members/{memberTag}/refresh": {
      "post": {
        "operationId": "dashboardRefreshRosterMember",
        "summary": "Refresh one roster member",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "member": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "tag": {
                          "type": "string"
                        },
                        "townhall": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "trophies": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "current_clan": {
                          "type": "string"
                        },
                        "current_clan_tag": {
                          "type": "string"
                        },
                        "league_id": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "league_name": {
                          "type": "string"
                        },
                        "hero_level_sum": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "max_percent": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "war_pref": {
                          "type": "boolean"
                        },
                        "discord": {
                          "type": "string"
                        },
                        "discord_username": {
                          "type": "string"
                        },
                        "discord_avatar_url": {
                          "type": "string"
                        },
                        "last_online": {
                          "type": "string"
                        },
                        "refreshed_at": {
                          "type": "string"
                        },
                        "hitrate": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "added_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last_updated": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_in_family": {
                          "type": "boolean"
                        },
                        "member_status": {
                          "type": "string"
                        },
                        "error_details": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers": {}
                      },
                      "required": [
                        "name",
                        "tag",
                        "townhall",
                        "hero_level_sum"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "member"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/{serverId}/list": {
      "get": {
        "operationId": "dashboardListRosters",
        "summary": "List dashboard rosters",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clan_tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rosters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "alias": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "roster_type": {
                            "type": "string",
                            "enum": [
                              "clan",
                              "family"
                            ]
                          },
                          "signup_scope": {
                            "type": "string",
                            "enum": [
                              "clan-only",
                              "family-wide"
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan_badge": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "tag": {
                                  "type": "string"
                                },
                                "townhall": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "trophies": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "current_clan": {
                                  "type": "string"
                                },
                                "current_clan_tag": {
                                  "type": "string"
                                },
                                "league_id": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "league_name": {
                                  "type": "string"
                                },
                                "hero_level_sum": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "max_percent": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "war_pref": {
                                  "type": "boolean"
                                },
                                "discord": {
                                  "type": "string"
                                },
                                "discord_username": {
                                  "type": "string"
                                },
                                "discord_avatar_url": {
                                  "type": "string"
                                },
                                "last_online": {
                                  "type": "string"
                                },
                                "refreshed_at": {
                                  "type": "string"
                                },
                                "hitrate": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "added_at": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "last_updated": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "is_in_family": {
                                  "type": "boolean"
                                },
                                "member_status": {
                                  "type": "string"
                                },
                                "error_details": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "answers": {}
                              },
                              "required": [
                                "name",
                                "tag",
                                "townhall",
                                "hero_level_sum"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "min_th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "max_th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "min_signups": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "max_accounts_per_user": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2147483647
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "sort": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "columnId": {
                                  "type": "string"
                                },
                                "direction": {
                                  "type": "string",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ]
                                }
                              },
                              "required": [
                                "columnId",
                                "direction"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "message_id": {
                            "type": "string"
                          },
                          "image": {
                            "type": "string"
                          },
                          "event_start_time": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "recurrence_days": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "recurrence_day_of_month": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "signup_questions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text",
                                    "boolean",
                                    "single_select"
                                  ]
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "label",
                                "type",
                                "required",
                                "order"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "revision": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "server_id",
                          "alias",
                          "roster_type",
                          "signup_scope",
                          "members",
                          "columns",
                          "sort",
                          "created_at",
                          "updated_at",
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "rosters",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/account-groups/query": {
      "post": {
        "operationId": "dashboardRosterAccountGroupsQuery",
        "summary": "Group roster accounts by linked owner without exposing owner IDs",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "playerName",
                        "playerTag",
                        "townhall",
                        "trophies",
                        "clanName",
                        "clanTag",
                        "leagueId",
                        "leagueName",
                        "heroLevelSum",
                        "maxPercent",
                        "warPreference",
                        "lastOnline",
                        "discordUsername",
                        "signupAnswers"
                      ]
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "group": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "accounts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "rosterId": {
                                  "type": "string"
                                },
                                "playerTag": {
                                  "type": "string"
                                },
                                "playerName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "rosterId",
                                "playerTag",
                                "playerName"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "group",
                          "accounts"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "groups",
                    "note"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/ai/context": {
      "post": {
        "operationId": "dashboardRosterAIContext",
        "summary": "Authorize and reserve an AI request with trusted roster context",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "viewId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        },
                        "parts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "toolCallId": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "input": {},
                              "approval": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "approved": {
                                    "type": "boolean"
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "role"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds",
                  "messages"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requestId": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string",
                      "enum": [
                        "gpt-5.6-luna"
                      ]
                    },
                    "budget": {
                      "type": "object",
                      "properties": {
                        "serverSpentUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "serverLimitUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "globalSpentUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "globalLimitUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "userSpentUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "userLimitUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "paidSpentUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "paidLimitUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "paidRemainingUsd": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "usesPaidPool": {
                          "type": "boolean"
                        },
                        "resetsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "serverSpentUsd",
                        "serverLimitUsd",
                        "globalSpentUsd",
                        "globalLimitUsd",
                        "userSpentUsd",
                        "userLimitUsd",
                        "paidSpentUsd",
                        "paidLimitUsd",
                        "paidRemainingUsd",
                        "usesPaidPool",
                        "resetsAt"
                      ],
                      "additionalProperties": false
                    },
                    "context": {
                      "type": "object",
                      "properties": {
                        "attachments": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "rosterId": {
                                    "type": "string"
                                  },
                                  "alias": {
                                    "type": "string"
                                  },
                                  "clanTag": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "memberCount": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "revision": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "signupQuestions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text",
                                            "boolean",
                                            "single_select"
                                          ]
                                        },
                                        "required": {
                                          "type": "boolean"
                                        },
                                        "options": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label",
                                        "type",
                                        "required",
                                        "options",
                                        "order"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "rosterId",
                                  "alias",
                                  "clanTag",
                                  "memberCount",
                                  "revision",
                                  "signupQuestions"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metrics": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "valueType": {
                                "type": "string",
                                "enum": [
                                  "string",
                                  "number",
                                  "boolean",
                                  "json",
                                  "time"
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "snapshot",
                                  "historical",
                                  "derived",
                                  "presentation"
                                ]
                              },
                              "description": {
                                "type": "string"
                              },
                              "cacheTtlSeconds": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "valueType",
                              "kind",
                              "description",
                              "cacheTtlSeconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "currentView": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "shareId": {
                                  "type": "string"
                                },
                                "serverId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "sourceCode": {
                                  "type": "string"
                                },
                                "sourceVersion": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "createdBy": {
                                  "type": "string"
                                },
                                "spec": {
                                  "type": "object",
                                  "properties": {
                                    "schemaVersion": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "columns": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "metricId": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "type": "object"
                                          },
                                          "format": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "metricId"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "sort": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "columnId": {
                                            "type": "string"
                                          },
                                          "direction": {
                                            "type": "string",
                                            "enum": [
                                              "asc",
                                              "desc"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "columnId",
                                          "direction"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "filters": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "columnId": {
                                            "type": "string"
                                          },
                                          "operator": {
                                            "type": "string",
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "gt",
                                              "gte",
                                              "lt",
                                              "lte",
                                              "in",
                                              "contains"
                                            ]
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "columnId",
                                          "operator",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "highlights": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "target": {
                                            "type": "string",
                                            "enum": [
                                              "row",
                                              "column",
                                              "cell"
                                            ]
                                          },
                                          "columnId": {
                                            "type": "string"
                                          },
                                          "when": {
                                            "type": "object",
                                            "properties": {
                                              "columnId": {
                                                "type": "string"
                                              },
                                              "operator": {
                                                "type": "string",
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "gt",
                                                  "gte",
                                                  "lt",
                                                  "lte",
                                                  "in",
                                                  "contains"
                                                ]
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "operator",
                                              "value"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "tone": {
                                            "type": "string",
                                            "enum": [
                                              "red",
                                              "amber",
                                              "green",
                                              "blue",
                                              "purple",
                                              "gray"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "target",
                                          "tone"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "limit": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schemaVersion",
                                    "columns"
                                  ],
                                  "additionalProperties": false
                                },
                                "createdAt": {
                                  "type": "string"
                                },
                                "updatedAt": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "shareId",
                                "serverId",
                                "name",
                                "sourceCode",
                                "sourceVersion",
                                "createdBy",
                                "createdAt",
                                "updatedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "attachments",
                        "metrics",
                        "currentView"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "requestId",
                    "model",
                    "budget",
                    "context"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user"
      }
    },
    "/v2/roster/ai/usage": {
      "post": {
        "operationId": "dashboardRosterAIUsage",
        "summary": "Settle AI usage with the dedicated metering secret",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "AiMetering": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string",
                    "enum": [
                      "gpt-5.6-luna"
                    ]
                  },
                  "usage": {
                    "type": "object",
                    "properties": {
                      "inputTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "cachedInputTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "cacheWriteTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "outputTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "reasoningTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "inputTokens",
                      "cachedInputTokens",
                      "cacheWriteTokens",
                      "outputTokens",
                      "reasoningTokens"
                    ],
                    "additionalProperties": false
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "cachedInputTokens": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "cacheWriteTokens": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "outputTokens": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "reasoningTokens": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "inputTokens",
                        "cachedInputTokens",
                        "cacheWriteTokens",
                        "outputTokens",
                        "reasoningTokens"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "requestId",
                  "model",
                  "usage",
                  "steps"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "ai-metering"
      }
    },
    "/v2/roster/members/query": {
      "post": {
        "operationId": "dashboardRosterMembersQuery",
        "summary": "Query selected roster snapshot fields",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "playerName",
                        "playerTag",
                        "townhall",
                        "trophies",
                        "clanName",
                        "clanTag",
                        "leagueId",
                        "leagueName",
                        "heroLevelSum",
                        "maxPercent",
                        "warPreference",
                        "lastOnline",
                        "discordUsername",
                        "signupAnswers"
                      ]
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rosterId": {
                            "type": "string"
                          },
                          "playerTag": {
                            "type": "string"
                          },
                          "playerName": {
                            "type": "string"
                          },
                          "townhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clanName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clanTag": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "leagueId": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "leagueName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "heroLevelSum": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "maxPercent": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "warPreference": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastOnline": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "discordUsername": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "signupAnswers": {
                            "type": "object"
                          }
                        },
                        "required": [
                          "rosterId",
                          "playerTag"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "rows"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/membership-changes": {
      "post": {
        "operationId": "dashboardApplyRosterMembershipChanges",
        "summary": "Apply approved roster membership changes",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string"
                  },
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "add",
                            "remove",
                            "move"
                          ]
                        },
                        "playerTag": {
                          "type": "string"
                        },
                        "fromRosterId": {
                          "type": "string"
                        },
                        "toRosterId": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "action",
                        "playerTag"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "expectedRevisions": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "serverId",
                  "changes",
                  "expectedRevisions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "applied": {
                      "type": "boolean"
                    },
                    "changeCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "revisions": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "applied",
                    "changeCount",
                    "revisions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/membership-changes/validate": {
      "post": {
        "operationId": "dashboardRosterMembershipValidate",
        "summary": "Validate an exact transient roster membership proposal",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "add",
                            "remove",
                            "move"
                          ]
                        },
                        "playerTag": {
                          "type": "string"
                        },
                        "fromRosterId": {
                          "type": "string"
                        },
                        "toRosterId": {
                          "type": "string"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "action",
                        "playerTag"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds",
                  "changes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "membershipProposal"
                      ]
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "enum": [
                              "add",
                              "remove",
                              "move"
                            ]
                          },
                          "playerTag": {
                            "type": "string"
                          },
                          "fromRosterId": {
                            "type": "string"
                          },
                          "toRosterId": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "action",
                          "playerTag"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "expectedRevisions": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    },
                    "generatedAt": {
                      "type": "string"
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "add": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "move": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "remove": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "add",
                        "move",
                        "remove"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "enum": [
                              "add",
                              "move",
                              "remove"
                            ]
                          },
                          "playerTag": {
                            "type": "string"
                          },
                          "fromRoster": {
                            "type": "string"
                          },
                          "toRoster": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "action",
                          "playerTag",
                          "fromRoster",
                          "toRoster",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "type",
                    "changes",
                    "expectedRevisions",
                    "generatedAt",
                    "counts",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/metrics": {
      "get": {
        "operationId": "dashboardListRosterMetrics",
        "summary": "List roster-view metrics",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "valueType": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "json",
                              "time"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "snapshot",
                              "historical",
                              "derived",
                              "presentation"
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "cacheTtlSeconds": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "dependsOn": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "valueType",
                          "kind",
                          "description",
                          "cacheTtlSeconds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/metrics/query": {
      "post": {
        "operationId": "dashboardQueryRosterMetric",
        "summary": "Evaluate one roster metric",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "metricId": {
                    "type": "string"
                  },
                  "parameters": {
                    "type": "object"
                  },
                  "force": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "rosterIds",
                  "metricId",
                  "force"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metricId": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rosterId": {
                            "type": "string"
                          },
                          "playerTag": {
                            "type": "string"
                          },
                          "value": {}
                        },
                        "required": [
                          "rosterId",
                          "playerTag",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "evaluatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "metricId",
                    "parameters",
                    "rows",
                    "cached",
                    "evaluatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/missing-members": {
      "get": {
        "operationId": "dashboardMissingRosterMembers",
        "summary": "Find clan members missing from dashboard rosters",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roster_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query_type": {
                      "type": "string",
                      "enum": [
                        "roster",
                        "group"
                      ]
                    },
                    "query_value": {
                      "type": "string"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "error"
                            ]
                          },
                          "roster_info": {
                            "type": "object",
                            "properties": {
                              "roster_id": {
                                "type": "string"
                              },
                              "alias": {
                                "type": "string"
                              },
                              "clan_tag": {
                                "type": "string"
                              },
                              "clan_name": {
                                "type": "string"
                              },
                              "registered_count": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "roster_id",
                              "alias",
                              "clan_tag",
                              "clan_name",
                              "registered_count"
                            ],
                            "additionalProperties": false
                          },
                          "missing_members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "townhall": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "role": {
                                  "type": "string"
                                },
                                "trophies": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "discord": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "tag",
                                "name",
                                "townhall",
                                "role",
                                "trophies"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "summary": {
                            "type": "object",
                            "properties": {
                              "total_missing": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "total_clan_members": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "coverage_percentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "total_missing",
                              "total_clan_members",
                              "coverage_percentage"
                            ],
                            "additionalProperties": false
                          },
                          "error_message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "missing_members"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total_rosters_checked": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "query_type",
                    "query_value",
                    "results",
                    "total_rosters_checked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/questionnaire": {
      "put": {
        "operationId": "dashboardRosterQuestionnaire",
        "summary": "Replace roster signup questions",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "roster_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "questions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "boolean",
                            "single_select"
                          ]
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "order": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "type",
                        "required",
                        "options",
                        "order"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "questionnaire": {
                      "type": "object",
                      "properties": {
                        "accountSelector": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "account"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "account"
                              ]
                            },
                            "required": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "questions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "boolean",
                                  "single_select"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "order": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "options",
                              "order"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "accountSelector",
                        "questions"
                      ],
                      "additionalProperties": false
                    },
                    "affectedMemberCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "questionnaire",
                    "affectedMemberCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/refresh-batch": {
      "post": {
        "operationId": "dashboardRosterRefreshBatch",
        "summary": "Refresh attached roster snapshots",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "playerName",
                        "playerTag",
                        "townhall",
                        "trophies",
                        "clanName",
                        "clanTag",
                        "leagueId",
                        "leagueName",
                        "heroLevelSum",
                        "maxPercent",
                        "warPreference",
                        "lastOnline",
                        "discordUsername",
                        "signupAnswers"
                      ]
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rosters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rosterId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "completed",
                              "reused",
                              "waiting"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "refreshedPlayers": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "failedPlayers": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "refreshedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "rosterId",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "rosters"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/refresh-data": {
      "post": {
        "operationId": "dashboardRosterRefreshData",
        "summary": "Refresh roster data or prepare role reconciliation",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "roster_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "data",
                      "role"
                    ]
                  }
                },
                "required": [
                  "scope"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "refreshId": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "data",
                        "role"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "refreshedPlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "failedPlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "refreshedAt": {
                      "type": "string"
                    },
                    "reused": {
                      "type": "boolean"
                    },
                    "roleId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "roleMemberUserIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^\\d{1,20}$",
                        "description": "Discord snowflake as an unsigned decimal string"
                      }
                    }
                  },
                  "required": [
                    "refreshId",
                    "scope",
                    "status",
                    "refreshedPlayers",
                    "failedPlayers",
                    "refreshedAt",
                    "reused"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/refresh": {
      "post": {
        "operationId": "dashboardRefreshRosters",
        "summary": "Refresh legacy roster snapshots",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roster_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "refreshed_rosters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "alias": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "roster_type": {
                            "type": "string",
                            "enum": [
                              "clan",
                              "family"
                            ]
                          },
                          "signup_scope": {
                            "type": "string",
                            "enum": [
                              "clan-only",
                              "family-wide"
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan_badge": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "tag": {
                                  "type": "string"
                                },
                                "townhall": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "trophies": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "current_clan": {
                                  "type": "string"
                                },
                                "current_clan_tag": {
                                  "type": "string"
                                },
                                "league_id": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "league_name": {
                                  "type": "string"
                                },
                                "hero_level_sum": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "max_percent": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "war_pref": {
                                  "type": "boolean"
                                },
                                "discord": {
                                  "type": "string"
                                },
                                "discord_username": {
                                  "type": "string"
                                },
                                "discord_avatar_url": {
                                  "type": "string"
                                },
                                "last_online": {
                                  "type": "string"
                                },
                                "refreshed_at": {
                                  "type": "string"
                                },
                                "hitrate": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "added_at": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "last_updated": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "is_in_family": {
                                  "type": "boolean"
                                },
                                "member_status": {
                                  "type": "string"
                                },
                                "error_details": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "answers": {}
                              },
                              "required": [
                                "name",
                                "tag",
                                "townhall",
                                "hero_level_sum"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "min_th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "max_th": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "min_signups": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "max_accounts_per_user": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2147483647
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "sort": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "columnId": {
                                  "type": "string"
                                },
                                "direction": {
                                  "type": "string",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ]
                                }
                              },
                              "required": [
                                "columnId",
                                "direction"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "message_id": {
                            "type": "string"
                          },
                          "image": {
                            "type": "string"
                          },
                          "event_start_time": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "recurrence_days": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "recurrence_day_of_month": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "signup_questions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text",
                                    "boolean",
                                    "single_select"
                                  ]
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "order": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "label",
                                "type",
                                "required",
                                "order"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          },
                          "revision": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "server_id",
                          "alias",
                          "roster_type",
                          "signup_scope",
                          "members",
                          "columns",
                          "sort",
                          "created_at",
                          "updated_at",
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "message",
                    "refreshed_rosters"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/server/{serverId}/members": {
      "get": {
        "operationId": "dashboardServerClanMembers",
        "summary": "List clan members for a dashboard server",
        "tags": [
          "Rosters"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "townhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "role": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "clan_tag",
                          "clan_name",
                          "townhall",
                          "role",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "members"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/views": {
      "get": {
        "operationId": "dashboardListRosterViews",
        "summary": "List saved roster views",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "shareId": {
                        "type": "string"
                      },
                      "serverId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "sourceCode": {
                        "type": "string"
                      },
                      "sourceVersion": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "createdBy": {
                        "type": "string"
                      },
                      "spec": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "metricId": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "object"
                                },
                                "format": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "label",
                                "metricId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "sort": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "columnId": {
                                  "type": "string"
                                },
                                "direction": {
                                  "type": "string",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ]
                                }
                              },
                              "required": [
                                "columnId",
                                "direction"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "filters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "columnId": {
                                  "type": "string"
                                },
                                "operator": {
                                  "type": "string",
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "gt",
                                    "gte",
                                    "lt",
                                    "lte",
                                    "in",
                                    "contains"
                                  ]
                                },
                                "value": {}
                              },
                              "required": [
                                "columnId",
                                "operator",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "highlights": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "target": {
                                  "type": "string",
                                  "enum": [
                                    "row",
                                    "column",
                                    "cell"
                                  ]
                                },
                                "columnId": {
                                  "type": "string"
                                },
                                "when": {
                                  "type": "object",
                                  "properties": {
                                    "columnId": {
                                      "type": "string"
                                    },
                                    "operator": {
                                      "type": "string",
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "gt",
                                        "gte",
                                        "lt",
                                        "lte",
                                        "in",
                                        "contains"
                                      ]
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                "tone": {
                                  "type": "string",
                                  "enum": [
                                    "red",
                                    "amber",
                                    "green",
                                    "blue",
                                    "purple",
                                    "gray"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "target",
                                "tone"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "limit": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "columns"
                        ],
                        "additionalProperties": false
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "shareId",
                      "serverId",
                      "name",
                      "sourceCode",
                      "sourceVersion",
                      "createdBy",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "post": {
        "operationId": "dashboardCreateRosterView",
        "summary": "Create a saved roster view",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "sourceCode": {
                    "type": "string"
                  },
                  "sourceVersion": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  }
                },
                "required": [
                  "name",
                  "sourceCode",
                  "sourceVersion"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "shareId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "sourceCode": {
                      "type": "string"
                    },
                    "sourceVersion": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "metricId": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "object"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "metricId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string",
                                "enum": [
                                  "eq",
                                  "neq",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "in",
                                  "contains"
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "columnId",
                              "operator",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "highlights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "row",
                                  "column",
                                  "cell"
                                ]
                              },
                              "columnId": {
                                "type": "string"
                              },
                              "when": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "contains"
                                    ]
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "operator",
                                  "value"
                                ],
                                "additionalProperties": false
                              },
                              "tone": {
                                "type": "string",
                                "enum": [
                                  "red",
                                  "amber",
                                  "green",
                                  "blue",
                                  "purple",
                                  "gray"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "target",
                              "tone"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "shareId",
                    "serverId",
                    "name",
                    "sourceCode",
                    "sourceVersion",
                    "createdBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/views/{viewId}": {
      "delete": {
        "operationId": "dashboardDeleteRosterView",
        "summary": "Delete a saved roster view",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "dashboardGetRosterView",
        "summary": "Get a saved roster view",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "shareId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "sourceCode": {
                      "type": "string"
                    },
                    "sourceVersion": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "metricId": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "object"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "metricId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string",
                                "enum": [
                                  "eq",
                                  "neq",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "in",
                                  "contains"
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "columnId",
                              "operator",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "highlights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "row",
                                  "column",
                                  "cell"
                                ]
                              },
                              "columnId": {
                                "type": "string"
                              },
                              "when": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "contains"
                                    ]
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "operator",
                                  "value"
                                ],
                                "additionalProperties": false
                              },
                              "tone": {
                                "type": "string",
                                "enum": [
                                  "red",
                                  "amber",
                                  "green",
                                  "blue",
                                  "purple",
                                  "gray"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "target",
                              "tone"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "shareId",
                    "serverId",
                    "name",
                    "sourceCode",
                    "sourceVersion",
                    "createdBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "dashboardUpdateRosterView",
        "summary": "Update a saved roster view",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "sourceCode": {
                    "type": "string"
                  },
                  "sourceVersion": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  }
                },
                "required": [
                  "name",
                  "sourceCode",
                  "sourceVersion"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "shareId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "sourceCode": {
                      "type": "string"
                    },
                    "sourceVersion": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "metricId": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "object"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "metricId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string",
                                "enum": [
                                  "eq",
                                  "neq",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "in",
                                  "contains"
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "columnId",
                              "operator",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "highlights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "row",
                                  "column",
                                  "cell"
                                ]
                              },
                              "columnId": {
                                "type": "string"
                              },
                              "when": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "contains"
                                    ]
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "operator",
                                  "value"
                                ],
                                "additionalProperties": false
                              },
                              "tone": {
                                "type": "string",
                                "enum": [
                                  "red",
                                  "amber",
                                  "green",
                                  "blue",
                                  "purple",
                                  "gray"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "target",
                              "tone"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "shareId",
                    "serverId",
                    "name",
                    "sourceCode",
                    "sourceVersion",
                    "createdBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/roster/views/preview": {
      "post": {
        "operationId": "dashboardPreviewRosterView",
        "summary": "Preview a materialized roster view",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serverId": {
                    "type": "string"
                  },
                  "rosterIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "viewId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "sourceCode": {
                    "type": "string"
                  },
                  "sourceVersion": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "metricId": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "type": "object"
                        },
                        "format": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "metricId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "columnId": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "gt",
                            "gte",
                            "lt",
                            "lte",
                            "in",
                            "contains"
                          ]
                        },
                        "value": {}
                      },
                      "required": [
                        "columnId",
                        "operator",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "sort": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "columnId": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "asc",
                            "desc"
                          ]
                        }
                      },
                      "required": [
                        "columnId",
                        "direction"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "highlights": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "target": {
                          "type": "string",
                          "enum": [
                            "row",
                            "column",
                            "cell"
                          ]
                        },
                        "columnId": {
                          "type": "string"
                        },
                        "when": {
                          "type": "object",
                          "properties": {
                            "columnId": {
                              "type": "string"
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "gt",
                                "gte",
                                "lt",
                                "lte",
                                "in",
                                "contains"
                              ]
                            },
                            "value": {}
                          },
                          "required": [
                            "operator",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "tone": {
                          "type": "string",
                          "enum": [
                            "red",
                            "amber",
                            "green",
                            "blue",
                            "purple",
                            "gray"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "target",
                        "tone"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "limit": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "rosterId": {
                          "type": "string"
                        },
                        "playerTag": {
                          "type": "string"
                        },
                        "values": {
                          "type": "object"
                        },
                        "highlight": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "rosterId",
                        "playerTag",
                        "values"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "serverId",
                  "rosterIds",
                  "name",
                  "sourceCode",
                  "sourceVersion",
                  "columns",
                  "filters",
                  "sort",
                  "highlights",
                  "limit"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "view": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "shareId": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "sourceCode": {
                          "type": "string"
                        },
                        "sourceVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "createdBy": {
                          "type": "string"
                        },
                        "spec": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "columns": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "metricId": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "type": "object"
                                  },
                                  "format": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "metricId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "sort": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ]
                                  }
                                },
                                "required": [
                                  "columnId",
                                  "direction"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "filters": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "contains"
                                    ]
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "columnId",
                                  "operator",
                                  "value"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "highlights": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "target": {
                                    "type": "string",
                                    "enum": [
                                      "row",
                                      "column",
                                      "cell"
                                    ]
                                  },
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "when": {
                                    "type": "object",
                                    "properties": {
                                      "columnId": {
                                        "type": "string"
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "in",
                                          "contains"
                                        ]
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "operator",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tone": {
                                    "type": "string",
                                    "enum": [
                                      "red",
                                      "amber",
                                      "green",
                                      "blue",
                                      "purple",
                                      "gray"
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "target",
                                  "tone"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "limit": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "columns"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "shareId",
                        "serverId",
                        "name",
                        "sourceCode",
                        "sourceVersion",
                        "createdBy",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "viewId": {
                          "type": "string"
                        },
                        "rosterIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "schemaVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "rosterId": {
                                "type": "string"
                              },
                              "playerTag": {
                                "type": "string"
                              },
                              "values": {
                                "type": "object"
                              },
                              "highlight": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "rosterId",
                              "playerTag",
                              "values"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "cachedMetricIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "evaluatedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "viewId",
                        "rosterIds",
                        "schemaVersion",
                        "rows",
                        "cachedMetricIds",
                        "evaluatedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "view",
                    "result"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/roster/views/shared/{viewId}": {
      "get": {
        "operationId": "dashboardResolveSharedRosterView",
        "summary": "Resolve a saved roster-view share link",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "shareId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "sourceCode": {
                      "type": "string"
                    },
                    "sourceVersion": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "metricId": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "parameters": {
                                "type": "object"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "metricId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string",
                                "enum": [
                                  "eq",
                                  "neq",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "in",
                                  "contains"
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "columnId",
                              "operator",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "highlights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "row",
                                  "column",
                                  "cell"
                                ]
                              },
                              "columnId": {
                                "type": "string"
                              },
                              "when": {
                                "type": "object",
                                "properties": {
                                  "columnId": {
                                    "type": "string"
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "in",
                                      "contains"
                                    ]
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "operator",
                                  "value"
                                ],
                                "additionalProperties": false
                              },
                              "tone": {
                                "type": "string",
                                "enum": [
                                  "red",
                                  "amber",
                                  "green",
                                  "blue",
                                  "purple",
                                  "gray"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "target",
                              "tone"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "limit": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "columns"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "shareId",
                    "serverId",
                    "name",
                    "sourceCode",
                    "sourceVersion",
                    "createdBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/search/{guildId}/banned-players": {
      "get": {
        "operationId": "searchBannedPlayers",
        "summary": "Search server bans by player name",
        "tags": [
          "Search"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "guildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tag",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/autoboards": {
      "get": {
        "operationId": "serverAutoboards",
        "summary": "Get server autoboards",
        "tags": [
          "Server Autoboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "boardType": {
                            "type": "string"
                          },
                          "targetKind": {
                            "type": "string"
                          },
                          "targetScope": {
                            "type": "string",
                            "enum": [
                              "family",
                              "custom"
                            ]
                          },
                          "targets": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "deliveryMode": {
                            "type": "string",
                            "enum": [
                              "refresh",
                              "send"
                            ]
                          },
                          "channelId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channelDeleted": {
                            "type": "boolean"
                          },
                          "threadId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messageId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "intervalMinutes": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "daily",
                                      "weekdays",
                                      "day_of_month"
                                    ]
                                  },
                                  "timeOfDay": {
                                    "type": "string"
                                  },
                                  "weekdays": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "dayOfMonth": {
                                    "anyOf": [
                                      {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "timeOfDay"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nextRunAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastRunAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "boardType",
                          "targetKind",
                          "targetScope",
                          "targets",
                          "deliveryMode",
                          "channelId",
                          "channelDeleted",
                          "threadId",
                          "messageId",
                          "enabled",
                          "intervalMinutes",
                          "schedule",
                          "nextRunAt",
                          "lastRunAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "refreshCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "sendCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "limit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "refreshCount",
                    "sendCount",
                    "limit"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "post": {
        "operationId": "createAutoboard",
        "summary": "Create an autoboard",
        "tags": [
          "Server Autoboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardType": {
                    "type": "string"
                  },
                  "targetScope": {
                    "type": "string",
                    "enum": [
                      "family",
                      "custom"
                    ]
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "deliveryMode": {
                    "type": "string",
                    "enum": [
                      "refresh",
                      "send"
                    ]
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "threadId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "intervalMinutes": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "daily",
                              "weekdays",
                              "day_of_month"
                            ]
                          },
                          "timeOfDay": {
                            "type": "string"
                          },
                          "weekdays": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dayOfMonth": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "timeOfDay"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "boardType",
                  "targetScope",
                  "targets",
                  "deliveryMode",
                  "channelId",
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "boardType": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string"
                        },
                        "targetScope": {
                          "type": "string",
                          "enum": [
                            "family",
                            "custom"
                          ]
                        },
                        "targets": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "refresh",
                            "send"
                          ]
                        },
                        "channelId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelDeleted": {
                          "type": "boolean"
                        },
                        "threadId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "messageId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "intervalMinutes": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "schedule": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "daily",
                                    "weekdays",
                                    "day_of_month"
                                  ]
                                },
                                "timeOfDay": {
                                  "type": "string"
                                },
                                "weekdays": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "dayOfMonth": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "timeOfDay"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextRunAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "boardType",
                        "targetKind",
                        "targetScope",
                        "targets",
                        "deliveryMode",
                        "channelId",
                        "channelDeleted",
                        "threadId",
                        "messageId",
                        "enabled",
                        "intervalMinutes",
                        "schedule",
                        "nextRunAt",
                        "lastRunAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "item"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/autoboards/{autoboardId}": {
      "delete": {
        "operationId": "deleteAutoboard",
        "summary": "Delete an autoboard",
        "tags": [
          "Server Autoboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "autoboardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "replaceAutoboard",
        "summary": "Replace an autoboard",
        "tags": [
          "Server Autoboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "autoboardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardType": {
                    "type": "string"
                  },
                  "targetScope": {
                    "type": "string",
                    "enum": [
                      "family",
                      "custom"
                    ]
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "deliveryMode": {
                    "type": "string",
                    "enum": [
                      "refresh",
                      "send"
                    ]
                  },
                  "channelId": {
                    "type": "string"
                  },
                  "threadId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "intervalMinutes": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "schedule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "daily",
                              "weekdays",
                              "day_of_month"
                            ]
                          },
                          "timeOfDay": {
                            "type": "string"
                          },
                          "weekdays": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dayOfMonth": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "timeOfDay"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "boardType",
                  "targetScope",
                  "targets",
                  "deliveryMode",
                  "channelId",
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "boardType": {
                          "type": "string"
                        },
                        "targetKind": {
                          "type": "string"
                        },
                        "targetScope": {
                          "type": "string",
                          "enum": [
                            "family",
                            "custom"
                          ]
                        },
                        "targets": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "refresh",
                            "send"
                          ]
                        },
                        "channelId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelDeleted": {
                          "type": "boolean"
                        },
                        "threadId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "messageId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "intervalMinutes": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "schedule": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "daily",
                                    "weekdays",
                                    "day_of_month"
                                  ]
                                },
                                "timeOfDay": {
                                  "type": "string"
                                },
                                "weekdays": {
                                  "anyOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "dayOfMonth": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "timeOfDay"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextRunAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastRunAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "boardType",
                        "targetKind",
                        "targetScope",
                        "targets",
                        "deliveryMode",
                        "channelId",
                        "channelDeleted",
                        "threadId",
                        "messageId",
                        "enabled",
                        "intervalMinutes",
                        "schedule",
                        "nextRunAt",
                        "lastRunAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "item"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/autoboards/capabilities": {
      "get": {
        "operationId": "autoboardCapabilities",
        "summary": "Get autoboard capabilities",
        "tags": [
          "Server Autoboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "boardTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "boardType": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "targetKind": {
                            "type": "string"
                          },
                          "minTargets": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "maxTargets": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "allowedScopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "family",
                                "custom"
                              ]
                            }
                          },
                          "allowedModes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "refresh",
                                "send"
                              ]
                            }
                          },
                          "refreshInterval": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "minMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "maxMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "defaultMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "minMinutes",
                                  "maxMinutes",
                                  "defaultMinutes"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "uiCapabilities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "boardType",
                          "label",
                          "targetKind",
                          "minTargets",
                          "maxTargets",
                          "allowedScopes",
                          "allowedModes",
                          "refreshInterval",
                          "uiCapabilities"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "boardTypes"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read"
      }
    },
    "/v2/server/{serverId}/bans": {
      "get": {
        "operationId": "serverBans",
        "summary": "List server bans",
        "tags": [
          "Server Bans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "VillageTag": {
                            "type": "string"
                          },
                          "VillageName": {
                            "type": "string"
                          },
                          "DateCreated": {
                            "type": "string"
                          },
                          "Notes": {
                            "type": "string"
                          },
                          "server": {
                            "type": "string"
                          },
                          "added_by": {
                            "type": "string"
                          },
                          "added_by_username": {
                            "type": "string"
                          },
                          "added_by_avatar_url": {
                            "type": "string"
                          },
                          "edited_by": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "user": {
                                  "type": "string"
                                },
                                "previous": {
                                  "type": "object",
                                  "properties": {
                                    "reason": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "user",
                                "previous"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "image": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "town_hall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "current_role": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "VillageTag",
                          "VillageName",
                          "DateCreated",
                          "Notes",
                          "server",
                          "added_by",
                          "edited_by"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botBans",
          "serverBans"
        ]
      }
    },
    "/v2/server/{serverId}/bans/{playerTag}": {
      "delete": {
        "operationId": "removeServerBan",
        "summary": "Remove a server ban",
        "tags": [
          "Server Bans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "player_tag",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write",
        "x-clashking-operation-aliases": [
          "botDeleteBan",
          "removeServerBan"
        ]
      },
      "post": {
        "operationId": "addServerBan",
        "summary": "Add or update a server ban",
        "tags": [
          "Server Bans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "added_by": {
                    "type": "string"
                  },
                  "image": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "reason",
                  "added_by",
                  "image"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "player_tag",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write",
        "x-clashking-operation-aliases": [
          "addServerBan",
          "botSaveBan"
        ]
      }
    },
    "/v2/server/{serverId}/bases": {
      "get": {
        "operationId": "dashboardBases",
        "summary": "List server bases",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "baseLink": {
                            "type": "string"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "downloadCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "upvotes": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "downvotes": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "downloaders": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "discordMessageUrl": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "channelId",
                          "messageId",
                          "baseLink",
                          "images",
                          "description",
                          "downloadCount",
                          "upvotes",
                          "downvotes",
                          "downloaders",
                          "createdAt",
                          "discordMessageUrl"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "limit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "offset": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read",
        "x-clashking-operation-aliases": [
          "botBases",
          "dashboardBases"
        ]
      },
      "post": {
        "operationId": "createDashboardBase",
        "summary": "Create a server base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channelId": {
                    "type": "string"
                  },
                  "baseLink": {
                    "type": "string"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "channelId",
                  "baseLink",
                  "images",
                  "description"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "messageId": {
                      "type": "string"
                    },
                    "baseLink": {
                      "type": "string"
                    },
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": {
                      "type": "string"
                    },
                    "downloadCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "upvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downloaders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "discordMessageUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "serverId",
                    "channelId",
                    "messageId",
                    "baseLink",
                    "images",
                    "description",
                    "downloadCount",
                    "upvotes",
                    "downvotes",
                    "downloaders",
                    "createdAt",
                    "discordMessageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error",
                        "database_insert_failed",
                        "database_delete_failed",
                        "discord_unavailable",
                        "discord_invalid_response",
                        "discord_cleanup_failed",
                        "invalid_discord_location"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "databaseInserted": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "discordMessageCreated": {
                      "type": "boolean"
                    },
                    "discordMessageId": {
                      "type": "string"
                    },
                    "discordMessageCleanup": {
                      "type": "string",
                      "enum": [
                        "notNeeded",
                        "deleted",
                        "alreadyMissing",
                        "failed"
                      ]
                    },
                    "retryable": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "databaseInserted",
                    "discordMessageCreated",
                    "discordMessageCleanup",
                    "retryable"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "databaseInserted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCreated": {
                          "type": "boolean"
                        },
                        "discordMessageId": {
                          "type": "string"
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "notNeeded",
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "databaseInserted",
                        "discordMessageCreated",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "databaseInserted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCreated": {
                          "type": "boolean"
                        },
                        "discordMessageId": {
                          "type": "string"
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "notNeeded",
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "databaseInserted",
                        "discordMessageCreated",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "databaseInserted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCreated": {
                          "type": "boolean"
                        },
                        "discordMessageId": {
                          "type": "string"
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "notNeeded",
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "databaseInserted",
                        "discordMessageCreated",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/bases/{baseId}": {
      "delete": {
        "operationId": "deleteDashboardBase",
        "summary": "Delete a server base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "baseId": {
                      "type": "string"
                    },
                    "databaseDeleted": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "discordMessageCleanup": {
                      "type": "string",
                      "enum": [
                        "deleted",
                        "alreadyMissing"
                      ]
                    }
                  },
                  "required": [
                    "baseId",
                    "databaseDeleted",
                    "discordMessageCleanup"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error",
                        "database_insert_failed",
                        "database_delete_failed",
                        "discord_unavailable",
                        "discord_invalid_response",
                        "discord_cleanup_failed",
                        "invalid_discord_location"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "baseId": {
                      "type": "string"
                    },
                    "databaseDeleted": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "discordMessageCleanup": {
                      "type": "string",
                      "enum": [
                        "deleted",
                        "alreadyMissing",
                        "failed"
                      ]
                    },
                    "retryable": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "baseId",
                    "databaseDeleted",
                    "discordMessageCleanup",
                    "retryable"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "baseId": {
                          "type": "string"
                        },
                        "databaseDeleted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "baseId",
                        "databaseDeleted",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "baseId": {
                          "type": "string"
                        },
                        "databaseDeleted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "baseId",
                        "databaseDeleted",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error",
                            "database_insert_failed",
                            "database_delete_failed",
                            "discord_unavailable",
                            "discord_invalid_response",
                            "discord_cleanup_failed",
                            "invalid_discord_location"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "baseId": {
                          "type": "string"
                        },
                        "databaseDeleted": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "discordMessageCleanup": {
                          "type": "string",
                          "enum": [
                            "deleted",
                            "alreadyMissing",
                            "failed"
                          ]
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "baseId",
                        "databaseDeleted",
                        "discordMessageCleanup",
                        "retryable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "validation_failed",
                            "unauthenticated",
                            "forbidden",
                            "not_found",
                            "conflict",
                            "rate_limited",
                            "payload_too_large",
                            "unprocessable_entity",
                            "not_implemented",
                            "upstream_unavailable",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "message"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      },
      "get": {
        "operationId": "dashboardBase",
        "summary": "Get one server base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "messageId": {
                      "type": "string"
                    },
                    "baseLink": {
                      "type": "string"
                    },
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": {
                      "type": "string"
                    },
                    "downloadCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "upvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downloaders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "discordMessageUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "serverId",
                    "channelId",
                    "messageId",
                    "baseLink",
                    "images",
                    "description",
                    "downloadCount",
                    "upvotes",
                    "downvotes",
                    "downloaders",
                    "createdAt",
                    "discordMessageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read",
        "x-clashking-operation-aliases": [
          "botBase",
          "dashboardBase"
        ]
      },
      "patch": {
        "operationId": "updateDashboardBase",
        "summary": "Update a server base",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseLink": {
                    "type": "string"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "baseLink",
                  "images",
                  "description"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "messageId": {
                      "type": "string"
                    },
                    "baseLink": {
                      "type": "string"
                    },
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": {
                      "type": "string"
                    },
                    "downloadCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "upvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downvotes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "downloaders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "discordMessageUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "serverId",
                    "channelId",
                    "messageId",
                    "baseLink",
                    "images",
                    "description",
                    "downloadCount",
                    "upvotes",
                    "downvotes",
                    "downloaders",
                    "createdAt",
                    "discordMessageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/bases/{baseId}/downloaders/{userId}": {
      "get": {
        "operationId": "baseDownloader",
        "summary": "Get a base downloader's Discord profile",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "displayName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatarUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "userId",
                    "displayName",
                    "avatarUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read"
      }
    },
    "/v2/server/{serverId}/bases/images": {
      "post": {
        "operationId": "uploadDashboardBaseImage",
        "summary": "Upload a server base image",
        "tags": [
          "Bases"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "filename"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/bot-profile": {
      "get": {
        "operationId": "botGuildProfile",
        "summary": "Get the bot's per-server profile",
        "tags": [
          "Bot Profile"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "avatar_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "banner_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bio": {
                      "type": "string"
                    },
                    "name_inherited": {
                      "type": "boolean"
                    },
                    "avatar_inherited": {
                      "type": "boolean"
                    },
                    "banner_inherited": {
                      "type": "boolean"
                    },
                    "bio_inherited": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "avatar_url",
                    "banner_url",
                    "bio",
                    "name_inherited",
                    "avatar_inherited",
                    "banner_inherited",
                    "bio_inherited"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "updateBotGuildProfile",
        "summary": "Update the bot's per-server profile",
        "tags": [
          "Bot Profile"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "avatar": {
                    "type": "string"
                  },
                  "banner": {
                    "type": "string"
                  },
                  "bio": {
                    "type": "string"
                  },
                  "clear_name": {
                    "type": "boolean"
                  },
                  "clear_avatar": {
                    "type": "boolean"
                  },
                  "clear_banner": {
                    "type": "boolean"
                  },
                  "clear_bio": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "avatar_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "banner_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bio": {
                      "type": "string"
                    },
                    "name_inherited": {
                      "type": "boolean"
                    },
                    "avatar_inherited": {
                      "type": "boolean"
                    },
                    "banner_inherited": {
                      "type": "boolean"
                    },
                    "bio_inherited": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name",
                    "avatar_url",
                    "banner_url",
                    "bio",
                    "name_inherited",
                    "avatar_inherited",
                    "banner_inherited",
                    "bio_inherited"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/channels": {
      "get": {
        "operationId": "serverChannels",
        "summary": "List Discord channels",
        "tags": [
          "Server Discord"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "category",
                          "text",
                          "news",
                          "forum"
                        ]
                      },
                      "parent_id": {
                        "type": "string"
                      },
                      "parent_name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "type"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/clan-categories": {
      "get": {
        "operationId": "clanCategories",
        "summary": "List server clan categories",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clanCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "name",
                          "position",
                          "clanCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read"
      },
      "post": {
        "operationId": "createClanCategory",
        "summary": "Create a server clan category",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "position": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "clanCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "serverId",
                        "name",
                        "position",
                        "clanCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "category"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/clan-categories/{categoryId}": {
      "delete": {
        "operationId": "deleteClanCategory",
        "summary": "Delete a server clan category",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categoryId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean"
                    },
                    "uncategorizedClanCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "categoryId",
                    "name",
                    "deleted",
                    "uncategorizedClanCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      },
      "patch": {
        "operationId": "renameClanCategory",
        "summary": "Rename a server clan category",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "position": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "clanCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "serverId",
                        "name",
                        "position",
                        "clanCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "category"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/clan-categories/{categoryId}/delete-preview": {
      "get": {
        "operationId": "previewClanCategoryDelete",
        "summary": "Preview deleting a clan category",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "position": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "clanCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "serverId",
                        "name",
                        "position",
                        "clanCount"
                      ],
                      "additionalProperties": false
                    },
                    "affectedClanCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "category",
                    "affectedClanCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read"
      }
    },
    "/v2/server/{serverId}/clan-categories/order": {
      "put": {
        "operationId": "reorderClanCategories",
        "summary": "Replace the server clan category order",
        "tags": [
          "Clan Categories"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "categoryIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clanCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "name",
                          "position",
                          "clanCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/clan/{clanTag}/countdowns": {
      "get": {
        "operationId": "clanCountdowns",
        "summary": "List clan countdowns",
        "tags": [
          "Server Countdowns"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "countdowns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "clan_games_timer",
                              "cwl_timer",
                              "raid_weekend_timer",
                              "season_end_timer",
                              "season_day_timer",
                              "war_score",
                              "war_timer"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "channel_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "enabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "clan_tag",
                    "countdowns"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/clan/{clanTag}/settings": {
      "get": {
        "operationId": "serverClanSettings",
        "summary": "Get one server clan's settings",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "abbreviation": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tag",
                    "name",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "updateServerClanSettings",
        "summary": "Update one server clan's settings",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "abbreviation": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "updated_fields": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "category": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "serverId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "position": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "clanCount": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "serverId",
                            "name",
                            "position",
                            "clanCount"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "server_id",
                    "clan_tag",
                    "updated_fields",
                    "category"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/clans-basic": {
      "get": {
        "operationId": "serverClansBasic",
        "summary": "List basic server clan references",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tag": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "tag",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botServerClans",
          "serverClansBasic"
        ]
      }
    },
    "/v2/server/{serverId}/clans": {
      "get": {
        "operationId": "serverClans",
        "summary": "List full server clans",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tag": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "badge_url": {
                        "type": "string"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "member_count": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      },
                      "added_at": {
                        "type": "string"
                      },
                      "settings": {
                        "type": "object",
                        "properties": {
                          "category": {
                            "type": "string"
                          },
                          "abbreviation": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "tag",
                      "name",
                      "added_at",
                      "settings"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "post": {
        "operationId": "addServerClan",
        "summary": "Add a clan to a server",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string"
                  }
                },
                "required": [
                  "tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "clan_name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "server_id",
                    "clan_tag",
                    "clan_name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/clans/{clanTag}": {
      "delete": {
        "operationId": "removeServerClan",
        "summary": "Remove a clan from a server",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "deleted_count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "server_id",
                    "clan_tag",
                    "deleted_count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/countdowns": {
      "delete": {
        "operationId": "disableCountdown",
        "summary": "Disable a server or clan countdown",
        "tags": [
          "Server Countdowns"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countdown_type": {
                    "type": "string",
                    "enum": [
                      "clan_games_timer",
                      "cwl_timer",
                      "raid_weekend_timer",
                      "season_end_timer",
                      "season_day_timer",
                      "war_score",
                      "war_timer"
                    ]
                  },
                  "clan_tag": {
                    "type": "string"
                  }
                },
                "required": [
                  "countdown_type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "countdown_type": {
                      "type": "string",
                      "enum": [
                        "clan_games_timer",
                        "cwl_timer",
                        "raid_weekend_timer",
                        "season_end_timer",
                        "season_day_timer",
                        "war_score",
                        "war_timer"
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "countdown_type"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "serverCountdowns",
        "summary": "List server countdowns",
        "tags": [
          "Server Countdowns"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "countdowns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "clan_games_timer",
                              "cwl_timer",
                              "raid_weekend_timer",
                              "season_end_timer",
                              "season_day_timer",
                              "war_score",
                              "war_timer"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "channel_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "enabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "countdowns"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "post": {
        "operationId": "enableCountdown",
        "summary": "Enable a server or clan countdown",
        "tags": [
          "Server Countdowns"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countdown_type": {
                    "type": "string",
                    "enum": [
                      "clan_games_timer",
                      "cwl_timer",
                      "raid_weekend_timer",
                      "season_end_timer",
                      "season_day_timer",
                      "war_score",
                      "war_timer"
                    ]
                  },
                  "clan_tag": {
                    "type": "string"
                  }
                },
                "required": [
                  "countdown_type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "countdown_type": {
                      "type": "string",
                      "enum": [
                        "clan_games_timer",
                        "cwl_timer",
                        "raid_weekend_timer",
                        "season_end_timer",
                        "season_day_timer",
                        "war_score",
                        "war_timer"
                      ]
                    },
                    "channel_id": {
                      "type": "string"
                    },
                    "channel_name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "countdown_type",
                    "channel_id",
                    "channel_name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/cwl/{clanTag}/bonus-recipients": {
      "get": {
        "operationId": "dashboardCwlBonusRecipients",
        "summary": "Get saved CWL bonus recipients",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "playerTag": {
                            "type": "string"
                          },
                          "medalCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "playerTag",
                          "medalCount"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "put": {
        "operationId": "dashboardReplaceCwlBonusRecipients",
        "summary": "Replace saved CWL bonus recipients",
        "tags": [
          "Server Clans"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipients": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "playerTag": {
                          "type": "string"
                        },
                        "medalCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "playerTag",
                        "medalCount"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "recipients"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "playerTag": {
                            "type": "string"
                          },
                          "medalCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "playerTag",
                          "medalCount"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/dashboard-access": {
      "get": {
        "operationId": "dashboardAccess",
        "summary": "Get assignable roles and Dashboard access grants",
        "tags": [
          "Dashboard Access"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "position"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role_id": {
                            "type": "string"
                          },
                          "section": {
                            "type": "string"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "manage"
                            ]
                          }
                        },
                        "required": [
                          "role_id",
                          "section",
                          "access_level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "roles",
                    "grants",
                    "sections"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-read"
      },
      "put": {
        "operationId": "updateDashboardAccess",
        "summary": "Replace Dashboard access grants",
        "tags": [
          "Dashboard Access"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role_id": {
                          "type": "string"
                        },
                        "section": {
                          "type": "string"
                        },
                        "access_level": {
                          "type": "string",
                          "enum": [
                            "view",
                            "manage"
                          ]
                        }
                      },
                      "required": [
                        "role_id",
                        "section",
                        "access_level"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "grants"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "position"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role_id": {
                            "type": "string"
                          },
                          "section": {
                            "type": "string"
                          },
                          "access_level": {
                            "type": "string",
                            "enum": [
                              "view",
                              "manage"
                            ]
                          }
                        },
                        "required": [
                          "role_id",
                          "section",
                          "access_level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "roles",
                    "grants",
                    "sections"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/dashboard-capabilities": {
      "get": {
        "operationId": "dashboardCapabilities",
        "summary": "Get effective Dashboard section capabilities",
        "tags": [
          "Dashboard Access"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "full_access": {
                      "type": "boolean"
                    },
                    "sections": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "enum": [
                          "view",
                          "manage"
                        ]
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "full_access",
                    "sections"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot",
        "x-clashking-operation-aliases": [
          "botDashboardCapabilities",
          "dashboardCapabilities"
        ]
      }
    },
    "/v2/server/{serverId}/discord-roles": {
      "get": {
        "operationId": "discordRoles",
        "summary": "List assignable Discord roles",
        "tags": [
          "Server Discord"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "position": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "managed": {
                            "type": "boolean"
                          },
                          "mentionable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "position",
                          "managed",
                          "mentionable"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "roles",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/discord-test": {
      "get": {
        "operationId": "serverDiscordTest",
        "summary": "Test Discord API access",
        "tags": [
          "Server Discord"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "bot_token_present": {
                      "type": "boolean"
                    },
                    "guild_name": {
                      "type": "string"
                    },
                    "status_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "message",
                    "bot_token_present"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/embed-color/{hexCode}": {
      "put": {
        "operationId": "updateServerEmbedColor",
        "summary": "Set the server embed color",
        "tags": [
          "Server Settings"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hexCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "embed_color": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "server_id",
                    "embed_color"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/embeds": {
      "get": {
        "operationId": "serverEmbeds",
        "summary": "List server embeds",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "data": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "username": {
                                "type": "string"
                              },
                              "avatar_url": {
                                "type": "string"
                              },
                              "embeds": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "timestamp": {
                                      "type": "string"
                                    },
                                    "color": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "footer": {
                                      "type": "object",
                                      "properties": {
                                        "text": {
                                          "type": "string"
                                        },
                                        "icon_url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "text"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "image": {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "thumbnail": {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "author": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "icon_url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "fields": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          },
                                          "inline": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "components": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                }
                              },
                              "messages": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "data": {
                                      "type": "object",
                                      "properties": {
                                        "content": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "username": {
                                          "type": "string"
                                        },
                                        "avatar_url": {
                                          "type": "string"
                                        },
                                        "tts": {
                                          "type": "boolean"
                                        },
                                        "embeds": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "title": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "url": {
                                                "type": "string"
                                              },
                                              "timestamp": {
                                                "type": "string"
                                              },
                                              "color": {
                                                "anyOf": [
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "NaN"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "Infinity"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "-Infinity"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "footer": {
                                                "type": "object",
                                                "properties": {
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "icon_url": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "text"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "image": {
                                                "type": "object",
                                                "properties": {
                                                  "url": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "url"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "thumbnail": {
                                                "type": "object",
                                                "properties": {
                                                  "url": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "url"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "author": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  },
                                                  "url": {
                                                    "type": "string"
                                                  },
                                                  "icon_url": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              },
                                              "fields": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "value": {
                                                      "type": "string"
                                                    },
                                                    "inline": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "value"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        },
                                        "components": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                          }
                                        },
                                        "attachments": {
                                          "type": "array",
                                          "items": {
                                            "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                          }
                                        },
                                        "allowed_mentions": {
                                          "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                        },
                                        "flags": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "additionalProperties": {
                                            "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "data"
                                  ],
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "additionalProperties": {
                                        "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                      }
                                    }
                                  ]
                                }
                              },
                              "application_id": {
                                "type": "string"
                              }
                            },
                            "allOf": [
                              {
                                "type": "object",
                                "additionalProperties": {
                                  "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
                                }
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "data"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botEmbeds",
          "serverEmbeds"
        ]
      },
      "post": {
        "operationId": "createServerEmbed",
        "summary": "Create a server embed",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "username": {
                        "type": "string"
                      },
                      "avatar_url": {
                        "type": "string"
                      },
                      "embeds": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "timestamp": {
                              "type": "string"
                            },
                            "color": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "footer": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string"
                                },
                                "icon_url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "image": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "thumbnail": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "icon_url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "fields": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "inline": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "value"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "components": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                        }
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "content": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "username": {
                                  "type": "string"
                                },
                                "avatar_url": {
                                  "type": "string"
                                },
                                "tts": {
                                  "type": "boolean"
                                },
                                "embeds": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "title": {
                                        "type": "string"
                                      },
                                      "description": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "timestamp": {
                                        "type": "string"
                                      },
                                      "color": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "footer": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "icon_url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "image": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "thumbnail": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "author": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "icon_url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "fields": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "value": {
                                              "type": "string"
                                            },
                                            "inline": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                },
                                "allowed_mentions": {
                                  "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                },
                                "flags": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "data"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {
                                "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                              }
                            }
                          ]
                        }
                      },
                      "application_id": {
                        "type": "string"
                      }
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/embeds/{embedName}": {
      "delete": {
        "operationId": "deleteServerEmbed",
        "summary": "Delete a server embed",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "embedName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "updateServerEmbed",
        "summary": "Update a server embed",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "embedName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "username": {
                        "type": "string"
                      },
                      "avatar_url": {
                        "type": "string"
                      },
                      "embeds": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "timestamp": {
                              "type": "string"
                            },
                            "color": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            "footer": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string"
                                },
                                "icon_url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "image": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "thumbnail": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "icon_url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "fields": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "inline": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "value"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "components": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                        }
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "content": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "username": {
                                  "type": "string"
                                },
                                "avatar_url": {
                                  "type": "string"
                                },
                                "tts": {
                                  "type": "boolean"
                                },
                                "embeds": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "title": {
                                        "type": "string"
                                      },
                                      "description": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "timestamp": {
                                        "type": "string"
                                      },
                                      "color": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "NaN"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "Infinity"
                                            ]
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "-Infinity"
                                            ]
                                          }
                                        ]
                                      },
                                      "footer": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "icon_url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "image": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "thumbnail": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "author": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "icon_url": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "fields": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "value": {
                                              "type": "string"
                                            },
                                            "inline": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "value"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                },
                                "allowed_mentions": {
                                  "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                },
                                "flags": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "allOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": {
                                    "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "data"
                          ],
                          "allOf": [
                            {
                              "type": "object",
                              "additionalProperties": {
                                "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                              }
                            }
                          ]
                        }
                      },
                      "application_id": {
                        "type": "string"
                      }
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/giveaways": {
      "get": {
        "operationId": "serverGiveaways",
        "summary": "List server giveaways",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ongoing": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "prize": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "ongoing",
                              "ended"
                            ]
                          },
                          "start": {
                            "type": "string"
                          },
                          "end": {
                            "type": "string"
                          },
                          "winners": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "textAboveEmbed": {
                            "type": "string"
                          },
                          "textInEmbed": {
                            "type": "string"
                          },
                          "textOnEnd": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": "string"
                          },
                          "profilePictureRequired": {
                            "type": "boolean"
                          },
                          "cocAccountRequired": {
                            "type": "boolean"
                          },
                          "rolesMode": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny",
                              "none"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "boosters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "roles": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "value",
                                "roles"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "entries": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "user_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "user_id"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "winnersList": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "username": {
                                  "type": "string"
                                },
                                "avatarUrl": {
                                  "type": "string"
                                },
                                "inServer": {
                                  "type": "boolean"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "winner",
                                    "rerolled"
                                  ]
                                },
                                "timestamp": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "userId",
                                "inServer",
                                "status"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updated": {
                            "type": "boolean"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "eventPending": {
                            "type": "string"
                          },
                          "eventPendingAt": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "prize",
                          "status",
                          "start",
                          "end",
                          "winners",
                          "mentions",
                          "textAboveEmbed",
                          "textInEmbed",
                          "textOnEnd",
                          "profilePictureRequired",
                          "cocAccountRequired",
                          "rolesMode",
                          "roles",
                          "boosters",
                          "entries",
                          "winnersList",
                          "updated",
                          "disabled",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "upcoming": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "prize": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "ongoing",
                              "ended"
                            ]
                          },
                          "start": {
                            "type": "string"
                          },
                          "end": {
                            "type": "string"
                          },
                          "winners": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "textAboveEmbed": {
                            "type": "string"
                          },
                          "textInEmbed": {
                            "type": "string"
                          },
                          "textOnEnd": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": "string"
                          },
                          "profilePictureRequired": {
                            "type": "boolean"
                          },
                          "cocAccountRequired": {
                            "type": "boolean"
                          },
                          "rolesMode": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny",
                              "none"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "boosters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "roles": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "value",
                                "roles"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "entries": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "user_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "user_id"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "winnersList": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "username": {
                                  "type": "string"
                                },
                                "avatarUrl": {
                                  "type": "string"
                                },
                                "inServer": {
                                  "type": "boolean"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "winner",
                                    "rerolled"
                                  ]
                                },
                                "timestamp": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "userId",
                                "inServer",
                                "status"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updated": {
                            "type": "boolean"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "eventPending": {
                            "type": "string"
                          },
                          "eventPendingAt": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "prize",
                          "status",
                          "start",
                          "end",
                          "winners",
                          "mentions",
                          "textAboveEmbed",
                          "textInEmbed",
                          "textOnEnd",
                          "profilePictureRequired",
                          "cocAccountRequired",
                          "rolesMode",
                          "roles",
                          "boosters",
                          "entries",
                          "winnersList",
                          "updated",
                          "disabled",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "ended": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string"
                          },
                          "prize": {
                            "type": "string"
                          },
                          "channelId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "ongoing",
                              "ended"
                            ]
                          },
                          "start": {
                            "type": "string"
                          },
                          "end": {
                            "type": "string"
                          },
                          "winners": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "textAboveEmbed": {
                            "type": "string"
                          },
                          "textInEmbed": {
                            "type": "string"
                          },
                          "textOnEnd": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": "string"
                          },
                          "profilePictureRequired": {
                            "type": "boolean"
                          },
                          "cocAccountRequired": {
                            "type": "boolean"
                          },
                          "rolesMode": {
                            "type": "string",
                            "enum": [
                              "allow",
                              "deny",
                              "none"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "boosters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "roles": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "value",
                                "roles"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "entries": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "user_id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "user_id"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "winnersList": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "username": {
                                  "type": "string"
                                },
                                "avatarUrl": {
                                  "type": "string"
                                },
                                "inServer": {
                                  "type": "boolean"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "winner",
                                    "rerolled"
                                  ]
                                },
                                "timestamp": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "userId",
                                "inServer",
                                "status"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "updated": {
                            "type": "boolean"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messageId": {
                            "type": "string"
                          },
                          "eventPending": {
                            "type": "string"
                          },
                          "eventPendingAt": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "serverId",
                          "prize",
                          "status",
                          "start",
                          "end",
                          "winners",
                          "mentions",
                          "textAboveEmbed",
                          "textInEmbed",
                          "textOnEnd",
                          "profilePictureRequired",
                          "cocAccountRequired",
                          "rolesMode",
                          "roles",
                          "boosters",
                          "entries",
                          "winnersList",
                          "updated",
                          "disabled",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "ongoing",
                    "upcoming",
                    "ended",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botGiveaways",
          "serverGiveaways"
        ]
      },
      "post": {
        "operationId": "createServerGiveaway",
        "summary": "Create a server giveaway",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "giveawayId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "giveawayId",
                    "serverId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/giveaways/{giveawayId}": {
      "delete": {
        "operationId": "deleteServerGiveaway",
        "summary": "Delete a server giveaway",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giveawayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "giveawayId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "giveawayId",
                    "serverId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "serverGiveaway",
        "summary": "Get one server giveaway",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "giveawayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "prize": {
                      "type": "string"
                    },
                    "channelId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "ongoing",
                        "ended"
                      ]
                    },
                    "start": {
                      "type": "string"
                    },
                    "end": {
                      "type": "string"
                    },
                    "winners": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "textAboveEmbed": {
                      "type": "string"
                    },
                    "textInEmbed": {
                      "type": "string"
                    },
                    "textOnEnd": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": "string"
                    },
                    "profilePictureRequired": {
                      "type": "boolean"
                    },
                    "cocAccountRequired": {
                      "type": "boolean"
                    },
                    "rolesMode": {
                      "type": "string",
                      "enum": [
                        "allow",
                        "deny",
                        "none"
                      ]
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "boosters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "value",
                          "roles"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "user_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "user_id"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "winnersList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "avatarUrl": {
                            "type": "string"
                          },
                          "inServer": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "winner",
                              "rerolled"
                            ]
                          },
                          "timestamp": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "inServer",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "updated": {
                      "type": "boolean"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "disabled_reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "messageId": {
                      "type": "string"
                    },
                    "eventPending": {
                      "type": "string"
                    },
                    "eventPendingAt": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "serverId",
                    "prize",
                    "status",
                    "start",
                    "end",
                    "winners",
                    "mentions",
                    "textAboveEmbed",
                    "textInEmbed",
                    "textOnEnd",
                    "profilePictureRequired",
                    "cocAccountRequired",
                    "rolesMode",
                    "roles",
                    "boosters",
                    "entries",
                    "winnersList",
                    "updated",
                    "disabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botGiveaway",
          "serverGiveaway"
        ]
      },
      "put": {
        "operationId": "updateServerGiveaway",
        "summary": "Update a server giveaway",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giveawayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "giveawayId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "giveawayId",
                    "serverId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/giveaways/{giveawayId}/entries": {
      "get": {
        "operationId": "giveawayEntries",
        "summary": "List giveaway entrants",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giveawayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "giveawayId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "totalEntries": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "uniqueUsers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "entrants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "entries": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "winChance": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "userId",
                          "entries",
                          "winChance"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "giveawayId",
                    "serverId",
                    "totalEntries",
                    "uniqueUsers",
                    "entrants"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/giveaways/{giveawayId}/reroll": {
      "post": {
        "operationId": "rerollGiveaway",
        "summary": "Reroll selected giveaway winners",
        "tags": [
          "Server Giveaways"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giveawayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_ids_to_replace": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "user_ids_to_replace"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "giveawayId": {
                      "type": "string"
                    },
                    "serverId": {
                      "type": "string"
                    },
                    "newWinners": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "message",
                    "giveawayId",
                    "serverId",
                    "newWinners"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write",
        "x-clashking-operation-aliases": [
          "botRerollGiveaway",
          "rerollGiveaway"
        ]
      }
    },
    "/v2/server/{serverId}/leaderboards": {
      "get": {
        "operationId": "serverLeaderboards",
        "summary": "Get server leaderboards",
        "tags": [
          "Server Leaderboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit_players",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "limit_clans",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "total_players": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_clans": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "players": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "player_tag": {
                            "type": "string"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "global_rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "local_rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "location_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country_code": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "legend_trophies": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "player_tag",
                          "player_name",
                          "clan_tag",
                          "clan_name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "global_rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "local_rank": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country_code": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan_level": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clan_points": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "member_count": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "capital_points": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "clan_tag",
                          "clan_name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "total_players",
                    "total_clans",
                    "players",
                    "clans"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/leaderboards/clan-games": {
      "get": {
        "operationId": "botServerClanGamesLeaderboard",
        "summary": "Get server Clan Games leaderboard",
        "tags": [
          "Server Leaderboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "season": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "clan_games": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "score": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "rank",
                          "player_tag",
                          "player_name",
                          "clan_tag",
                          "clan_name",
                          "clan_games",
                          "score"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "season",
                    "type",
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/leaderboards/donations": {
      "get": {
        "operationId": "botServerDonationsLeaderboard",
        "summary": "Get server donation leaderboard",
        "tags": [
          "Server Leaderboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "season": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "donated": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "received": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "score": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "rank",
                          "player_tag",
                          "player_name",
                          "clan_tag",
                          "clan_name",
                          "donated",
                          "received",
                          "score"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "season",
                    "type",
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/leaderboards/legends": {
      "get": {
        "operationId": "botServerLegendsLeaderboard",
        "summary": "Get server Legend leaderboard",
        "tags": [
          "Server Leaderboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "player_tag": {
                            "type": "string"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "player_tag",
                          "player_name",
                          "clan_tag",
                          "clan_name",
                          "trophies"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/leaderboards/war-performance": {
      "get": {
        "operationId": "botServerWarLeaderboard",
        "summary": "Get server war leaderboard",
        "tags": [
          "Server Leaderboards"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "player_tag": {
                            "type": "string"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "townhall_level": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "total_attacks": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "total_stars": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_stars": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "average_destruction": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "three_star_attacks": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "three_star_rate": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "destruction_percentage": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "rank",
                          "player_tag",
                          "player_name",
                          "clan_tag",
                          "clan_name",
                          "total_attacks",
                          "total_stars",
                          "average_stars",
                          "average_destruction",
                          "destruction_percentage"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "items",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/logs": {
      "delete": {
        "operationId": "deleteServerLogs",
        "summary": "Delete server log destinations",
        "tags": [
          "Server Logs"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clan_tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "log_types",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "updated_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "deleted_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "message",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "get": {
        "operationId": "serverLogs",
        "summary": "List server log destinations",
        "tags": [
          "Server Logs"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "logs",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "updateServerLogsState",
        "summary": "Enable or disable server logs",
        "tags": [
          "Server Logs"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clan_tag": {
                    "type": "string"
                  },
                  "log_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "disabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "log_types",
                  "disabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "updated_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "deleted_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "message",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "saveServerLogs",
        "summary": "Assign server log destinations",
        "tags": [
          "Server Logs"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clan_tag": {
                    "type": "string"
                  },
                  "channel_id": {
                    "type": "string"
                  },
                  "thread_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "log_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "channel_id",
                  "log_types"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "clan_tag": {
                      "type": "string"
                    },
                    "updated_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "deleted_log_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "webhook_id": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "message",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/panel": {
      "get": {
        "operationId": "serverPanel",
        "summary": "Get the server welcome panel",
        "tags": [
          "Server Panels"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "embed_name": {
                      "type": "string"
                    },
                    "buttons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "button_color": {
                      "type": "string"
                    },
                    "welcome_channel": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "buttons",
                    "button_color"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "put": {
        "operationId": "updateServerPanel",
        "summary": "Update the server welcome panel",
        "tags": [
          "Server Panels"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "embed_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "buttons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "button_color": {
                    "type": "string"
                  },
                  "welcome_channel": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "buttons",
                  "button_color"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "embed_name": {
                      "type": "string"
                    },
                    "buttons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "button_color": {
                      "type": "string"
                    },
                    "welcome_channel": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "buttons",
                    "button_color"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/reactivate": {
      "post": {
        "operationId": "reactivateServer",
        "summary": "Re-enable inactive server tracking",
        "tags": [
          "Other"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-manager-write"
      }
    },
    "/v2/server/{serverId}/reminders": {
      "get": {
        "operationId": "serverReminders",
        "summary": "List server reminders",
        "tags": [
          "Server Reminders"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "war_reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "custom_text": {
                            "type": "string"
                          },
                          "townhall_filter": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "war_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "point_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attack_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "ping_type": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "time",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "capital_reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "custom_text": {
                            "type": "string"
                          },
                          "townhall_filter": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "war_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "point_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attack_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "ping_type": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "time",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clan_games_reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "custom_text": {
                            "type": "string"
                          },
                          "townhall_filter": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "war_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "point_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attack_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "ping_type": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "time",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "inactivity_reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "custom_text": {
                            "type": "string"
                          },
                          "townhall_filter": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "war_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "point_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attack_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "ping_type": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "time",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "roster_reminders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "channel_id": {
                            "type": "string"
                          },
                          "thread_id": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "time": {
                            "type": "string"
                          },
                          "custom_text": {
                            "type": "string"
                          },
                          "townhall_filter": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            }
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "war_types": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "point_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attack_threshold": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "roster_id": {
                            "type": "string"
                          },
                          "ping_type": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "disabled_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "time",
                          "disabled"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "war_reminders",
                    "capital_reminders",
                    "clan_games_reminders",
                    "inactivity_reminders",
                    "roster_reminders"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botReminders",
          "serverReminders"
        ]
      },
      "post": {
        "operationId": "createServerReminder",
        "summary": "Create a server reminder",
        "tags": [
          "Server Reminders"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "clan_tag": {
                    "type": "string"
                  },
                  "channel_id": {
                    "type": "string"
                  },
                  "thread_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "time": {
                    "type": "string"
                  },
                  "custom_text": {
                    "type": "string"
                  },
                  "townhall_filter": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "war_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "point_threshold": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "attack_threshold": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "roster_id": {
                    "type": "string"
                  },
                  "ping_type": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "channel_id",
                  "time"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "reminder_id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "reminder_id",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/reminders/{reminderId}": {
      "delete": {
        "operationId": "deleteServerReminder",
        "summary": "Delete a server reminder",
        "tags": [
          "Server Reminders"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reminderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "reminder_id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "reminder_id",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "updateServerReminder",
        "summary": "Update a server reminder",
        "tags": [
          "Server Reminders"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reminderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_id": {
                    "type": "string"
                  },
                  "thread_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "time": {
                    "type": "string"
                  },
                  "custom_text": {
                    "type": "string"
                  },
                  "townhall_filter": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "war_types": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "point_threshold": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "attack_threshold": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "ping_type": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "reminder_id": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "reminder_id",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/role-settings": {
      "get": {
        "operationId": "roleSettings",
        "summary": "Get server role automation settings",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "auto_eval_status": {
                      "type": "boolean"
                    },
                    "auto_eval_nickname": {
                      "type": "boolean"
                    },
                    "autoeval_triggers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "autoeval_log": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "updateRoleSettings",
        "summary": "Update server role automation settings",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "auto_eval_status": {
                    "type": "boolean"
                  },
                  "auto_eval_nickname": {
                    "type": "boolean"
                  },
                  "autoeval_triggers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "autoeval_log": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/rosters": {
      "get": {
        "operationId": "botRosters",
        "summary": "Get server rosters",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "minTownhall": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "maxTownhall": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "databaseId": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "serverId": {
                            "type": "string",
                            "pattern": "^\\d{1,20}$",
                            "description": "Discord snowflake as an unsigned decimal string"
                          },
                          "alias": {
                            "type": "string"
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clanTag": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publicShareId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "displayColumnIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "sortConfiguration": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "columnId": {
                                  "type": "string"
                                },
                                "direction": {
                                  "type": "string",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ]
                                }
                              },
                              "required": [
                                "columnId",
                                "direction"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "webhookId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{1,20}$",
                                "description": "Discord snowflake as an unsigned decimal string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "messageId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{1,20}$",
                                "description": "Discord snowflake as an unsigned decimal string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "questionnaire": {
                            "type": "object",
                            "properties": {
                              "accountSelector": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "required": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "required"
                                ],
                                "additionalProperties": false
                              },
                              "questions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "options": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "type",
                                    "required",
                                    "options",
                                    "order"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "accountSelector",
                              "questions"
                            ],
                            "additionalProperties": false
                          },
                          "memberCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "refreshedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revision": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "minTownhall",
                          "maxTownhall",
                          "id",
                          "serverId",
                          "alias",
                          "description",
                          "clanTag",
                          "publicShareId",
                          "displayColumnIds",
                          "sortConfiguration",
                          "webhookId",
                          "messageId",
                          "questionnaire",
                          "memberCount",
                          "refreshedAt",
                          "revision",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}": {
      "get": {
        "operationId": "botRoster",
        "summary": "Get server roster",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roster": {
                      "type": "object",
                      "properties": {
                        "minTownhall": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxTownhall": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "databaseId": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "serverId": {
                          "type": "string",
                          "pattern": "^\\d{1,20}$",
                          "description": "Discord snowflake as an unsigned decimal string"
                        },
                        "alias": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clanTag": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "publicShareId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "displayColumnIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sortConfiguration": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "columnId": {
                                "type": "string"
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "asc",
                                  "desc"
                                ]
                              }
                            },
                            "required": [
                              "columnId",
                              "direction"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "webhookId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{1,20}$",
                              "description": "Discord snowflake as an unsigned decimal string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "messageId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{1,20}$",
                              "description": "Discord snowflake as an unsigned decimal string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionnaire": {
                          "type": "object",
                          "properties": {
                            "accountSelector": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string"
                                },
                                "required": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "required"
                              ],
                              "additionalProperties": false
                            },
                            "questions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "required": {
                                    "type": "boolean"
                                  },
                                  "options": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "type",
                                  "required",
                                  "options",
                                  "order"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "accountSelector",
                            "questions"
                          ],
                          "additionalProperties": false
                        },
                        "memberCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "refreshedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "playerTag": {
                                "type": "string"
                              },
                              "playerName": {
                                "type": "string"
                              },
                              "clanTag": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clanName": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "townhall": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "trophies": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "leagueId": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "leagueName": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "heroLevelSum": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "maxPercent": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warPreference": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "discordUserId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d{1,20}$",
                                    "description": "Discord snowflake as an unsigned decimal string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "discordUsername": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "discordAvatarUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastOnline": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "refreshedAt": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers": {}
                            },
                            "required": [
                              "playerTag",
                              "playerName",
                              "clanTag",
                              "clanName",
                              "townhall",
                              "trophies",
                              "leagueId",
                              "leagueName",
                              "heroLevelSum",
                              "maxPercent",
                              "warPreference",
                              "discordUserId",
                              "discordUsername",
                              "discordAvatarUrl",
                              "lastOnline",
                              "refreshedAt",
                              "answers"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "minTownhall",
                        "maxTownhall",
                        "id",
                        "serverId",
                        "alias",
                        "description",
                        "clanTag",
                        "publicShareId",
                        "displayColumnIds",
                        "sortConfiguration",
                        "webhookId",
                        "messageId",
                        "questionnaire",
                        "memberCount",
                        "refreshedAt",
                        "revision",
                        "createdAt",
                        "updatedAt",
                        "members"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "roster"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}/discord-identity/refresh": {
      "post": {
        "operationId": "dashboardRefreshRosterDiscordIdentity",
        "summary": "Refresh one roster member's Discord identity",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "playerTag": {
                    "type": "string"
                  }
                },
                "required": [
                  "playerTag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "playerTag": {
                      "type": "string"
                    },
                    "discordUserId": {
                      "type": "string"
                    },
                    "discordUsername": {
                      "type": "string"
                    },
                    "discordAvatarUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "playerTag",
                    "discordUserId",
                    "discordUsername",
                    "discordAvatarUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}/missing-members": {
      "get": {
        "operationId": "dashboardRosterBuilderMissingMembers",
        "summary": "Get roster members outside its configured clan",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "playerTag": {
                            "type": "string"
                          },
                          "playerName": {
                            "type": "string"
                          },
                          "townhall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clanTag": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clanName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "discordUserId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{1,20}$",
                                "description": "Discord snowflake as an unsigned decimal string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "playerTag",
                          "playerName",
                          "townhall",
                          "trophies",
                          "clanTag",
                          "clanName",
                          "discordUserId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}/refresh": {
      "post": {
        "operationId": "botRefreshRoster",
        "summary": "Refresh roster data",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "data",
                      "role"
                    ]
                  }
                },
                "required": [
                  "scope"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "refreshId": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "refreshedPlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "failedPlayers": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "refreshedAt": {
                      "type": "string"
                    },
                    "reused": {
                      "type": "boolean"
                    },
                    "roleId": {
                      "type": "string",
                      "pattern": "^\\d{1,20}$",
                      "description": "Discord snowflake as an unsigned decimal string"
                    },
                    "roleMemberUserIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^\\d{1,20}$",
                        "description": "Discord snowflake as an unsigned decimal string"
                      }
                    }
                  },
                  "required": [
                    "refreshId",
                    "scope",
                    "status",
                    "refreshedPlayers",
                    "failedPlayers",
                    "refreshedAt",
                    "reused"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}/signup-form": {
      "get": {
        "operationId": "dashboardRosterSignupForm",
        "summary": "Get roster signup form",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountSelector": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "enum": [
                            "account"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "account"
                          ]
                        },
                        "required": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "required"
                      ],
                      "additionalProperties": false
                    },
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "boolean",
                              "single_select"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "order": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "type",
                          "required",
                          "options",
                          "order"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "accountSelector",
                    "questions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/server/{serverId}/rosters/{rosterId}/submissions": {
      "post": {
        "operationId": "dashboardRosterSubmission",
        "summary": "Submit linked account roster signup answers",
        "tags": [
          "Roster Builder"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$",
              "description": "Discord snowflake as an unsigned decimal string"
            }
          },
          {
            "name": "rosterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "playerTag": {
                    "type": "string"
                  },
                  "answers": {
                    "type": "object"
                  },
                  "discordUserId": {
                    "type": "string",
                    "pattern": "^\\d{1,20}$",
                    "description": "Discord snowflake as an unsigned decimal string"
                  },
                  "discordUsername": {
                    "type": "string"
                  },
                  "discordAvatarUrl": {
                    "type": "string"
                  }
                },
                "required": [
                  "playerTag",
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "submission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "rosterId": {
                          "type": "string"
                        },
                        "playerTag": {
                          "type": "string"
                        },
                        "answers": {
                          "type": "object"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "rosterId",
                        "playerTag",
                        "answers",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "submission"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "user-or-bot"
      }
    },
    "/v2/server/{serverId}/server-roles": {
      "get": {
        "operationId": "serverRoles",
        "summary": "List configured server roles",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "townhall",
                "builderhall",
                "league",
                "builder_league",
                "clan_role",
                "clan_category",
                "family",
                "achievement",
                "status"
              ]
            }
          },
          {
            "name": "clan_tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "townhall",
                              "builderhall",
                              "league",
                              "builder_league",
                              "clan_role",
                              "clan_category",
                              "family",
                              "achievement",
                              "status"
                            ]
                          },
                          "option": {
                            "type": "string"
                          },
                          "role_id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "both",
                              "add",
                              "remove"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "server_id",
                          "type",
                          "option",
                          "role_id",
                          "mode",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "server_id",
                    "roles",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "post": {
        "operationId": "createServerRole",
        "summary": "Create a server role rule",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clan_tag": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "townhall",
                      "builderhall",
                      "league",
                      "builder_league",
                      "clan_role",
                      "clan_category",
                      "family",
                      "achievement",
                      "status"
                    ]
                  },
                  "option": {
                    "type": "string"
                  },
                  "role_id": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "both",
                      "add",
                      "remove"
                    ]
                  }
                },
                "required": [
                  "type",
                  "option",
                  "role_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "townhall",
                            "builderhall",
                            "league",
                            "builder_league",
                            "clan_role",
                            "clan_category",
                            "family",
                            "achievement",
                            "status"
                          ]
                        },
                        "option": {
                          "type": "string"
                        },
                        "role_id": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "both",
                            "add",
                            "remove"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "type",
                        "option",
                        "role_id",
                        "mode",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/server-roles/{roleId}": {
      "delete": {
        "operationId": "deleteServerRole",
        "summary": "Delete a server role rule",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "townhall",
                            "builderhall",
                            "league",
                            "builder_league",
                            "clan_role",
                            "clan_category",
                            "family",
                            "achievement",
                            "status"
                          ]
                        },
                        "option": {
                          "type": "string"
                        },
                        "role_id": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "both",
                            "add",
                            "remove"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "type",
                        "option",
                        "role_id",
                        "mode",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "patch": {
        "operationId": "updateServerRole",
        "summary": "Update a server role rule",
        "tags": [
          "Server Roles"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clan_tag": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "townhall",
                      "builderhall",
                      "league",
                      "builder_league",
                      "clan_role",
                      "clan_category",
                      "family",
                      "achievement",
                      "status"
                    ]
                  },
                  "option": {
                    "type": "string"
                  },
                  "role_id": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "both",
                      "add",
                      "remove"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "server_id": {
                          "type": "string"
                        },
                        "clan_tag": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "townhall",
                            "builderhall",
                            "league",
                            "builder_league",
                            "clan_role",
                            "clan_category",
                            "family",
                            "achievement",
                            "status"
                          ]
                        },
                        "option": {
                          "type": "string"
                        },
                        "role_id": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "both",
                            "add",
                            "remove"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "server_id",
                        "type",
                        "option",
                        "role_id",
                        "mode",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/settings": {
      "get": {
        "operationId": "serverSettings",
        "summary": "Get server settings",
        "tags": [
          "Server Settings"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clan_settings",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_id": {
                      "type": "string"
                    },
                    "server": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "require_api_token_when_linking": {
                      "type": "boolean"
                    },
                    "embed_color": {
                      "type": "string"
                    },
                    "nickname_rule": {
                      "type": "string"
                    },
                    "non_family_nickname_rule": {
                      "type": "string"
                    },
                    "change_nickname": {
                      "type": "boolean"
                    },
                    "flair_non_family": {
                      "type": "boolean"
                    },
                    "auto_eval_nickname": {
                      "type": "boolean"
                    },
                    "autoeval_triggers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "autoeval_log": {
                      "type": "string"
                    },
                    "autoeval": {
                      "type": "boolean"
                    },
                    "full_whitelist_role": {
                      "type": "string"
                    },
                    "autoboard_limit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "tied": {
                      "type": "boolean"
                    },
                    "family_label": {
                      "type": "string"
                    },
                    "link_parse": {
                      "type": "object",
                      "properties": {
                        "clan": {
                          "type": "boolean"
                        },
                        "army": {
                          "type": "boolean"
                        },
                        "player": {
                          "type": "boolean"
                        },
                        "base": {
                          "type": "boolean"
                        },
                        "show": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "countdowns": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "server_roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "townhall",
                              "builderhall",
                              "league",
                              "builder_league",
                              "clan_role",
                              "clan_category",
                              "family",
                              "achievement",
                              "status"
                            ]
                          },
                          "option": {
                            "type": "string"
                          },
                          "role_id": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "both",
                              "add",
                              "remove"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "server_id",
                          "type",
                          "option",
                          "role_id",
                          "mode",
                          "created_at",
                          "updated_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "abbreviation": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tag",
                          "name",
                          "server_id"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "server_id",
                    "server",
                    "name",
                    "require_api_token_when_linking",
                    "countdowns",
                    "server_roles"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      },
      "patch": {
        "operationId": "updateServerSettings",
        "summary": "Update server settings",
        "tags": [
          "Server Settings"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "require_api_token_when_linking": {
                    "type": "boolean"
                  },
                  "embed_color": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "nickname_rule": {
                    "type": "string"
                  },
                  "non_family_nickname_rule": {
                    "type": "string"
                  },
                  "change_nickname": {
                    "type": "boolean"
                  },
                  "flair_non_family": {
                    "type": "boolean"
                  },
                  "auto_eval_nickname": {
                    "type": "boolean"
                  },
                  "autoeval_triggers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "autoeval_log": {
                    "type": "string"
                  },
                  "autoeval": {
                    "type": "boolean"
                  },
                  "full_whitelist_role": {
                    "type": "string"
                  },
                  "autoboard_limit": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "tied": {
                    "type": "boolean"
                  },
                  "family_label": {
                    "type": "string"
                  },
                  "link_parse": {
                    "type": "object",
                    "properties": {
                      "clan": {
                        "type": "boolean"
                      },
                      "army": {
                        "type": "boolean"
                      },
                      "player": {
                        "type": "boolean"
                      },
                      "base": {
                        "type": "boolean"
                      },
                      "show": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "updated_fields": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "server_id",
                    "updated_fields"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/strikes": {
      "get": {
        "operationId": "serverStrikes",
        "summary": "List server strikes",
        "tags": [
          "Server Strikes"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "player_tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "view_expired",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "strike_id": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "server": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "added_by": {
                            "type": "string"
                          },
                          "added_by_username": {
                            "type": "string"
                          },
                          "added_by_avatar_url": {
                            "type": "string"
                          },
                          "strike_weight": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "image": {
                            "type": "string"
                          },
                          "date_created": {
                            "type": "string"
                          },
                          "rollover_date": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "town_hall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "current_role": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "strike_id",
                          "tag",
                          "server",
                          "reason",
                          "added_by",
                          "strike_weight",
                          "date_created"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "count": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botStrikes",
          "serverStrikes"
        ]
      }
    },
    "/v2/server/{serverId}/strikes/{playerTag}": {
      "post": {
        "operationId": "addServerStrike",
        "summary": "Add a server strike",
        "tags": [
          "Server Strikes"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "added_by": {
                    "type": "string"
                  },
                  "rollover_days": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "strike_weight": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "image": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "strike_id": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "total_strikes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_weight": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "strike_id",
                    "player_tag",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write",
        "x-clashking-operation-aliases": [
          "addServerStrike",
          "botAddStrike"
        ]
      }
    },
    "/v2/server/{serverId}/strikes/{strikeId}": {
      "delete": {
        "operationId": "removeServerStrike",
        "summary": "Remove a server strike",
        "tags": [
          "Server Strikes"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "strikeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "strike_id": {
                      "type": "string"
                    },
                    "player_tag": {
                      "type": "string"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "total_strikes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_weight": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "strike_id",
                    "player_tag",
                    "server_id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write",
        "x-clashking-operation-aliases": [
          "botDeleteStrike",
          "removeServerStrike"
        ]
      }
    },
    "/v2/server/{serverId}/strikes/player/{playerTag}/summary": {
      "get": {
        "operationId": "playerStrikeSummary",
        "summary": "Get a player's active strike summary",
        "tags": [
          "Server Strikes"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "playerTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "player_tag": {
                      "type": "string"
                    },
                    "server_id": {
                      "type": "string"
                    },
                    "total_strikes": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "total_weight": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "strikes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "strike_id": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "server": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "added_by": {
                            "type": "string"
                          },
                          "added_by_username": {
                            "type": "string"
                          },
                          "added_by_avatar_url": {
                            "type": "string"
                          },
                          "strike_weight": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "image": {
                            "type": "string"
                          },
                          "date_created": {
                            "type": "string"
                          },
                          "rollover_date": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "town_hall": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "clan_tag": {
                            "type": "string"
                          },
                          "clan_name": {
                            "type": "string"
                          },
                          "current_role": {
                            "type": "string"
                          },
                          "trophies": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "strike_id",
                          "tag",
                          "server",
                          "reason",
                          "added_by",
                          "strike_weight",
                          "date_created"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "player_tag",
                    "server_id",
                    "total_strikes",
                    "total_weight",
                    "strikes"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botStrikeSummary",
          "playerStrikeSummary"
        ]
      }
    },
    "/v2/server/{serverId}/threads": {
      "get": {
        "operationId": "serverThreads",
        "summary": "List active Discord threads",
        "tags": [
          "Server Discord"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "parent_channel_id": {
                        "type": "string"
                      },
                      "parent_channel_name": {
                        "type": "string"
                      },
                      "archived": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "parent_channel_id",
                      "parent_channel_name",
                      "archived"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read"
      }
    },
    "/v2/server/{serverId}/tickets": {
      "get": {
        "operationId": "ticketPanels",
        "summary": "List server ticket panels",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "server_id": {
                            "type": "string"
                          },
                          "embed_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "components": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "custom_id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "style": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "emoji": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "animated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "custom_id",
                                "label",
                                "style",
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "button_settings": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "questions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "mod_role": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "no_ping_mod_role": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "private_thread": {
                                  "type": "boolean"
                                },
                                "th_min": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "num_apply": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "NaN"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "Infinity"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "-Infinity"
                                      ]
                                    }
                                  ]
                                },
                                "naming": {
                                  "type": "string"
                                },
                                "account_apply": {
                                  "type": "boolean"
                                },
                                "player_info": {
                                  "type": "boolean"
                                },
                                "apply_clans": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "roles_to_add": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "roles_to_remove": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "townhall_requirements": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                },
                                "new_message": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "questions",
                                "mod_role",
                                "no_ping_mod_role",
                                "private_thread",
                                "th_min",
                                "num_apply",
                                "naming",
                                "account_apply",
                                "player_info",
                                "apply_clans",
                                "roles_to_add",
                                "roles_to_remove",
                                "townhall_requirements"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "open_category": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sleep_category": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "closed_category": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status_change_log": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ticket_button_click_log": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ticket_close_log": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "approve_messages": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name",
                                "message"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "name",
                          "server_id",
                          "components",
                          "button_settings",
                          "approve_messages"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "available_embeds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "townhall_requirement_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "available_embeds",
                    "townhall_requirement_fields"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-read",
        "x-clashking-operation-aliases": [
          "botTickets",
          "ticketPanels"
        ]
      },
      "post": {
        "operationId": "createTicketPanel",
        "summary": "Create a server ticket panel",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/tickets/{panelName}": {
      "delete": {
        "operationId": "deleteTicketPanel",
        "summary": "Delete a server ticket panel",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "updateTicketPanel",
        "summary": "Update a server ticket panel",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "open_category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sleep_category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closed_category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status_change_log": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ticket_button_click_log": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ticket_close_log": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "embed_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/tickets/{panelName}/approve-messages": {
      "put": {
        "operationId": "updateTicketApproveMessages",
        "summary": "Update ticket approval messages",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "messages"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/tickets/{panelName}/buttons": {
      "post": {
        "operationId": "createTicketButton",
        "summary": "Create a ticket panel button",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "style": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "emoji": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "animated": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "label",
                  "style"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/server/{serverId}/tickets/{panelName}/buttons/{customId}": {
      "delete": {
        "operationId": "deleteTicketButton",
        "summary": "Delete a ticket panel button",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "patch": {
        "operationId": "updateTicketButtonAppearance",
        "summary": "Update ticket button appearance",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "style": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "emoji": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "animated": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "label",
                  "style"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      },
      "put": {
        "operationId": "updateTicketButtonSettings",
        "summary": "Update ticket button settings",
        "tags": [
          "Server Tickets"
        ],
        "security": [
          {
            "UserToken": []
          },
          {
            "BotToken": []
          }
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "panelName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "questions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "mod_role": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "no_ping_mod_role": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "private_thread": {
                    "type": "boolean"
                  },
                  "th_min": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "num_apply": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "NaN"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "-Infinity"
                        ]
                      }
                    ]
                  },
                  "naming": {
                    "type": "string"
                  },
                  "account_apply": {
                    "type": "boolean"
                  },
                  "player_info": {
                    "type": "boolean"
                  },
                  "apply_clans": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "roles_to_add": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "roles_to_remove": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "townhall_requirements": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "NaN"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "Infinity"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "-Infinity"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "new_message": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "questions",
                  "mod_role",
                  "no_ping_mod_role",
                  "private_thread",
                  "th_min",
                  "num_apply",
                  "naming",
                  "account_apply",
                  "player_info",
                  "apply_clans",
                  "roles_to_add",
                  "roles_to_remove",
                  "townhall_requirements",
                  "new_message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "server-write"
      }
    },
    "/v2/static/{category}/{itemIdOrName}/max-level": {
      "get": {
        "operationId": "dashboardStaticMaxLevel",
        "summary": "Get the maximum level for one static-data item",
        "tags": [
          "Static Data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemIdOrName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "max_level": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "max_level"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/static/{category}/names": {
      "get": {
        "operationId": "dashboardStaticCategoryNames",
        "summary": "Get names from one static-data category",
        "tags": [
          "Static Data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "village",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/armies": {
      "get": {
        "operationId": "searchLeagueArmies",
        "summary": "Discover similar Legend army families",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cohort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "legend_i",
                "top_1000",
                "top_200"
              ]
            }
          },
          {
            "name": "heroIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "equipmentIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minimumAttacks",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "minimumPlayers",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "minimumTripleRate",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "usage",
                "tripleRate",
                "zeroStarRate",
                "averageDuration",
                "averageDestruction"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cohort": {
                      "type": "string",
                      "enum": [
                        "legend_i",
                        "top_1000",
                        "top_200"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "familyId": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$",
                            "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shareCode": {
                            "type": "string"
                          },
                          "attacks": {
                            "type": "integer"
                          },
                          "players": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Exact collected players. Null when retained raw rows cannot reproduce every selected daily closeout population; never a sum of player-days."
                          },
                          "starCounts": {
                            "type": "object",
                            "properties": {
                              "zero": {
                                "type": "integer"
                              },
                              "one": {
                                "type": "integer"
                              },
                              "two": {
                                "type": "integer"
                              },
                              "three": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "zero",
                              "one",
                              "two",
                              "three"
                            ],
                            "additionalProperties": false
                          },
                          "averageDuration": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "averageDestruction": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "totalLegendAttacks": {
                            "type": "integer",
                            "description": "All selected Legend attacks including missing army codes; usage is attacks divided by this total."
                          }
                        },
                        "required": [
                          "familyId",
                          "name",
                          "shareCode",
                          "attacks",
                          "players",
                          "starCounts",
                          "averageDuration",
                          "averageDestruction",
                          "totalLegendAttacks"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "cohort",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/armies/detail": {
      "get": {
        "operationId": "getArmyFamily",
        "summary": "Get a Legend army family",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cohort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "legend_i",
                "top_1000",
                "top_200"
              ]
            }
          },
          {
            "name": "armyLink",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 8192,
              "description": "Clash CopyArmy link or raw army share code. URL-encode links when supplying this query parameter."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cohort": {
                      "type": "string",
                      "enum": [
                        "legend_i",
                        "top_1000",
                        "top_200"
                      ]
                    },
                    "familyId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$",
                      "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shareCode": {
                      "type": "string"
                    },
                    "attacks": {
                      "type": "integer"
                    },
                    "players": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Exact collected players. Null when retained raw rows cannot reproduce every selected daily closeout population; never a sum of player-days."
                    },
                    "starCounts": {
                      "type": "object",
                      "properties": {
                        "zero": {
                          "type": "integer"
                        },
                        "one": {
                          "type": "integer"
                        },
                        "two": {
                          "type": "integer"
                        },
                        "three": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "zero",
                        "one",
                        "two",
                        "three"
                      ],
                      "additionalProperties": false
                    },
                    "averageDuration": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "averageDestruction": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "totalLegendAttacks": {
                      "type": "integer",
                      "description": "All selected Legend attacks including missing army codes; usage is attacks divided by this total."
                    }
                  },
                  "required": [
                    "cohort",
                    "familyId",
                    "name",
                    "shareCode",
                    "attacks",
                    "players",
                    "starCounts",
                    "averageDuration",
                    "averageDestruction",
                    "totalLegendAttacks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/armies/timeline": {
      "get": {
        "operationId": "getArmyFamilyTimeline",
        "summary": "Get a Legend army family's daily timeline",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cohort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "legend_i",
                "top_1000",
                "top_200"
              ]
            }
          },
          {
            "name": "armyLink",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 8192,
              "description": "Clash CopyArmy link or raw army share code. URL-encode links when supplying this query parameter."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cohort": {
                      "type": "string",
                      "enum": [
                        "legend_i",
                        "top_1000",
                        "top_200"
                      ]
                    },
                    "familyId": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$",
                      "description": "Permanent family ID as a decimal string; never convert to a JavaScript number."
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shareCode": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string"
                          },
                          "totalLegendAttacks": {
                            "type": "integer"
                          },
                          "attacks": {
                            "type": "integer"
                          },
                          "players": {
                            "type": "integer"
                          },
                          "starCounts": {
                            "type": "object",
                            "properties": {
                              "zero": {
                                "type": "integer"
                              },
                              "one": {
                                "type": "integer"
                              },
                              "two": {
                                "type": "integer"
                              },
                              "three": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "zero",
                              "one",
                              "two",
                              "three"
                            ],
                            "additionalProperties": false
                          },
                          "averageDuration": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "averageDestruction": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "day",
                          "totalLegendAttacks",
                          "attacks",
                          "players",
                          "starCounts",
                          "averageDuration",
                          "averageDestruction"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "cohort",
                    "familyId",
                    "name",
                    "shareCode",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/cwl": {
      "get": {
        "operationId": "statsCwl",
        "summary": "Query CWL performance",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "townHallLevel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "opponentTownHallLevel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "equalTownHalls",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "cwlLeagueId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "seasons",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dateRange": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "sampleSize": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "usageRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageStars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageDestruction": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "zeroStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "oneStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "twoStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "threeStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "daily": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "useCount": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "date",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "available",
                        "sampleSize",
                        "averageStars",
                        "averageDestruction",
                        "zeroStarRate",
                        "oneStarRate",
                        "twoStarRate",
                        "threeStarRate",
                        "daily"
                      ],
                      "additionalProperties": false
                    },
                    "breakdowns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "metrics": {
                            "type": "object",
                            "properties": {
                              "available": {
                                "type": "boolean"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "daily": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "sampleSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "useCount": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "usageRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageStars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageDestruction": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "zeroStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "oneStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "twoStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "threeStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "sampleSize",
                                    "averageStars",
                                    "averageDestruction",
                                    "zeroStarRate",
                                    "oneStarRate",
                                    "twoStarRate",
                                    "threeStarRate"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "available",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate",
                              "daily"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "key",
                          "metrics"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "dateRange",
                    "metrics"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/league/hit-rates": {
      "get": {
        "operationId": "getLeagueHitRateHistory",
        "summary": "Get Ranked-season and Legend-day hit rates",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ranked",
                "legend"
              ]
            }
          },
          {
            "name": "leagueTierId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "townHallLevel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "ranked"
                                ]
                              },
                              "seasonId": {
                                "type": "string"
                              },
                              "league": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "townHallLevel": {
                                "type": "integer"
                              },
                              "attacks": {
                                "type": "integer"
                              },
                              "starCounts": {
                                "type": "object",
                                "properties": {
                                  "zero": {
                                    "type": "integer"
                                  },
                                  "one": {
                                    "type": "integer"
                                  },
                                  "two": {
                                    "type": "integer"
                                  },
                                  "three": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "zero",
                                  "one",
                                  "two",
                                  "three"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "mode",
                              "seasonId",
                              "league",
                              "townHallLevel",
                              "attacks",
                              "starCounts"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "legend"
                                ]
                              },
                              "day": {
                                "type": "string"
                              },
                              "attacks": {
                                "type": "integer"
                              },
                              "starCounts": {
                                "type": "object",
                                "properties": {
                                  "zero": {
                                    "type": "integer"
                                  },
                                  "one": {
                                    "type": "integer"
                                  },
                                  "two": {
                                    "type": "integer"
                                  },
                                  "three": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "zero",
                                  "one",
                                  "two",
                                  "three"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "mode",
                              "day",
                              "attacks",
                              "starCounts"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/league/tournaments/{seasonId}/tiers/{leagueTierId}": {
      "get": {
        "operationId": "getLeagueTierStatistics",
        "summary": "Get one Ranked season and tier",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagueTierId",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "seasonId": {
                      "type": "string"
                    },
                    "league": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "groupCount": {
                      "type": "integer"
                    },
                    "playerCount": {
                      "type": "integer"
                    },
                    "participatingPlayers": {
                      "type": "integer"
                    },
                    "trophyPercentiles": {
                      "type": "object",
                      "properties": {
                        "p10": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "p25": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "p50": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "p75": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "p90": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "p10",
                        "p25",
                        "p50",
                        "p75",
                        "p90"
                      ],
                      "additionalProperties": false
                    },
                    "townHallDistribution": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "level": {
                            "type": "integer"
                          },
                          "count": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "level",
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "groupCompetitiveness": {
                      "type": "object",
                      "properties": {
                        "averageTrophyRange": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "averageFirstPlaceGap": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "NaN"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "Infinity"
                                  ]
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    "-Infinity"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "averageTrophyRange",
                        "averageFirstPlaceGap"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "seasonId",
                    "league",
                    "groupCount",
                    "playerCount",
                    "participatingPlayers",
                    "trophyPercentiles",
                    "townHallDistribution",
                    "groupCompetitiveness"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/legend/days": {
      "get": {
        "operationId": "getLegendDays",
        "summary": "Get detailed Legend-day statistics",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cohort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "legend_i",
                "top_1000",
                "top_200"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cohort": {
                      "type": "string",
                      "enum": [
                        "legend_i",
                        "top_1000",
                        "top_200"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string"
                          },
                          "attacks": {
                            "type": "integer"
                          },
                          "players": {
                            "type": "integer"
                          },
                          "starCounts": {
                            "type": "object",
                            "properties": {
                              "zero": {
                                "type": "integer"
                              },
                              "one": {
                                "type": "integer"
                              },
                              "two": {
                                "type": "integer"
                              },
                              "three": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "zero",
                              "one",
                              "two",
                              "three"
                            ],
                            "additionalProperties": false
                          },
                          "averageDuration": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "averageDestruction": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "heroes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "uses": {
                                  "type": "integer"
                                },
                                "triples": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "id",
                                "uses",
                                "triples"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "pets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "uses": {
                                  "type": "integer"
                                },
                                "triples": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "id",
                                "uses",
                                "triples"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "equipment": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "uses": {
                                  "type": "integer"
                                },
                                "triples": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "id",
                                "uses",
                                "triples"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "petAssignments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "petId": {
                                  "type": "integer"
                                },
                                "heroId": {
                                  "type": "integer"
                                },
                                "uses": {
                                  "type": "integer"
                                },
                                "triples": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "petId",
                                "heroId",
                                "uses",
                                "triples"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "day",
                          "attacks",
                          "players",
                          "starCounts",
                          "averageDuration",
                          "averageDestruction",
                          "heroes",
                          "pets",
                          "equipment",
                          "petAssignments"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "cohort",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/ranked": {
      "get": {
        "operationId": "statsRanked",
        "summary": "Query non-Legend Ranked attacks attributed to their tournament group period",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "townHallLevel",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "leagueTierId",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dateRange": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "sampleSize": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "usageRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageStars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageDestruction": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "zeroStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "oneStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "twoStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "threeStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "daily": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "useCount": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "date",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "available",
                        "sampleSize",
                        "averageStars",
                        "averageDestruction",
                        "zeroStarRate",
                        "oneStarRate",
                        "twoStarRate",
                        "threeStarRate",
                        "daily"
                      ],
                      "additionalProperties": false
                    },
                    "breakdowns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "metrics": {
                            "type": "object",
                            "properties": {
                              "available": {
                                "type": "boolean"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "daily": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "sampleSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "useCount": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "usageRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageStars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageDestruction": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "zeroStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "oneStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "twoStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "threeStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "sampleSize",
                                    "averageStars",
                                    "averageDestruction",
                                    "zeroStarRate",
                                    "oneStarRate",
                                    "twoStarRate",
                                    "threeStarRate"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "available",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate",
                              "daily"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "key",
                          "metrics"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "dateRange",
                    "metrics"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/war": {
      "get": {
        "operationId": "statsWar",
        "summary": "Query regular-war performance",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "townHallLevel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "opponentTownHallLevel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string",
                  "enum": [
                    "NaN"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "Infinity"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "-Infinity"
                  ]
                }
              ]
            }
          },
          {
            "name": "equalTownHalls",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dateRange": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "sampleSize": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "usageRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageStars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "averageDestruction": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "zeroStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "oneStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "twoStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "threeStarRate": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "daily": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "useCount": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "date",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "available",
                        "sampleSize",
                        "averageStars",
                        "averageDestruction",
                        "zeroStarRate",
                        "oneStarRate",
                        "twoStarRate",
                        "threeStarRate",
                        "daily"
                      ],
                      "additionalProperties": false
                    },
                    "breakdowns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "metrics": {
                            "type": "object",
                            "properties": {
                              "available": {
                                "type": "boolean"
                              },
                              "sampleSize": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "usageRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageStars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "averageDestruction": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "zeroStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "oneStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "twoStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "threeStarRate": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "daily": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "sampleSize": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "useCount": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "usageRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageStars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "averageDestruction": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "zeroStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "oneStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "twoStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "threeStarRate": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "sampleSize",
                                    "averageStars",
                                    "averageDestruction",
                                    "zeroStarRate",
                                    "oneStarRate",
                                    "twoStarRate",
                                    "threeStarRate"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "available",
                              "sampleSize",
                              "averageStars",
                              "averageDestruction",
                              "zeroStarRate",
                              "oneStarRate",
                              "twoStarRate",
                              "threeStarRate",
                              "daily"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "key",
                          "metrics"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "dateRange",
                    "metrics"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/wars/hitrates": {
      "get": {
        "operationId": "getWarHitrates",
        "summary": "Get uploaded regular-war same-Town-Hall hit rates",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month"
              ]
            }
          },
          {
            "name": "townHall",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period": {
                            "type": "string"
                          },
                          "townHall": {
                            "type": "integer"
                          },
                          "attacks": {
                            "type": "integer"
                          },
                          "stars": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "stars": {
                                  "type": "integer"
                                },
                                "count": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "stars",
                                "count"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "averageStars": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "averageDestruction": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "averageDuration": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "period",
                          "townHall",
                          "attacks",
                          "stars",
                          "averageStars",
                          "averageDestruction",
                          "averageDuration"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/stats/wars/summary": {
      "get": {
        "operationId": "getWarSummary",
        "summary": "Get uploaded regular-war participation summaries",
        "tags": [
          "Stats"
        ],
        "security": [],
        "parameters": [
          {
            "name": "time[after]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time[before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month"
              ]
            }
          },
          {
            "name": "warSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "warSize"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period": {
                            "type": "string"
                          },
                          "warSize": {
                            "type": "integer"
                          },
                          "wars": {
                            "type": "integer"
                          },
                          "accounts": {
                            "type": "integer"
                          },
                          "townHalls": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "level": {
                                  "type": "integer"
                                },
                                "count": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "level",
                                "count"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "draws": {
                            "type": "integer"
                          },
                          "missedAttacks": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "period",
                          "wars",
                          "accounts",
                          "townHalls",
                          "draws"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/ticket-transcripts/{capability}": {
      "get": {
        "operationId": "ticketTranscript",
        "summary": "Read a structured ticket transcript and optional thread using its UUID link",
        "tags": [
          "Ticket Transcripts"
        ],
        "security": [],
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "collectedAt": {
                      "type": "string"
                    },
                    "captureStartedAt": {
                      "type": "string"
                    },
                    "ticket": {
                      "type": "object",
                      "properties": {
                        "guildId": {
                          "type": "string",
                          "pattern": "^[0-9]{1,20}$"
                        },
                        "channelId": {
                          "type": "string",
                          "pattern": "^[0-9]{1,20}$"
                        },
                        "openerId": {
                          "type": "string",
                          "pattern": "^[0-9]{1,20}$"
                        },
                        "number": {
                          "type": "string"
                        },
                        "panelName": {
                          "type": "string",
                          "maxLength": 100000
                        }
                      },
                      "required": [
                        "guildId",
                        "channelId",
                        "openerId",
                        "number",
                        "panelName"
                      ],
                      "additionalProperties": false
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9]{1,20}$"
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 100000
                          },
                          "type": {
                            "type": "integer"
                          },
                          "topic": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 100000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "historyComplete": {
                            "type": "boolean"
                          },
                          "messages": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^[0-9]{1,20}$"
                                },
                                "createdAt": {
                                  "type": "string"
                                },
                                "editedAt": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "author": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[0-9]{1,20}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "maxLength": 100000
                                    },
                                    "displayName": {
                                      "type": "string",
                                      "maxLength": 100000
                                    },
                                    "avatarUrl": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 100000
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "bot": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "displayName",
                                    "avatarUrl",
                                    "bot"
                                  ],
                                  "additionalProperties": false
                                },
                                "content": {
                                  "type": "string",
                                  "maxLength": 100000
                                },
                                "type": {
                                  "type": "integer"
                                },
                                "pinned": {
                                  "type": "boolean"
                                },
                                "referencedMessageId": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]{1,20}$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "embeds": {
                                  "type": "array",
                                  "items": {
                                    "type": "object"
                                  },
                                  "maxItems": 10
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "type": "object"
                                  },
                                  "maxItems": 40
                                },
                                "attachmentIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                                  },
                                  "maxItems": 100
                                },
                                "omittedAttachmentCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "reactions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "emoji": {
                                        "type": "string",
                                        "maxLength": 100000
                                      },
                                      "count": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "emoji",
                                      "count"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 100
                                }
                              },
                              "required": [
                                "id",
                                "createdAt",
                                "editedAt",
                                "author",
                                "content",
                                "type",
                                "pinned",
                                "referencedMessageId",
                                "embeds",
                                "components",
                                "attachmentIds",
                                "omittedAttachmentCount",
                                "reactions"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 2000
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "type",
                          "topic",
                          "historyComplete",
                          "messages"
                        ],
                        "additionalProperties": false
                      },
                      "minItems": 1,
                      "maxItems": 2
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
                          },
                          "filename": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "contentType": {
                            "type": "string",
                            "maxLength": 200
                          },
                          "size": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 536870912
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          }
                        },
                        "required": [
                          "id",
                          "filename",
                          "contentType",
                          "size",
                          "sha256"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "collectedAt",
                    "captureStartedAt",
                    "ticket",
                    "channels",
                    "attachments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/ticket-transcripts/{capability}/attachments/{attachmentId}": {
      "get": {
        "operationId": "ticketTranscriptAttachment",
        "summary": "Download a copied attachment under its complete transcript capability",
        "tags": [
          "Ticket Transcripts"
        ],
        "security": [],
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/v2/war/{clanTag}/basic": {
      "get": {
        "operationId": "getExpoWarBasic",
        "summary": "Get the current stored war pointer for a clan",
        "tags": [
          "War & CWL"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "clan": {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "publicWarLog": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "publicWarLog"
                          ],
                          "additionalProperties": false
                        },
                        "opponent": {
                          "type": "object",
                          "properties": {
                            "tag": {
                              "type": "string"
                            },
                            "publicWarLog": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "tag",
                            "publicWarLog"
                          ],
                          "additionalProperties": false
                        },
                        "preparationStartTime": {
                          "type": "string"
                        },
                        "endTime": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "warTag": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "clan",
                        "opponent",
                        "preparationStartTime",
                        "endTime",
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botCurrentWar",
          "getExpoWarBasic"
        ]
      }
    },
    "/v2/war/{clanTag}/previous/{endTime}": {
      "get": {
        "operationId": "getExpoPreviousWar",
        "summary": "Get a stored war by its end time",
        "tags": [
          "War & CWL"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanTag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endTime",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "teamSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "attacksPerMember": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "battleModifier": {
                      "type": "string"
                    },
                    "preparationStartTime": {
                      "type": "string"
                    },
                    "startTime": {
                      "type": "string"
                    },
                    "endTime": {
                      "type": "string"
                    },
                    "clan": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "badgeUrls": {
                          "type": "object",
                          "properties": {
                            "small": {
                              "type": "string"
                            },
                            "large": {
                              "type": "string"
                            },
                            "medium": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "small",
                            "large",
                            "medium"
                          ],
                          "additionalProperties": false
                        },
                        "clanLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "attacks": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "stars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "destructionPercentage": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attackerTag": {
                                      "type": "string"
                                    },
                                    "defenderTag": {
                                      "type": "string"
                                    },
                                    "stars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "destructionPercentage": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "duration": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "attackerTag",
                                    "defenderTag",
                                    "stars",
                                    "destructionPercentage",
                                    "order",
                                    "duration"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "opponentAttacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "bestOpponentAttack": {
                                "type": "object",
                                "properties": {
                                  "attackerTag": {
                                    "type": "string"
                                  },
                                  "defenderTag": {
                                    "type": "string"
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "duration": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "attackerTag",
                                  "defenderTag",
                                  "stars",
                                  "destructionPercentage",
                                  "order",
                                  "duration"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "badgeUrls",
                        "clanLevel",
                        "attacks",
                        "stars",
                        "destructionPercentage",
                        "members"
                      ],
                      "additionalProperties": false
                    },
                    "opponent": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "badgeUrls": {
                          "type": "object",
                          "properties": {
                            "small": {
                              "type": "string"
                            },
                            "large": {
                              "type": "string"
                            },
                            "medium": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "small",
                            "large",
                            "medium"
                          ],
                          "additionalProperties": false
                        },
                        "clanLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "attacks": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "stars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "destructionPercentage": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attackerTag": {
                                      "type": "string"
                                    },
                                    "defenderTag": {
                                      "type": "string"
                                    },
                                    "stars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "destructionPercentage": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "duration": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "attackerTag",
                                    "defenderTag",
                                    "stars",
                                    "destructionPercentage",
                                    "order",
                                    "duration"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "opponentAttacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "bestOpponentAttack": {
                                "type": "object",
                                "properties": {
                                  "attackerTag": {
                                    "type": "string"
                                  },
                                  "defenderTag": {
                                    "type": "string"
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "duration": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "attackerTag",
                                  "defenderTag",
                                  "stars",
                                  "destructionPercentage",
                                  "order",
                                  "duration"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "badgeUrls",
                        "clanLevel",
                        "attacks",
                        "stars",
                        "destructionPercentage",
                        "members"
                      ],
                      "additionalProperties": false
                    },
                    "warStartTime": {
                      "type": "string"
                    },
                    "tag": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "teamSize",
                    "preparationStartTime",
                    "endTime",
                    "clan",
                    "opponent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public",
        "x-clashking-operation-aliases": [
          "botPreviousWar",
          "getExpoPreviousWar"
        ]
      }
    },
    "/war/{clan_tag}/previous": {
      "get": {
        "operationId": "getLegacyPreviousWars",
        "summary": "Get legacy stored clan wars",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timestamp_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "teamSize": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "attacksPerMember": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "NaN"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "Infinity"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "-Infinity"
                                ]
                              }
                            ]
                          },
                          "battleModifier": {
                            "type": "string"
                          },
                          "preparationStartTime": {
                            "type": "string"
                          },
                          "startTime": {
                            "type": "string"
                          },
                          "endTime": {
                            "type": "string"
                          },
                          "clan": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "large",
                                  "medium"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          },
                          "opponent": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "badgeUrls": {
                                "type": "object",
                                "properties": {
                                  "small": {
                                    "type": "string"
                                  },
                                  "large": {
                                    "type": "string"
                                  },
                                  "medium": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "small",
                                  "large",
                                  "medium"
                                ],
                                "additionalProperties": false
                              },
                              "clanLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "stars": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "destructionPercentage": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "tag": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "townhallLevel": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "mapPosition": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "attacks": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "attackerTag": {
                                            "type": "string"
                                          },
                                          "defenderTag": {
                                            "type": "string"
                                          },
                                          "stars": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "destructionPercentage": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "order": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          },
                                          "duration": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "NaN"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "Infinity"
                                                ]
                                              },
                                              {
                                                "type": "string",
                                                "enum": [
                                                  "-Infinity"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "attackerTag",
                                          "defenderTag",
                                          "stars",
                                          "destructionPercentage",
                                          "order",
                                          "duration"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "opponentAttacks": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "bestOpponentAttack": {
                                      "type": "object",
                                      "properties": {
                                        "attackerTag": {
                                          "type": "string"
                                        },
                                        "defenderTag": {
                                          "type": "string"
                                        },
                                        "stars": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "destructionPercentage": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "order": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        },
                                        "duration": {
                                          "anyOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "NaN"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "Infinity"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "enum": [
                                                "-Infinity"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "attackerTag",
                                        "defenderTag",
                                        "stars",
                                        "destructionPercentage",
                                        "order",
                                        "duration"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "tag",
                                    "name",
                                    "townhallLevel",
                                    "mapPosition"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "badgeUrls",
                              "clanLevel",
                              "attacks",
                              "stars",
                              "destructionPercentage"
                            ],
                            "additionalProperties": false
                          },
                          "warStartTime": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "season": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "state",
                          "teamSize",
                          "preparationStartTime",
                          "endTime",
                          "clan",
                          "opponent"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    },
    "/war/{clan_tag}/previous/{end_time}": {
      "get": {
        "operationId": "getLegacyPreviousWarAtTime",
        "summary": "Get a legacy stored clan war at an end time",
        "tags": [
          "Legacy"
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "teamSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "attacksPerMember": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "battleModifier": {
                      "type": "string"
                    },
                    "preparationStartTime": {
                      "type": "string"
                    },
                    "startTime": {
                      "type": "string"
                    },
                    "endTime": {
                      "type": "string"
                    },
                    "clan": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "badgeUrls": {
                          "type": "object",
                          "properties": {
                            "small": {
                              "type": "string"
                            },
                            "large": {
                              "type": "string"
                            },
                            "medium": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "small",
                            "large",
                            "medium"
                          ],
                          "additionalProperties": false
                        },
                        "clanLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "attacks": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "stars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "destructionPercentage": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attackerTag": {
                                      "type": "string"
                                    },
                                    "defenderTag": {
                                      "type": "string"
                                    },
                                    "stars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "destructionPercentage": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "duration": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "attackerTag",
                                    "defenderTag",
                                    "stars",
                                    "destructionPercentage",
                                    "order",
                                    "duration"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "opponentAttacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "bestOpponentAttack": {
                                "type": "object",
                                "properties": {
                                  "attackerTag": {
                                    "type": "string"
                                  },
                                  "defenderTag": {
                                    "type": "string"
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "duration": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "attackerTag",
                                  "defenderTag",
                                  "stars",
                                  "destructionPercentage",
                                  "order",
                                  "duration"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "badgeUrls",
                        "clanLevel",
                        "attacks",
                        "stars",
                        "destructionPercentage"
                      ],
                      "additionalProperties": false
                    },
                    "opponent": {
                      "type": "object",
                      "properties": {
                        "tag": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "badgeUrls": {
                          "type": "object",
                          "properties": {
                            "small": {
                              "type": "string"
                            },
                            "large": {
                              "type": "string"
                            },
                            "medium": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "small",
                            "large",
                            "medium"
                          ],
                          "additionalProperties": false
                        },
                        "clanLevel": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "attacks": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "stars": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "destructionPercentage": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "NaN"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "Infinity"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "-Infinity"
                              ]
                            }
                          ]
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "townhallLevel": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "mapPosition": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "attacks": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attackerTag": {
                                      "type": "string"
                                    },
                                    "defenderTag": {
                                      "type": "string"
                                    },
                                    "stars": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "destructionPercentage": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "order": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    },
                                    "duration": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "NaN"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "Infinity"
                                          ]
                                        },
                                        {
                                          "type": "string",
                                          "enum": [
                                            "-Infinity"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "attackerTag",
                                    "defenderTag",
                                    "stars",
                                    "destructionPercentage",
                                    "order",
                                    "duration"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "opponentAttacks": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "NaN"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "Infinity"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "-Infinity"
                                    ]
                                  }
                                ]
                              },
                              "bestOpponentAttack": {
                                "type": "object",
                                "properties": {
                                  "attackerTag": {
                                    "type": "string"
                                  },
                                  "defenderTag": {
                                    "type": "string"
                                  },
                                  "stars": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "destructionPercentage": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "order": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  },
                                  "duration": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "NaN"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "Infinity"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "-Infinity"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "attackerTag",
                                  "defenderTag",
                                  "stars",
                                  "destructionPercentage",
                                  "order",
                                  "duration"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "tag",
                              "name",
                              "townhallLevel",
                              "mapPosition"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tag",
                        "name",
                        "badgeUrls",
                        "clanLevel",
                        "attacks",
                        "stars",
                        "destructionPercentage"
                      ],
                      "additionalProperties": false
                    },
                    "warStartTime": {
                      "type": "string"
                    },
                    "tag": {
                      "type": "string"
                    },
                    "season": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "teamSize",
                    "preparationStartTime",
                    "endTime",
                    "clan",
                    "opponent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "detail"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Expected error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "invalid_request",
                        "validation_failed",
                        "unauthenticated",
                        "forbidden",
                        "not_found",
                        "conflict",
                        "rate_limited",
                        "payload_too_large",
                        "unprocessable_entity",
                        "not_implemented",
                        "upstream_unavailable",
                        "internal_error"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-clashking-auth": "public"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "UserToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "CloudflareAccess": {
        "type": "apiKey",
        "in": "header",
        "name": "Cf-Access-Jwt-Assertion",
        "description": "Verified Cloudflare Access identity admitted by the configured Access application."
      },
      "BotToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Configured API bot token."
      },
      "WebRefreshCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "ck_web_refresh"
      },
      "DeveloperToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Active developer application API key."
      },
      "AiMetering": {
        "type": "apiKey",
        "in": "header",
        "name": "X-ClashKing-AI-Metering"
      }
    },
    "schemas": {
      "Schema_1c9f72a61e5d1808_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_1c9f72a61e5d1808_0"
            }
          }
        ]
      },
      "Schema_f09cdd234f458632_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_f09cdd234f458632_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_f09cdd234f458632_0"
            }
          }
        ]
      },
      "Schema_aff4d1f4c4721594_4": {
        "type": "object",
        "properties": {
          "attacksPerMember": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "battleModifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
              },
              {
                "type": "null"
              }
            ]
          },
          "endTime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "opponent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
              },
              {
                "type": "null"
              }
            ]
          },
          "preparationStartTime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "startTime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string"
          },
          "teamSize": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "state"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_3": {
        "type": "object",
        "properties": {
          "attacks": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "badgeUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanLevel": {
            "type": "integer"
          },
          "destructionPercentage": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "NaN"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "Infinity"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "-Infinity"
                    ]
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expEarned": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_2"
            }
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "stars": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "clanLevel"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_0": {
        "type": "object",
        "properties": {
          "large": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "medium": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "small": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_2": {
        "type": "object",
        "properties": {
          "attacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_1"
            }
          },
          "bestOpponentAttack": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_1"
              },
              {
                "type": "null"
              }
            ]
          },
          "mapPosition": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "opponentAttacks": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tag": {
            "type": "string"
          },
          "townhallLevel": {
            "type": "integer"
          }
        },
        "required": [
          "mapPosition",
          "name",
          "tag",
          "townhallLevel"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_1": {
        "type": "object",
        "properties": {
          "attackerTag": {
            "type": "string"
          },
          "defenderTag": {
            "type": "string"
          },
          "destructionPercentage": {
            "type": "integer"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "type": "integer"
          },
          "stars": {
            "type": "integer"
          }
        },
        "required": [
          "attackerTag",
          "defenderTag",
          "destructionPercentage",
          "order",
          "stars"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_17": {
        "type": "object",
        "properties": {
          "achievements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_5"
            }
          },
          "attackWins": {
            "type": "integer"
          },
          "bestBuilderBaseTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "bestTrophies": {
            "type": "integer"
          },
          "builderBaseLeague": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_6"
          },
          "builderBaseTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "builderHallLevel": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_7"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanCapitalContributions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentLeagueGroupTag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentLeagueSeasonId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "defenseWins": {
            "type": "integer"
          },
          "donations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "donationsReceived": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "expLevel": {
            "type": "integer"
          },
          "heroEquipment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_8"
            }
          },
          "heroes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_8"
            }
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_10"
            }
          },
          "league": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_11"
              },
              {
                "type": "null"
              }
            ]
          },
          "leagueTier": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_12"
          },
          "legendStatistics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_14"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "playerHouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_16"
              },
              {
                "type": "null"
              }
            ]
          },
          "previousLeagueGroupTag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "previousLeagueSeasonId": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "spells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_8"
            }
          },
          "tag": {
            "type": "string"
          },
          "townHallLevel": {
            "type": "integer"
          },
          "troops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_8"
            }
          },
          "trophies": {
            "type": "integer"
          },
          "warPreference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warStars": {
            "type": "integer"
          }
        },
        "required": [
          "attackWins",
          "bestTrophies",
          "defenseWins",
          "expLevel",
          "name",
          "tag",
          "townHallLevel",
          "trophies",
          "warStars"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_5": {
        "type": "object",
        "properties": {
          "completionInfo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "info": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "stars": {
            "type": "integer"
          },
          "target": {
            "type": "integer"
          },
          "value": {
            "type": "integer"
          },
          "village": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "stars",
          "target",
          "value",
          "village"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_6": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_7": {
        "type": "object",
        "properties": {
          "badgeUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanLevel": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "tag"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_8": {
        "type": "object",
        "properties": {
          "equipment": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_8"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "level": {
            "type": "integer"
          },
          "maxLevel": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "superTroopIsActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "village": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "maxLevel",
          "name",
          "village"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_10": {
        "type": "object",
        "properties": {
          "iconUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_9"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_9": {
        "type": "object",
        "properties": {
          "large": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "medium": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "small": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tiny": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_11": {
        "type": "object",
        "properties": {
          "iconUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_9"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_12": {
        "type": "object",
        "properties": {
          "iconUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_9"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_14": {
        "type": "object",
        "properties": {
          "bestBuilderBaseSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_13"
              },
              {
                "type": "null"
              }
            ]
          },
          "bestSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_13"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_13"
              },
              {
                "type": "null"
              }
            ]
          },
          "legendTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "previousBuilderBaseSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_13"
              },
              {
                "type": "null"
              }
            ]
          },
          "previousSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_13"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_13": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "trophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_16": {
        "type": "object",
        "properties": {
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_15"
            }
          }
        },
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_15": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_25": {
        "type": "object",
        "properties": {
          "badgeUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
              },
              {
                "type": "null"
              }
            ]
          },
          "capitalLeague": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_18"
              },
              {
                "type": "null"
              }
            ]
          },
          "chatLanguage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_19"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanBuilderBasePoints": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanCapital": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_21"
          },
          "clanCapitalPoints": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanLevel": {
            "type": "integer"
          },
          "clanPoints": {
            "type": "integer"
          },
          "clanVersusPoints": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isFamilyFriendly": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "isWarLogPublic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_10"
            }
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_22"
              },
              {
                "type": "null"
              }
            ]
          },
          "memberList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_23"
            }
          },
          "members": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "requiredBuilderBaseTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "requiredTownhallLevel": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "requiredTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "requiredVersusTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tag": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "open",
              "inviteOnly",
              "closed"
            ]
          },
          "warFrequency": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unknown",
                  "always",
                  "moreThanOncePerWeek",
                  "oncePerWeek",
                  "lessThanOncePerWeek",
                  "never",
                  "any"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "warLeague": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_24"
              },
              {
                "type": "null"
              }
            ]
          },
          "warLosses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "warTies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "warWinStreak": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "warWins": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "clanCapital",
          "clanLevel",
          "clanPoints",
          "members",
          "name",
          "tag",
          "type"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_18": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_19": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "languageCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "languageCode",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_21": {
        "type": "object",
        "properties": {
          "capitalHallLevel": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanGoldSinkTotal": {
            "type": "integer",
            "allOf": [
              {
                "format": "int64"
              }
            ]
          },
          "districts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_20"
            }
          }
        },
        "required": [
          "clanGoldSinkTotal"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_20": {
        "type": "object",
        "properties": {
          "districtHallLevel": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "districtHallLevel",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_22": {
        "type": "object",
        "properties": {
          "countryCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "isCountry": {
            "type": "boolean"
          },
          "localizedName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "isCountry",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_23": {
        "type": "object",
        "properties": {
          "builderBaseLeague": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_11"
              },
              {
                "type": "null"
              }
            ]
          },
          "builderBaseTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "clanRank": {
            "type": "integer"
          },
          "donations": {
            "type": "integer"
          },
          "donationsReceived": {
            "type": "integer"
          },
          "expLevel": {
            "type": "integer"
          },
          "league": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_11"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "playerHouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_16"
              },
              {
                "type": "null"
              }
            ]
          },
          "previousClanRank": {
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "townHallLevel": {
            "type": "integer"
          },
          "trophies": {
            "type": "integer"
          },
          "versusTrophies": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "clanRank",
          "donations",
          "donationsReceived",
          "expLevel",
          "name",
          "previousClanRank",
          "role",
          "tag",
          "townHallLevel",
          "trophies"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_24": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_33": {
        "type": "object",
        "properties": {
          "attackLog": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_30"
            }
          },
          "capitalTotalLoot": {
            "type": "integer"
          },
          "defenseLog": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_31"
            }
          },
          "defensiveReward": {
            "type": "integer"
          },
          "endTime": {
            "type": "string"
          },
          "enemyDistrictsDestroyed": {
            "type": "integer"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_32"
            }
          },
          "offensiveReward": {
            "type": "integer"
          },
          "raidsCompleted": {
            "type": "integer"
          },
          "startTime": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "totalAttacks": {
            "type": "integer"
          }
        },
        "required": [
          "capitalTotalLoot",
          "defensiveReward",
          "endTime",
          "enemyDistrictsDestroyed",
          "offensiveReward",
          "raidsCompleted",
          "startTime",
          "state",
          "totalAttacks"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_30": {
        "type": "object",
        "properties": {
          "attackCount": {
            "type": "integer"
          },
          "defender": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_26"
          },
          "districtCount": {
            "type": "integer"
          },
          "districts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_29"
            }
          },
          "districtsDestroyed": {
            "type": "integer"
          }
        },
        "required": [
          "attackCount",
          "defender",
          "districtCount",
          "districtsDestroyed"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_26": {
        "type": "object",
        "properties": {
          "badgeUrls": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_0"
              },
              {
                "type": "null"
              }
            ]
          },
          "level": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "name",
          "tag"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_29": {
        "type": "object",
        "properties": {
          "attackCount": {
            "type": "integer"
          },
          "attacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_28"
            }
          },
          "destructionPercent": {
            "type": "integer"
          },
          "districtHallLevel": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "stars": {
            "type": "integer"
          },
          "totalLooted": {
            "type": "integer"
          }
        },
        "required": [
          "attackCount",
          "destructionPercent",
          "districtHallLevel",
          "id",
          "name",
          "stars",
          "totalLooted"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_28": {
        "type": "object",
        "properties": {
          "attacker": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_27"
          },
          "destructionPercent": {
            "type": "integer"
          },
          "stars": {
            "type": "integer"
          }
        },
        "required": [
          "attacker",
          "destructionPercent",
          "stars"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_27": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "tag"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_31": {
        "type": "object",
        "properties": {
          "attackCount": {
            "type": "integer"
          },
          "attacker": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_26"
          },
          "districtCount": {
            "type": "integer"
          },
          "districts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_29"
            }
          },
          "districtsDestroyed": {
            "type": "integer"
          }
        },
        "required": [
          "attackCount",
          "attacker",
          "districtCount",
          "districtsDestroyed"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_32": {
        "type": "object",
        "properties": {
          "attackLimit": {
            "type": "integer"
          },
          "attacks": {
            "type": "integer"
          },
          "bonusAttackLimit": {
            "type": "integer"
          },
          "capitalResourcesLooted": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "attackLimit",
          "attacks",
          "bonusAttackLimit",
          "capitalResourcesLooted",
          "name",
          "tag"
        ],
        "additionalProperties": false
      },
      "Schema_aff4d1f4c4721594_34": {
        "type": "object",
        "properties": {
          "attacksPerMember": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "battleModifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
          },
          "endTime": {
            "type": "string"
          },
          "opponent": {
            "$ref": "#/components/schemas/Schema_aff4d1f4c4721594_3"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "teamSize": {
            "type": "integer"
          }
        },
        "required": [
          "clan",
          "endTime",
          "opponent",
          "teamSize"
        ],
        "additionalProperties": false
      },
      "Schema_00c373bb92a8faf6_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_00c373bb92a8faf6_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_00c373bb92a8faf6_0"
            }
          }
        ]
      },
      "Schema_e27a3de76765204b_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_e27a3de76765204b_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_e27a3de76765204b_0"
            }
          }
        ]
      },
      "Schema_f18bc5b3778ee643_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_f18bc5b3778ee643_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_f18bc5b3778ee643_0"
            }
          }
        ]
      },
      "Schema_7d0628ce0008d723_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_7d0628ce0008d723_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_7d0628ce0008d723_0"
            }
          }
        ]
      },
      "Schema_fa6dda04f2ee2e67_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_fa6dda04f2ee2e67_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_fa6dda04f2ee2e67_0"
            }
          }
        ]
      },
      "Schema_d806d5ac15d0a004_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_d806d5ac15d0a004_0"
            }
          }
        ]
      },
      "Schema_d76dc9bc1b5e51ac_0": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "boolean"
          },
          {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "enum": [
                  "NaN"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "Infinity"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "-Infinity"
                ]
              }
            ]
          },
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
            }
          },
          {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Schema_d76dc9bc1b5e51ac_0"
            }
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Player"
    },
    {
      "name": "Clan"
    },
    {
      "name": "War & CWL"
    },
    {
      "name": "Leaderboard"
    },
    {
      "name": "Counts"
    },
    {
      "name": "Stats"
    },
    {
      "name": "Search"
    },
    {
      "name": "Dates"
    },
    {
      "name": "Links"
    },
    {
      "name": "Achievements"
    },
    {
      "name": "Activity & Inactivity"
    },
    {
      "name": "Admin Tracking"
    },
    {
      "name": "App Authentication"
    },
    {
      "name": "Bases"
    },
    {
      "name": "Bases Bot Integration"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Bot Profile"
    },
    {
      "name": "Clan Categories"
    },
    {
      "name": "Configuration"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "Dashboard Access"
    },
    {
      "name": "Enums"
    },
    {
      "name": "Legacy"
    },
    {
      "name": "Mobile App"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "Public Rosters"
    },
    {
      "name": "Roster Builder"
    },
    {
      "name": "Rosters"
    },
    {
      "name": "Server Autoboards"
    },
    {
      "name": "Server Bans"
    },
    {
      "name": "Server Clans"
    },
    {
      "name": "Server Countdowns"
    },
    {
      "name": "Server Discord"
    },
    {
      "name": "Server Giveaways"
    },
    {
      "name": "Server Leaderboards"
    },
    {
      "name": "Server Logs"
    },
    {
      "name": "Server Panels"
    },
    {
      "name": "Server Reminders"
    },
    {
      "name": "Server Roles"
    },
    {
      "name": "Server Settings"
    },
    {
      "name": "Server Strikes"
    },
    {
      "name": "Server Tickets"
    },
    {
      "name": "Web Authentication"
    },
    {
      "name": "Other"
    },
    {
      "name": "Health"
    },
    {
      "name": "Media"
    },
    {
      "name": "Static Data"
    },
    {
      "name": "Ticket Transcripts"
    }
  ]
}
