@pocketprep/types 1.19.35 → 1.19.37

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
@@ -382,6 +382,7 @@ export type SubscriptionSource = {
382
382
  Stripe: 'Stripe'
383
383
  Support: 'Support'
384
384
  Teach: 'Teach'
385
+ Gift: 'Gift'
385
386
  }
386
387
 
387
388
  export type CustomerWithAttributes = {
@@ -969,6 +970,18 @@ export type ComputedStudyStats = {
969
970
  }
970
971
  }
971
972
 
973
+ export type MockExamStudyStats = {
974
+ totalAnswersCount: number
975
+ totalCorrectAnswersCount: number
976
+ averageScore: number
977
+ subjectStats: SubjectStudyStats[]
978
+ }
979
+
980
+ export type StudyStatsByBank = {
981
+ standard: ComputedStudyStats
982
+ mockExam: MockExamStudyStats
983
+ }
984
+
972
985
  /**
973
986
  * A user's study stats for one exam version, one document per user per version.
974
987
  */
@@ -976,10 +989,11 @@ export type StudyStats = Parse.Object<{
976
989
  user: User | Parse.Pointer
977
990
  examMetadata: ExamMetadata | Parse.Pointer
978
991
  latestAnswerBySerial: LatestAnswerBySerial
992
+ latestMockAnswerBySerial: LatestAnswerBySerial
979
993
  quizCount: number // Excludes QotD and Mock Exams
980
994
  studyDays: string[]
981
995
  durationSeconds: number // Excludes Mock Exams
982
- studyStats: ComputedStudyStats
996
+ studyStats: StudyStatsByBank
983
997
  }>
984
998
 
985
999
  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.37",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",