@pocketprep/types 1.14.18 → 1.14.20

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
@@ -11,6 +11,7 @@ export type OrderedQuestions = Parse.Object<{
11
11
  examGuid: string
12
12
  serials: string[]
13
13
  version: string
14
+ examMetadata?: ExamMetadata | Parse.Pointer
14
15
  }>
15
16
 
16
17
  export type OrderedQuestionsPayload = Payload<OrderedQuestions>
@@ -37,6 +38,7 @@ export type Quiz = Parse.Object<{
37
38
  readinessScore?: number
38
39
  levelUpProgress?: LevelUpProgress
39
40
  prebuiltQuiz?: PrebuiltQuiz | Parse.Pointer
41
+ examMetadata?: ExamMetadata | Parse.Pointer
40
42
  }>
41
43
 
42
44
  export type QuizJSON = ReturnType<Quiz['toJSON']>
@@ -108,6 +110,7 @@ export type UserExamMetadata = Parse.Object<{
108
110
  aggregateStats?: UEMAggregateStats
109
111
  messageConfig?: MessageConfig
110
112
  readinessScore?: number
113
+ examMetadata?: ExamMetadata | Parse.Pointer
111
114
  }>
112
115
 
113
116
  export type UserExamMetadataJSON = ReturnType<UserExamMetadata['toJSON']>
@@ -218,11 +221,13 @@ export type GlobalQuestionMetric = Parse.Object<{
218
221
  answeredCorrectlyCount?: number
219
222
  answeredIncorrectlyCount?: number
220
223
  questionSerial: string
221
- examType: string
224
+ examType?: string
222
225
  examGuid: string
223
226
  choiceStats: Partial<Record<TChoiceKey, number>>
227
+ examMetadata?: ExamMetadata | Parse.Pointer
224
228
  }>
225
229
 
230
+ export type GlobalQuestionMetricPayload = Payload<GlobalQuestionMetric>
226
231
  export type GlobalQuestionMetricJSON = ReturnType<GlobalQuestionMetric['toJSON']>
227
232
 
228
233
  export type License = Parse.Object<{
@@ -337,14 +342,15 @@ export type User = Parse.User<{
337
342
  studyRemindersFrequency?: string
338
343
  studyRemindersEmail?: string
339
344
  sendStudyReminders?: boolean
340
- currentExamGuid?: string
341
- currentApp?: string
342
345
  version?: string
343
346
  webConfig?: UserWebConfig
344
347
  currentOrganization?: Teach.Class.Organization
345
348
  lastActiveAt?: Date
346
349
  quizSettings?: UserQuizSettings
347
350
  deleteRequestedDate?: Date
351
+ currentUserExamMetadata?: UserExamMetadata | Parse.Pointer
352
+ currentExamGuid?: string // DEPRECATED
353
+ currentApp?: string // DEPRECATED
348
354
  }>
349
355
 
350
356
  export type UserJSON = ReturnType<User['toJSON']>
@@ -423,6 +429,7 @@ export type QuestionScenarioJSON = ReturnType<QuestionScenario['toJSON']>
423
429
  export type KeywordDefinition = Parse.Object<{
424
430
  examGuid: string
425
431
  serial: string
432
+ examMetadata?: ExamMetadata | Parse.Pointer
426
433
  keyword: string
427
434
  definition: string
428
435
  voteCountHelpful: number
@@ -617,6 +624,7 @@ export type SurveyExamResult = Parse.Object<{
617
624
  source: string
618
625
  user: User | Parse.Pointer
619
626
  readinessScore?: number
627
+ examMetadata?: ExamMetadata | Parse.Pointer
620
628
  }>
621
629
 
622
630
  export type ReadinessStats = {
@@ -717,9 +725,10 @@ export type RecentActivity = {
717
725
  durationSeconds: number
718
726
  }
719
727
  export type AggregateStats = Parse.Object<{
720
- user: User
728
+ user: User | Parse.Pointer
721
729
  examGuid: string
722
730
  majorVersion: number
731
+ examMetadata?: ExamMetadata | Parse.Pointer
723
732
  answerStats: AnswerStats
724
733
  quizStats: QuizStats
725
734
  counts: AggregateCounts
@@ -733,6 +742,8 @@ export type AggregateStats = Parse.Object<{
733
742
  }[]
734
743
  }>
735
744
 
745
+ export type AggregateStatsPayload = Payload<AggregateStats>
746
+
736
747
  export type PrebuiltQuiz = Parse.Object<{
737
748
  name: string
738
749
  key: string
package/Study/Cloud.d.ts CHANGED
@@ -95,6 +95,7 @@ export interface IRecordQuizPayload {
95
95
  levelSubjectId?: string
96
96
  appBundleId?: string
97
97
  prebuiltQuizId?: string
98
+ examMetadataId?: string
98
99
  }
99
100
 
100
101
  export type TLevelUpProgress = NonNullable<UserExamMetadataJSON['levelUpProgress']>
@@ -223,6 +224,7 @@ export type fetchQotDV4 = (params: {
223
224
  examGuid: string
224
225
  version: string
225
226
  includeMatrixQuestions?: boolean
227
+ examMetadataId?: string
226
228
  }) => Question[]
227
229
 
228
230
  export type fetchQotDV5 = (params: {
@@ -231,6 +233,7 @@ export type fetchQotDV5 = (params: {
231
233
  examGuid: string
232
234
  version: string
233
235
  includeMatrixQuestions?: boolean
236
+ examMetadataId?: string
234
237
  }) => QuestionJSON[]
235
238
 
236
239
  export type fetchSharedQotd = (params: {
@@ -259,6 +262,7 @@ export type fetchSharedQotdV3 = (params: {
259
262
  daysSinceEpoch: number
260
263
  examGuid: string
261
264
  version: string
265
+ examMetadataId?: string
262
266
  }) => {
263
267
  bundle?: Bundle
264
268
  examMetadata: ExamMetadata
@@ -269,6 +273,7 @@ export type fetchSharedQotdV3 = (params: {
269
273
  export type fetchGlobalQuestionMetrics = (params: {
270
274
  examGuid: string
271
275
  serials?: string[]
276
+ examMetadataId?: string
272
277
  }) => GlobalQuestionMetric[]
273
278
 
274
279
  export type fetchQuizQuestions = (params: {
@@ -316,6 +321,7 @@ export type fetchQuizQuestionsV4 = (params: {
316
321
  incorrect?: boolean
317
322
  }
318
323
  includeMatrixQuestions?: boolean
324
+ examMetadataId?: string
319
325
  }) => QuestionJSON[]
320
326
 
321
327
  export type fetchQuizQuestionsV5 = (params: {
@@ -331,6 +337,7 @@ export type fetchQuizQuestionsV5 = (params: {
331
337
  incorrect?: boolean
332
338
  }
333
339
  includeMatrixQuestions?: boolean
340
+ examMetadataId?: string
334
341
  }) => QuestionJSON[]
335
342
 
336
343
  export type fetchFlaggedQuestionKnowledgeAreas =
@@ -385,6 +392,7 @@ export type fetchUserData = (params: {
385
392
 
386
393
  export type fetchUserDataV2 = (params: {
387
394
  examGuid: string
395
+ examMetadataId?: string
388
396
  lastFetchedAt?: string // ISO8901 date string
389
397
  version?: string
390
398
  includeQuestionMetrics?: boolean
@@ -437,7 +445,10 @@ export type resetUserExamProgress = (params: { appId: string }) => (
437
445
  UserExamMetadata | TEUserAppMetadata | undefined
438
446
  )
439
447
 
440
- export type resetQuizProgress = (params: { examGuid: string }) => UserExamMetadata | undefined
448
+ export type resetQuizProgress = (params: {
449
+ examGuid: string
450
+ examMetadataId?: string
451
+ }) => UserExamMetadata | undefined
441
452
 
442
453
  export type buySubscription = (params: {
443
454
  stripeToken?: Stripe.Token
@@ -621,6 +632,7 @@ export type fetchLevelUpQuizQuestionsV2 = (params: {
621
632
  subjectId?: string
622
633
  lastResetDateISO?: string
623
634
  includeMatrixQuestions?: boolean
635
+ examMetadataId?: string
624
636
  }) => QuestionJSON[]
625
637
 
626
638
  export type fetchLevelUpQuizQuestionsV3 = (params: {
@@ -632,6 +644,7 @@ export type fetchLevelUpQuizQuestionsV3 = (params: {
632
644
  subjectName?: string
633
645
  lastResetDateISO?: string
634
646
  includeMatrixQuestions?: boolean
647
+ examMetadataId?: string
635
648
  }) => QuestionJSON[]
636
649
 
637
650
  export type fetchSubjectsWithLevels = (params: {
@@ -656,6 +669,7 @@ export type resetLevelUpProgress = (params: {
656
669
  majorVersion: string
657
670
  subjectNames?: string[]
658
671
  subjectIds?: string[]
672
+ examMetadataId?: string
659
673
  }) => TLevelUpProgress
660
674
 
661
675
  export type fetchReferralInfo = (params: { bundleId: string }) => {
@@ -671,13 +685,50 @@ export type fetchPrebuiltQuizQuestions = (params: { prebuiltQuizId: string }) =>
671
685
  export type fetchQuestionsByExamV2 = (params: {
672
686
  compositeKey: string
673
687
  includeMatrixQuestions?: boolean
688
+ examMetadataId?: string
674
689
  }) => Question[]
675
690
 
676
691
  export type fetchQuestionsByExamV3 = (params: {
677
692
  compositeKey: string
678
693
  includeMatrixQuestions?: boolean
694
+ examMetadataId?: string
679
695
  }) => QuestionJSON[]
680
696
 
681
697
  export type fetchExamNamesByQuestionSerials = (params: { serials: string[] }) => {
682
698
  [serial: string]: string[]
683
- }
699
+ }
700
+
701
+ export type updateCurrentExam = (params: { examMetadataId: string }) => UserExamMetadataJSON
702
+
703
+ export type CustomerIOCustomer = {
704
+ id: string
705
+ identifiers: {
706
+ cio_id: string
707
+ email: string
708
+ id: string
709
+ }
710
+ topics: {
711
+ id: number
712
+ subscribed: boolean
713
+ name: string
714
+ description: string
715
+ }[]
716
+ unsubscribed: boolean // can be true even with topics listed
717
+ }
718
+
719
+ export type fetchUserSubscriptionSettingsV2 = (params: {
720
+ userId: string
721
+ secret: string
722
+ }) => Promise<undefined |{
723
+ email: string
724
+ studyReminders?: string
725
+ customerioSubscriptions: CustomerIOCustomer['topics']
726
+ }>
727
+
728
+ export type updateSubscriptionSettingsV2 = (params: {
729
+ userId: string
730
+ secret: string
731
+ subscribedTopicIds: string[]
732
+ studyReminders: 'weekly' | 'daily' | false
733
+ messageId?: string
734
+ }) => Promise<void>
package/Teach/Cloud.d.ts CHANGED
@@ -64,11 +64,13 @@ export type createAssignment = (params: {
64
64
  questionCount?: number
65
65
  subjectIds?: string[]
66
66
  }
67
+ examMetadataId?: string
67
68
  }) => Study.Class.PrebuiltQuiz
68
69
 
69
70
  export type fetchQuestionDifficultyCounts = (params: {
70
71
  examGuid: string
71
72
  majorVersion: string
73
+ examMetadataId?: string
72
74
  }) => {
73
75
  [subjectId: string]: {
74
76
  easy: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.14.18",
3
+ "version": "1.14.20",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",