Appearance
DoCurious API Reference / types / User
Interface: User
Defined in: types/user.types.ts:131
Core user profile entity -- intentionally minimal by design.
Remarks
"The platform is about doing, not self-presentation." Profiles carry only what is needed for COPPA compliance, role-based access, and challenge recommendations. Extended personal data lives in the optional UserProfile.
Users with school-related roles must have a schoolId. Students may be Tier 1 (school-only, limited features) or Tier 2 (parent-linked, full access).
Example
ts
const student: User = {
id: 'usr-042',
createdAt: '2025-09-01T08:00:00Z',
updatedAt: '2025-09-15T12:30:00Z',
email: 'alex@school.edu',
displayName: 'Alex T.',
dateOfBirth: '2014-03-22',
role: 'student',
accountTier: 'tier_2_full',
accountStatus: 'active',
isUnder13: true,
parentalConsentStatus: 'granted',
interests: ['outdoor-adventure', 'science'],
schoolId: 'sch-001',
}Extends
Extended by
Properties
accountStatus
accountStatus:
AccountStatus
Defined in: types/user.types.ts:142
accountTier
accountTier:
AccountTier
Defined in: types/user.types.ts:141
COPPA-driven tier -- Tier 1 students have limited features (no gifts, no saved list)
activeContext?
optionalactiveContext:ContextType
Defined in: types/user.types.ts:162
The context currently active in the UI -- drives which dashboard and nav items appear
avatarUrl?
optionalavatarUrl:string
Defined in: types/user.types.ts:153
balance?
optionalbalance:number
Defined in: types/user.types.ts:175
Wallet balance in USD cents (sourced from SQL users.balance)
contexts?
optionalcontexts:UserContexts
Defined in: types/user.types.ts:160
All contexts this user participates in (personal, school, business, platform)
createdAt
createdAt:
string
Defined in: types/common.types.ts:154
ISO 8601 datetime when the entity was created
Inherited from
dateOfBirth
dateOfBirth:
string
Defined in: types/user.types.ts:135
ISO 8601 date string -- used for COPPA age gating at login
displayName
displayName:
string
Defined in: types/user.types.ts:133
email
email:
string
Defined in: types/user.types.ts:132
id
id:
string
Defined in: types/common.types.ts:167
Inherited from
interests
interests:
string[]
Defined in: types/user.types.ts:156
Category slugs used by the recommendation engine to personalize Explore views
isUnder13
isUnder13:
boolean
Defined in: types/user.types.ts:146
COPPA flag -- under-13 users require parental consent and have content restrictions
linkedChildIds?
optionallinkedChildIds:string[]
Defined in: types/user.types.ts:172
UUIDs of linked child accounts; populated only for the parent role
parentalConsentStatus
parentalConsentStatus:
ConsentStatus
Defined in: types/user.types.ts:148
Tracks whether a parent/guardian has granted consent for this under-13 user
profile?
optionalprofile:UserProfile
Defined in: types/user.types.ts:151
profileFieldVisibility?
optionalprofileFieldVisibility:ProfileFieldVisibility
Defined in: types/user.types.ts:178
Per-field privacy settings controlling who can see each profile field
role
role:
UserRole
Defined in: types/user.types.ts:139
Primary role determining platform capabilities and route access
schoolId?
optionalschoolId:string
Defined in: types/user.types.ts:166
School UUID for school-affiliated roles; required for student/teacher/school_admin
updatedAt
updatedAt:
string
Defined in: types/common.types.ts:156
ISO 8601 datetime when the entity was last modified
Inherited from
vendorProfileId?
optionalvendorProfileId:string
Defined in: types/user.types.ts:168
Vendor profile UUID; present only for users with the vendor role