{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/movie-planner-ru/json-schema/movie-planner-ru-mini-app-auth-success-schema.json",
  "title": "MiniAppAuthSuccess",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/movie-planner-ru-openapi.yaml#/components/schemas/MiniAppAuthSuccess",
  "type": "object",
  "required": [
    "success",
    "token",
    "user",
    "chat_id",
    "has_data",
    "movies_count"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "token": {
      "type": "string",
      "description": "Bearer site_session для последующих /api/miniapp/* и /api/site/*."
    },
    "user": {
      "$ref": "#/$defs/MiniAppTelegramUser"
    },
    "chat_id": {
      "type": "integer"
    },
    "has_data": {
      "type": "boolean"
    },
    "movies_count": {
      "type": "integer"
    }
  },
  "$defs": {
    "MiniAppTelegramUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "first_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "username": {
          "type": [
            "string",
            "null"
          ]
        },
        "photo_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "language_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_premium": {
          "type": "boolean"
        }
      }
    }
  }
}