@pocketprep/types 1.16.6 → 1.16.8
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 +39 -0
- package/Study/Cloud.d.ts +2 -7
- package/package.json +1 -1
package/Study/Class.d.ts
CHANGED
|
@@ -35,6 +35,44 @@ export type LevelUpProgress = {
|
|
|
35
35
|
goal: number
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export type RecommendationStyle = 'concept-quiz' | 'next-up' | 'info'
|
|
39
|
+
|
|
40
|
+
export type RecommendationCTA = {
|
|
41
|
+
style: RecommendationStyle
|
|
42
|
+
label: string
|
|
43
|
+
message: string
|
|
44
|
+
buttonLabel: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type PremiumRequirement = 'free' | 'premium' | false
|
|
48
|
+
|
|
49
|
+
export type RecommendationConfig = Parse.Object<Partial<RecommendationCTA> & {
|
|
50
|
+
recommenderClass: string
|
|
51
|
+
weight: number
|
|
52
|
+
cadence: number
|
|
53
|
+
premiumRequirement: PremiumRequirement
|
|
54
|
+
ineligibleAfterQuizModes?: number[]
|
|
55
|
+
}>
|
|
56
|
+
|
|
57
|
+
export type Recommendation = RecommendationCTA & {
|
|
58
|
+
recommenderClass: string
|
|
59
|
+
config: {
|
|
60
|
+
quizMode?: number // Numeric representation of the quiz mode that this recommendation CTA will trigger
|
|
61
|
+
conceptQuizId?: string // The ID of the ConceptQuiz if a concept quiz is being recommended
|
|
62
|
+
questionCount?: number // The number of questions to be taken with the recommended quiz
|
|
63
|
+
retakeQuizId?: string // The ID of the quiz for the user to retake
|
|
64
|
+
byoConfig?: { // Config to be passed directly thru client to fetchQuizQuestions call
|
|
65
|
+
subjectIds?: string[]
|
|
66
|
+
include?: {
|
|
67
|
+
new?: boolean
|
|
68
|
+
answered?: boolean
|
|
69
|
+
flagged?: boolean
|
|
70
|
+
incorrect?: boolean
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
38
76
|
export type Quiz = Parse.Object<{
|
|
39
77
|
answers: IQuizAnswer[]
|
|
40
78
|
correctCount: number
|
|
@@ -52,6 +90,7 @@ export type Quiz = Parse.Object<{
|
|
|
52
90
|
conceptQuiz?: ConceptQuiz | Parse.Pointer
|
|
53
91
|
examMetadata?: ExamMetadata | Parse.Pointer
|
|
54
92
|
readiness?: ReadinessModelData[]
|
|
93
|
+
recommendationConfig?: RecommendationConfig
|
|
55
94
|
}>
|
|
56
95
|
|
|
57
96
|
export type QuizJSON = ReturnType<Quiz['toJSON']>
|
package/Study/Cloud.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
PrebuiltQuiz,
|
|
30
30
|
UserExamBackgroundJSON,
|
|
31
31
|
ConceptQuiz,
|
|
32
|
+
Recommendation,
|
|
32
33
|
} from './Class'
|
|
33
34
|
|
|
34
35
|
// DEPRECATED - previously used answer package for a quiz or qotd
|
|
@@ -174,13 +175,7 @@ export type recordQuiz = (
|
|
|
174
175
|
feedback?: {
|
|
175
176
|
progressDescription?: string
|
|
176
177
|
}
|
|
177
|
-
recommendedNext?:
|
|
178
|
-
type: 'quiz' // eventually this might include other types of recommendations like a blog link
|
|
179
|
-
quizMode: number
|
|
180
|
-
message: string
|
|
181
|
-
conceptQuizId?: string
|
|
182
|
-
questionCount?: number
|
|
183
|
-
}
|
|
178
|
+
recommendedNext?: Recommendation
|
|
184
179
|
}
|
|
185
180
|
|
|
186
181
|
export type recordQuizAnswers = (params: {
|