{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clusterhack-dev/json-schema/clusterhack-dev-auth-account-schema.json",
  "title": "AuthAccount",
  "description": "``_build_me_payload()`` + freshly minted credentials.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clusterhack-dev-auth-api-openapi.yml#/components/schemas/AuthAccount",
  "type": "object",
  "properties": {
    "user": {
      "$ref": "#/$defs/UserMe"
    },
    "profile": {
      "$ref": "#/$defs/ProfileMe"
    },
    "auth": {
      "$ref": "#/$defs/AuthCredentials"
    }
  },
  "required": [
    "auth",
    "profile",
    "user"
  ],
  "$defs": {
    "AuthCredentials": {
      "type": "object",
      "description": "``_build_auth_payload()`` — the DRF token plus a fresh JWT pair.",
      "properties": {
        "token": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Always \"Token\"."
        },
        "jwt": {
          "$ref": "#/$defs/AuthJWTPair"
        }
      },
      "required": [
        "jwt",
        "token",
        "type"
      ]
    },
    "AuthJWTPair": {
      "type": "object",
      "description": "``apps.users.jwt_auth.build_jwt_pair()``.",
      "properties": {
        "access": {
          "type": "string"
        },
        "refresh": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Always \"Bearer\"."
        },
        "session_id": {
          "type": "string",
          "format": "uuid"
        },
        "access_expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "refresh_expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "access",
        "access_expires_at",
        "refresh",
        "refresh_expires_at",
        "session_id",
        "type"
      ]
    },
    "ProfileMe": {
      "type": "object",
      "properties": {
        "date_of_birth": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "photo": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "mini_description": {
          "type": "string",
          "maxLength": 100
        },
        "full_description": {
          "type": "string",
          "maxLength": 1000
        },
        "phone_number": {
          "type": "string",
          "maxLength": 17
        },
        "website": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri",
              "maxLength": 200
            },
            {
              "type": "string",
              "maxLength": 0
            }
          ]
        },
        "linkedin_link": {
          "type": "string",
          "maxLength": 130
        },
        "github_link": {
          "type": "string",
          "maxLength": 130
        },
        "telegram_name": {
          "type": "string",
          "maxLength": 130
        },
        "user_privacy": {
          "type": "boolean",
          "title": "Agreement with the user agreement and with the policy regarding the processing of personal data"
        }
      }
    },
    "UserMe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "username": {
          "type": "string",
          "readOnly": true,
          "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
        },
        "first_name": {
          "type": "string",
          "maxLength": 150
        },
        "last_name": {
          "type": "string",
          "maxLength": 150
        },
        "email": {
          "title": "Email address",
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "maxLength": 254
            },
            {
              "type": "string",
              "maxLength": 0
            }
          ]
        }
      },
      "required": [
        "id",
        "username"
      ]
    }
  }
}