66} from '@db/core/types/user' ;
77import { CourseElo , Status } from '@vue-skuilder/common' ;
88import { Moment } from 'moment' ;
9- import { CardHistory , CardRecord } from '../types/types-legacy' ;
9+ import { CardHistory , CardRecord , QualifiedCardID } from '../types/types-legacy' ;
1010import { UserConfig } from '../types/user' ;
1111import { DocumentUpdater } from '@db/study' ;
1212
@@ -17,55 +17,55 @@ export interface UserDBReader {
1717 get < T > ( id : string ) : Promise < T & PouchDB . Core . RevisionIdMeta > ;
1818 getUsername ( ) : string ;
1919 isLoggedIn ( ) : boolean ;
20-
20+
2121 /**
2222 * Get user configuration
2323 */
2424 getConfig ( ) : Promise < UserConfig > ;
25-
25+
2626 /**
2727 * Get cards that the user has seen
2828 */
2929 getSeenCards ( courseId ?: string ) : Promise < string [ ] > ;
30-
30+
3131 /**
3232 * Get cards that are actively scheduled for review
3333 */
34- getActiveCards ( ) : Promise < string [ ] > ;
35-
34+ getActiveCards ( ) : Promise < QualifiedCardID [ ] > ;
35+
3636 /**
3737 * Get user's course registrations
3838 */
3939 getCourseRegistrationsDoc ( ) : Promise < CourseRegistrationDoc > ;
40-
40+
4141 /**
4242 * Get the registration doc for a specific course.
4343 * @param courseId
4444 */
4545 getCourseRegDoc ( courseId : string ) : Promise < CourseRegistration > ;
46-
46+
4747 /**
4848 * Get user's active courses
4949 */
5050 getActiveCourses ( ) : Promise < CourseRegistration [ ] > ;
51-
51+
5252 /**
5353 * Get user's pending reviews
5454 */
5555 getPendingReviews ( courseId ?: string ) : Promise < ScheduledCard [ ] > ;
56-
56+
5757 getActivityRecords ( ) : Promise < ActivityRecord [ ] > ;
58-
58+
5959 /**
6060 * Get user's classroom registrations
6161 */
6262 getUserClassrooms ( ) : Promise < ClassroomRegistrationDoc > ;
63-
63+
6464 /**
6565 * Get user's active classes
6666 */
6767 getActiveClasses ( ) : Promise < string [ ] > ;
68-
68+
6969 getCourseInterface ( courseId : string ) : Promise < UsrCrsDataInterface > ;
7070}
7171
@@ -77,22 +77,22 @@ export interface UserDBWriter extends DocumentUpdater {
7777 * Update user configuration
7878 */
7979 setConfig ( config : Partial < UserConfig > ) : Promise < void > ;
80-
80+
8181 /**
8282 * Record a user's interaction with a card
8383 */
8484 putCardRecord < T extends CardRecord > ( record : T ) : Promise < CardHistory < CardRecord > > ;
85-
85+
8686 /**
8787 * Register user for a course
8888 */
8989 registerForCourse ( courseId : string , previewMode ?: boolean ) : Promise < PouchDB . Core . Response > ;
90-
90+
9191 /**
9292 * Drop a course registration
9393 */
9494 dropCourse ( courseId : string , dropStatus ?: string ) : Promise < PouchDB . Core . Response > ;
95-
95+
9696 /**
9797 * Schedule a card for review
9898 */
@@ -104,30 +104,30 @@ export interface UserDBWriter extends DocumentUpdater {
104104 scheduledFor : 'course' | 'classroom' ;
105105 schedulingAgentId : string ;
106106 } ) : Promise < void > ;
107-
107+
108108 /**
109109 * Remove a scheduled card review
110110 */
111111 removeScheduledCardReview ( reviewId : string ) : Promise < void > ;
112-
112+
113113 /**
114114 * Register user for a classroom
115115 */
116116 registerForClassroom (
117117 classId : string ,
118118 registerAs : 'student' | 'teacher' | 'aide' | 'admin'
119119 ) : Promise < PouchDB . Core . Response > ;
120-
120+
121121 /**
122122 * Drop user from classroom
123123 */
124124 dropFromClassroom ( classId : string ) : Promise < PouchDB . Core . Response > ;
125-
125+
126126 /**
127127 * Update user's ELO rating for a course
128128 */
129129 updateUserElo ( courseId : string , elo : CourseElo ) : Promise < PouchDB . Core . Response > ;
130-
130+
131131 /**
132132 * Reset all user data (progress, registrations, etc.) while preserving authentication
133133 */
@@ -173,8 +173,7 @@ export interface UserDBAuthenticator {
173173 * Complete user database interface - combines all user operations
174174 * This maintains backward compatibility with existing code
175175 */
176- export interface UserDBInterface extends UserDBReader , UserDBWriter , UserDBAuthenticator {
177- }
176+ export interface UserDBInterface extends UserDBReader , UserDBWriter , UserDBAuthenticator { }
178177
179178export interface UserCourseSettings {
180179 [ setting : string ] : string | number | boolean ;
0 commit comments