feat(card-master): add request/response DTOs for /immutable_data/card_master

This commit is contained in:
gamer147
2026-06-12 12:05:14 -04:00
parent 014cd62729
commit dc39ed4146
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using MessagePack;
using System.Text.Json.Serialization;
using SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.ImmutableData;
/// <summary>
/// Wire body for <c>POST /immutable_data/card_master</c>. Client populates from
/// <c>GetCardMasterTask.CardMasterTaskParam</c> (Wizard/GetCardMasterTask.cs:14). For Tier 1
/// the hash is bound only for completeness — the controller serves the static blob regardless.
/// </summary>
[MessagePackObject]
public class CardMasterRequest : BaseRequest
{
[JsonPropertyName("card_master_hash")]
[Key("card_master_hash")]
public string? CardMasterHash { get; set; }
}

View File

@@ -0,0 +1,17 @@
using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.ImmutableData;
/// <summary>
/// Wire response shape. Client decodes <c>card_master</c> via:
/// <c>Convert.FromBase64String</c> → <c>GZipStream.UncompressBuffer</c> → UTF-8 decode →
/// <c>JsonMapper.ToObject</c>, yielding a dict <c>{ "1": "&lt;csv&gt;", "2"?: "&lt;csv&gt;" }</c>.
/// </summary>
[MessagePackObject]
public class CardMasterResponse
{
[JsonPropertyName("card_master")]
[Key("card_master")]
public string CardMaster { get; set; } = "";
}