@pocketprep/types 1.8.0 → 1.8.2

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
@@ -1,4 +1,4 @@
1
- import { IQuizAnswer, TChoiceKey } from './Cloud'
1
+ import { IQuizAnswer, IStreakInfo, TChoiceKey } from './Cloud'
2
2
  import { Payload, Study, Teach } from '../index'
3
3
 
4
4
  export type MagicToken = Parse.Object<{
@@ -40,6 +40,7 @@ export type UserExamMetadata = Parse.Object<{
40
40
  scheduledExamDate?: Date
41
41
  upgradesSeen?: string[]
42
42
  disabledSubjects?: string[]
43
+ streakInfo?: IStreakInfo
43
44
  }>
44
45
 
45
46
  export type UserExamMetadataJSON = ReturnType<UserExamMetadata['toJSON']>
package/Study/Cloud.d.ts CHANGED
@@ -54,6 +54,23 @@ export interface IExam {
54
54
  export type TChoiceKey = 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6' | 'a7' | 'a8' | 'a9' |
55
55
  'd1' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'd9'
56
56
 
57
+ export interface IStreakDay {
58
+ day: string
59
+ numCorrect: number
60
+ }
61
+
62
+ export interface IStreakSummary {
63
+ longest: number
64
+ current: IStreakDay[]
65
+ completed: IStreakDay[][]
66
+ }
67
+
68
+ export interface IStreakInfo {
69
+ updatedAt: Date
70
+ all: IStreakSummary
71
+ qotd: IStreakSummary
72
+ }
73
+
57
74
  export interface IQuizAnswer {
58
75
  isCorrect: boolean
59
76
  selectedChoices: TChoiceKey[]
@@ -424,7 +441,7 @@ export type fetchLicenseOrgName = () => Promise<string | undefined>
424
441
  export type fetchOrgNameFromLicenseCode = (params: { licenseCode: string }) => Promise<string | undefined>
425
442
 
426
443
  export type updateStudentInviteEmailStatus = (
427
- params: {
444
+ params: {
428
445
  status: {
429
446
  message: string
430
447
  description: string
@@ -434,7 +451,7 @@ export type updateStudentInviteEmailStatus = (
434
451
  }
435
452
  email: string
436
453
  event: string
437
- secret: string
454
+ secret: string
438
455
  }
439
456
  ) => Promise<License>
440
457
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "main": "",
6
6
  "repository": {