@pocketprep/types 1.10.3 → 1.11.0

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
@@ -76,6 +76,7 @@ export type UserExamMetadata = Parse.Object<{
76
76
  score: number
77
77
  goal: number
78
78
  }[]
79
+ levelUpResetDates?: Date[]
79
80
  }>
80
81
 
81
82
  export type UserExamMetadataJSON = ReturnType<UserExamMetadata['toJSON']>
@@ -280,6 +281,7 @@ export type UserWebConfig = {
280
281
  lastActiveApp?: 'study' | 'teach'
281
282
  hasSeenLevelUpFalseDoor?: boolean
282
283
  hasViewedCompareTable?: boolean
284
+ levelUpOpenedCount?: number
283
285
  }
284
286
 
285
287
  export type UserQuizSettings = {
package/Study/Cloud.d.ts CHANGED
@@ -25,6 +25,7 @@ import {
25
25
  Question,
26
26
  Platform,
27
27
  OnboardingResult,
28
+ UserExamMetadataJSON,
28
29
  } from './Class'
29
30
 
30
31
  // DEPRECATED - previously used answer package for a quiz or qotd
@@ -89,8 +90,12 @@ export interface IRecordQuizPayload {
89
90
  platform: string
90
91
  startedAt: string
91
92
  mockExamId?: string
93
+ examVersion?: string
94
+ levelSubjectName?: string
92
95
  }
93
96
 
97
+ export type TLevelUpProgress = NonNullable<UserExamMetadataJSON['levelUpProgress']>
98
+
94
99
  export type subscribeWithAppleReceipt = (params: { receiptData: string; bundleId: string })
95
100
  => Promise<Subscription>
96
101
 
@@ -482,7 +487,7 @@ export type fetchMockExams = () => MockExam[]
482
487
 
483
488
  export type fetchMockExamQuestions = (params: { mockExamId: string }) => ExamData[]
484
489
 
485
- export type validateReferral = (params: { referralId: string }) => Referral
490
+ export type validateReferral = (params: { referralId: string }) => Referral | Stripe.Coupon
486
491
 
487
492
  export type createSetupIntent = () => Promise<string | null>
488
493
 
@@ -495,4 +500,34 @@ export type createIncompleteSubscription = (params: {
495
500
  subscriptionId: string
496
501
  }>
497
502
 
498
- export type activateSubscription = (params: { subscriptionId: string }) => Promise<SubscriptionBundle>
503
+ export type activateSubscription = (params: { subscriptionId: string }) => Promise<SubscriptionBundle>
504
+
505
+ export type fetchLevelUpQuizQuestions = (params: {
506
+ level: number
507
+ examGuid: string
508
+ majorVersion: string
509
+ questionCount: number
510
+ subjectName: string
511
+ lastResetDateISO?: string
512
+ }) => ExamDataJSON[]
513
+
514
+ export type fetchSubjectsWithLevels = (params: {
515
+ examGuid: string
516
+ majorVersion: string
517
+ }) => {
518
+ subjectName: string
519
+ levels: number[]
520
+ }[]
521
+
522
+ export type startNewLevels = (params: {
523
+ examGuid: string
524
+ majorVersion: string
525
+ subjectNames: string[]
526
+ }) => TLevelUpProgress
527
+
528
+
529
+ export type resetLevelUpProgress = (params: {
530
+ examGuid: string
531
+ majorVersion: string
532
+ subjectNames?: string[]
533
+ }) => TLevelUpProgress
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",