@pocketprep/types 1.8.8 → 1.8.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/CMS/Class.d.ts +5 -2
- package/CMS/Cloud.d.ts +26 -1
- package/package.json +1 -1
package/CMS/Class.d.ts
CHANGED
|
@@ -181,6 +181,7 @@ export type KnowledgeAreaDraft = Parse.Object<{
|
|
|
181
181
|
examDraft: ExamDraft | Parse.Pointer
|
|
182
182
|
name: string
|
|
183
183
|
isArchived: boolean
|
|
184
|
+
subjectId?: string
|
|
184
185
|
}>
|
|
185
186
|
|
|
186
187
|
export type KnowledgeAreaDraftJSON = ReturnType<KnowledgeAreaDraft['toJSON']>
|
|
@@ -207,12 +208,14 @@ export interface S3Manifest {
|
|
|
207
208
|
}[]
|
|
208
209
|
}
|
|
209
210
|
|
|
210
|
-
export type
|
|
211
|
+
export type QuestionStats = {
|
|
211
212
|
answeredCorrectlyCount: number
|
|
212
213
|
answeredIncorrectlyCount: number
|
|
213
214
|
percentCorrect: number
|
|
214
215
|
choiceStats: Partial<Record<Study.Cloud.TChoiceKey, number>>
|
|
215
|
-
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type QuestionHistory = Parse.Object<Study.Class.ExamData['attributes'] & QuestionStats>
|
|
216
219
|
|
|
217
220
|
export type QuestionHistoryJSON = ReturnType<QuestionHistory['toJSON']>
|
|
218
221
|
|
package/CMS/Cloud.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionDraftJSON, IAllowedQuestionTypes, S3Manifest, QuestionHistoryJSON,
|
|
1
|
+
import { QuestionDraftJSON, IAllowedQuestionTypes, S3Manifest, QuestionHistoryJSON, QuestionStats } from './Class'
|
|
2
2
|
import {
|
|
3
3
|
GlobalQuestionMetricJSON,
|
|
4
4
|
Bundle,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ExamDataJSON,
|
|
8
8
|
ExamData,
|
|
9
9
|
MockExam,
|
|
10
|
+
QuestionJSON,
|
|
10
11
|
} from '../Study/Class'
|
|
11
12
|
|
|
12
13
|
export interface JobWithMetrics {
|
|
@@ -178,6 +179,30 @@ export type searchQuestions<T = ExamDataJSON> = (params: {
|
|
|
178
179
|
totalCount: number
|
|
179
180
|
}
|
|
180
181
|
|
|
182
|
+
export type searchQuestionsV2<T = QuestionJSON> = (params: {
|
|
183
|
+
perPage?: number
|
|
184
|
+
page?: number
|
|
185
|
+
orderBy?: keyof T
|
|
186
|
+
order?: 'ascending' | 'descending'
|
|
187
|
+
equalTo?: { [key in keyof T]?: T[key] extends string | undefined
|
|
188
|
+
? string
|
|
189
|
+
: T[key] | Parse.Pointer
|
|
190
|
+
}
|
|
191
|
+
notEqualTo?: { [key in keyof T]?: T[key] extends string | undefined ? string : T[key] }
|
|
192
|
+
contains?: { [key in keyof T]?: string }
|
|
193
|
+
containsAll?: { [key in keyof T]?: string[] }
|
|
194
|
+
exists?: (keyof T)[]
|
|
195
|
+
doesNotExist?: (keyof T)[]
|
|
196
|
+
searchAll?: {
|
|
197
|
+
keys: (keyof T)[]
|
|
198
|
+
value: string
|
|
199
|
+
}
|
|
200
|
+
caseSensitive?: boolean
|
|
201
|
+
}) => {
|
|
202
|
+
results: (QuestionJSON & QuestionStats)[]
|
|
203
|
+
totalCount: number
|
|
204
|
+
}
|
|
205
|
+
|
|
181
206
|
export type disableUser = (params: { userId: string }) => Parse.User
|
|
182
207
|
|
|
183
208
|
export type sendAdminEditorFlaggedEmail = (params: {
|