@pocketprep/types 1.15.8 → 1.15.10
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/AI/index.d.ts +25 -0
- package/Study/Class.d.ts +21 -14
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/AI/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReadinessStats } from '../Study/Class'
|
|
2
|
+
|
|
3
|
+
export type Model = 'xgb_model' | 'rf_model'
|
|
4
|
+
|
|
5
|
+
export type calculateReadinessRequest = ReadinessStats & {
|
|
6
|
+
models: Model[],
|
|
7
|
+
explain?: boolean
|
|
8
|
+
examGuid: string
|
|
9
|
+
bundleId?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ReadinessModelResponse = {
|
|
13
|
+
confidence: number
|
|
14
|
+
missingKeys: string[]
|
|
15
|
+
explanation?: {
|
|
16
|
+
feature: string
|
|
17
|
+
importance: number
|
|
18
|
+
}[]
|
|
19
|
+
model: Model
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type calculateReadinessResponse = {
|
|
23
|
+
models: ReadinessModelResponse[]
|
|
24
|
+
}
|
|
25
|
+
|
package/Study/Class.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IQuizAnswer, IStreakInfo, TChoiceKey } from './Cloud'
|
|
2
2
|
import { Payload, Teach, CMS } from '../index'
|
|
3
3
|
import { OrgStudent } from '../Teach/Class'
|
|
4
|
+
import { Model } from '../AI/Class'
|
|
4
5
|
|
|
5
6
|
export type MagicToken = Parse.Object<{
|
|
6
7
|
code: string
|
|
@@ -25,18 +26,6 @@ export type LevelUpProgress = {
|
|
|
25
26
|
goal: number
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export type Models = 'xgb_model' | 'rf_model'
|
|
29
|
-
|
|
30
|
-
export type Readiness = {
|
|
31
|
-
failProbability: number
|
|
32
|
-
passProbability: number
|
|
33
|
-
explanation: {
|
|
34
|
-
feature: string
|
|
35
|
-
importance: number
|
|
36
|
-
}[]
|
|
37
|
-
model: Models
|
|
38
|
-
}
|
|
39
|
-
|
|
40
29
|
export type Quiz = Parse.Object<{
|
|
41
30
|
answers: IQuizAnswer[]
|
|
42
31
|
correctCount: number
|
|
@@ -52,7 +41,14 @@ export type Quiz = Parse.Object<{
|
|
|
52
41
|
levelUpProgress?: LevelUpProgress
|
|
53
42
|
prebuiltQuiz?: PrebuiltQuiz | Parse.Pointer
|
|
54
43
|
examMetadata?: ExamMetadata | Parse.Pointer
|
|
55
|
-
readiness?:
|
|
44
|
+
readiness?: {
|
|
45
|
+
confidence: number
|
|
46
|
+
explanation: {
|
|
47
|
+
feature: string
|
|
48
|
+
importance: number
|
|
49
|
+
}[]
|
|
50
|
+
model: Model
|
|
51
|
+
}[]
|
|
56
52
|
}>
|
|
57
53
|
|
|
58
54
|
export type QuizJSON = ReturnType<Quiz['toJSON']>
|
|
@@ -123,9 +119,17 @@ export type UserExamMetadata = Parse.Object<{
|
|
|
123
119
|
levelUpResetDates?: Date[]
|
|
124
120
|
aggregateStats?: UEMAggregateStats
|
|
125
121
|
messageConfig?: MessageConfig
|
|
126
|
-
readinessScore?: number
|
|
122
|
+
readinessScore?: number // DEPRECATED
|
|
127
123
|
examMetadata?: ExamMetadata | Parse.Pointer
|
|
128
124
|
hasCompletedFreeQuestionBank?: boolean
|
|
125
|
+
readiness?: {
|
|
126
|
+
confidence: number
|
|
127
|
+
explanation: {
|
|
128
|
+
feature: string
|
|
129
|
+
importance: number
|
|
130
|
+
}[]
|
|
131
|
+
model: Model
|
|
132
|
+
}[]
|
|
129
133
|
}>
|
|
130
134
|
|
|
131
135
|
export type UserExamMetadataJSON = ReturnType<UserExamMetadata['toJSON']>
|
|
@@ -754,6 +758,9 @@ export type ReadinessStats = {
|
|
|
754
758
|
attemptsPerQuestion: number
|
|
755
759
|
uniqueQuizzesRetaken: number
|
|
756
760
|
totalRetakes: number
|
|
761
|
+
recentWeightedScoreMean: number
|
|
762
|
+
recentOverallAvgScore: number
|
|
763
|
+
recentAvgSecondsPerQuestion: number
|
|
757
764
|
}
|
|
758
765
|
type AnswerStats = {
|
|
759
766
|
[serial: string]: {
|
package/index.d.ts
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import * as Study from './Study'
|
|
3
3
|
import * as CMS from './CMS'
|
|
4
4
|
import * as Teach from './Teach'
|
|
5
|
+
import * as AI from './AI'
|
|
5
6
|
|
|
6
7
|
export {
|
|
7
8
|
Study,
|
|
8
9
|
CMS,
|
|
9
10
|
Teach,
|
|
11
|
+
AI,
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export type Payload<T extends Parse.Object> = T extends Parse.Object<infer R>
|