@pocketprep/types 1.19.35 → 1.19.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Study/Class.d.ts CHANGED
@@ -969,6 +969,18 @@ export type ComputedStudyStats = {
969
969
  }
970
970
  }
971
971
 
972
+ export type MockExamStudyStats = {
973
+ totalAnswersCount: number
974
+ totalCorrectAnswersCount: number
975
+ averageScore: number
976
+ subjectStats: SubjectStudyStats[]
977
+ }
978
+
979
+ export type StudyStatsByBank = {
980
+ standard: ComputedStudyStats
981
+ mockExam: MockExamStudyStats
982
+ }
983
+
972
984
  /**
973
985
  * A user's study stats for one exam version, one document per user per version.
974
986
  */
@@ -976,10 +988,11 @@ export type StudyStats = Parse.Object<{
976
988
  user: User | Parse.Pointer
977
989
  examMetadata: ExamMetadata | Parse.Pointer
978
990
  latestAnswerBySerial: LatestAnswerBySerial
991
+ latestMockAnswerBySerial: LatestAnswerBySerial
979
992
  quizCount: number // Excludes QotD and Mock Exams
980
993
  studyDays: string[]
981
994
  durationSeconds: number // Excludes Mock Exams
982
- studyStats: ComputedStudyStats
995
+ studyStats: StudyStatsByBank
983
996
  }>
984
997
 
985
998
  export type StudyStatsPayload = Payload<StudyStats>
package/Study/Cloud.d.ts CHANGED
@@ -113,11 +113,25 @@ export interface IRecordQuizPayload {
113
113
  /**
114
114
  * The study stats a client renders on its stats page.
115
115
  * Calculated on the server so that all clients show the same values.
116
+ *
117
+ * totalQuizzesCount/daysStudyingCount/studyingDurationSeconds are omitted on the Mock Exam bank
116
118
  */
117
- export type TStudyStats = Omit<ComputedStudyStats, 'unansweredCount'> & {
119
+ export type TStudyStats = Omit<
120
+ ComputedStudyStats,
121
+ 'unansweredCount' | 'totalQuizzesCount' | 'daysStudyingCount' | 'studyingDurationSeconds'
122
+ > & {
118
123
  totalUnansweredCount: number
119
124
  examCommunityAverage: number
120
125
  weakestSubjectId?: string
126
+ totalQuizzesCount?: number
127
+ daysStudyingCount?: number
128
+ studyingDurationSeconds?: number
129
+ }
130
+
131
+ export type TStudyStatsByBank = {
132
+ standard: TStudyStats
133
+ mockExam: TStudyStats
134
+ combined: TStudyStats
121
135
  }
122
136
 
123
137
  export type TLevelUpProgress = NonNullable<UserExamMetadataJSON['levelUpProgress']>
@@ -205,7 +219,7 @@ export type recordQuizV2 = (
205
219
  }
206
220
  tip: RecommendationTip | null
207
221
  recommendedNext: Recommendation | null
208
- studyStats?: TStudyStats
222
+ studyStats?: TStudyStatsByBank
209
223
  }
210
224
 
211
225
  export type recordQuizAnswers = (params: {
@@ -459,7 +473,7 @@ export type fetchUserDataV2 = (params: {
459
473
  }) => {
460
474
  quizzes: QuizJSON[]
461
475
  subscriptions: Subscription[]
462
- studyStats?: TStudyStats
476
+ studyStats?: TStudyStatsByBank
463
477
  user: User
464
478
  userExamMetadata: UserExamMetadata | undefined
465
479
  referralInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.19.35",
3
+ "version": "1.19.36",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",