using MessagePack; using System.Text.Json.Serialization; namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses; /// /// /mypage/refresh response — a slim notification-delta payload, NOT a full state refresh. /// Prod sends exactly 3 top-level keys, all of which the client reads unconditionally: /// /// /// friend_battle_invite_count — int, viewer's room-invite count /// (consumed at MyPageRefreshTask.cs:29). /// shop_notification — same nested shape as /mypage/index's shop_notification. /// The side-effect call ShopNotification.SetShopNotification unconditionally indexes /// all four sub-keys (card_pack / build_deck / sleeve / leader_skin), already handled by /// our DTO's field initializers. /// gathering_notification — new shape distinct from /mypage/index's gathering_info. /// Carries only the matching-established message string. /// /// /// All three fields are required-present per the new "anything prod emits, we emit" methodology /// — even though the third call site looks tolerant, omitting the key would throw /// KeyNotFoundException at LitJson's indexer. /// [MessagePackObject] public class MyPageRefreshResponse { [JsonPropertyName("friend_battle_invite_count")] [Key("friend_battle_invite_count")] public int FriendBattleInviteCount { get; set; } [JsonPropertyName("shop_notification")] [Key("shop_notification")] public ShopNotification ShopNotification { get; set; } = new(); [JsonPropertyName("gathering_notification")] [Key("gathering_notification")] public GatheringNotification GatheringNotification { get; set; } = new(); }