Skip to content

DoCurious API Reference / types / UserProfileWithStats

Interface: UserProfileWithStats ​

Defined in: types/user.types.ts:384

User profile augmented with gamification stats, used by the dashboard header and profile cards.

Remarks ​

Extends the base User with computed/aggregated fields from the gamification system. See import('./gamification.types').UserGamificationStats for the full stat breakdown.

Extends ​

Properties ​

accountStatus ​

accountStatus: AccountStatus

Defined in: types/user.types.ts:142

Inherited from ​

User.accountStatus


accountTier ​

accountTier: AccountTier

Defined in: types/user.types.ts:141

COPPA-driven tier -- Tier 1 students have limited features (no gifts, no saved list)

Inherited from ​

User.accountTier


activeContext? ​

optional activeContext: ContextType

Defined in: types/user.types.ts:162

The context currently active in the UI -- drives which dashboard and nav items appear

Inherited from ​

User.activeContext


avatarUrl? ​

optional avatarUrl: string

Defined in: types/user.types.ts:153

Inherited from ​

User.avatarUrl


balance? ​

optional balance: number

Defined in: types/user.types.ts:175

Wallet balance in USD cents (sourced from SQL users.balance)

Inherited from ​

User.balance


contexts? ​

optional contexts: UserContexts

Defined in: types/user.types.ts:160

All contexts this user participates in (personal, school, business, platform)

Inherited from ​

User.contexts


createdAt ​

createdAt: string

Defined in: types/common.types.ts:154

ISO 8601 datetime when the entity was created

Inherited from ​

User.createdAt


dateOfBirth ​

dateOfBirth: string

Defined in: types/user.types.ts:135

ISO 8601 date string -- used for COPPA age gating at login

Inherited from ​

User.dateOfBirth


displayName ​

displayName: string

Defined in: types/user.types.ts:133

Inherited from ​

User.displayName


email ​

email: string

Defined in: types/user.types.ts:132

Inherited from ​

User.email


id ​

id: string

Defined in: types/common.types.ts:167

Inherited from ​

User.id


interests ​

interests: string[]

Defined in: types/user.types.ts:156

Category slugs used by the recommendation engine to personalize Explore views

Inherited from ​

User.interests


isUnder13 ​

isUnder13: boolean

Defined in: types/user.types.ts:146

COPPA flag -- under-13 users require parental consent and have content restrictions

Inherited from ​

User.isUnder13


joinedAt ​

joinedAt: string

Defined in: types/user.types.ts:395

ISO datetime when the user account was created


level ​

level: number

Defined in: types/user.types.ts:386

Current gamification level (1-15, see LEVEL_DEFINITIONS)


linkedChildIds? ​

optional linkedChildIds: string[]

Defined in: types/user.types.ts:172

UUIDs of linked child accounts; populated only for the parent role

Inherited from ​

User.linkedChildIds


parentalConsentStatus ​

parentalConsentStatus: ConsentStatus

Defined in: types/user.types.ts:148

Tracks whether a parent/guardian has granted consent for this under-13 user

Inherited from ​

User.parentalConsentStatus


profile? ​

optional profile: UserProfile

Defined in: types/user.types.ts:151

Inherited from ​

User.profile


profileFieldVisibility? ​

optional profileFieldVisibility: ProfileFieldVisibility

Defined in: types/user.types.ts:178

Per-field privacy settings controlling who can see each profile field

Inherited from ​

User.profileFieldVisibility


role ​

role: UserRole

Defined in: types/user.types.ts:139

Primary role determining platform capabilities and route access

Inherited from ​

User.role


schoolId? ​

optional schoolId: string

Defined in: types/user.types.ts:166

School UUID for school-affiliated roles; required for student/teacher/school_admin

Inherited from ​

User.schoolId


streakDays ​

streakDays: number

Defined in: types/user.types.ts:393

Current weekly activity streak length in days


totalChallengesCompleted ​

totalChallengesCompleted: number

Defined in: types/user.types.ts:391


updatedAt ​

updatedAt: string

Defined in: types/common.types.ts:156

ISO 8601 datetime when the entity was last modified

Inherited from ​

User.updatedAt


vendorProfileId? ​

optional vendorProfileId: string

Defined in: types/user.types.ts:168

Vendor profile UUID; present only for users with the vendor role

Inherited from ​

User.vendorProfileId


xp ​

xp: number

Defined in: types/user.types.ts:388

Cumulative experience points earned


xpToNextLevel ​

xpToNextLevel: number

Defined in: types/user.types.ts:390

XP remaining to reach the next level

DoCurious Platform Documentation