{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ctlsurf-com/json-schema/ctlsurf-com-token-response-schema.json",
  "title": "TokenResponse",
  "description": "Schema for token response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ctlsurf-com-auth-api-openapi.yml#/components/schemas/TokenResponse",
  "properties": {
    "access_token": {
      "type": "string",
      "title": "Access Token"
    },
    "refresh_token": {
      "type": "string",
      "title": "Refresh Token"
    },
    "token_type": {
      "type": "string",
      "title": "Token Type",
      "default": "bearer"
    },
    "user": {
      "$ref": "#/$defs/UserResponse"
    }
  },
  "type": "object",
  "required": [
    "access_token",
    "refresh_token",
    "user"
  ],
  "$defs": {
    "UserResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "email": {
          "type": "string",
          "title": "Email"
        },
        "is_admin": {
          "type": "boolean",
          "title": "Is Admin"
        },
        "admin_role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Admin Role"
        },
        "must_change_password": {
          "type": "boolean",
          "title": "Must Change Password"
        },
        "email_verified": {
          "type": "boolean",
          "title": "Email Verified"
        },
        "tier": {
          "type": "string",
          "title": "Tier",
          "default": "free"
        },
        "chat_logging_enabled": {
          "type": "boolean",
          "title": "Chat Logging Enabled",
          "default": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "email",
        "is_admin",
        "must_change_password",
        "email_verified",
        "created_at",
        "updated_at"
      ],
      "title": "UserResponse",
      "description": "Schema for user response (excludes password)."
    }
  }
}