Appearance
DoCurious API Reference / adapters / adaptPortfolioToTrackRecordShell
Function: adaptPortfolioToTrackRecordShell()
adaptPortfolioToTrackRecordShell(
sql,userChallengeId):TrackRecord|null
Defined in: adapters/portfolioAdapter.ts:103
Create a shell TrackRecord for a completed portfolio_without_orders entry.
Returns null if the portfolio entry is not completed. The resulting TrackRecord has a synthetic id prefixed with tr- and defaults to verified status with zero storage used.
Parameters
sql
Raw SQL portfolio_without_orders row
userChallengeId
string
The FE UserChallenge ID to link to
Returns
TrackRecord | null
Shell TrackRecord or null if not completed