using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses;
///
/// Wire-shape mirrors production's /check/game_start response. Several fields here are
/// NOT read by Cute/GameStartCheckTask.Parse (now_viewer_id, now_name,
/// now_rank 窶・those are consumed by sibling tasks); they're included because prod sends
/// them and the boot worked when we matched prod exactly. Removing them is a regression risk
/// even though the parse-time decompile says they're unused.
///
[MessagePackObject]
public class GameStartResponse
{
/// The signed-in viewer's internal id. Prod always sends.
[JsonPropertyName("now_viewer_id")]
[Key("now_viewer_id")]
public long NowViewerId { get; set; }
///
/// Whether the user has set a data-transfer password. Prod sends a non-null bool;
/// GameStartCheckTask.Parse gates the read with Keys.Contains.
///
[JsonPropertyName("is_set_transition_password")]
[Key("is_set_transition_password")]
public bool IsSetTransitionPassword { get; set; }
/// Viewer display name. Not read by GameStartCheckTask but sent by prod.
[JsonPropertyName("now_name")]
[Key("now_name")]
public string NowName { get; set; } = string.Empty;
///
/// Per-format rank-name map keyed by deck-format id ("1", "2", "4" observed in prod).
/// Stub for now until rank state is persisted; pinned to RankName_010 / RankName_017
/// (matches prod's shape).
///
[JsonPropertyName("now_rank")]
[Key("now_rank")]
public Dictionary NowRank { get; set; } = new();
///
/// Tutorial progress 窶・**sent as a string on the wire** ("100" = tutorial complete).
/// GameStartCheckTask.Parse calls .ToInt() so LitJson coerces.
///
[JsonPropertyName("now_tutorial_step")]
[Key("now_tutorial_step")]
public string NowTutorialStep { get; set; } = "100";
///
/// Linked social accounts. Per-entry shape in .
///
[JsonPropertyName("transition_account_data")]
[Key("transition_account_data")]
public List TransitionAccountData { get; set; } = new();
///
/// When present, client overwrites Certification.ViewerId with this value. Optional
/// 窶・leave null to omit. The serialization pipeline (JSON + msgpack via the translation
/// middleware) drops null properties end-to-end, so the client sees the key as absent.
///
[JsonPropertyName("rewrite_viewer_id")]
[Key("rewrite_viewer_id")]
public long? RewriteViewerId { get; set; }
///
/// Presence indicates the user has applied for account deletion (value ignored by client at
/// this stage). Optional 窶・leave null to omit.
///
[JsonPropertyName("account_delete_reservation_status")]
[Key("account_delete_reservation_status")]
public int? AccountDeleteReservationStatus { get; set; }
// --- Agreement / consent state (all required) ---
/// PlayerStaticData.AgreementState enum.
[JsonPropertyName("tos_state")]
[Key("tos_state")]
public int TosState { get; set; }
/// PlayerStaticData.AgreementState enum.
[JsonPropertyName("policy_state")]
[Key("policy_state")]
public int PolicyState { get; set; }
/// PlayerStaticData.AgreementState enum.
[JsonPropertyName("kor_authority_state")]
[Key("kor_authority_state")]
public int KorAuthorityState { get; set; }
/// Current Terms of Service document id.
[JsonPropertyName("tos_id")]
[Key("tos_id")]
public int TosId { get; set; }
/// Current Privacy Policy document id.
[JsonPropertyName("policy_id")]
[Key("policy_id")]
public int PolicyId { get; set; }
/// Current Korean authority consent document id.
[JsonPropertyName("kor_authority_id")]
[Key("kor_authority_id")]
public int KorAuthorityId { get; set; }
}