Skip to content

DoCurious API Reference / adapters / adaptPortfolioWithoutOrder

Function: adaptPortfolioWithoutOrder()

adaptPortfolioWithoutOrder(sql): UserChallenge

Defined in: adapters/portfolioAdapter.ts:71

Adapt a portfolio_without_orders row to a FE UserChallenge.

Maps order_status to UserChallengeStatus and derives the source (gift vs. self) from the is_gifted flag.

Parameters

sql

SqlPortfolioWithoutOrder

Raw SQL portfolio_without_orders row

Returns

UserChallenge

FE UserChallenge entity

DoCurious Platform Documentation