#pragma once // Spec: models.md Profile. Wire key for the user is profile_user. Undocumented keys (achievements, heatmap, // activities, ...) are ignored. xp_progress_pct defaults to 0, rank stays optional. #include #include #include #include #include "core/Json.hpp" #include "model/Badge.hpp" #include "model/Gist.hpp" #include "model/Media.hpp" #include "model/Post.hpp" #include "model/Project.hpp" #include "model/User.hpp" namespace dp { struct Profile { User user; std::vector posts; std::vector badges; std::int64_t badgeTotal = 0; std::int64_t badgeEarned = 0; std::vector projects; std::vector gists; std::string currentTab; std::int64_t postsCount = 0; bool isFollowing = false; bool isBlocked = false; bool isMuted = false; bool isOwner = false; bool canViewApiKey = false; std::string apiKey; bool aiCorrectionEnabled = false; bool aiCorrectionSync = false; std::optional aiCorrectionPrompt; bool aiModifierEnabled = false; bool aiModifierSync = false; std::optional aiModifierPrompt; bool telegramPaired = false; bool notifTelegramPaired = false; bool canManageCustomization = false; bool custDisableGlobal = false; bool custDisablePagetype = false; std::optional rank; std::int64_t followersCount = 0; std::int64_t followingCount = 0; bool viewerIsAdmin = false; std::vector media; std::int64_t xpProgressPercent = 0; static Profile fromJson(const Json& j); std::string id() const { return "profile:" + user.id; } }; } // namespace dp