Skip to content

Commit 8160a5a

Browse files
committed
add sessionTracking to userConfig
1 parent 638632d commit 8160a5a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/db/src/core/types/user.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
import { CourseElo } from '@vue-skuilder/common';
22
import { Moment } from 'moment';
33

4+
export interface SessionTrackingData {
5+
peekSessionCount: number;
6+
studySessionCount: number;
7+
sessionCount: number; // total
8+
firstSessionDate: string;
9+
lastSessionDate: string;
10+
signupPrompted: boolean;
11+
promptDismissalCount: number;
12+
studyModeAcknowledged: boolean;
13+
}
14+
415
export interface UserConfig {
516
darkMode: boolean;
617
likesConfetti: boolean;
718
sessionTimeLimit: number; // Session time limit in minutes
819
email?: string; // Optional email for verification flows (added for enhanced auth)
20+
21+
// Session tracking for trial enforcement (per-course)
22+
// Key is courseId (e.g., 'letterspractice-basic')
23+
sessionTracking?: Record<string, SessionTrackingData>;
924
}
1025

1126
export interface ActivityRecord {

0 commit comments

Comments
 (0)