{
  "openapi": "3.0.3",
  "info": {
    "title": "WuWa Hub API",
    "version": "2.67.0",
    "description": "All API operations. Public /api/v1/ GET supports CORS *. Other routes are same-origin application APIs. Session cookies + CSRF protect account writes; no Bearer keys. Examples are illustrative."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "tags": [
    {
      "name": "public",
      "description": "Public API",
      "x-description-uk": "Публічний API"
    },
    {
      "name": "wiki",
      "description": "Wiki",
      "x-description-uk": "Wiki"
    },
    {
      "name": "showcase",
      "description": "Showcases and likes",
      "x-description-uk": "Вітрини й лайки"
    },
    {
      "name": "account",
      "description": "Account and builds",
      "x-description-uk": "Акаунт і білди"
    },
    {
      "name": "pulls",
      "description": "Pull history",
      "x-description-uk": "Історія круток"
    },
    {
      "name": "import",
      "description": "Collection import",
      "x-description-uk": "Імпорт колекції"
    },
    {
      "name": "recovery",
      "description": "Password recovery",
      "x-description-uk": "Відновлення пароля"
    },
    {
      "name": "data",
      "description": "Game data and images",
      "x-description-uk": "Ігрові дані й зображення"
    },
    {
      "name": "world",
      "description": "Announcements and clocks",
      "x-description-uk": "Оголошення й час"
    },
    {
      "name": "reference",
      "description": "Documentation",
      "x-description-uk": "Документація"
    },
    {
      "name": "media",
      "description": "Artwork and animated card exports."
    }
  ],
  "paths": {
    "/api/v1/builds/{owner_id}/{build_id}/card": {
      "get": {
        "operationId": "get_api_v1_builds_owner_id_build_id_card",
        "tags": [
          "public"
        ],
        "summary": "Render-ready build card",
        "x-summary-uk": "Готові дані картки білда",
        "description": "Render-ready saved build for your own server/card design. One JSON request supplies final static stats, every equipped Echo main/secondary/substat value, skills, chain activation, sonatas, local roll scores, selected skin and absolute game image URLs. Custom artwork uses data:image/...;base64,..., not HTTP. Percentage points: 22 means 22%; HP/ATK/DEF are final values. Five Echo positions preserve null slots. Same calculation as the site constructor: weapon passives, chain effects and conditional/team combat buffs are NOT automatically included; manual bonuses are included. Read calculation.includes/excludes and warnings. No image downloads during this request. Missing local details may be fetched on demand. Invalid saved configuration: 422; unavailable/incomplete game tables: 503. lang falls back to English. Existing raw build APIs keep their contract and add cardUrl discovery links. Published builds only, even for the owner. No authentication required; CORS *; no-store.",
        "x-description-uk": "Готові дані для власної картки на твоєму сервері. Один JSON-запит: підсумкові статичні характеристики, головна/друга/додаткові характеристики кожного ехо, навички, активні константи, сонати, локальний Echo Score, скін і абсолютні URL ігрових зображень. Власний арт — data:image/...;base64,..., не HTTP. Відсоткові пункти: 22 означає 22%; HP/ATK/DEF — підсумкові числа. Масив ехо завжди має 5 позицій із null для порожніх. Формула відповідає конструктору: пасиви зброї, ефекти констант, умовні/командні бойові бонуси НЕ застосовуються автоматично; ручні бонуси враховуються. Дивись calculation.includes/excludes та warnings. Запит не завантажує зображення. Відсутні локальні деталі можуть отримуватися за потреби. Некоректний білд: 422; відсутні/недоступні таблиці: 503. Якщо немає перекладу, використовується англійська. Старі API збережено; cardUrl у списках веде до готової відповіді. Лише опубліковані білди, навіть для власника. Без авторизації; CORS *; no-store.",
        "parameters": [
          {
            "name": "owner_id",
            "in": "path",
            "required": true,
            "description": "Site account ID, not game UID.",
            "x-description-uk": "Site account ID, not game UID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          },
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "GameData language, with English fallback.",
            "x-description-uk": "Мова GameData; якщо перекладу немає, повертається англійська.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "uk",
                "ru",
                "ja",
                "ko",
                "de",
                "es",
                "fr",
                "pt",
                "th",
                "vi",
                "id",
                "zh-Hans",
                "zh-Hant"
              ],
              "default": "en"
            },
            "example": "en"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildCard"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "422": {
            "description": "Saved build cannot be calculated, or no importable pulls are available.",
            "x-description-uk": "Збережений білд неможливо розрахувати або немає круток для імпорту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Saved build cannot be calculated, or no importable pulls are available."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/account/builds/{build_id}/card": {
      "get": {
        "operationId": "get_api_account_builds_build_id_card",
        "tags": [
          "account"
        ],
        "summary": "My render-ready build card",
        "x-summary-uk": "Готові дані власної картки",
        "description": "Render-ready saved build for your own server/card design. One JSON request supplies final static stats, every equipped Echo main/secondary/substat value, skills, chain activation, sonatas, local roll scores, selected skin and absolute game image URLs. Custom artwork uses data:image/...;base64,..., not HTTP. Percentage points: 22 means 22%; HP/ATK/DEF are final values. Five Echo positions preserve null slots. Same calculation as the site constructor: weapon passives, chain effects and conditional/team combat buffs are NOT automatically included; manual bonuses are included. Read calculation.includes/excludes and warnings. No image downloads during this request. Missing local details may be fetched on demand. Invalid saved configuration: 422; unavailable/incomplete game tables: 503. lang falls back to English. Existing raw build APIs keep their contract and add cardUrl discovery links. Signed-in owner only, including private builds. Server clients must retain the login session cookie. Never send credentials to a third-party renderer. No public CORS.",
        "x-description-uk": "Готові дані для власної картки на твоєму сервері. Один JSON-запит: підсумкові статичні характеристики, головна/друга/додаткові характеристики кожного ехо, навички, активні константи, сонати, локальний Echo Score, скін і абсолютні URL ігрових зображень. Власний арт — data:image/...;base64,..., не HTTP. Відсоткові пункти: 22 означає 22%; HP/ATK/DEF — підсумкові числа. Масив ехо завжди має 5 позицій із null для порожніх. Формула відповідає конструктору: пасиви зброї, ефекти констант, умовні/командні бойові бонуси НЕ застосовуються автоматично; ручні бонуси враховуються. Дивись calculation.includes/excludes та warnings. Запит не завантажує зображення. Відсутні локальні деталі можуть отримуватися за потреби. Некоректний білд: 422; відсутні/недоступні таблиці: 503. Якщо немає перекладу, використовується англійська. Старі API збережено; cardUrl у списках веде до готової відповіді. Лише власник із сесією, включно з приватними білдами. Серверний клієнт зберігає cookie після входу. Не передавай пароль сторонньому рендереру. Без публічного CORS.",
        "parameters": [
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "GameData language, with English fallback.",
            "x-description-uk": "Мова GameData; якщо перекладу немає, повертається англійська.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "uk",
                "ru",
                "ja",
                "ko",
                "de",
                "es",
                "fr",
                "pt",
                "th",
                "vi",
                "id",
                "zh-Hans",
                "zh-Hant"
              ],
              "default": "en"
            },
            "example": "en"
          }
        ],
        "x-access": "session",
        "security": [
          {
            "sessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildCard"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "422": {
            "description": "Saved build cannot be calculated, or no importable pulls are available.",
            "x-description-uk": "Збережений білд неможливо розрахувати або немає круток для імпорту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Saved build cannot be calculated, or no importable pulls are available."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profiles/uid/{uid}": {
      "get": {
        "operationId": "get_api_v1_profiles_uid_uid",
        "tags": [
          "public"
        ],
        "summary": "Profiles and builds by UID",
        "x-summary-uk": "Профілі та білди за UID",
        "description": "Exact game UID match. Multiple profiles may share a UID. Published builds only; no email or passwords.",
        "x-description-uk": "Точний збіг UID. Кілька профілів можуть мати один UID. Лише опубліковані білди; без пошти й паролів.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Zero-based result offset.",
            "x-description-uk": "Зміщення від нуля.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum records on this page.",
            "x-description-uk": "Максимум записів на сторінці.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "example": 20
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/PublicUser"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "showcaseUrl": {
                                "type": "string"
                              },
                              "builds": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/BuildEntry"
                                }
                              }
                            }
                          }
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "profiles": [
                    {
                      "id": 12,
                      "login": "rover",
                      "profile": {
                        "uid": "700000001",
                        "nickname": "Rover"
                      },
                      "showcaseUrl": "/showcase/12",
                      "builds": []
                    }
                  ],
                  "total": 1,
                  "offset": 0,
                  "limit": 20
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profiles/search": {
      "get": {
        "operationId": "get_api_v1_profiles_search",
        "tags": [
          "public"
        ],
        "summary": "Search players",
        "x-summary-uk": "Пошук гравців",
        "description": "Unicode case-insensitive substring search in login and in-game nickname.",
        "x-description-uk": "Пошук частини логіна або ігрового нікнейму без урахування регістру, з підтримкою Unicode.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "2–80 characters.",
            "x-description-uk": "2–80 characters.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            },
            "example": "Rover"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Zero-based result offset.",
            "x-description-uk": "Зміщення від нуля.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum records on this page.",
            "x-description-uk": "Максимум записів на сторінці.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "example": 20
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/PublicUser"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "showcaseUrl": {
                                "type": "string"
                              },
                              "builds": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/BuildEntry"
                                }
                              }
                            }
                          }
                        ]
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "profiles": [
                    {
                      "id": 12,
                      "login": "rover",
                      "profile": {
                        "uid": "700000001",
                        "nickname": "Rover"
                      },
                      "showcaseUrl": "/showcase/12",
                      "builds": []
                    }
                  ],
                  "total": 1,
                  "offset": 0,
                  "limit": 20
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pulls/uid/{uid}": {
      "get": {
        "operationId": "get_api_v1_pulls_uid_uid",
        "tags": [
          "public"
        ],
        "summary": "Shared pull history",
        "x-summary-uk": "Відкрита історія круток",
        "description": "Private until explicitly shared. 404 for hidden history, including owner requests. 409 supplies userIds: select userId. Newest first; rarity filters rows, not stats. Banner filters both. Unknown starting pity is null.",
        "x-description-uk": "Приватна до явної публікації. Прихована історія дає 404 навіть власнику. 409 містить userIds: вибери userId. Нові записи першими; рідкість фільтрує записи, але не статистику. Банер — обидва. Невідомий початковий pity — null.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "description": "Site account ID to resolve 409.",
            "x-description-uk": "Site account ID to resolve 409.",
            "schema": {
              "type": "integer"
            },
            "example": 12
          },
          {
            "name": "banner",
            "in": "query",
            "required": false,
            "description": "Convene type ID.",
            "x-description-uk": "Convene type ID.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "description": "Displayed record rarity.",
            "x-description-uk": "Displayed record rarity.",
            "schema": {
              "type": "integer",
              "enum": [
                3,
                4,
                5
              ]
            },
            "example": 4
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Zero-based result offset.",
            "x-description-uk": "Зміщення від нуля.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum records on this page.",
            "x-description-uk": "Максимум записів на сторінці.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uid": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "integer"
                    },
                    "updated": {
                      "type": "number"
                    },
                    "stats": {
                      "$ref": "#/components/schemas/PullStats"
                    },
                    "pulls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pull"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "order": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "uid": "700000001",
                  "userId": 12,
                  "stats": {
                    "total": 1,
                    "five": 0,
                    "four": 1,
                    "three": 0,
                    "avg5": null,
                    "byPool": []
                  },
                  "pulls": [
                    {
                      "id": "123",
                      "banner": "1",
                      "itemId": "1402",
                      "name": "Yangyang",
                      "rarity": 4,
                      "time": "2026-10-01 12:00:00",
                      "pity": null
                    }
                  ],
                  "total": 1,
                  "offset": 0,
                  "limit": 100,
                  "order": "newest-first"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "409": {
            "description": "Ambiguous ID or duplicate login/email.",
            "x-description-uk": "Неоднозначний ID або зайняті логін/пошта.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Ambiguous ID or duplicate login/email."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wiki": {
      "get": {
        "operationId": "get_api_v1_wiki",
        "tags": [
          "wiki"
        ],
        "summary": "Search Wiki",
        "x-summary-uk": "Пошук у Wiki",
        "description": "Uses bundled/cached Wuthery data; missing details may be fetched on demand. Sanitize raw game tags before rendering HTML. Searches IDs and names across languages. Includes bundled achievements (conditions, groups, star tiers and rewards) and food (effects, ingredients and specialty cooks). Character details also include favoriteFood, specialCook and profileCards where available.",
        "x-description-uk": "Використовує наявні дані й кеш Wuthery; відсутні деталі можуть завантажуватися за потреби. Очищуй ігрові теги перед HTML. Шукає ID й назви всіма мовами.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Wiki category.",
            "x-description-uk": "Wiki category.",
            "schema": {
              "type": "string",
              "enum": [
                "character",
                "weapon",
                "phantom",
                "item",
                "monster",
                "skin",
                "weapon-skin",
                "card",
                "achievement",
                "food"
              ],
              "default": "character"
            },
            "example": "character"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Name substring or ID, up to 100 characters.",
            "x-description-uk": "Name substring or ID, up to 100 characters.",
            "schema": {
              "type": "string"
            },
            "example": "Yangyang"
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "description": "Rarity or monster rank ID.",
            "x-description-uk": "Rarity or monster rank ID.",
            "schema": {
              "type": "string"
            },
            "example": "4"
          },
          {
            "name": "element",
            "in": "query",
            "required": false,
            "description": "Element ID.",
            "x-description-uk": "Element ID.",
            "schema": {
              "type": "string"
            },
            "example": "4"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "GameData language, with English fallback.",
            "x-description-uk": "Мова GameData; якщо перекладу немає, повертається англійська.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "uk",
                "ru",
                "ja",
                "ko",
                "de",
                "es",
                "fr",
                "pt",
                "th",
                "vi",
                "id",
                "zh-Hans",
                "zh-Hant"
              ],
              "default": "en"
            },
            "example": "en"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Zero-based result offset.",
            "x-description-uk": "Зміщення від нуля.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum records on this page.",
            "x-description-uk": "Максимум записів на сторінці.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 40
            },
            "example": 40
          },
          {
            "name": "group",
            "in": "query",
            "description": "Achievement group ID.",
            "x-description-uk": "ID групи досягнень.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Achievement category ID.",
            "x-description-uk": "ID категорії досягнень.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hidden",
            "in": "query",
            "description": "Filter hidden achievements: true or false.",
            "x-description-uk": "Приховані досягнення: true або false.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GameData"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "fallbackLanguage": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "type": "character",
                  "items": [
                    {
                      "id": 1402,
                      "name": "Yangyang",
                      "rarity": {
                        "id": 4
                      }
                    }
                  ],
                  "total": 1,
                  "offset": 0,
                  "limit": 40,
                  "source": "Wuthery GameData",
                  "language": "en",
                  "fallbackLanguage": "en"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wiki/{item_id}": {
      "get": {
        "operationId": "get_api_v1_wiki_item_id",
        "tags": [
          "wiki"
        ],
        "summary": "Wiki detail by ID",
        "x-summary-uk": "Деталі Wiki за ID",
        "description": "Uses bundled/cached Wuthery data; missing details may be fetched on demand. Sanitize raw game tags before rendering HTML. lang=all retains language dictionaries. Ambiguous bare IDs return 409 and types. Characters include original and all outfits in appearances; weapons include same-type skins, with requiresResonatorSkin restrictions. Echoes include sonataEffects.",
        "x-description-uk": "Використовує наявні дані й кеш Wuthery; відсутні деталі можуть завантажуватися за потреби. Очищуй ігрові теги перед HTML. lang=all зберігає мовні словники. Неоднозначний ID без типу — 409 і types. Персонажі мають оригінал та образи в appearances; зброя — скіни свого типу, з обмеженням requiresResonatorSkin. Ехо мають sonataEffects.",
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "description": "GameData resource ID.",
            "x-description-uk": "GameData resource ID.",
            "schema": {
              "type": "string"
            },
            "example": 1402
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Optional type; required to resolve ambiguous IDs.",
            "x-description-uk": "Optional type; required to resolve ambiguous IDs.",
            "schema": {
              "type": "string",
              "enum": [
                "character",
                "weapon",
                "phantom",
                "item",
                "monster",
                "skin",
                "weapon-skin",
                "card",
                "achievement",
                "food"
              ]
            },
            "example": "character"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "GameData language, with English fallback.",
            "x-description-uk": "Мова GameData; якщо перекладу немає, повертається англійська.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "uk",
                "ru",
                "ja",
                "ko",
                "de",
                "es",
                "fr",
                "pt",
                "th",
                "vi",
                "id",
                "zh-Hans",
                "zh-Hant",
                "all"
              ],
              "default": "en"
            },
            "example": "en"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WikiDetail"
                },
                "example": {
                  "type": "character",
                  "id": 1402,
                  "data": {
                    "id": 1402,
                    "name": "Yangyang",
                    "rarity": {
                      "id": 4
                    },
                    "appearances": []
                  },
                  "source": "Wuthery GameData",
                  "language": "en",
                  "fallbackLanguage": "en"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "409": {
            "description": "Ambiguous ID or duplicate login/email.",
            "x-description-uk": "Неоднозначний ID або зайняті логін/пошта.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Ambiguous ID or duplicate login/email."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wiki/{kind}/{item_id}": {
      "get": {
        "operationId": "get_api_v1_wiki_kind_item_id",
        "tags": [
          "wiki"
        ],
        "summary": "Wiki detail by ID",
        "x-summary-uk": "Деталі Wiki за ID",
        "description": "Uses bundled/cached Wuthery data; missing details may be fetched on demand. Sanitize raw game tags before rendering HTML. lang=all retains language dictionaries. Ambiguous bare IDs return 409 and types. Characters include original and all outfits in appearances; weapons include same-type skins, with requiresResonatorSkin restrictions. Echoes include sonataEffects.",
        "x-description-uk": "Використовує наявні дані й кеш Wuthery; відсутні деталі можуть завантажуватися за потреби. Очищуй ігрові теги перед HTML. lang=all зберігає мовні словники. Неоднозначний ID без типу — 409 і types. Персонажі мають оригінал та образи в appearances; зброя — скіни свого типу, з обмеженням requiresResonatorSkin. Ехо мають sonataEffects.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "description": "Wiki category.",
            "x-description-uk": "Wiki category.",
            "schema": {
              "type": "string",
              "enum": [
                "character",
                "weapon",
                "phantom",
                "item",
                "monster",
                "skin",
                "weapon-skin",
                "card",
                "achievement",
                "food"
              ]
            },
            "example": "character"
          },
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "description": "GameData resource ID.",
            "x-description-uk": "GameData resource ID.",
            "schema": {
              "type": "string"
            },
            "example": 1402
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "GameData language, with English fallback.",
            "x-description-uk": "Мова GameData; якщо перекладу немає, повертається англійська.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "uk",
                "ru",
                "ja",
                "ko",
                "de",
                "es",
                "fr",
                "pt",
                "th",
                "vi",
                "id",
                "zh-Hans",
                "zh-Hant",
                "all"
              ],
              "default": "en"
            },
            "example": "en"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WikiDetail"
                },
                "example": {
                  "type": "character",
                  "id": 1402,
                  "data": {
                    "id": 1402,
                    "name": "Yangyang",
                    "rarity": {
                      "id": 4
                    },
                    "appearances": []
                  },
                  "source": "Wuthery GameData",
                  "language": "en",
                  "fallbackLanguage": "en"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "409": {
            "description": "Ambiguous ID or duplicate login/email.",
            "x-description-uk": "Неоднозначний ID або зайняті логін/пошта.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Ambiguous ID or duplicate login/email."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/community/builds": {
      "get": {
        "operationId": "get_api_community_builds",
        "tags": [
          "showcase"
        ],
        "summary": "Browse and rank public builds",
        "x-summary-uk": "Пошук і рейтинг білдів",
        "description": "Only published builds. Global like sorting before pagination. List design omits large artwork; fetch full build for rendering.",
        "x-description-uk": "Лише опубліковані білди. Сортування лайків до пагінації. Список не містить великих артів; для рендера потрібен повний білд.",
        "parameters": [
          {
            "name": "uid",
            "in": "query",
            "required": false,
            "description": "Partial UID match, up to 24 characters.",
            "x-description-uk": "Partial UID match, up to 24 characters.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "description": "Exact character ID.",
            "x-description-uk": "Exact character ID.",
            "schema": {
              "type": "string"
            },
            "example": "1402"
          },
          {
            "name": "element",
            "in": "query",
            "required": false,
            "description": "Character element ID.",
            "x-description-uk": "Character element ID.",
            "schema": {
              "type": "string"
            },
            "example": "4"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Login, nickname or build label, up to 80 characters.",
            "x-description-uk": "Login, nickname or build label, up to 80 characters.",
            "schema": {
              "type": "string"
            },
            "example": "Rover"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Global sort.",
            "x-description-uk": "Global sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "likes"
              ],
              "default": "recent"
            },
            "example": "likes"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Clamped to 0–100000.",
            "x-description-uk": "Clamped to 0–100000.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Clamped to 1–300; default 60.",
            "x-description-uk": "Clamped to 1–300; default 60.",
            "schema": {
              "type": "integer"
            },
            "example": 30
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "builds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicBuildSummary"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "builds": [],
                  "total": 0,
                  "offset": 0,
                  "limit": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          }
        }
      }
    },
    "/api/community/builds/{owner_id}/{build_id}": {
      "get": {
        "operationId": "get_api_community_builds_owner_id_build_id",
        "tags": [
          "showcase"
        ],
        "summary": "Full public build",
        "x-summary-uk": "Повний публічний білд",
        "description": "Original artwork, card settings and owner profile for a published build.",
        "x-description-uk": "Оригінальний арт, налаштування картки й профіль власника опублікованого білда.",
        "parameters": [
          {
            "name": "owner_id",
            "in": "path",
            "required": true,
            "description": "Site account ID, not game UID.",
            "x-description-uk": "Site account ID, not game UID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          },
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "build": {
                      "$ref": "#/components/schemas/Build"
                    },
                    "userId": {
                      "type": "integer"
                    },
                    "login": {
                      "type": "string"
                    },
                    "profile": {
                      "$ref": "#/components/schemas/ProfileFields"
                    },
                    "likes": {
                      "type": "integer"
                    },
                    "liked": {
                      "type": "boolean"
                    },
                    "cardUrl": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true,
                      "description": "Absolute URL of render-ready JSON. Null for private builds in owner responses."
                    }
                  }
                },
                "example": {
                  "id": "build_demo",
                  "build": {
                    "characterId": "1402",
                    "design": {}
                  },
                  "userId": 12,
                  "login": "rover",
                  "profile": {},
                  "likes": 4,
                  "liked": false
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          }
        }
      }
    },
    "/api/showcase/{user_id}": {
      "get": {
        "operationId": "get_api_showcase_user_id",
        "tags": [
          "showcase"
        ],
        "summary": "Player showcase",
        "x-summary-uk": "Вітрина гравця",
        "description": "Published builds only, even for the owner. The ID is a site account ID, not a game UID.",
        "x-description-uk": "Лише публічні білди, навіть для власника. ID — акаунт сайту, не UID гри.",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "description": "Site account ID.",
            "x-description-uk": "Site account ID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/OwnerUser"
                        },
                        {
                          "$ref": "#/components/schemas/PublicUser"
                        }
                      ]
                    },
                    "owner": {
                      "type": "boolean"
                    },
                    "showcase": {
                      "type": "boolean"
                    },
                    "builds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BuildEntry"
                      }
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "profile": {}
                  },
                  "owner": false,
                  "showcase": true,
                  "builds": []
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          }
        }
      }
    },
    "/api/profile/{login}": {
      "get": {
        "operationId": "get_api_profile_login",
        "tags": [
          "showcase"
        ],
        "summary": "Profile by login",
        "x-summary-uk": "Профіль за логіном",
        "description": "Owners see their email/private builds; guests see only published builds. Not publicly cached.",
        "x-description-uk": "Власник бачить свою пошту й приватні білди; гість — лише опубліковані. Не кешується публічно.",
        "parameters": [
          {
            "name": "login",
            "in": "path",
            "required": true,
            "description": "Site login, case-insensitive.",
            "x-description-uk": "Site login, case-insensitive.",
            "schema": {
              "type": "string"
            },
            "example": "rover"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/OwnerUser"
                        },
                        {
                          "$ref": "#/components/schemas/PublicUser"
                        }
                      ]
                    },
                    "owner": {
                      "type": "boolean"
                    },
                    "builds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BuildEntry"
                      }
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "profile": {}
                  },
                  "owner": false,
                  "builds": []
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          }
        }
      }
    },
    "/api/profile/cards": {
      "get": {
        "operationId": "get_api_profile_cards",
        "tags": [
          "showcase"
        ],
        "summary": "Profile banner catalog",
        "x-summary-uk": "Каталог шапок профілю",
        "description": "Map of card IDs to multilingual data and artwork.",
        "x-description-uk": "Словник ID карток із багатомовними назвами й артами.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": {
                    "$ref": "#/components/schemas/GameData"
                  }
                },
                "example": {
                  "80060000": {
                    "id": 80060000,
                    "name": {
                      "en": "Sigil of the Wanderer"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/account/me": {
      "get": {
        "operationId": "get_api_account_me",
        "tags": [
          "account"
        ],
        "summary": "Session and CSRF",
        "x-summary-uk": "Сесія та CSRF",
        "description": "Creates a guest session if needed. Keep cookie and csrf. Login/register/logout/reset return a replacement csrf token.",
        "x-description-uk": "Створює гостьову сесію за потреби. Збережи cookie і csrf. Вхід, реєстрація, вихід та скидання повертають новий csrf.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "login": {
                          "type": "string"
                        },
                        "profile": {
                          "$ref": "#/components/schemas/ProfileFields"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "login",
                        "profile"
                      ],
                      "nullable": true
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "user": null,
                  "csrf": "<csrf-token>"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/register": {
      "post": {
        "operationId": "post_api_account_register",
        "tags": [
          "account"
        ],
        "summary": "Register",
        "x-summary-uk": "Реєстрація",
        "description": "Creates and signs in an account. Email/login lowercased. Shared auth/recovery limit: 20 attempts/IP/15 minutes.",
        "x-description-uk": "Створює акаунт та одразу входить. Пошта/логін у нижньому регістрі. Спільний ліміт входу/відновлення: 20 спроб/IP/15 хвилин.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "login": {
                          "type": "string"
                        },
                        "profile": {
                          "$ref": "#/components/schemas/ProfileFields"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "login",
                        "profile"
                      ],
                      "nullable": true
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "email": "rover@example.test",
                    "profile": {}
                  },
                  "csrf": "<new-csrf-token>"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "409": {
            "description": "Ambiguous ID or duplicate login/email.",
            "x-description-uk": "Неоднозначний ID або зайняті логін/пошта.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Ambiguous ID or duplicate login/email."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "login": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]{3,32}$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 256
                  }
                },
                "required": [
                  "email",
                  "login",
                  "password"
                ]
              },
              "example": {
                "email": "rover@example.test",
                "login": "rover",
                "password": "<new-password>"
              }
            }
          }
        }
      }
    },
    "/api/account/login": {
      "post": {
        "operationId": "post_api_account_login",
        "tags": [
          "account"
        ],
        "summary": "Sign in",
        "x-summary-uk": "Вхід",
        "description": "identity accepts email or site login. Cookie session, no Bearer token. Same rate limit as registration.",
        "x-description-uk": "identity — пошта або логін сайту. Сесія через cookie, без Bearer-токена. Ліміт спільний із реєстрацією.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "login": {
                          "type": "string"
                        },
                        "profile": {
                          "$ref": "#/components/schemas/ProfileFields"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "login",
                        "profile"
                      ],
                      "nullable": true
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "email": "rover@example.test",
                    "profile": {}
                  },
                  "csrf": "<new-csrf-token>"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identity": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 256
                  }
                },
                "required": [
                  "identity",
                  "password"
                ]
              },
              "example": {
                "identity": "rover",
                "password": "<password>"
              }
            }
          }
        }
      }
    },
    "/api/account/logout": {
      "post": {
        "operationId": "post_api_account_logout",
        "tags": [
          "account"
        ],
        "summary": "Sign out",
        "x-summary-uk": "Вихід",
        "description": "Clears session and returns guest csrf.",
        "x-description-uk": "Очищає сесію та повертає гостьовий csrf.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "csrf": "<guest-csrf-token>"
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          }
        }
      }
    },
    "/api/account/profile": {
      "put": {
        "operationId": "put_api_account_profile",
        "tags": [
          "account"
        ],
        "summary": "Update profile",
        "x-summary-uk": "Оновити профіль",
        "description": "Replace supported fields; omitted strings/lists become empty. Send the complete desired profile.",
        "x-description-uk": "Замінює поля; пропущені рядки/списки очищуються. Передавай повний потрібний профіль.",
        "parameters": [],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "$ref": "#/components/schemas/OwnerUser"
                    }
                  }
                },
                "example": {
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "profile": {
                      "uid": "700000001",
                      "nickname": "Rover"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileFields"
              },
              "example": {
                "uid": "700000001",
                "nickname": "Rover",
                "cardId": "80060000",
                "avatarId": "1402",
                "elements": [
                  "4"
                ],
                "characters": [
                  "1402"
                ]
              }
            }
          }
        }
      }
    },
    "/api/account/builds/{build_id}": {
      "put": {
        "operationId": "put_api_account_builds_build_id",
        "tags": [
          "account"
        ],
        "summary": "Save build",
        "x-summary-uk": "Зберегти білд",
        "description": "Owner-scoped ID: 1–80 letters/digits/_/-. Create/replace full build. Max 150/account, 5 Echo slots, 10,000,000 JSON characters. Omitted favorite/published flags persist; likes survive edits.",
        "x-description-uk": "ID власника: 1–80 літер/цифр/_/-. Створює/замінює повний білд. До 150/акаунт, 5 ехо, 10 000 000 символів JSON. Пропущені favorite/published зберігаються; лайки залишаються.",
        "parameters": [
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "updated": {
                      "type": "number",
                      "description": "Unix timestamp in seconds."
                    },
                    "favorite": {
                      "type": "boolean"
                    },
                    "published": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "id": "build_demo",
                  "updated": 1793016000,
                  "favorite": true,
                  "published": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "build": {
                    "$ref": "#/components/schemas/Build"
                  },
                  "favorite": {
                    "type": "boolean"
                  },
                  "published": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "build"
                ]
              },
              "example": {
                "build": {
                  "version": 2,
                  "characterId": "1402",
                  "name": "My build",
                  "echoes": []
                },
                "favorite": true,
                "published": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_account_builds_build_id",
        "tags": [
          "account"
        ],
        "summary": "Delete build",
        "x-summary-uk": "Видалити білд",
        "description": "Owner-scoped ID: 1–80 letters/digits/_/-. Idempotent deletion of own build, likes and copy mapping.",
        "x-description-uk": "ID власника: 1–80 літер/цифр/_/-. Повторне видалення безпечне. Видаляє власний білд, лайки та зв’язок копії.",
        "parameters": [
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_api_account_builds_build_id",
        "tags": [
          "account"
        ],
        "summary": "Update build visibility or favorite status",
        "x-summary-uk": "Змінити публікацію або позначку улюбленого білда",
        "description": "Updates only supplied favorite/published flags on an existing own build. Artwork, equipment and all other build values stay intact. Returns confirmed flags and the server update timestamp.",
        "x-description-uk": "Змінює лише передані прапорці favorite/published існуючого власного білда. Арт, спорядження та решта даних зберігаються. Повертає підтверджені прапорці й час сервера.",
        "parameters": [
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "updated": {
                      "type": "number",
                      "description": "Unix timestamp in seconds."
                    },
                    "favorite": {
                      "type": "boolean"
                    },
                    "published": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "id": "build_demo",
                  "updated": 1793016000,
                  "favorite": true,
                  "published": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          },
          "404": {
            "description": "Own build not found.",
            "x-description-uk": "Власний білд не знайдено.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Білд не знайдено."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "favorite": {
                    "type": "boolean"
                  },
                  "published": {
                    "type": "boolean"
                  }
                },
                "minProperties": 1,
                "additionalProperties": false
              },
              "example": {
                "published": true
              }
            }
          }
        }
      }
    },
    "/api/account/community/{owner_id}/{build_id}/like": {
      "put": {
        "operationId": "put_api_account_community_owner_id_build_id_like",
        "tags": [
          "showcase"
        ],
        "summary": "Like build",
        "x-summary-uk": "Поставити лайк",
        "description": "One like/account/build. Idempotent. Published builds only.",
        "x-description-uk": "Один лайк/акаунт/білд. Повтор не дублює дію. Лише опубліковані білди.",
        "parameters": [
          {
            "name": "owner_id",
            "in": "path",
            "required": true,
            "description": "Site account ID, not game UID.",
            "x-description-uk": "Site account ID, not game UID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          },
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "likes": {
                      "type": "integer"
                    },
                    "liked": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "likes": 1,
                  "liked": true
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_account_community_owner_id_build_id_like",
        "tags": [
          "showcase"
        ],
        "summary": "Remove like",
        "x-summary-uk": "Зняти лайк",
        "description": "One like/account/build. Idempotent. Published builds only.",
        "x-description-uk": "Один лайк/акаунт/білд. Повтор не дублює дію. Лише опубліковані білди.",
        "parameters": [
          {
            "name": "owner_id",
            "in": "path",
            "required": true,
            "description": "Site account ID, not game UID.",
            "x-description-uk": "Site account ID, not game UID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          },
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "likes": {
                      "type": "integer"
                    },
                    "liked": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "likes": 0,
                  "liked": false
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          }
        }
      }
    },
    "/api/account/community/{owner_id}/{build_id}/copy": {
      "post": {
        "operationId": "post_api_account_community_owner_id_build_id_copy",
        "tags": [
          "showcase"
        ],
        "summary": "Save private copy",
        "x-summary-uk": "Зберегти приватну копію",
        "description": "201 creates a private favorite copy with source attribution. Repeats and own builds return 200 with existing ID. Art/settings preserved. Max 150/account.",
        "x-description-uk": "201 створює приватну копію в обраному з джерелом. Повтор і власний білд — 200 з існуючим ID. Арт/налаштування зберігаються. До 150/акаунт.",
        "parameters": [
          {
            "name": "owner_id",
            "in": "path",
            "required": true,
            "description": "Site account ID, not game UID.",
            "x-description-uk": "Site account ID, not game UID.",
            "schema": {
              "type": "string"
            },
            "example": 12
          },
          {
            "name": "build_id",
            "in": "path",
            "required": true,
            "description": "Owner-scoped build ID; not character ID.",
            "x-description-uk": "Owner-scoped build ID; not character ID.",
            "schema": {
              "type": "string"
            },
            "example": "build_demo"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "existing": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "id": "showcase_example",
                  "existing": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "200": {
            "description": "Existing copy or own build",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "existing": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "id": "build_demo",
                  "existing": true
                }
              }
            }
          }
        }
      }
    },
    "/api/account/pulls": {
      "get": {
        "operationId": "get_api_account_pulls",
        "tags": [
          "pulls"
        ],
        "summary": "My history accounts",
        "x-summary-uk": "Мої історії за UID",
        "description": "Only signed-in account histories, newest update first. public is SQLite 0/1 in this index.",
        "x-description-uk": "Лише історії поточного акаунта, за оновленням. public у цьому списку — 0/1.",
        "parameters": [],
        "x-access": "session",
        "security": [
          {
            "sessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "histories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uid": {
                            "type": "string"
                          },
                          "public": {
                            "type": "integer",
                            "enum": [
                              0,
                              1
                            ]
                          },
                          "updated": {
                            "type": "number"
                          },
                          "total": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "histories": [
                    {
                      "uid": "700000001",
                      "public": 0,
                      "updated": 1791000000,
                      "total": 200
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          }
        }
      }
    },
    "/api/account/pulls/{uid}": {
      "get": {
        "operationId": "get_api_account_pulls_uid",
        "tags": [
          "pulls"
        ],
        "summary": "Read own history",
        "x-summary-uk": "Прочитати свою історію",
        "description": "Chronological order. Missing history returns empty pulls and public=false. Includes stats.",
        "x-description-uk": "Хронологічний порядок. Без історії: порожні pulls, public=false. Містить статистику.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          }
        ],
        "x-access": "session",
        "security": [
          {
            "sessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uid": {
                      "type": "string"
                    },
                    "public": {
                      "type": "boolean"
                    },
                    "pulls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pull"
                      }
                    },
                    "stats": {
                      "$ref": "#/components/schemas/PullStats"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "added": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "uid": "700000001",
                  "public": false,
                  "pulls": [],
                  "stats": {
                    "total": 0,
                    "five": 0,
                    "four": 0,
                    "three": 0,
                    "avg5": null,
                    "byPool": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_api_account_pulls_uid",
        "tags": [
          "pulls"
        ],
        "summary": "Merge history",
        "x-summary-uk": "Об’єднати історію",
        "description": "Normalizes and merges records without changing sharing. Source UID must match path. Common Kuro/nested exports accepted. Max 40,000 pulls/UID and 20 UIDs/account. Identical id-less drops in a batch retain separate ordinal identities.",
        "x-description-uk": "Нормалізує й об’єднує записи без зміни доступу. UID джерела має збігатися з URL. Підтримує Kuro та вкладені експорти. До 40 000 круток/UID, 20 UID/акаунт. Однакові записи без ID у пачці зберігають окремі порядкові ключі.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uid": {
                      "type": "string"
                    },
                    "public": {
                      "type": "boolean"
                    },
                    "pulls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pull"
                      }
                    },
                    "stats": {
                      "$ref": "#/components/schemas/PullStats"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "added": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "uid": "700000001",
                  "public": false,
                  "pulls": [
                    {
                      "id": "123",
                      "banner": "1",
                      "itemId": "1402",
                      "name": "Yangyang",
                      "rarity": 4,
                      "time": "2026-10-01 12:00:00",
                      "pity": null
                    }
                  ],
                  "added": 1,
                  "total": 1
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uid": {
                    "type": "string"
                  },
                  "order": {
                    "type": "string",
                    "enum": [
                      "oldest-first",
                      "newest-first"
                    ]
                  },
                  "pulls": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Pull"
                    }
                  }
                },
                "required": [
                  "pulls"
                ]
              },
              "example": {
                "uid": "700000001",
                "order": "oldest-first",
                "pulls": [
                  {
                    "id": "123",
                    "banner": "1",
                    "itemId": "1402",
                    "name": "Yangyang",
                    "rarity": 4,
                    "time": "2026-10-01 12:00:00",
                    "pity": null
                  }
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_api_account_pulls_uid",
        "tags": [
          "pulls"
        ],
        "summary": "Set history visibility",
        "x-summary-uk": "Змінити доступ історії",
        "description": "Requires existing history. public must be JSON boolean; false immediately hides history from public API.",
        "x-description-uk": "Потрібна існуюча історія. public — JSON boolean; false одразу приховує її від публічного API.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uid": {
                      "type": "string"
                    },
                    "public": {
                      "type": "boolean"
                    },
                    "pulls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pull"
                      }
                    },
                    "stats": {
                      "$ref": "#/components/schemas/PullStats"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "added": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "uid": "700000001",
                  "public": true,
                  "pulls": [],
                  "stats": {
                    "total": 0,
                    "five": 0,
                    "four": 0,
                    "three": 0,
                    "avg5": null,
                    "byPool": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "public": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "public"
                ]
              },
              "example": {
                "public": true
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_account_pulls_uid",
        "tags": [
          "pulls"
        ],
        "summary": "Delete own history",
        "x-summary-uk": "Видалити свою історію",
        "description": "Idempotent deletion of this UID under the signed-in account only.",
        "x-description-uk": "Повторне видалення безпечне; лише цей UID у поточному акаунті.",
        "parameters": [
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "description": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "x-description-uk": "Game UID: 6–24 digits. Self-declared; ownership is not verified.",
            "schema": {
              "type": "string"
            },
            "example": "700000001"
          }
        ],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          }
        }
      }
    },
    "/api/tracker/convene/import": {
      "post": {
        "operationId": "post_api_tracker_convene_import",
        "tags": [
          "pulls"
        ],
        "summary": "Fetch from Kuro",
        "x-summary-uk": "Отримати крутки з Kuro",
        "description": "Temporary Convene URL from the game. Requests banner types 1–13. Does not save to account: PUT returned pulls separately. URL is not stored. JSON max 8192 bytes; 1 call/IP/8 seconds; up to 40,000 pulls. Partial success includes warnings.",
        "x-description-uk": "Тимчасове Convene-посилання гри. Запитує типи банерів 1–13. Не зберігає в акаунт: передай pulls окремим PUT. URL не зберігається. JSON до 8192 байтів; 1 запит/IP/8 секунд; до 40 000 круток. Часткова відповідь містить warnings.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pulls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    },
                    "playerId": {
                      "type": "string"
                    },
                    "loadedTypes": {
                      "type": "integer"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "pulls": [
                    {
                      "id": "123",
                      "banner": "1",
                      "itemId": "1402",
                      "name": "Yangyang",
                      "rarity": 4,
                      "time": "2026-10-01 12:00:00",
                      "pity": null
                    }
                  ],
                  "playerId": "700000001",
                  "loadedTypes": 13,
                  "warnings": []
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "422": {
            "description": "Saved build cannot be calculated, or no importable pulls are available.",
            "x-description-uk": "Збережений білд неможливо розрахувати або немає круток для імпорту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Saved build cannot be calculated, or no importable pulls are available."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          },
          "502": {
            "description": "Kuro upstream request failed.",
            "x-description-uk": "Не вдалося отримати відповідь Kuro.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Kuro upstream request failed."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "<temporary Convene URL copied from your game>"
              }
            }
          }
        }
      }
    },
    "/api/account/recovery/mode": {
      "get": {
        "operationId": "get_api_account_recovery_mode",
        "tags": [
          "recovery"
        ],
        "summary": "Recovery mode",
        "x-summary-uk": "Режим відновлення",
        "description": "local=true only with server bound to loopback, local caller/Host and no forwarding headers.",
        "x-description-uk": "local=true лише для локального сервера, клієнта й Host без заголовків проксі.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "local": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "local": false
                }
              }
            }
          }
        }
      }
    },
    "/api/account/recovery/local": {
      "post": {
        "operationId": "post_api_account_recovery_local",
        "tags": [
          "recovery"
        ],
        "summary": "Local password reset",
        "x-summary-uk": "Локальна зміна пароля",
        "description": "Development-only email+login match; /mode conditions required. Password 10–256 characters. Invalidates sessions.",
        "x-description-uk": "Лише локально: збіг пошти/логіна й умови /mode. Пароль 10–256 символів. Анулює сесії.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "csrf": "<guest-csrf-token>"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "login": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 256
                  }
                },
                "required": [
                  "email",
                  "login",
                  "password"
                ]
              },
              "example": {
                "email": "rover@example.test",
                "login": "rover",
                "password": "<new-password>"
              }
            }
          }
        }
      }
    },
    "/api/account/recovery/request": {
      "post": {
        "operationId": "post_api_account_recovery_request",
        "tags": [
          "recovery"
        ],
        "summary": "Request recovery code",
        "x-summary-uk": "Запит коду відновлення",
        "description": "SMTP required. Unknown accounts/delivery failures receive same outward success. Single-use 8-digit code expires in 15 minutes; max 5 incorrect attempts. Shared auth rate limit applies.",
        "x-description-uk": "Потрібен SMTP. Невідомий акаунт/помилка доставки мають однакову зовнішню відповідь. Одноразовий 8-значний код діє 15 хвилин; до 5 помилок. Діє спільний ліміт входу.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "requestId": "<43-character-request-id>",
                  "message": "If details match, check your inbox."
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "login": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "login"
                ]
              },
              "example": {
                "email": "rover@example.test",
                "login": "rover"
              }
            }
          }
        }
      }
    },
    "/api/account/recovery/confirm": {
      "post": {
        "operationId": "post_api_account_recovery_confirm",
        "tags": [
          "recovery"
        ],
        "summary": "Confirm password reset",
        "x-summary-uk": "Підтвердити зміну пароля",
        "description": "Submit requestId, emailed code and new password. Invalidates old sessions and reset codes. Returns guest csrf; sign in again.",
        "x-description-uk": "Передай requestId, код із листа та новий пароль. Анулює старі сесії й коди. Повертає гостьовий csrf; увійди знову.",
        "parameters": [],
        "x-access": "csrf",
        "security": [
          {
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "csrf": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "csrf": "<guest-csrf-token>"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 43,
                    "maxLength": 43
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{8}$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 256
                  }
                },
                "required": [
                  "requestId",
                  "code",
                  "password"
                ]
              },
              "example": {
                "requestId": "<requestId>",
                "code": "<8-digit-code>",
                "password": "<new-password>"
              }
            }
          }
        }
      }
    },
    "/api/account/import/preview": {
      "post": {
        "operationId": "post_api_account_import_preview",
        "tags": [
          "import"
        ],
        "summary": "Preview collection import",
        "x-summary-uk": "Попередній перегляд імпорту",
        "description": "Upload a .pcap capture as multipart file with allowImport=yes. Other file extensions and JSON imports are rejected (400). The server starts a background job (202); poll GET /api/account/import/jobs/{jobId} until ready/error, then confirm selected characters through /api/account/import/commit. Max file size 64 MiB; 5 attempts/account/5 minutes; one active capture globally. Preview tokens expire after 30 minutes.",
        "x-description-uk": "Завантаж лише .pcap через multipart file та allowImport=yes. Інші розширення й імпорт JSON відхиляються (400). Сервер запускає фонове завдання (202); опитуй GET /api/account/import/jobs/{jobId} до ready/error, потім підтвердь вибір персонажів через /api/account/import/commit. Файл до 64 МіБ; 5 спроб/акаунт/5 хв; один активний capture глобально. Токен preview діє 30 хв.",
        "parameters": [],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          },
          "413": {
            "description": "Request is too large. Flask may return HTML instead of JSON.",
            "x-description-uk": "Завеликий запит; Flask може повернути HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Request is too large. Flask may return HTML instead of JSON."
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached or importer busy.",
            "x-description-uk": "Перевищено частоту або імпортер зайнятий.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Rate limit reached or importer busy."
                }
              }
            }
          },
          "202": {
            "description": "Capture accepted. Poll the private job URL.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jobId",
                    "status"
                  ],
                  "properties": {
                    "jobId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing"
                      ]
                    }
                  }
                },
                "example": {
                  "jobId": "opaque-job-id",
                  "status": "processing"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Only .pcap game captures, up to 64 MiB."
                  },
                  "allowImport": {
                    "type": "string",
                    "enum": [
                      "yes"
                    ],
                    "description": "Confirms processing by the site and external parsing service."
                  }
                },
                "required": [
                  "file",
                  "allowImport"
                ]
              }
            }
          }
        }
      }
    },
    "/api/account/import/commit": {
      "post": {
        "operationId": "post_api_account_import_commit",
        "tags": [
          "import"
        ],
        "summary": "Commit selected characters",
        "x-summary-uk": "Зберегти вибраних персонажів",
        "description": "Explicit characters list required: all role IDs for everyone; [] for no new roles. Private deterministic pcpa_UID_character builds. Existing favorite/published flags persist. For same UID, unselected old roles remain; other collection sections replaced. applyIdentity defaults true. Token consumed on success. Max 150 builds/account.",
        "x-description-uk": "Потрібен список characters: усі ID для всіх; [] без нових ролей. Приватні білди з ID pcpa_UID_character. Існуючі favorite/published зберігаються. Для того самого UID невибрані старі ролі залишаються; інші розділи колекції замінюються. applyIdentity типово true. Токен одноразовий. До 150 білдів/акаунт.",
        "parameters": [],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "importedBuilds": {
                      "type": "integer"
                    },
                    "user": {
                      "$ref": "#/components/schemas/OwnerUser"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "importedBuilds": 1,
                  "user": {
                    "id": 12,
                    "login": "rover",
                    "profile": {
                      "uid": "700000001"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "characters": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "applyIdentity": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "token",
                  "characters"
                ]
              },
              "example": {
                "token": "<stage-token>",
                "characters": [
                  "1402"
                ],
                "applyIdentity": true
              }
            }
          }
        }
      }
    },
    "/api/account/collection": {
      "get": {
        "operationId": "get_api_account_collection",
        "tags": [
          "import"
        ],
        "summary": "Read collection",
        "x-summary-uk": "Прочитати колекцію",
        "description": "Own collection only; null until import commit. Player, roles, weapons, achievements and Convene summary.",
        "x-description-uk": "Лише власна колекція; null до збереження імпорту. Гравець, ролі, зброя, досягнення, підсумок круток.",
        "parameters": [],
        "x-access": "session",
        "security": [
          {
            "sessionAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "collection": {
                      "type": "object",
                      "properties": {
                        "player": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": true
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        },
                        "weapons": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        },
                        "achievements": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        },
                        "convene": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": true
                        }
                      },
                      "additionalProperties": true,
                      "nullable": true
                    }
                  }
                },
                "example": {
                  "collection": null
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_account_collection",
        "tags": [
          "import"
        ],
        "summary": "Delete collection",
        "x-summary-uk": "Видалити колекцію",
        "description": "Deletes collection and pending stages, preserving saved builds and tracker history.",
        "x-description-uk": "Видаляє колекцію й незавершені імпорти, зберігаючи білди та історію трекера.",
        "parameters": [],
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "403": {
            "description": "Invalid CSRF token or local-only operation rejected.",
            "x-description-uk": "Некоректний CSRF або дія дозволена лише локально.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid CSRF token or local-only operation rejected."
                }
              }
            }
          }
        }
      }
    },
    "/api/{kind}": {
      "get": {
        "operationId": "get_api_kind",
        "tags": [
          "data"
        ],
        "summary": "Builder catalog",
        "x-summary-uk": "Каталог конструктора",
        "description": "ID → raw multilingual record. items includes only id/name/icon/rarity; use Wiki for descriptions. rules contains Echo/sonata calculation tables. Cache 300 seconds.",
        "x-description-uk": "ID → багатомовний запис. items містить лише id/name/icon/rarity; описи у Wiki. rules — таблиці розрахунку ехо/сонат. Кеш 300 секунд.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "description": "Catalog name.",
            "x-description-uk": "Catalog name.",
            "schema": {
              "type": "string",
              "enum": [
                "characters",
                "weapons",
                "phantoms",
                "items",
                "skins",
                "rules",
                "cards"
              ]
            },
            "example": "characters"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "example": {
                  "1402": {
                    "id": 1402,
                    "name": {
                      "en": "Yangyang"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/{kind}/{item_id}": {
      "get": {
        "operationId": "get_api_kind_item_id",
        "tags": [
          "data"
        ],
        "summary": "Builder detail",
        "x-summary-uk": "Деталі конструктора",
        "description": "Singular kind: character/weapon/phantom. Character data omits stories, voice, goods, specialCook, constant. X-Data-Source: cache or remote. Cache 300 seconds.",
        "x-description-uk": "kind в однині: character/weapon/phantom. Персонажі без stories, voice, goods, specialCook, constant. X-Data-Source: cache або remote. Кеш 300 секунд.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "description": "Entity type.",
            "x-description-uk": "Entity type.",
            "schema": {
              "type": "string",
              "enum": [
                "character",
                "weapon",
                "phantom",
                "achievement",
                "food"
              ]
            },
            "example": "character"
          },
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "description": "GameData resource ID.",
            "x-description-uk": "GameData resource ID.",
            "schema": {
              "type": "string"
            },
            "example": 1402
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GameData"
                },
                "example": {
                  "id": 1402,
                  "name": {
                    "en": "Yangyang"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/image": {
      "get": {
        "operationId": "get_api_image",
        "tags": [
          "data"
        ],
        "summary": "Game image proxy",
        "x-summary-uk": "Проксі ігрових зображень",
        "description": "Only Wuthery GameData UIResources/UiResources paths. Returns PNG/WebP/JPEG bytes, not JSON. Cache 604800 seconds. Arbitrary remote URLs rejected.",
        "x-description-uk": "Лише шляхи Wuthery GameData UIResources/UiResources. Байти PNG/WebP/JPEG, не JSON. Кеш 604800 секунд. Довільні URL заборонені.",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "description": "Image path under /d/GameData/UIResources/.",
            "x-description-uk": "Image path under /d/GameData/UIResources/.",
            "schema": {
              "type": "string"
            },
            "example": "/d/GameData/UIResources/Common/Image/IconWeapon/T_IconWeapon21010011_UI.png"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or request shape.",
            "x-description-uk": "Некоректні параметри або структура запиту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Invalid parameters or request shape."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "operationId": "get_api_status",
        "tags": [
          "data"
        ],
        "summary": "Catalog status",
        "x-summary-uk": "Стан каталогів",
        "description": "Local catalog counts/timestamps without refreshing data. updated: Unix seconds or null.",
        "x-description-uk": "Локальні кількості/час каталогів без оновлення даних. updated: Unix-секунди або null.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "catalogs": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer"
                          },
                          "updated": {
                            "type": "number",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "source": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "catalogs": {
                    "characters": {
                      "count": 66,
                      "updated": 1791000000
                    }
                  },
                  "source": "Wuthery",
                  "version": "2.57"
                }
              }
            }
          }
        }
      }
    },
    "/api/world/announcements": {
      "get": {
        "operationId": "get_api_world_announcements",
        "tags": [
          "world"
        ],
        "summary": "Official announcements",
        "x-summary-uk": "Офіційні оголошення",
        "description": "Kuro news/events/Convene, deduplicated by ID. lang=en or ja; other values use en. Millisecond times. stale flags cached fallback.",
        "x-description-uk": "Новини/події/банери Kuro без дублікатів ID. lang=en або ja; інші → en. Час у мілісекундах. stale позначає резервний кеш.",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Feed language.",
            "x-description-uk": "Feed language.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "ja"
              ],
              "default": "en"
            },
            "example": "en"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Notice"
                      }
                    },
                    "stale": {
                      "type": "boolean"
                    },
                    "fetchedAt": {
                      "type": "number"
                    },
                    "serverNow": {
                      "type": "number"
                    },
                    "source": {
                      "type": "string"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Region"
                      }
                    }
                  }
                },
                "example": {
                  "entries": [],
                  "stale": false,
                  "fetchedAt": 1791000000000,
                  "serverNow": 1791000000000,
                  "source": "en.json / ja.json",
                  "regions": []
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/world/announcements/{notice_id}": {
      "get": {
        "operationId": "get_api_world_announcements_notice_id",
        "tags": [
          "world"
        ],
        "summary": "Announcement details",
        "x-summary-uk": "Деталі оголошення",
        "description": "Sanitized official HTML, title and cover image. ID must be 1–12 digits. Cache 5 minutes.",
        "x-description-uk": "Очищений офіційний HTML, заголовок і зображення. ID із 1–12 цифр. Кеш 5 хвилин.",
        "parameters": [
          {
            "name": "notice_id",
            "in": "path",
            "required": true,
            "description": "Announcement ID.",
            "x-description-uk": "Announcement ID.",
            "schema": {
              "type": "string"
            },
            "example": "50612"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "en or ja; otherwise en.",
            "x-description-uk": "en or ja; otherwise en.",
            "schema": {
              "type": "string"
            },
            "example": "en"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "image": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "html": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "image": "",
                  "title": "Event announcement",
                  "html": "<p>Event details</p>",
                  "source": "Kuro feed"
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or private.",
            "x-description-uk": "Об’єкт відсутній або приватний.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Resource missing or private."
                }
              }
            }
          },
          "503": {
            "description": "Source or mail service unavailable.",
            "x-description-uk": "Джерело або поштовий сервіс недоступні.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Source or mail service unavailable."
                }
              }
            }
          }
        }
      }
    },
    "/api/world/time": {
      "get": {
        "operationId": "get_api_world_time",
        "tags": [
          "world"
        ],
        "summary": "Server clocks",
        "x-summary-uk": "Час серверів",
        "description": "serverNow: site UTC Unix milliseconds. Fixed regional offsets; resetHour=4. Does not query a player session.",
        "x-description-uk": "serverNow: UTC Unix-мілісекунди сайту. Фіксовані зсуви регіонів; resetHour=4. Не запитує сесію гравця.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "serverNow": {
                      "type": "number"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Region"
                      }
                    },
                    "resetHour": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "serverNow": 1791000000000,
                  "regions": [
                    {
                      "id": "EUROPE",
                      "name": "Європа",
                      "offsetMinutes": 60
                    }
                  ],
                  "resetHour": 4
                }
              }
            }
          }
        }
      }
    },
    "/api/docs": {
      "get": {
        "operationId": "get_api_docs",
        "tags": [
          "reference"
        ],
        "summary": "Interactive API reference",
        "x-summary-uk": "Інтерактивний довідник API",
        "description": "All API routes with parameters, schemas and examples. No mutation requests run from this page.",
        "x-description-uk": "Усі API-маршрути з параметрами, схемами й прикладами. Сторінка не виконує запитів зміни даних.",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "UI language; Japanese uses English technical descriptions.",
            "x-description-uk": "UI language; Japanese uses English technical descriptions.",
            "schema": {
              "type": "string",
              "enum": [
                "uk",
                "en",
                "ja"
              ],
              "default": "uk"
            },
            "example": "uk"
          }
        ],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "get_api_v1_openapi.json",
        "tags": [
          "reference"
        ],
        "summary": "OpenAPI specification",
        "x-summary-uk": "Специфікація OpenAPI",
        "description": "OpenAPI 3.0.3 for all API routes. Relative server URL is the current origin.",
        "x-description-uk": "OpenAPI 3.0.3 для всіх API. Відносний URL сервера — поточний домен.",
        "parameters": [],
        "x-access": "public",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/account/import/jobs/{jobId}": {
      "get": {
        "operationId": "get_api_account_import_job",
        "tags": [
          "import"
        ],
        "summary": "Get private PCAP import status",
        "x-summary-uk": "Стан приватного імпорту PCAP",
        "description": "Session required; a job is visible only to its owner. processing means retry after 2.5 seconds. ready includes the preview token/player/roles/counts; submit its token to /api/account/import/commit. error includes an actionable error string. Unknown, expired and another account’s jobs return 404. A server restart interrupts active work; re-upload if the job fails or times out. Responses are never cached.",
        "x-description-uk": "Потрібна сесія власника. processing — повторити через 2,5 с; ready містить token/player/roles/counts для попереднього перегляду; токен надсилається в /api/account/import/commit. error містить текст помилки. Невідомі, прострочені та чужі завдання — 404. Перезапуск інстансу перериває активну обробку; за потреби завантаж файл повторно. Відповіді не кешуються.",
        "x-access": "session",
        "security": [
          {
            "sessionAuth": []
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current state or ready preview",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "jobId",
                        "status"
                      ],
                      "properties": {
                        "jobId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "processing"
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "player": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": true
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "icon": {
                                "type": "string"
                              },
                              "level": {
                                "type": "integer"
                              },
                              "rarity": {
                                "type": "integer"
                              },
                              "chain": {
                                "type": "integer"
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "weapons": {
                              "type": "integer"
                            },
                            "achievements": {
                              "type": "integer"
                            },
                            "roles": {
                              "type": "integer"
                            }
                          }
                        },
                        "jobId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ready"
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "jobId",
                        "status",
                        "error"
                      ],
                      "properties": {
                        "jobId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "error"
                          ]
                        },
                        "error": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "x-description-uk": "Потрібен вхід.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "Sign in required."
                }
              }
            }
          },
          "404": {
            "description": "Unknown, expired or not owned by the signed-in account"
          }
        }
      }
    },
    "/api/card-art": {
      "post": {
        "operationId": "post_api_card-art",
        "tags": [
          "media"
        ],
        "summary": "Normalize uploaded artwork",
        "x-summary-uk": "Підготувати завантажений арт",
        "description": "Accepts PNG/JPEG/GIF/WebP up to 10 MB. Animated art: up to 8 seconds; output is bounded to 48 frames and 1,400,000 base64 characters. Anonymous sessions can use this endpoint after GET /api/account/me. Images are processed in memory and are not stored on the server.",
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "art"
                ],
                "properties": {
                  "art": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "art": {
                      "type": "string"
                    },
                    "animated": {
                      "type": "boolean"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "frames": {
                      "type": "integer"
                    },
                    "duration": {
                      "type": "integer",
                      "description": "Loop duration in milliseconds."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid image or frame limits exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or expired CSRF token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 12 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Image converter busy. Retry after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-description-uk": "PNG/JPEG/GIF/WebP до 10 МБ. Анімація до 8 секунд; до 48 кадрів. Повертає нормалізований WebP. Доступно гостям після GET /api/account/me з CSRF. Конвертація в пам’яті, файли на сервері не зберігаються."
      }
    },
    "/api/card-art/frames": {
      "post": {
        "operationId": "post_api_card-art_frames",
        "tags": [
          "media"
        ],
        "summary": "Decode animation frames",
        "x-summary-uk": "Отримати кадри анімованого арту",
        "description": "Accepts normalized animated WebP returned by /api/card-art. Returns at most 48 static WebP data URIs with per-frame durations, bounded to 800px. No external URLs are fetched.",
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "art"
                ],
                "properties": {
                  "art": {
                    "type": "string",
                    "maxLength": 1500000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "frames": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "image": {
                            "type": "string"
                          },
                          "duration": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "duration": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid image or frame limits exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or expired CSRF token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 12 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Image converter busy. Retry after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-description-uk": "Кадри нормалізованого WebP: до 48 статичних зображень з тривалістю, до 800px. Зовнішні посилання не завантажуються."
      }
    },
    "/api/cards/animated.webp": {
      "post": {
        "operationId": "post_api_cards_animated_webp",
        "tags": [
          "media"
        ],
        "summary": "Encode an animated build card",
        "x-summary-uk": "Створити анімовану картку WebP",
        "description": "Combines 2–36 static WebP frames. All frames must have the same dimensions, at most 1280px per side and 40 million decoded pixels in total. At most 8 MB of frame data. Duration is 40–250ms per frame. Returns a looping animated WebP. The site exporter uses 36 frames, 83ms and a 1024px longest side.",
        "x-access": "write",
        "security": [
          {
            "sessionAuth": [],
            "csrfToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "frames"
                ],
                "properties": {
                  "frames": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 36,
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 40,
                    "maximum": 250,
                    "default": 83
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid image or frame limits exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or expired CSRF token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 12 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Image converter busy. Retry after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-description-uk": "Збирає 2–36 однакових за розміром статичних WebP у циклічну анімацію. До 8 МБ файлів, 1280px на сторону й 40 млн пікселів сумарно. Тривалість кадру 40–250 мс. Експортер сайту створює 36 кадрів по 83 мс зі стороною до 1024px."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sessionAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "session",
        "description": "Cookie from login/register."
      },
      "csrfToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-CSRF-Token",
        "description": "GET /api/account/me first. Keep cookie and latest csrf."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable reason."
          },
          "retryable": {
            "type": "boolean",
            "description": "Optional; source error can be retried."
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Matching/accepted Wiki categories."
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Account IDs for an ambiguous shared-history UID (409)."
          }
        }
      },
      "LocalizedText": {
        "type": "object",
        "properties": {},
        "additionalProperties": {
          "type": "string"
        }
      },
      "ProfileFields": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "string",
            "description": "Up to 24 characters."
          },
          "nickname": {
            "type": "string",
            "description": "In-game nickname, up to 40 characters."
          },
          "cardId": {
            "type": "string",
            "description": "Profile banner ID, up to 32 characters."
          },
          "avatarId": {
            "type": "string",
            "description": "Avatar character ID, up to 32 characters."
          },
          "elements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Favorite element IDs; at most 6."
          },
          "characters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Favorite character IDs; at most 24."
          }
        }
      },
      "PublicUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "login": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/ProfileFields"
          }
        },
        "required": [
          "id",
          "login",
          "profile"
        ]
      },
      "OwnerUser": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicUser"
          },
          {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "description": "Only returned to the signed-in owner."
              }
            }
          }
        ]
      },
      "Build": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "characterId": {
            "type": "string",
            "description": "Must exist in the character catalog."
          },
          "level": {
            "type": "integer"
          },
          "ascension": {
            "type": "integer"
          },
          "chain": {
            "type": "integer",
            "description": "Active resonance chain count: 0–6."
          },
          "weaponId": {
            "type": "string",
            "nullable": true
          },
          "weaponLevel": {
            "type": "integer"
          },
          "weaponAscension": {
            "type": "integer"
          },
          "weaponRank": {
            "type": "integer"
          },
          "skinId": {
            "type": "string",
            "nullable": true
          },
          "skills": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "nodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "echoes": {
            "type": "array",
            "items": {
              "type": "object",
              "nullable": true,
              "additionalProperties": true
            },
            "description": "Up to five Echo objects or null slots."
          },
          "design": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Card settings and custom art. Lists return a reduced design subset."
          },
          "bonuses": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "source": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "integer"
              },
              "buildId": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "characterId"
        ],
        "additionalProperties": true
      },
      "BuildEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "build": {
            "$ref": "#/components/schemas/Build"
          },
          "favorite": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          },
          "updated": {
            "type": "number",
            "description": "Unix seconds, when returned."
          },
          "userId": {
            "type": "integer"
          },
          "likes": {
            "type": "integer"
          },
          "liked": {
            "type": "boolean",
            "description": "Current session has liked the build."
          },
          "cardUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute URL of render-ready JSON. Null for private builds in owner responses."
          }
        }
      },
      "PublicBuildSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "integer"
          },
          "login": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "gameUid": {
            "type": "string"
          },
          "build": {
            "$ref": "#/components/schemas/Build"
          },
          "updated": {
            "type": "number"
          },
          "likes": {
            "type": "integer"
          },
          "liked": {
            "type": "boolean"
          },
          "cardUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute URL of render-ready JSON. Null for private builds in owner responses."
          }
        }
      },
      "Pull": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Source record ID or empty string."
          },
          "key": {
            "type": "string",
            "description": "Normalized deduplication key; do not edit manually."
          },
          "banner": {
            "type": "string",
            "description": "Convene type ID; each type is counted independently."
          },
          "itemId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rarity": {
            "type": "integer",
            "enum": [
              3,
              4,
              5
            ]
          },
          "time": {
            "type": "string",
            "description": "YYYY-MM-DD HH:mm:ss. Explicit timezone becomes UTC; naive game time retains clock value."
          },
          "pity": {
            "type": "integer",
            "nullable": true,
            "description": "Annotated 5-star cycle count; null when its beginning is unknown."
          }
        }
      },
      "PoolStats": {
        "type": "object",
        "properties": {
          "banner": {
            "type": "string"
          },
          "total": {
            "type": "integer"
          },
          "five": {
            "type": "integer"
          },
          "four": {
            "type": "integer"
          },
          "three": {
            "type": "integer"
          },
          "since5": {
            "type": "integer",
            "nullable": true
          },
          "since4": {
            "type": "integer",
            "nullable": true
          },
          "complete5": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "complete4": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "PullStats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "five": {
            "type": "integer"
          },
          "four": {
            "type": "integer"
          },
          "three": {
            "type": "integer"
          },
          "avg5": {
            "type": "number",
            "nullable": true
          },
          "byPool": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PoolStats"
            }
          }
        }
      },
      "Appearance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "original": {
            "type": "boolean"
          },
          "name": {},
          "description": {},
          "icon": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "rarity": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "requiresResonatorSkin": {
            "type": "boolean"
          }
        }
      },
      "GameData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/LocalizedText"
              }
            ]
          },
          "description": {},
          "rarity": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {},
              "color": {
                "type": "string"
              }
            }
          },
          "icon": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "element": {},
          "stats": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "statsLevel": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "ascensions": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Phase → material ID → quantity. Character keys 1–6; weapon keys zero-based."
          },
          "skill": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "skillTrees": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "chains": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "appearances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appearance"
            }
          },
          "appearanceScope": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "WikiDetail": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/GameData"
          },
          "source": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "fallbackLanguage": {
            "type": "string"
          }
        }
      },
      "Region": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "offsetMinutes": {
            "type": "integer"
          }
        }
      },
      "Notice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "section": {
            "type": "string",
            "enum": [
              "news",
              "events",
              "convene"
            ]
          },
          "title": {
            "type": "string"
          },
          "start": {
            "type": "number",
            "nullable": true,
            "description": "Unix milliseconds; may be absent/null."
          },
          "end": {
            "type": "number",
            "nullable": true
          },
          "permanent": {
            "type": "boolean"
          },
          "image": {
            "type": "string"
          },
          "recommended": {
            "type": "boolean"
          }
        }
      },
      "Collection": {
        "type": "object",
        "properties": {
          "player": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "weapons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "achievements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "convene": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "CardImages": {
        "type": "object",
        "properties": {},
        "additionalProperties": {
          "type": "string",
          "format": "uri",
          "nullable": true,
          "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
        }
      },
      "CardRarity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CardStat": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "unit": {
            "type": "string",
            "enum": [
              "flat",
              "percent"
            ]
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          }
        },
        "required": [
          "key",
          "value",
          "label",
          "unit",
          "iconUrl"
        ]
      },
      "CardElement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          }
        }
      },
      "CardAppearance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "selected": {
            "type": "boolean"
          },
          "original": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "artUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "images": {
            "$ref": "#/components/schemas/CardImages"
          }
        }
      },
      "CardSkill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "description": {
            "type": "string"
          },
          "level": {
            "type": "integer"
          },
          "maxLevel": {
            "type": "integer"
          }
        }
      },
      "CardNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "description": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardStat"
            }
          }
        }
      },
      "CardChain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "index": {
            "type": "integer",
            "description": "One-based S1–S6."
          },
          "active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "description": {
            "type": "string"
          }
        }
      },
      "CardSonataEffect": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "active": {
            "type": "boolean",
            "description": "Enough equipped pieces; does not mean a combat condition is active."
          },
          "conditional": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardStat"
            }
          }
        }
      },
      "CardSonata": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "effects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardSonataEffect"
            }
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "color": {
            "type": "string"
          }
        }
      },
      "CardCharacter": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rarity": {
            "$ref": "#/components/schemas/CardRarity"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "images": {
            "$ref": "#/components/schemas/CardImages"
          },
          "level": {
            "type": "integer"
          },
          "ascension": {
            "type": "integer",
            "description": "Actual phase selected from the level table."
          },
          "chain": {
            "type": "integer"
          },
          "element": {
            "$ref": "#/components/schemas/CardElement"
          },
          "skinId": {
            "type": "string",
            "nullable": true
          },
          "artUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "appearances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardAppearance"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardSkill"
            }
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardNode"
            }
          },
          "chains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardChain"
            }
          }
        }
      },
      "CardWeapon": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rarity": {
            "$ref": "#/components/schemas/CardRarity"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "images": {
            "$ref": "#/components/schemas/CardImages"
          },
          "level": {
            "type": "integer"
          },
          "ascension": {
            "type": "integer"
          },
          "rank": {
            "type": "integer"
          },
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardStat"
            }
          },
          "effect": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string",
                "description": "Passive description with values substituted for the saved rank."
              },
              "includedInStats": {
                "type": "boolean",
                "description": "False: the constructor does not automatically apply weapon passives."
              }
            }
          }
        },
        "nullable": true
      },
      "CardEcho": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rarity": {
            "$ref": "#/components/schemas/CardRarity"
          },
          "iconUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
          },
          "images": {
            "$ref": "#/components/schemas/CardImages"
          },
          "slot": {
            "type": "integer",
            "description": "Zero-based position, 0–4. Null entries retain empty slots."
          },
          "level": {
            "type": "integer"
          },
          "cost": {
            "type": "integer"
          },
          "setId": {
            "type": "string",
            "nullable": true
          },
          "sonata": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "count": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "effects": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CardSonataEffect"
                }
              },
              "iconUrl": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
              },
              "color": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardElement"
            }
          },
          "mainStat": {
            "$ref": "#/components/schemas/CardStat"
          },
          "secondaryStat": {
            "$ref": "#/components/schemas/CardStat"
          },
          "substats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardStat"
            }
          },
          "score": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "max": {
                "type": "integer"
              },
              "rank": {
                "type": "string"
              },
              "method": {
                "type": "string",
                "description": "roll-quality-v1: sum of each substat/max roll ×20, capped per roll. Not character-weighted DPR."
              }
            }
          },
          "skill": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "iconUrl": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
              },
              "cooldown": {
                "type": "number",
                "nullable": true
              }
            }
          }
        },
        "nullable": true
      },
      "BuildCard": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "enum": [
              1
            ]
          },
          "language": {
            "type": "string"
          },
          "fallbackLanguage": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "updated": {
            "type": "number",
            "description": "Unix seconds."
          },
          "published": {
            "type": "boolean"
          },
          "cardUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Absolute URL of render-ready JSON. Null for private builds in owner responses."
          },
          "owner": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "player": {
            "type": "object",
            "properties": {
              "uid": {
                "type": "string"
              },
              "nickname": {
                "type": "string"
              }
            }
          },
          "character": {
            "$ref": "#/components/schemas/CardCharacter"
          },
          "weapon": {
            "$ref": "#/components/schemas/CardWeapon"
          },
          "echoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardEcho"
            },
            "minItems": 5,
            "maxItems": 5
          },
          "sonatas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardSonata"
            }
          },
          "totalEchoCost": {
            "type": "integer"
          },
          "stats": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "type": "number"
            },
            "description": "Unrounded numeric values. HP/ATK/DEF are final flat totals; other values use percentage points (22 = 22%). hpPct/atkPct/defPct are accumulated bonuses, not separate final totals."
          },
          "statDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardStat"
            }
          },
          "art": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "game",
                  "custom"
                ]
              },
              "url": {
                "type": "string",
                "nullable": true,
                "description": "Selected art: absolute HTTPS URL, custom data:image/...;base64,..., or null."
              },
              "customDataUrl": {
                "type": "string",
                "nullable": true
              },
              "gameUrl": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Absolute HTTPS Wuthery URL, or null if no asset exists. No image bytes are fetched by the card endpoint."
              }
            }
          },
          "design": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "build": {
            "$ref": "#/components/schemas/Build",
            "description": "Original saved build. Optional for your renderer; enriched fields are provided separately."
          },
          "calculation": {
            "type": "object",
            "properties": {
              "engine": {
                "type": "string"
              },
              "base": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": "number"
                }
              },
              "bonus": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": "number"
                }
              },
              "percentageUnit": {
                "type": "string"
              },
              "rulesVersion": {},
              "rulesUpdated": {},
              "includes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "excludes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "note": {
                "type": "string"
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "schemaVersion",
          "id",
          "userId",
          "character",
          "weapon",
          "echoes",
          "stats",
          "statDetails",
          "art",
          "calculation",
          "warnings"
        ]
      }
    }
  }
}
