1.3 KiB
1.3 KiB
Plan: Full Metadata Passthrough
Objective
Ensure that the DraftCard objects used throughout the application (and eventually sent to the backend) contain the complete original metadata from Scryfall. The user has explicitly requested access to "all cards informations" for future algorithms.
Steps
-
Update
ScryfallService.ts- Add an index signature
[key: string]: any;to theScryfallCardinterface. This acknowledges that the object contains more fields than strictly typed, preventing TypeScript from complaining when accessing obscure fields, and correctly modeling the API response.
- Add an index signature
-
Update
PackGeneratorService.ts- Add
sourceData: ScryfallCard;(or similar name likescryfallData) to theDraftCardinterface. - In
processCards, assign the incomingcardData(the full Scryfall object) to this new property.
- Add
Impact
- Data Size: Payload size for rooms will increase, but this is acceptable (and requested) for the richness of data required.
- Flexibility: Future updates to pack generation (e.g., checking specific
frame_effectsorprices) will not require interface updates; the data will already be there incard.sourceData.
Verification
- The valid "Parse Bulk" operation will now produce
DraftCards that, if inspected, contain the full Scryfall JSON.