{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI SteamGold",
    "description": "Is used for steamgold API",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.steamgold.dev/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/gold": {
      "post": {
        "description": "Создает намерение пополнения баланса",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentGoldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentGoldResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gold/verify": {
      "post": {
        "description": "Проверяет возможность пополнения баланса",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentGoldVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentGoldVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gold/{id}": {
      "get": {
        "description": "Получает информацию о намерении пополнения баланса",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gold/{id}/checkout": {
      "post": {
        "description": "Выставляет счет на пополнение баланса",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное создание счета",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gold/{id}/cancel": {
      "post": {
        "description": "Возвращает платеж клиенту",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное возврат",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/items": {
      "post": {
        "description": "Создает намерение для покупки",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentItemsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentItemsResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/items/verify": {
      "post": {
        "description": "Проверяет доступность и возможность покупки товара",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentItemsVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentItemsVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/items/{id}": {
      "get": {
        "description": "Получает информацию о намерении пополнения баланса",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/items/{id}/checkout": {
      "post": {
        "description": "Выставляет счет на оплату покупки",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное создание счета",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/items/{id}/cancel": {
      "post": {
        "description": "Возвращает платеж клиенту",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное возврат",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/catalog": {
      "get": {
        "description": "Возвращает список доступных игр в каталоге подарков с пагинацией",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы (начиная с 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Количество игр на странице",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "genre",
            "in": "query",
            "description": "Фильтр по жанру (например, `Action`, `RPG`)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "steamCategory",
            "in": "query",
            "description": "Фильтр по категории Steam Featured. Допустимые значения: `specials`, `coming_soon`, `top_sellers`, `new_releases`",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "specials",
                "coming_soon",
                "top_sellers",
                "new_releases"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Полнотекстовый поиск по названию и описанию игры",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Список игр в каталоге",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/catalog/{appId}": {
      "get": {
        "description": "Возвращает информацию о конкретной игре, включая доступные издания и цены",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "description": "Идентификатор приложения Steam",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Информация об игре",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftGameResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts": {
      "post": {
        "description": "Создает намерение для покупки Steam-игры в подарок",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentGiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentGiftResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/verify": {
      "post": {
        "description": "Проверяет доступность и возможность покупки подарка",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentGiftVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentGiftVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/{id}": {
      "get": {
        "description": "Получает информацию о намерении покупки подарка",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gifts/{id}/checkout": {
      "post": {
        "description": "Выставляет счет на оплату подарка",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное создание счета",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/promo/verify": {
      "post": {
        "description": "Проверяет существование промокода",
        "requestBody": {
          "description": "Описание промокода",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "promo response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/refresh-tokens": {
      "post": {
        "description": "Обновляет токен",
        "requestBody": {
          "description": "Токен",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refreshToken": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "plant response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/treasures/items/{platform}": {
      "get": {
        "description": "Отображает список доступных товаров для платформы",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "description": "Идентификатор платформы",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Список доступных товаров",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreasureItemsResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gear/search": {
      "post": {
        "summary": "Поиск снаряжения",
        "description": "Позволяет искать и фильтровать доступное снаряжение по различным критериям.",
        "requestBody": {
          "description": "Параметры для поиска и фильтрации снаряжения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GearSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Список доступного снаряжения",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GearSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Неверный запрос или параметры поиска",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gear": {
      "post": {
        "description": "Создает намерение для покупки снаряжения",
        "requestBody": {
          "description": "Описание намерения",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentGearRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentGearResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gear/{id}": {
      "get": {
        "description": "Получает информацию о намерении купить снаряжение",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "intent response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gear/{id}/checkout": {
      "post": {
        "description": "Выставляет счет на покупку снаряжения",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное создание счета",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gear/{id}/cancel": {
      "post": {
        "description": "Возвращает платеж клиенту",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор намерения",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное возврат",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/currency": {
      "get": {
        "description": "Возвращает список последних котировок валютных пар",
        "responses": {
          "200": {
            "description": "Список валютных пар",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrencyPairsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Отсутствует авторизация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/currency/{pair}": {
      "get": {
        "description": "Возвращает историю котировок конкретной валютной пары",
        "parameters": [
          {
            "name": "pair",
            "in": "path",
            "description": "Валютная пара в формате `XXX:YYY` (заглавные латинские буквы)",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}:[A-Z]{3}$"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Количество последних записей. Минимум 1, максимум 90. По умолчанию возвращается одна свежая запись.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "История котировок",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrencyPairsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Некорректный формат пары или параметров запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Отсутствует авторизация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/currency/available": {
      "get": {
        "description": "Возвращает список доступных валют в Steam",
        "responses": {
          "200": {
            "description": "Список валют",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrencyAvailableResponse"
                }
              }
            }
          },
          "400": {
            "description": "Пользователь не настроил токен Steam Currency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Отсутствует авторизация",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pouch": {
      "post": {
        "tags": [
          "Pouch"
        ],
        "description": "Создает новую пустую корзину для последующего наполнения намерениями",
        "operationId": "createPouch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attribution": {
                    "description": "Атрибуция трафика (если есть). Подробнее в [документации](/attribution)",
                    "type": "object",
                    "properties": {
                      "utm_source": {
                        "description": "Источник трафика",
                        "type": "string"
                      },
                      "utm_medium": {
                        "description": "Тип трафика",
                        "type": "string"
                      }
                    },
                    "required": [
                      "utm_source",
                      "utm_medium"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Корзина успешно создана",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "pouchId": {
                      "type": "string",
                      "description": "ID созданной корзины",
                      "example": "5f4d3fc4a1f6c80017e7b7d1"
                    },
                    "paymentAmount": {
                      "type": "number",
                      "description": "Сумма к оплате",
                      "example": 1000
                    },
                    "paymentCurrency": {
                      "type": "string",
                      "description": "Валюта оплаты",
                      "example": "RUB"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pouch/{pouchId}": {
      "get": {
        "tags": [
          "Pouch"
        ],
        "description": "Возвращает детальную информацию о корзине и содержащихся в ней намерениях",
        "operationId": "getPouch",
        "parameters": [
          {
            "name": "pouchId",
            "in": "path",
            "description": "ID корзины",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Информация о корзине",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "pouchStatus": {
                      "type": "string",
                      "description": "Статус корзины",
                      "enum": [
                        "open",
                        "closed",
                        "delivered",
                        "failed"
                      ],
                      "example": "open"
                    },
                    "intents": {
                      "type": "array",
                      "description": "Список намерений в корзине",
                      "items": {
                        "type": "object",
                        "properties": {
                          "intentId": {
                            "type": "string",
                            "description": "ID намерения",
                            "example": "5f4d3fc4a1f6c80017e7b7d2"
                          },
                          "verification": {
                            "type": "string",
                            "description": "Статус верификации",
                            "enum": [
                              "pending",
                              "verified",
                              "rejected",
                              "fraud"
                            ],
                            "example": "verified"
                          },
                          "deliveryStatus": {
                            "type": "string",
                            "description": "Статус доставки",
                            "enum": [
                              "created",
                              "pending",
                              "in_review",
                              "retrying",
                              "delivered",
                              "failed"
                            ],
                            "example": "created"
                          },
                          "deliveryId": {
                            "type": "string",
                            "description": "ID доставки",
                            "example": "delivery_12345"
                          },
                          "intentAmount": {
                            "type": "number",
                            "description": "Сумма намерения",
                            "example": 500
                          },
                          "intentCurrency": {
                            "type": "string",
                            "description": "Валюта намерения",
                            "example": "RUB"
                          },
                          "paymentAmount": {
                            "type": "number",
                            "description": "Сумма к оплате по намерению",
                            "example": 500
                          },
                          "treasure": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Тип сокровища",
                                "example": "gold"
                              },
                              "platform": {
                                "type": "string",
                                "description": "Платформа",
                                "example": "steam"
                              },
                              "item": {
                                "type": "string",
                                "description": "Предмет",
                                "example": "1000_gold_coins"
                              },
                              "title": {
                                "type": "string",
                                "description": "Название",
                                "example": "1000 золотых монет"
                              }
                            }
                          }
                        }
                      }
                    },
                    "paymentStatus": {
                      "type": "string",
                      "description": "Статус оплаты корзины",
                      "enum": [
                        "created",
                        "pending",
                        "paid",
                        "rejected",
                        "canceled",
                        "refunded",
                        "expired"
                      ],
                      "example": "created"
                    },
                    "paymentAmount": {
                      "type": "number",
                      "description": "Сумма к оплате",
                      "example": 1000
                    },
                    "paymentCurrency": {
                      "type": "string",
                      "description": "Валюта оплаты",
                      "example": "RUB"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pouch/{pouchId}/intents": {
      "post": {
        "tags": [
          "Pouch"
        ],
        "description": "Добавляет существующее намерение в корзину",
        "operationId": "addIntentToPouch",
        "parameters": [
          {
            "name": "pouchId",
            "in": "path",
            "description": "ID корзины",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intentId": {
                    "type": "string",
                    "description": "ID намерения для добавления"
                  }
                },
                "required": [
                  "intentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Намерение успешно добавлено",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "paymentAmount": {
                      "type": "number",
                      "description": "Обновленная сумма к оплате",
                      "example": 1500
                    },
                    "paymentCurrency": {
                      "type": "string",
                      "description": "Валюта оплаты",
                      "example": "RUB"
                    },
                    "message": {
                      "type": "string",
                      "example": "Intent added to pouch"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pouch/{pouchId}/intents/{intentId}": {
      "delete": {
        "tags": [
          "Pouch"
        ],
        "description": "Удаляет намерение из корзины",
        "operationId": "removeIntentFromPouch",
        "parameters": [
          {
            "name": "pouchId",
            "in": "path",
            "description": "ID корзины",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "intentId",
            "in": "path",
            "description": "ID намерения",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Намерение успешно удалено",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "paymentAmount": {
                      "type": "number",
                      "description": "Обновленная сумма к оплате",
                      "example": 1000
                    },
                    "paymentCurrency": {
                      "type": "string",
                      "description": "Валюта оплаты",
                      "example": "RUB"
                    },
                    "message": {
                      "type": "string",
                      "example": "Intent removed from pouch"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pouch/{pouchId}/verify": {
      "get": {
        "tags": [
          "Pouch"
        ],
        "description": "Проверяет возможность оплаты корзины",
        "operationId": "pouchVerify",
        "parameters": [
          {
            "name": "pouchId",
            "in": "path",
            "description": "ID корзины",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Корзина готова к оплате",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "verified": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pouch/{pouchId}/checkout": {
      "post": {
        "tags": [
          "Pouch"
        ],
        "description": "Выставляет счет на оплату корзины (один счет на все намерения корзины)",
        "operationId": "pouchCheckout",
        "parameters": [
          {
            "name": "pouchId",
            "in": "path",
            "description": "ID корзины",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Email покупателя",
                    "format": "email"
                  },
                  "name": {
                    "type": "string",
                    "description": "Имя покупателя",
                    "maxLength": 200
                  },
                  "phone": {
                    "type": "string",
                    "description": "Телефон покупателя",
                    "maxLength": 50
                  },
                  "comment": {
                    "type": "string",
                    "description": "Комментарий к заказу",
                    "maxLength": 1000
                  },
                  "delivery": {
                    "type": "object",
                    "description": "Информация о доставке из [CDEK виджета](https://github.com/cdek-it/widget/wiki/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-3.0#%D0%B2%D1%8B%D0%B1%D0%BE%D1%80-%D1%82%D0%B0%D1%80%D0%B8%D1%84%D0%B0-%D0%B8-%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%B0-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B8-onchoose)",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "door",
                          "office"
                        ]
                      },
                      "rates": {
                        "type": "object",
                        "properties": {
                          "tariff_code": {
                            "type": "number"
                          },
                          "tariff_name": {
                            "type": "string"
                          },
                          "tariff_description": {
                            "type": "string"
                          },
                          "delivery_mode": {
                            "type": "number"
                          },
                          "period_min": {
                            "type": "number"
                          },
                          "period_max": {
                            "type": "number"
                          },
                          "delivery_sum": {
                            "type": "number"
                          }
                        }
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "postal_code": {
                            "type": "string"
                          },
                          "country_code": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "city_code": {
                            "type": "number"
                          },
                          "type": {
                            "type": "string"
                          },
                          "have_cashless": {
                            "type": "boolean"
                          },
                          "have_cash": {
                            "type": "boolean"
                          },
                          "allowed_cod": {
                            "type": "boolean"
                          },
                          "is_dressing_room": {
                            "type": "boolean"
                          },
                          "code": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "work_time": {
                            "type": "string"
                          },
                          "location": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "position": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "kind": {
                            "type": "string"
                          },
                          "precision": {
                            "type": "string"
                          },
                          "formatted": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Оплата успешно инициирована",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "paymentId": {
                      "type": "string",
                      "description": "ID платежа",
                      "example": "payment_12345"
                    },
                    "paymentUrl": {
                      "type": "string",
                      "description": "Ссылка на оплату"
                    },
                    "message": {
                      "type": "string",
                      "example": "Payment initiated"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "IntentGiftRequest": {
        "required": [
          "platform",
          "item",
          "target",
          "email"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "description": "Платформа для которой создается намерение (например, `steam-gift`)",
            "type": "string"
          },
          "item": {
            "description": "Идентификатор игры (appId в Steam)",
            "type": "string"
          },
          "target": {
            "description": "Данные получателя подарка",
            "type": "object",
            "required": [
              "inviteUrl",
              "region",
              "packageId"
            ],
            "properties": {
              "inviteUrl": {
                "description": "Ссылка-приглашение в Steam-группу получателя",
                "type": "string",
                "format": "uri"
              },
              "region": {
                "description": "Регион получателя (двухбуквенный код ISO 3166-1 alpha-2, например `US`, `DE`, `TR`)",
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              },
              "packageId": {
                "description": "Идентификатор издания игры в Steam",
                "type": "integer"
              }
            }
          },
          "email": {
            "description": "Электронная почта геймера для получения чека",
            "type": "string",
            "format": "email"
          },
          "fee": {
            "description": "Если `included` то комиссия включена в сумму, если `excluded` то комиссия не включена в сумму, `naive` считает комиссию от суммы оплаты.",
            "type": "string",
            "enum": [
              "included",
              "excluded",
              "naive"
            ],
            "default": "excluded"
          },
          "code": {
            "description": "Промокод применяемый к покупке",
            "type": "string"
          },
          "attribution": {
            "description": "Атрибуция трафика (если есть). Подробнее в [документации](/attribution)",
            "type": "object",
            "properties": {
              "utm_source": {
                "description": "Источник трафика",
                "type": "string"
              },
              "utm_medium": {
                "description": "Тип трафика",
                "type": "string"
              }
            }
          },
          "successUrl": {
            "description": "URL для перенаправления после успешной оплаты",
            "type": "string"
          },
          "failureUrl": {
            "description": "URL для перенаправления после неуспешной оплаты",
            "type": "string"
          },
          "callbackUrl": {
            "description": "URL для оповещения об успешной оплате",
            "type": "string"
          }
        }
      },
      "IntentGiftVerifyRequest": {
        "required": [
          "platform",
          "item",
          "target",
          "email"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "description": "Платформа для которой создается намерение (например, `steam-gift`)",
            "type": "string"
          },
          "item": {
            "description": "Идентификатор игры (appId в Steam)",
            "type": "string"
          },
          "target": {
            "description": "Данные получателя подарка",
            "type": "object",
            "required": [
              "inviteUrl",
              "region",
              "packageId"
            ],
            "properties": {
              "inviteUrl": {
                "description": "Ссылка-приглашение в Steam-группу получателя",
                "type": "string",
                "format": "uri"
              },
              "region": {
                "description": "Регион получателя (двухбуквенный код ISO 3166-1 alpha-2, например `US`, `DE`, `TR`)",
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              },
              "packageId": {
                "description": "Идентификатор издания игры в Steam",
                "type": "integer"
              }
            }
          },
          "email": {
            "description": "Электронная почта геймера для получения чека",
            "type": "string",
            "format": "email"
          },
          "fee": {
            "description": "Если `included` то комиссия включена в сумму, если `excluded` то комиссия не включена в сумму, `naive` считает комиссию от суммы оплаты.",
            "type": "string",
            "enum": [
              "included",
              "excluded",
              "naive"
            ],
            "default": "excluded"
          },
          "code": {
            "description": "Промокод применяемый к покупке",
            "type": "string"
          }
        }
      },
      "IntentGiftResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "verified": {
            "description": "Флаг успешной верификации намерения",
            "type": "boolean"
          },
          "intentAmount": {
            "description": "Сумма намерения",
            "type": "number"
          },
          "intentCurrency": {
            "description": "Валюта намерения",
            "type": "string"
          },
          "paymentAmount": {
            "description": "Сумма оплаты для геймера",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "IntentGiftVerifyResponse": {
        "required": [
          "code",
          "intentId",
          "paymentAmount",
          "paymentCurrency"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "paymentAmount": {
            "description": "Сумма платежа",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          }
        }
      },
      "GiftCatalogResponse": {
        "type": "object",
        "properties": {
          "games": {
            "description": "Список игр в каталоге",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GiftCatalogGame"
            }
          },
          "total": {
            "description": "Общее количество игр в каталоге",
            "type": "integer"
          }
        }
      },
      "GiftCatalogGame": {
        "type": "object",
        "properties": {
          "appId": {
            "description": "Идентификатор приложения Steam",
            "type": "integer"
          },
          "slug": {
            "description": "Уникальный идентификатор игры (например, `steam-730`)",
            "type": "string"
          },
          "title": {
            "description": "Название игры",
            "type": "string"
          },
          "headerImage": {
            "description": "URL обложки игры",
            "type": "string"
          },
          "shortDescription": {
            "description": "Краткое описание игры",
            "type": "string"
          },
          "genres": {
            "description": "Жанры игры",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "description": "Ценовая информация в рублях. `null` если данные о цене недоступны.",
            "nullable": true,
            "type": "object",
            "properties": {
              "paymentAmount": {
                "description": "Сумма к оплате в копейках (RUB)",
                "type": "integer"
              },
              "paymentCurrency": {
                "description": "Валюта оплаты",
                "type": "string",
                "example": "RUB"
              },
              "paymentAmountFull": {
                "description": "Сумма без скидки в копейках (только если есть скидка)",
                "type": "integer"
              },
              "discountPercent": {
                "description": "Размер скидки в процентах (только если есть скидка)",
                "type": "integer"
              }
            }
          }
        }
      },
      "GiftGameResponse": {
        "type": "object",
        "properties": {
          "appId": {
            "description": "Идентификатор приложения Steam",
            "type": "integer"
          },
          "slug": {
            "description": "Уникальный идентификатор игры (например, `steam-730`)",
            "type": "string"
          },
          "type": {
            "description": "Тип приложения Steam (`game`, `dlc`, `demo` и др.)",
            "type": "string"
          },
          "isDlc": {
            "description": "Флаг — является ли приложение DLC",
            "type": "boolean"
          },
          "isFree": {
            "description": "Флаг — является ли игра бесплатной",
            "type": "boolean"
          },
          "requiredAge": {
            "description": "Минимальный возраст для игры",
            "type": "integer"
          },
          "title": {
            "description": "Название игры",
            "type": "string"
          },
          "shortDescription": {
            "description": "Краткое описание игры",
            "type": "string"
          },
          "website": {
            "description": "Официальный сайт игры",
            "type": "string"
          },
          "media": {
            "description": "Медиа-ресурсы игры",
            "type": "object",
            "properties": {
              "header": {
                "description": "URL обложки игры (460×215)",
                "type": "string"
              },
              "capsule": {
                "description": "URL капсулы игры (231×87)",
                "type": "string"
              },
              "background": {
                "description": "URL фонового изображения страницы игры",
                "type": "string"
              },
              "screenshots": {
                "description": "Скриншоты игры",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "thumbnail": {
                      "description": "URL уменьшенного скриншота",
                      "type": "string"
                    },
                    "full": {
                      "description": "URL полного скриншота",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "genres": {
            "description": "Жанры игры (например, `Action`, `RPG`)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "description": "Категории Steam (например, `Single-player`, `Multi-player`, `Steam Achievements`)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "developers": {
            "description": "Разработчики игры",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publishers": {
            "description": "Издатели игры",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "release": {
            "description": "Информация о дате выхода",
            "type": "object",
            "properties": {
              "date": {
                "description": "Дата выхода игры",
                "type": "string"
              },
              "comingSoon": {
                "description": "Флаг — игра ещё не вышла",
                "type": "boolean"
              }
            }
          },
          "platforms": {
            "description": "Поддерживаемые платформы",
            "type": "object",
            "properties": {
              "windows": {
                "type": "boolean"
              },
              "mac": {
                "type": "boolean"
              },
              "linux": {
                "type": "boolean"
              }
            }
          },
          "metacritic": {
            "description": "Оценка Metacritic",
            "type": "object",
            "properties": {
              "score": {
                "description": "Числовая оценка (0–100)",
                "type": "integer"
              },
              "url": {
                "description": "Ссылка на страницу Metacritic",
                "type": "string"
              }
            }
          },
          "recommendations": {
            "description": "Количество рекомендаций в Steam",
            "type": "integer"
          },
          "achievements": {
            "description": "Количество достижений",
            "type": "integer"
          },
          "editions": {
            "description": "Список доступных изданий игры",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GiftEdition"
            }
          }
        }
      },
      "GiftEdition": {
        "type": "object",
        "properties": {
          "edition": {
            "description": "Название издания",
            "type": "string"
          },
          "packageId": {
            "description": "Идентификатор пакета в Steam. Передается в поле `target.packageId` при создании намерения.",
            "type": "integer"
          },
          "regions": {
            "description": "Список регионов с ценами для данного издания",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "region": {
                  "description": "Двухбуквенный код региона (ISO 3166-1 alpha-2)",
                  "type": "string",
                  "example": "US"
                },
                "paymentAmount": {
                  "description": "Сумма к оплате в копейках (RUB)",
                  "type": "integer"
                },
                "paymentCurrency": {
                  "description": "Валюта оплаты",
                  "type": "string",
                  "example": "RUB"
                },
                "paymentAmountFull": {
                  "description": "Сумма без скидки в копейках (только если есть скидка)",
                  "type": "integer"
                },
                "discountPercent": {
                  "description": "Размер скидки в процентах (только если есть скидка)",
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "IntentGoldRequest": {
        "required": [
          "account",
          "email",
          "platform",
          "amount",
          "currency"
        ],
        "type": "object",
        "properties": {
          "account": {
            "description": "Идентификатор аккаунта геймера",
            "type": "string"
          },
          "email": {
            "description": "Электронная почта геймера",
            "type": "string"
          },
          "platform": {
            "description": "Платформа для которой создается намерение",
            "type": "string"
          },
          "amount": {
            "description": "Сумма пополнения (в копейках)",
            "type": "number"
          },
          "currency": {
            "description": "Валюта пополнения (RUB, USD, EUR)",
            "type": "string"
          },
          "code": {
            "description": "Промокод приминяемый к пополнению",
            "type": "string"
          },
          "fee": {
            "description": "Если `included` то комиссия включена в сумму, если `excluded` то комиссия не включена в сумму, `naive` считает комиссию от суммы оплаты.",
            "type": "string",
            "enum": [
              "included",
              "excluded",
              "naive"
            ],
            "default": "excluded"
          },
          "attribution": {
            "description": "Атрибуция трафика (если есть). Подробнее в [документации](/attribution)",
            "type": "object",
            "properties": {
              "utm_source": {
                "description": "Источник трафика",
                "type": "string"
              },
              "utm_medium": {
                "description": "Тип трафика",
                "type": "string"
              }
            }
          },
          "successUrl": {
            "description": "URL для перенаправления после успешной оплаты",
            "type": "string"
          },
          "failureUrl": {
            "description": "URL для перенаправления после неуспешной оплаты",
            "type": "string"
          },
          "callbackUrl": {
            "description": "URL для оповещения об успешной оплате",
            "type": "string"
          }
        }
      },
      "IntentGoldResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "verified": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "boolean"
          },
          "intentAmount": {
            "description": "Сумма пополнения",
            "type": "number"
          },
          "intentCurrency": {
            "description": "Валюта пополнения",
            "type": "string"
          },
          "paymentAmount": {
            "description": "Сумма оплаты для геймера",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "IntentItemsRequest": {
        "required": [
          "account",
          "email",
          "platform",
          "item"
        ],
        "type": "object",
        "properties": {
          "account": {
            "description": "Идентификатор аккаунта геймера",
            "type": "string"
          },
          "additionalFields": {
            "description": "Дополнительные поля для создания намерения (если есть)",
            "type": "object"
          },
          "email": {
            "description": "Электронная почта геймера",
            "type": "string"
          },
          "platform": {
            "description": "Платформа для которой создается намерение",
            "type": "string"
          },
          "item": {
            "description": "Предмет для которого создается намерение",
            "type": "string"
          },
          "code": {
            "description": "Промокод приминяемый к покупке",
            "type": "string"
          },
          "fee": {
            "description": "Для товаров мы пока поддерживаем только `excluded`",
            "type": "string",
            "enum": [
              "excluded"
            ],
            "default": "excluded"
          },
          "attribution": {
            "description": "Атрибуция трафика (если есть). Подробнее в [документации](/attribution)",
            "type": "object",
            "properties": {
              "utm_source": {
                "description": "Источник трафика",
                "type": "string"
              },
              "utm_medium": {
                "description": "Тип трафика",
                "type": "string"
              }
            }
          },
          "successUrl": {
            "description": "URL для перенаправления после успешной оплаты",
            "type": "string"
          },
          "failureUrl": {
            "description": "URL для перенаправления после неуспешной оплаты",
            "type": "string"
          },
          "callbackUrl": {
            "description": "URL для оповещения об успешной оплате",
            "type": "string"
          }
        }
      },
      "IntentItemsResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "verified": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "boolean"
          },
          "intentAmount": {
            "description": "Сумма пополнения",
            "type": "number"
          },
          "intentCurrency": {
            "description": "Валюта пополнения",
            "type": "string"
          },
          "paymentAmount": {
            "description": "Сумма оплаты для геймера",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "IntentGearRequest": {
        "required": [
          "account",
          "additionalFields",
          "email",
          "platform",
          "item"
        ],
        "type": "object",
        "properties": {
          "account": {
            "description": "Идентификатор аккаунта геймера в Steam (steam64 ID)",
            "type": "string"
          },
          "additionalFields": {
            "description": "Дополнительные поля для создания намерения",
            "type": "object",
            "required": [
              "steamId",
              "tradeLink"
            ],
            "properties": {
              "steamId": {
                "description": "Идентификатор аккаунта геймера в Steam (steam64 ID)",
                "type": "string"
              },
              "tradeLink": {
                "description": "Ссылка на обмен для предметов формата https://steamcommunity.com/tradeoffer/new/?partner=<partner_id>&token=<token>",
                "type": "string"
              }
            }
          },
          "email": {
            "description": "Электронная почта геймера",
            "type": "string"
          },
          "platform": {
            "description": "Идентификатор приложения Steam, для которого создается намерение. Например, для CS2 это `730`, для Dota 2 это `570`.",
            "type": "string"
          },
          "item": {
            "description": "Снаряжение для которого создается намерение",
            "type": "string"
          },
          "code": {
            "description": "Промокод приминяемый к покупке",
            "type": "string"
          },
          "fee": {
            "description": "Для снаряжения мы пока поддерживаем только `excluded`",
            "type": "string",
            "enum": [
              "excluded"
            ],
            "default": "excluded"
          },
          "attribution": {
            "description": "Атрибуция трафика (если есть). Подробнее в [документации](/attribution)",
            "type": "object",
            "properties": {
              "utm_source": {
                "description": "Источник трафика",
                "type": "string"
              },
              "utm_medium": {
                "description": "Тип трафика",
                "type": "string"
              }
            }
          },
          "successUrl": {
            "description": "URL для перенаправления после успешной оплаты",
            "type": "string"
          },
          "failureUrl": {
            "description": "URL для перенаправления после неуспешной оплаты",
            "type": "string"
          },
          "callbackUrl": {
            "description": "URL для оповещения об успешной оплате",
            "type": "string"
          }
        }
      },
      "IntentGearResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "verified": {
            "description": "Сообщение об успешной резервации снаряжения",
            "type": "boolean"
          },
          "intentAmount": {
            "description": "Сумма пополнения",
            "type": "number"
          },
          "intentCurrency": {
            "description": "Валюта пополнения",
            "type": "string"
          },
          "paymentAmount": {
            "description": "Сумма оплаты для геймера",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "IntentGoldVerifyRequest": {
        "required": [
          "account",
          "platform"
        ],
        "type": "object",
        "properties": {
          "account": {
            "description": "Идентификатор аккаунта геймера",
            "type": "string"
          },
          "platform": {
            "description": "Платформа на которой находится аккаунт",
            "type": "string"
          }
        }
      },
      "IntentGoldVerifyResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "verified": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "boolean"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "IntentItemsVerifyRequest": {
        "required": [
          "platform",
          "item"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "description": "Платформа на которой расположен товар",
            "type": "string"
          },
          "item": {
            "description": "Идентификатор товара",
            "type": "string"
          },
          "fee": {
            "description": "Для товаров мы пока поддерживаем только `excluded`",
            "type": "string",
            "enum": [
              "excluded"
            ],
            "default": "excluded"
          },
          "code": {
            "description": "Промокод приминяемый к покупке",
            "type": "string"
          }
        }
      },
      "IntentItemsVerifyResponse": {
        "required": [
          "code",
          "intentId",
          "paymentAmount",
          "paymentCurrency"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          },
          "paymentAmount": {
            "description": "Сумма платежа",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          }
        }
      },
      "IntentStatusResponse": {
        "required": [
          "code",
          "verification",
          "payment"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "verification": {
            "description": "Статус верификации",
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "rejected"
            ]
          },
          "deliveryStatus": {
            "description": "Статус доставки (для товаров и снаряжения)",
            "type": "string",
            "enum": [
              "created",
              "pending",
              "retrying",
              "delivered",
              "failed"
            ]
          },
          "deliveryId": {
            "description": "Идентификатор доставки (для товаров и снаряжения)",
            "type": "string"
          },
          "intentAmount": {
            "description": "Сумма пополнения",
            "type": "number"
          },
          "intentCurrency": {
            "description": "Валюта пополнения",
            "type": "string"
          },
          "paymentStatus": {
            "description": "Стаутс платежа",
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "rejected"
            ]
          },
          "paymentAmount": {
            "description": "Сумма платежа",
            "type": "number"
          },
          "paymentCurrency": {
            "description": "Валюта платежа",
            "type": "string"
          }
        }
      },
      "IntentCheckoutRequest": {
        "required": [
          "intentId"
        ],
        "type": "object",
        "properties": {
          "intentId": {
            "description": "Идентификатор намерения",
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IntentCheckoutResponse": {
        "required": [
          "code",
          "checkoutId"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "paymentId": {
            "description": "Идентификатор счета",
            "type": "string"
          },
          "paymentUrl": {
            "description": "Ссылка на оплату",
            "type": "string"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "PromoVerifyRequest": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "Промокод для проверки",
            "type": "string"
          }
        }
      },
      "PromoVerifyResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "description": "Тип скидки у промокода",
            "type": "string",
            "enum": [
              "commission"
            ]
          },
          "discount": {
            "description": "Размер скидки у промокода",
            "type": "number"
          }
        }
      },
      "TreasureItemsResponse": {
        "required": [
          "code",
          "intentId",
          "verified"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "treasures": {
            "description": "Список товаров у платформы",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "active": {
                  "description": "Флаг доступности товара",
                  "type": "boolean"
                },
                "inputParams": {
                  "description": "Список полей для создания намерения",
                  "type": "object"
                },
                "type": {
                  "description": "Тип товара",
                  "type": "string"
                },
                "platform": {
                  "description": "Платформа, на которой доступен товар",
                  "type": "string"
                },
                "item": {
                  "description": "Идентификатор товара",
                  "type": "string"
                },
                "icon": {
                  "description": "Иконка товара (можно использовать наш CDN — `https://cdn.steamgold.dev/items/{icon}.svg`)",
                  "type": "string"
                },
                "title": {
                  "description": "Название товара",
                  "type": "string"
                },
                "symbol": {
                  "description": "Символ валюты",
                  "type": "string"
                },
                "currency": {
                  "description": "Название внутриигровой валюты",
                  "type": "string"
                },
                "region": {
                  "description": "Регион, в котором доступен товар",
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RefreshTokenResponse": {
        "required": [
          "access",
          "refresh"
        ],
        "type": "object",
        "properties": {
          "access": {
            "description": "Ключ доступа",
            "type": "string"
          },
          "refresh": {
            "description": "Ключ обновления",
            "type": "string"
          }
        }
      },
      "Response": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "description": "Сообщение об успешном выполнении операции",
            "type": "string"
          }
        }
      },
      "Error": {
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "description": "HTTP-код ответа",
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "description": "Сообщение об ошибке",
            "type": "string"
          }
        }
      },
      "GearSearchRequest": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "integer",
            "description": "Идентификатор приложения Steam, для которого вы хотите получить снаряжение. По умолчанию `730` (для CS2).",
            "default": 730
          },
          "query": {
            "type": "string",
            "description": "Строка поиска по названию предмета. Используется для фильтрации снаряжения по названию или части названия."
          },
          "filters": {
            "type": "object",
            "description": "Объект, содержащий параметры фильтрации для поиска снаряжения. Все поля внутри `filters` необязательны.",
            "properties": {
              "price": {
                "type": "object",
                "description": "Фильтрация по диапазону цен. Значения `min` и `max` указываются в **центах**.",
                "properties": {
                  "min": {
                    "type": "number",
                    "description": "Минимальная цена в центах."
                  },
                  "max": {
                    "type": "number",
                    "description": "Максимальная цена в центах."
                  }
                }
              },
              "weapon": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по типу оружия (например, AK-47, M4A4)."
              },
              "type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по типу снаряжения. Возможные значения соответствуют полю `details.type` в ответе."
              },
              "rarity": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по редкости предмета. Возможные значения соответствуют полю `details.rarity` в ответе."
              },
              "exterior": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по внешнему износу для скинов оружия. Возможные значения соответствуют полю `details.exterior` в ответе."
              },
              "quality": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по качеству предмета (например, StatTrak™, Souvenir). Возможные значения соответствуют полю `details.quality` в ответе."
              },
              "phase": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Фильтрация по фазе."
              }
            }
          },
          "limit": {
            "type": "integer",
            "description": "Максимальное количество предметов для возврата на странице. По умолчанию `10`.",
            "default": 10
          },
          "page": {
            "type": "integer",
            "description": "Номер страницы для пагинации. По умолчанию `0`.",
            "default": 0
          },
          "sort": {
            "type": "string",
            "description": "Порядок сортировки результатов. По умолчанию `price_asc`.",
            "enum": [
              "price_asc",
              "price_desc"
            ]
          }
        }
      },
      "GearSearchResponse": {
        "required": [
          "status",
          "gear",
          "total"
        ],
        "type": "object",
        "properties": {
          "status": {
            "description": "Статус ответа API.",
            "type": "string"
          },
          "gear": {
            "type": "array",
            "description": "Массив объектов снаряжения, соответствующих критериям запроса.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Уникальный идентификатор предмета."
                },
                "name": {
                  "type": "string",
                  "description": "Отображаемое название предмета (например, название скина)."
                },
                "price": {
                  "type": "number",
                  "description": "Цена предмета в **копейках**."
                },
                "image": {
                  "type": "string",
                  "description": "URL-адрес иконки/миниатюры предмета."
                },
                "inspectLink": {
                  "type": "string",
                  "nullable": true,
                  "description": "Ссылка для осмотра предмета в игре, если доступна (для скинов)."
                },
                "description": {
                  "type": "string",
                  "nullable": true,
                  "description": "Основной описательный текст предмета."
                },
                "details": {
                  "description": "Этот объект содержит детализированные метаданные о предмете снаряжения.",
                  "$ref": "#/components/schemas/GearItemDetails"
                },
                "paint": {
                  "type": "object",
                  "description": "Этот объект содержит свойства, относящиеся к визуальному паттерну и износу предмета.",
                  "properties": {
                    "float": {
                      "type": "number",
                      "nullable": true,
                      "description": "Значение представляющее износ предмета (от 0.0 до 1.0)."
                    },
                    "seed": {
                      "type": "number",
                      "nullable": true,
                      "description": "ID покраски, влияющее на вариации паттерна."
                    },
                    "index": {
                      "type": "number",
                      "nullable": true,
                      "description": "Индекс покраски, для конкретных вариаций."
                    },
                    "pattern": {
                      "type": "number",
                      "nullable": true,
                      "description": "ID паттерна для предметов с отличительными визуальными паттернами (скины, наклейки, нашивки, граффити)."
                    }
                  }
                },
                "attachments": {
                  "type": "array",
                  "description": "Этот массив представляет прикрепления (наклейки, нашивки), которые могут быть *применены к предмету*. Для расходуемых прикреплений (таких как сами предметы-наклейки, нашивки или граффити) он описывает прикрепление, *содержащееся в предмете*. Массив всегда будет иметь фиксированную длину 5 элементов. Каждый элемент будет либо объектом `Attachment`, либо `null`, если слот пуст.",
                  "items": {
                    "$ref": "#/components/schemas/Attachment",
                    "nullable": true
                  },
                  "maxItems": 5,
                  "minItems": 5
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "description": "Общее количество предметов, найденных по запросу (без учёта `limit` и `page`)."
          }
        }
      },
      "GearItemDetails": {
        "type": "object",
        "description": "Детализированные метаданные о предмете снаряжения.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Общая классификация предмета. Соответствует ключам фильтра `filters.type`."
          },
          "weapon": {
            "type": "string",
            "nullable": true,
            "description": "Конкретное название оружия, если предмет является скином оружия. Соответствует ключам `filters.weapon`."
          },
          "set": {
            "type": "string",
            "nullable": true,
            "description": "Название коллекции или кейса, к которому принадлежит предмет. Соответствует ключам `filters.item_set`."
          },
          "quality": {
            "type": "string",
            "nullable": true,
            "description": "Атрибут качества предмета, например, StatTrak™ или Souvenir. Соответствует ключам `filters.quality`."
          },
          "rarity": {
            "type": "string",
            "nullable": true,
            "description": "Уровень редкости предмета. Соответствует ключам `filters.rarity`."
          },
          "exterior": {
            "type": "string",
            "nullable": true,
            "description": "Уровень внешнего износа для скинов оружия. Соответствует ключам `filters.exterior`."
          },
          "phase": {
            "type": "string",
            "nullable": true,
            "description": "Фаза Доплера для определённых раскрасок ножей. Соответствует ключам `filters.phase`."
          },
          "tournament": {
            "type": "string",
            "nullable": true,
            "description": "Название турнира, связанного с предметом (например, для мажорных стикеров, пропусков)."
          },
          "color": {
            "type": "string",
            "nullable": true,
            "description": "Конкретный цвет для предметов граффити."
          }
        }
      },
      "Attachment": {
        "type": "object",
        "description": "Структура объекта `Attachment`",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true,
            "description": "Внутренний ID наклейки/нашивки/граффити."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Отображаемое название наклейки/нашивки/граффити."
          },
          "wear": {
            "type": "number",
            "nullable": true,
            "description": "Значение износа (стирания) для *применённой* наклейки."
          },
          "type": {
            "type": "string",
            "description": "Тип прикрепления. (`sticker`, `patch`, `graffiti_pattern`)"
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "URL изображения наклейки/нашивки/граффити."
          }
        }
      },
      "CurrencyPairsResponse": {
        "type": "object",
        "description": "Ответ со списком котировок валютных пар",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP-код ответа"
          },
          "items": {
            "type": "array",
            "description": "Список котировок",
            "items": {
              "$ref": "#/components/schemas/CurrencyPairItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "Количество записей в ответе"
          },
          "message": {
            "type": "string",
            "description": "Дополнительное сообщение"
          }
        }
      },
      "CurrencyPairItem": {
        "type": "object",
        "properties": {
          "currency_pair": {
            "type": "string",
            "description": "Валютная пара в формате `XXX:YYY`"
          },
          "close_price": {
            "type": "number",
            "description": "Цена закрытия пары"
          },
          "created_at": {
            "type": "string",
            "description": "Дата фиксации котировки в формате `YYYY-MM-DD HH:mm:ss`"
          }
        }
      },
      "CurrencyAvailableResponse": {
        "type": "object",
        "description": "Ответ со списком доступных валют",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP-код ответа"
          },
          "items": {
            "type": "array",
            "description": "Список валют",
            "items": {
              "$ref": "#/components/schemas/CurrencyAvailableItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "Количество записей в ответе"
          },
          "message": {
            "type": "string",
            "description": "Дополнительное сообщение"
          }
        }
      },
      "CurrencyAvailableItem": {
        "type": "object",
        "properties": {
          "currency_code": {
            "type": "string",
            "description": "Код валюты"
          },
          "description": {
            "type": "string",
            "description": "Описание валюты"
          }
        }
      },
      "Pouch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Уникальный идентификатор корзины"
          },
          "status": {
            "type": "string",
            "description": "Статус корзины",
            "enum": [
              "open",
              "closed",
              "delivered",
              "failed"
            ]
          },
          "payment": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID платежа"
              },
              "url": {
                "type": "string",
                "description": "URL для оплаты"
              },
              "status": {
                "type": "string",
                "description": "Статус оплаты",
                "enum": [
                  "created",
                  "pending",
                  "paid",
                  "rejected",
                  "canceled",
                  "refunded",
                  "expired"
                ]
              },
              "message": {
                "type": "string",
                "description": "Сообщение о статусе оплаты"
              },
              "date": {
                "type": "string",
                "format": "date-time",
                "description": "Дата создания платежа"
              }
            }
          },
          "intents": {
            "type": "array",
            "description": "Список ID намерений в корзине",
            "items": {
              "type": "string"
            }
          },
          "productsAmount": {
            "type": "number",
            "description": "Сумма продуктов"
          },
          "productsCurrency": {
            "type": "string",
            "description": "Валюта продуктов"
          },
          "deliveryAmount": {
            "type": "number",
            "description": "Сумма доставки"
          },
          "deliveryCurrency": {
            "type": "string",
            "description": "Валюта доставки"
          },
          "totalAmount": {
            "type": "number",
            "description": "Общая сумма к оплате"
          },
          "totalCurrency": {
            "type": "string",
            "description": "Валюта оплаты"
          },
          "delivery": {
            "type": "object",
            "description": "Информация о доставке"
          },
          "attribution": {
            "type": "object",
            "description": "Данные атрибуции",
            "properties": {
              "utm_source": {
                "type": "string"
              },
              "utm_medium": {
                "type": "string"
              }
            }
          },
          "email": {
            "type": "string",
            "description": "Email покупателя"
          },
          "name": {
            "type": "string",
            "description": "Имя покупателя"
          },
          "phone": {
            "type": "string",
            "description": "Телефон покупателя"
          },
          "comment": {
            "type": "string",
            "description": "Комментарий к заказу"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}