feat(deck-builder): /deck_code mint + /deck resolve with 3-min in-memory TTL
Adds the portal pair (shadowverse-portal.com deck-builder endpoints) as anonymous routes on the app server. The translation middleware learns a new [NoWireEncryption] attribute that skips both AES calls but keeps the rest of the msgpack + base64 + envelope pipeline intact, matching prod's portal wire profile observed in data_dumps/traffic_prod_deckcode.ndjson. Storage is a 3-minute IMemoryCache — codes are anonymous-global, 4-char lowercase alphanumeric (matches the shortest prod sample). Foil bit is stripped on mint to match prod's normalize-on-encode behaviour. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
22
SVSim.EmulatedEntrypoint/Models/Dtos/Common/PortalErrors.cs
Normal file
22
SVSim.EmulatedEntrypoint/Models/Dtos/Common/PortalErrors.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
/// <summary>
|
||||
/// The portal (shadowverse-portal.com) wraps every response with an `errors` object that is
|
||||
/// present even on success — the success-path payload carries a stub `UNKNOWN_ERROR` / "error
|
||||
/// message" pair that the client ignores when result_code == 1. See
|
||||
/// <c>docs/api-spec/endpoints/deck-builder/*.md</c>.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class PortalErrors
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
[Key("type")]
|
||||
public string Type { get; set; } = "UNKNOWN_ERROR";
|
||||
|
||||
[JsonPropertyName("message")]
|
||||
[Key("message")]
|
||||
public string Message { get; set; } = "";
|
||||
}
|
||||
Reference in New Issue
Block a user