@quesmed/types 2.6.132 → 2.6.133
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/dist/cjs/models/Product.d.ts +2 -1
- package/dist/cjs/models/Product.js +1 -0
- package/dist/cjs/models/Question.d.ts +9 -32
- package/dist/cjs/models/Question.js +14 -2
- package/dist/cjs/models/Ucat.d.ts +0 -7
- package/dist/cjs/models/User.d.ts +2 -0
- package/dist/cjs/models/User.js +2 -0
- package/dist/cjs/resolvers/fragments/question.d.ts +1 -0
- package/dist/cjs/resolvers/fragments/question.js +21 -1
- package/dist/cjs/resolvers/fragments/user.js +3 -0
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +7 -7
- package/dist/mjs/models/Product.d.ts +2 -1
- package/dist/mjs/models/Product.js +1 -0
- package/dist/mjs/models/Question.d.ts +9 -32
- package/dist/mjs/models/Question.js +12 -1
- package/dist/mjs/models/Ucat.d.ts +0 -7
- package/dist/mjs/models/User.d.ts +2 -0
- package/dist/mjs/models/User.js +2 -0
- package/dist/mjs/resolvers/fragments/question.d.ts +1 -0
- package/dist/mjs/resolvers/fragments/question.js +20 -0
- package/dist/mjs/resolvers/fragments/user.js +3 -0
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +7 -7
- package/package.json +1 -1
|
@@ -95,6 +95,7 @@ var EAppType;
|
|
|
95
95
|
EAppType[EAppType["INTERVIEW"] = 4] = "INTERVIEW";
|
|
96
96
|
EAppType[EAppType["MSRA"] = 5] = "MSRA";
|
|
97
97
|
EAppType[EAppType["PLAB"] = 6] = "PLAB";
|
|
98
|
+
EAppType[EAppType["UCAT"] = 7] = "UCAT";
|
|
98
99
|
})(EAppType = exports.EAppType || (exports.EAppType = {}));
|
|
99
100
|
var EProductDuration;
|
|
100
101
|
(function (EProductDuration) {
|
|
@@ -76,7 +76,7 @@ export interface IQuestionCommentLike {
|
|
|
76
76
|
likeTrueDislikeFalse: boolean;
|
|
77
77
|
}
|
|
78
78
|
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeMark[] | [string, string][] | [string, string, string] | string[] | [string, string];
|
|
79
|
-
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking |
|
|
79
|
+
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking | IQuestionSjtTwoAnswer;
|
|
80
80
|
export interface IQuestion {
|
|
81
81
|
id: Id;
|
|
82
82
|
createdAt: Date | number;
|
|
@@ -87,7 +87,7 @@ export interface IQuestion {
|
|
|
87
87
|
conceptId: Id;
|
|
88
88
|
stemId: Id | null;
|
|
89
89
|
public: boolean;
|
|
90
|
-
stem?:
|
|
90
|
+
stem?: IChapter;
|
|
91
91
|
themes?: ITheme[];
|
|
92
92
|
concept?: IConcept;
|
|
93
93
|
conditions?: ICondition[];
|
|
@@ -173,15 +173,10 @@ export interface IQuestionQAAnswer {
|
|
|
173
173
|
dose: string;
|
|
174
174
|
units: string;
|
|
175
175
|
}
|
|
176
|
-
export declare function isQuestionQA(data: IQuestionAll): data is IQuestionQA;
|
|
177
176
|
export interface IQuestionQA extends IQuestion {
|
|
178
177
|
answer: [IQuestionQAAnswer];
|
|
179
178
|
qaAnswer: [IQuestionQAAnswer];
|
|
180
179
|
}
|
|
181
|
-
export declare function isQuestionMultiQ(data: IQuestionAll): data is IQuestionMultiQ;
|
|
182
|
-
export declare function isQuestionEMQ(data: IQuestionAll): data is IQuestionEMQ;
|
|
183
|
-
export declare function isQuestionSelect3(data: IQuestionAll): data is IQuestionSelect3;
|
|
184
|
-
export declare function isQuestionRanking(data: IQuestionAll): data is IQuestionRanking;
|
|
185
180
|
export interface IQuestionMultiQ extends IQuestion {
|
|
186
181
|
answer: [string[], string[]];
|
|
187
182
|
multiAnswer: [string[], string[]];
|
|
@@ -198,35 +193,10 @@ export interface IQuestionRanking extends IQuestion {
|
|
|
198
193
|
answer: string[];
|
|
199
194
|
rankingAnswer: string[];
|
|
200
195
|
}
|
|
201
|
-
export interface IQuestionVerbalVeracity extends IQuestion {
|
|
202
|
-
answer: [string];
|
|
203
|
-
verbalVeracityAnswer: [string];
|
|
204
|
-
}
|
|
205
|
-
export interface IQuestionVerbalReading extends IQuestion {
|
|
206
|
-
answer: [string];
|
|
207
|
-
verbalReadingAnswer: [string];
|
|
208
|
-
}
|
|
209
|
-
export interface IQuestionQuantitativeSBA extends IQuestion {
|
|
210
|
-
answer: [string];
|
|
211
|
-
quantitativeSbaAnswer: [string];
|
|
212
|
-
}
|
|
213
|
-
export interface IQuestionDecisionSBA extends IQuestion {
|
|
214
|
-
answer: [string];
|
|
215
|
-
decisionSbaAnswer: [string];
|
|
216
|
-
}
|
|
217
|
-
export interface IQuestionDecisionYesNo extends IQuestion {
|
|
218
|
-
answer: [string[], string[]];
|
|
219
|
-
decisionYesNoAnswer: [string];
|
|
220
|
-
}
|
|
221
|
-
export interface IQuestionSjtSingleChoice extends IQuestion {
|
|
222
|
-
answer: [string];
|
|
223
|
-
sjtSingleChoiceAnswer: [string];
|
|
224
|
-
}
|
|
225
196
|
export interface IQuestionSjtTwoAnswer extends IQuestion {
|
|
226
197
|
answer: [string, string];
|
|
227
198
|
sjtTwoAnswer: [string, string];
|
|
228
199
|
}
|
|
229
|
-
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
230
200
|
export interface IQuestionPrescribe extends IQuestion {
|
|
231
201
|
answer: IPrescribeMark[];
|
|
232
202
|
prescribeAnswer: IPrescribeAnswer[];
|
|
@@ -236,6 +206,13 @@ export type IPrescribeAnswerData = {
|
|
|
236
206
|
visible: boolean;
|
|
237
207
|
label: string;
|
|
238
208
|
};
|
|
209
|
+
export declare function isQuestionQA(data: IQuestionAll): data is IQuestionQA;
|
|
210
|
+
export declare function isQuestionMultiQ(data: IQuestionAll): data is IQuestionMultiQ;
|
|
211
|
+
export declare function isQuestionEMQ(data: IQuestionAll): data is IQuestionEMQ;
|
|
212
|
+
export declare function isQuestionSelect3(data: IQuestionAll): data is IQuestionSelect3;
|
|
213
|
+
export declare function isQuestionRanking(data: IQuestionAll): data is IQuestionRanking;
|
|
214
|
+
export declare function isQuestionSjtTwoAnswer(data: IQuestionAll): data is IQuestionSjtTwoAnswer;
|
|
215
|
+
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
239
216
|
export interface IPrescribeAnswer {
|
|
240
217
|
drug: IPrescribeAnswerData;
|
|
241
218
|
dose: IPrescribeAnswerData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isQuestionPrescribe = exports.isQuestionRanking = exports.isQuestionSelect3 = exports.isQuestionEMQ = exports.isQuestionMultiQ = exports.isQuestionQA = exports.isQuestionSBA = exports.EQuestionLike = exports.EQuestionType = exports.EVeracityAnswer = exports.EPsaSectionType = void 0;
|
|
3
|
+
exports.isQuestionPrescribe = exports.isQuestionSjtTwoAnswer = exports.isQuestionRanking = exports.isQuestionSelect3 = exports.isQuestionEMQ = exports.isQuestionMultiQ = exports.isQuestionQA = exports.isQuestionSBA = exports.EQuestionLike = exports.EQuestionType = exports.EVeracityAnswer = exports.EPsaSectionType = void 0;
|
|
4
4
|
var EPsaSectionType;
|
|
5
5
|
(function (EPsaSectionType) {
|
|
6
6
|
EPsaSectionType[EPsaSectionType["PRESCRIBING"] = 1] = "PRESCRIBING";
|
|
@@ -46,6 +46,11 @@ function isQuestionSBA(data) {
|
|
|
46
46
|
return [
|
|
47
47
|
EQuestionType.SINGLE_BEST_ANSWER,
|
|
48
48
|
EQuestionType.SBA_WITH_MULTIPLE_CHOICES,
|
|
49
|
+
EQuestionType.VERBAL_VERACITY,
|
|
50
|
+
EQuestionType.VERBAL_READING_COMPREHENSION,
|
|
51
|
+
EQuestionType.DECISION_MAKING_SBA,
|
|
52
|
+
EQuestionType.QUANTITATIVE_REASONING_SBA,
|
|
53
|
+
EQuestionType.SJT_SINGLE_CHOICE,
|
|
49
54
|
].includes(data.typeId);
|
|
50
55
|
}
|
|
51
56
|
exports.isQuestionSBA = isQuestionSBA;
|
|
@@ -54,7 +59,10 @@ function isQuestionQA(data) {
|
|
|
54
59
|
}
|
|
55
60
|
exports.isQuestionQA = isQuestionQA;
|
|
56
61
|
function isQuestionMultiQ(data) {
|
|
57
|
-
return
|
|
62
|
+
return [
|
|
63
|
+
EQuestionType.MULTIPLE_ANSWERS,
|
|
64
|
+
EQuestionType.DECISION_MAKING_YES_NO,
|
|
65
|
+
].includes(data.typeId);
|
|
58
66
|
}
|
|
59
67
|
exports.isQuestionMultiQ = isQuestionMultiQ;
|
|
60
68
|
function isQuestionEMQ(data) {
|
|
@@ -69,6 +77,10 @@ function isQuestionRanking(data) {
|
|
|
69
77
|
return data.typeId === EQuestionType.RANKING_ANSWER;
|
|
70
78
|
}
|
|
71
79
|
exports.isQuestionRanking = isQuestionRanking;
|
|
80
|
+
function isQuestionSjtTwoAnswer(data) {
|
|
81
|
+
return data.typeId === EQuestionType.SJT_TWO_ANSWERS;
|
|
82
|
+
}
|
|
83
|
+
exports.isQuestionSjtTwoAnswer = isQuestionSjtTwoAnswer;
|
|
72
84
|
function isQuestionPrescribe(data) {
|
|
73
85
|
return data.typeId === EQuestionType.PRESCRIPTION_ANSWER;
|
|
74
86
|
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { EEntitlementType, IEntitlement } from './Product';
|
|
2
|
-
export interface IQuestionStem {
|
|
3
|
-
id: number;
|
|
4
|
-
explanation: string;
|
|
5
|
-
public: boolean;
|
|
6
|
-
createdAt: number | Date;
|
|
7
|
-
updatedAt: number | Date;
|
|
8
|
-
}
|
|
9
2
|
export interface ITheme {
|
|
10
3
|
id: number;
|
|
11
4
|
name: string;
|
|
@@ -75,6 +75,7 @@ export interface IPayload {
|
|
|
75
75
|
paediatricsInterviewSubscriptionEndDate: number | null;
|
|
76
76
|
plab1SubscriptionEndDate: number | null;
|
|
77
77
|
plab2SubscriptionEndDate: number | null;
|
|
78
|
+
ucatSubscriptionEndDate: number | null;
|
|
78
79
|
ver: number;
|
|
79
80
|
}
|
|
80
81
|
export interface IDailyProgressVar {
|
|
@@ -182,6 +183,7 @@ export interface IUser {
|
|
|
182
183
|
paediatricsInterviewSubscriptionEndDate: number | Date | null;
|
|
183
184
|
plab1SubscriptionEndDate: number | Date | null;
|
|
184
185
|
plab2SubscriptionEndDate: number | Date | null;
|
|
186
|
+
ucatSubscriptionEndDate: number | Date | null;
|
|
185
187
|
settings: IUserSettings;
|
|
186
188
|
}
|
|
187
189
|
export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear, compareUnix?: number): IClassYear;
|
package/dist/cjs/models/User.js
CHANGED
|
@@ -46,6 +46,7 @@ exports.subscriptionDates = [
|
|
|
46
46
|
'paediatricsInterviewSubscriptionEndDate',
|
|
47
47
|
'plab1SubscriptionEndDate',
|
|
48
48
|
'plab2SubscriptionEndDate',
|
|
49
|
+
'ucatSubscriptionEndDate',
|
|
49
50
|
];
|
|
50
51
|
exports.dateProductMapping = {
|
|
51
52
|
qbankSubscriptionEndDate: Product_1.EProductType.QBANK,
|
|
@@ -65,6 +66,7 @@ exports.dateProductMapping = {
|
|
|
65
66
|
paediatricsInterviewSubscriptionEndDate: Product_1.EProductType.INTERVIEW_PAEDIATRICS,
|
|
66
67
|
plab1SubscriptionEndDate: Product_1.EProductType.PLAB1,
|
|
67
68
|
plab2SubscriptionEndDate: Product_1.EProductType.PLAB2,
|
|
69
|
+
ucatSubscriptionEndDate: Product_1.EProductType.UCAT,
|
|
68
70
|
};
|
|
69
71
|
var EClassYearGroup;
|
|
70
72
|
(function (EClassYearGroup) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
2
|
export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
4
|
export declare const QUESTION_CATEGORY_FIELDS: import("@apollo/client").DocumentNode;
|
|
4
5
|
export declare const QUESTION_FIELDS: import("@apollo/client").DocumentNode;
|
|
5
6
|
export declare const QUESTION_WITH_HIGHLIGHT_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = void 0;
|
|
3
|
+
exports.QUESTION_WITH_LEARNING_FIELDS = exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
|
+
const chapter_1 = require("./chapter");
|
|
5
6
|
const concept_1 = require("./concept");
|
|
6
7
|
const highlight_1 = require("./highlight");
|
|
7
8
|
const picture_1 = require("./picture");
|
|
@@ -59,6 +60,23 @@ exports.QUESTION_UKMLA_FIELDS = (0, client_1.gql) `
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
`;
|
|
63
|
+
exports.QUESTION_UCAT_FIELDS = (0, client_1.gql) `
|
|
64
|
+
${chapter_1.CHAPTER_FIELDS}
|
|
65
|
+
fragment QuestionUcatFields on Question {
|
|
66
|
+
themes {
|
|
67
|
+
id
|
|
68
|
+
name
|
|
69
|
+
entitlementId
|
|
70
|
+
entitlement {
|
|
71
|
+
id
|
|
72
|
+
name
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
stem {
|
|
76
|
+
...ChapterFields
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
62
80
|
exports.QUESTION_CATEGORY_FIELDS = (0, client_1.gql) `
|
|
63
81
|
fragment QuestionCategoryFields on Question {
|
|
64
82
|
... on QuestionSBA {
|
|
@@ -121,6 +139,7 @@ exports.QUESTION_CATEGORY_FIELDS = (0, client_1.gql) `
|
|
|
121
139
|
}
|
|
122
140
|
`;
|
|
123
141
|
exports.QUESTION_FIELDS = (0, client_1.gql) `
|
|
142
|
+
${exports.QUESTION_UCAT_FIELDS}
|
|
124
143
|
${exports.QUESTION_UKMLA_FIELDS}
|
|
125
144
|
${highlight_1.HIGHLIGHT_FIELDS}
|
|
126
145
|
${exports.QUESTION_CATEGORY_FIELDS}
|
|
@@ -168,6 +187,7 @@ exports.QUESTION_FIELDS = (0, client_1.gql) `
|
|
|
168
187
|
}
|
|
169
188
|
...QuestionUkmlaFields
|
|
170
189
|
...QuestionCategoryFields
|
|
190
|
+
...QuestionUcatFields
|
|
171
191
|
}
|
|
172
192
|
`;
|
|
173
193
|
// used in cache updator
|
|
@@ -40,13 +40,13 @@ const getQuestionTypeName = (typeId) => {
|
|
|
40
40
|
[models_1.EQuestionType.EXTENDED_MATCHING_ANSWER]: 'QuestionEMQ',
|
|
41
41
|
[models_1.EQuestionType.RANKING_ANSWER]: 'QuestionRanking',
|
|
42
42
|
[models_1.EQuestionType.SELECT_THREE_ANSWER]: 'QuestionSelect3',
|
|
43
|
-
[models_1.EQuestionType.VERBAL_READING_COMPREHENSION]: '
|
|
44
|
-
[models_1.EQuestionType.VERBAL_VERACITY]: '
|
|
45
|
-
[models_1.EQuestionType.
|
|
46
|
-
[models_1.EQuestionType.
|
|
47
|
-
[models_1.EQuestionType.
|
|
48
|
-
[models_1.EQuestionType.SJT_SINGLE_CHOICE]: '
|
|
49
|
-
[models_1.EQuestionType.SJT_TWO_ANSWERS]: '
|
|
43
|
+
[models_1.EQuestionType.VERBAL_READING_COMPREHENSION]: 'QuestionSBA',
|
|
44
|
+
[models_1.EQuestionType.VERBAL_VERACITY]: 'QuestionSBA',
|
|
45
|
+
[models_1.EQuestionType.QUANTITATIVE_REASONING_SBA]: 'QuestionSBA',
|
|
46
|
+
[models_1.EQuestionType.DECISION_MAKING_SBA]: 'QuestionSBA',
|
|
47
|
+
[models_1.EQuestionType.DECISION_MAKING_YES_NO]: 'QuestionMultiA',
|
|
48
|
+
[models_1.EQuestionType.SJT_SINGLE_CHOICE]: 'QuestionSBA',
|
|
49
|
+
[models_1.EQuestionType.SJT_TWO_ANSWERS]: 'QuestionSelect3',
|
|
50
50
|
};
|
|
51
51
|
return mappedObj[typeId] ?? 'QuestionSBA';
|
|
52
52
|
};
|
|
@@ -92,6 +92,7 @@ export var EAppType;
|
|
|
92
92
|
EAppType[EAppType["INTERVIEW"] = 4] = "INTERVIEW";
|
|
93
93
|
EAppType[EAppType["MSRA"] = 5] = "MSRA";
|
|
94
94
|
EAppType[EAppType["PLAB"] = 6] = "PLAB";
|
|
95
|
+
EAppType[EAppType["UCAT"] = 7] = "UCAT";
|
|
95
96
|
})(EAppType || (EAppType = {}));
|
|
96
97
|
export var EProductDuration;
|
|
97
98
|
(function (EProductDuration) {
|
|
@@ -76,7 +76,7 @@ export interface IQuestionCommentLike {
|
|
|
76
76
|
likeTrueDislikeFalse: boolean;
|
|
77
77
|
}
|
|
78
78
|
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeMark[] | [string, string][] | [string, string, string] | string[] | [string, string];
|
|
79
|
-
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking |
|
|
79
|
+
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking | IQuestionSjtTwoAnswer;
|
|
80
80
|
export interface IQuestion {
|
|
81
81
|
id: Id;
|
|
82
82
|
createdAt: Date | number;
|
|
@@ -87,7 +87,7 @@ export interface IQuestion {
|
|
|
87
87
|
conceptId: Id;
|
|
88
88
|
stemId: Id | null;
|
|
89
89
|
public: boolean;
|
|
90
|
-
stem?:
|
|
90
|
+
stem?: IChapter;
|
|
91
91
|
themes?: ITheme[];
|
|
92
92
|
concept?: IConcept;
|
|
93
93
|
conditions?: ICondition[];
|
|
@@ -173,15 +173,10 @@ export interface IQuestionQAAnswer {
|
|
|
173
173
|
dose: string;
|
|
174
174
|
units: string;
|
|
175
175
|
}
|
|
176
|
-
export declare function isQuestionQA(data: IQuestionAll): data is IQuestionQA;
|
|
177
176
|
export interface IQuestionQA extends IQuestion {
|
|
178
177
|
answer: [IQuestionQAAnswer];
|
|
179
178
|
qaAnswer: [IQuestionQAAnswer];
|
|
180
179
|
}
|
|
181
|
-
export declare function isQuestionMultiQ(data: IQuestionAll): data is IQuestionMultiQ;
|
|
182
|
-
export declare function isQuestionEMQ(data: IQuestionAll): data is IQuestionEMQ;
|
|
183
|
-
export declare function isQuestionSelect3(data: IQuestionAll): data is IQuestionSelect3;
|
|
184
|
-
export declare function isQuestionRanking(data: IQuestionAll): data is IQuestionRanking;
|
|
185
180
|
export interface IQuestionMultiQ extends IQuestion {
|
|
186
181
|
answer: [string[], string[]];
|
|
187
182
|
multiAnswer: [string[], string[]];
|
|
@@ -198,35 +193,10 @@ export interface IQuestionRanking extends IQuestion {
|
|
|
198
193
|
answer: string[];
|
|
199
194
|
rankingAnswer: string[];
|
|
200
195
|
}
|
|
201
|
-
export interface IQuestionVerbalVeracity extends IQuestion {
|
|
202
|
-
answer: [string];
|
|
203
|
-
verbalVeracityAnswer: [string];
|
|
204
|
-
}
|
|
205
|
-
export interface IQuestionVerbalReading extends IQuestion {
|
|
206
|
-
answer: [string];
|
|
207
|
-
verbalReadingAnswer: [string];
|
|
208
|
-
}
|
|
209
|
-
export interface IQuestionQuantitativeSBA extends IQuestion {
|
|
210
|
-
answer: [string];
|
|
211
|
-
quantitativeSbaAnswer: [string];
|
|
212
|
-
}
|
|
213
|
-
export interface IQuestionDecisionSBA extends IQuestion {
|
|
214
|
-
answer: [string];
|
|
215
|
-
decisionSbaAnswer: [string];
|
|
216
|
-
}
|
|
217
|
-
export interface IQuestionDecisionYesNo extends IQuestion {
|
|
218
|
-
answer: [string[], string[]];
|
|
219
|
-
decisionYesNoAnswer: [string];
|
|
220
|
-
}
|
|
221
|
-
export interface IQuestionSjtSingleChoice extends IQuestion {
|
|
222
|
-
answer: [string];
|
|
223
|
-
sjtSingleChoiceAnswer: [string];
|
|
224
|
-
}
|
|
225
196
|
export interface IQuestionSjtTwoAnswer extends IQuestion {
|
|
226
197
|
answer: [string, string];
|
|
227
198
|
sjtTwoAnswer: [string, string];
|
|
228
199
|
}
|
|
229
|
-
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
230
200
|
export interface IQuestionPrescribe extends IQuestion {
|
|
231
201
|
answer: IPrescribeMark[];
|
|
232
202
|
prescribeAnswer: IPrescribeAnswer[];
|
|
@@ -236,6 +206,13 @@ export type IPrescribeAnswerData = {
|
|
|
236
206
|
visible: boolean;
|
|
237
207
|
label: string;
|
|
238
208
|
};
|
|
209
|
+
export declare function isQuestionQA(data: IQuestionAll): data is IQuestionQA;
|
|
210
|
+
export declare function isQuestionMultiQ(data: IQuestionAll): data is IQuestionMultiQ;
|
|
211
|
+
export declare function isQuestionEMQ(data: IQuestionAll): data is IQuestionEMQ;
|
|
212
|
+
export declare function isQuestionSelect3(data: IQuestionAll): data is IQuestionSelect3;
|
|
213
|
+
export declare function isQuestionRanking(data: IQuestionAll): data is IQuestionRanking;
|
|
214
|
+
export declare function isQuestionSjtTwoAnswer(data: IQuestionAll): data is IQuestionSjtTwoAnswer;
|
|
215
|
+
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
239
216
|
export interface IPrescribeAnswer {
|
|
240
217
|
drug: IPrescribeAnswerData;
|
|
241
218
|
dose: IPrescribeAnswerData;
|
|
@@ -43,13 +43,21 @@ export function isQuestionSBA(data) {
|
|
|
43
43
|
return [
|
|
44
44
|
EQuestionType.SINGLE_BEST_ANSWER,
|
|
45
45
|
EQuestionType.SBA_WITH_MULTIPLE_CHOICES,
|
|
46
|
+
EQuestionType.VERBAL_VERACITY,
|
|
47
|
+
EQuestionType.VERBAL_READING_COMPREHENSION,
|
|
48
|
+
EQuestionType.DECISION_MAKING_SBA,
|
|
49
|
+
EQuestionType.QUANTITATIVE_REASONING_SBA,
|
|
50
|
+
EQuestionType.SJT_SINGLE_CHOICE,
|
|
46
51
|
].includes(data.typeId);
|
|
47
52
|
}
|
|
48
53
|
export function isQuestionQA(data) {
|
|
49
54
|
return data.typeId === EQuestionType.QUESTION_ANSWER;
|
|
50
55
|
}
|
|
51
56
|
export function isQuestionMultiQ(data) {
|
|
52
|
-
return
|
|
57
|
+
return [
|
|
58
|
+
EQuestionType.MULTIPLE_ANSWERS,
|
|
59
|
+
EQuestionType.DECISION_MAKING_YES_NO,
|
|
60
|
+
].includes(data.typeId);
|
|
53
61
|
}
|
|
54
62
|
export function isQuestionEMQ(data) {
|
|
55
63
|
return data.typeId === EQuestionType.EXTENDED_MATCHING_ANSWER;
|
|
@@ -60,6 +68,9 @@ export function isQuestionSelect3(data) {
|
|
|
60
68
|
export function isQuestionRanking(data) {
|
|
61
69
|
return data.typeId === EQuestionType.RANKING_ANSWER;
|
|
62
70
|
}
|
|
71
|
+
export function isQuestionSjtTwoAnswer(data) {
|
|
72
|
+
return data.typeId === EQuestionType.SJT_TWO_ANSWERS;
|
|
73
|
+
}
|
|
63
74
|
export function isQuestionPrescribe(data) {
|
|
64
75
|
return data.typeId === EQuestionType.PRESCRIPTION_ANSWER;
|
|
65
76
|
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { EEntitlementType, IEntitlement } from './Product';
|
|
2
|
-
export interface IQuestionStem {
|
|
3
|
-
id: number;
|
|
4
|
-
explanation: string;
|
|
5
|
-
public: boolean;
|
|
6
|
-
createdAt: number | Date;
|
|
7
|
-
updatedAt: number | Date;
|
|
8
|
-
}
|
|
9
2
|
export interface ITheme {
|
|
10
3
|
id: number;
|
|
11
4
|
name: string;
|
|
@@ -75,6 +75,7 @@ export interface IPayload {
|
|
|
75
75
|
paediatricsInterviewSubscriptionEndDate: number | null;
|
|
76
76
|
plab1SubscriptionEndDate: number | null;
|
|
77
77
|
plab2SubscriptionEndDate: number | null;
|
|
78
|
+
ucatSubscriptionEndDate: number | null;
|
|
78
79
|
ver: number;
|
|
79
80
|
}
|
|
80
81
|
export interface IDailyProgressVar {
|
|
@@ -182,6 +183,7 @@ export interface IUser {
|
|
|
182
183
|
paediatricsInterviewSubscriptionEndDate: number | Date | null;
|
|
183
184
|
plab1SubscriptionEndDate: number | Date | null;
|
|
184
185
|
plab2SubscriptionEndDate: number | Date | null;
|
|
186
|
+
ucatSubscriptionEndDate: number | Date | null;
|
|
185
187
|
settings: IUserSettings;
|
|
186
188
|
}
|
|
187
189
|
export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear, compareUnix?: number): IClassYear;
|
package/dist/mjs/models/User.js
CHANGED
|
@@ -43,6 +43,7 @@ export const subscriptionDates = [
|
|
|
43
43
|
'paediatricsInterviewSubscriptionEndDate',
|
|
44
44
|
'plab1SubscriptionEndDate',
|
|
45
45
|
'plab2SubscriptionEndDate',
|
|
46
|
+
'ucatSubscriptionEndDate',
|
|
46
47
|
];
|
|
47
48
|
export const dateProductMapping = {
|
|
48
49
|
qbankSubscriptionEndDate: EProductType.QBANK,
|
|
@@ -62,6 +63,7 @@ export const dateProductMapping = {
|
|
|
62
63
|
paediatricsInterviewSubscriptionEndDate: EProductType.INTERVIEW_PAEDIATRICS,
|
|
63
64
|
plab1SubscriptionEndDate: EProductType.PLAB1,
|
|
64
65
|
plab2SubscriptionEndDate: EProductType.PLAB2,
|
|
66
|
+
ucatSubscriptionEndDate: EProductType.UCAT,
|
|
65
67
|
};
|
|
66
68
|
export var EClassYearGroup;
|
|
67
69
|
(function (EClassYearGroup) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
2
|
export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
4
|
export declare const QUESTION_CATEGORY_FIELDS: import("@apollo/client").DocumentNode;
|
|
4
5
|
export declare const QUESTION_FIELDS: import("@apollo/client").DocumentNode;
|
|
5
6
|
export declare const QUESTION_WITH_HIGHLIGHT_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
+
import { CHAPTER_FIELDS } from './chapter';
|
|
2
3
|
import { CONCEPT_FIELDS } from './concept';
|
|
3
4
|
import { HIGHLIGHT_FIELDS } from './highlight';
|
|
4
5
|
import { PICTURE_FIELDS } from './picture';
|
|
@@ -56,6 +57,23 @@ export const QUESTION_UKMLA_FIELDS = gql `
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
`;
|
|
60
|
+
export const QUESTION_UCAT_FIELDS = gql `
|
|
61
|
+
${CHAPTER_FIELDS}
|
|
62
|
+
fragment QuestionUcatFields on Question {
|
|
63
|
+
themes {
|
|
64
|
+
id
|
|
65
|
+
name
|
|
66
|
+
entitlementId
|
|
67
|
+
entitlement {
|
|
68
|
+
id
|
|
69
|
+
name
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
stem {
|
|
73
|
+
...ChapterFields
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
59
77
|
export const QUESTION_CATEGORY_FIELDS = gql `
|
|
60
78
|
fragment QuestionCategoryFields on Question {
|
|
61
79
|
... on QuestionSBA {
|
|
@@ -118,6 +136,7 @@ export const QUESTION_CATEGORY_FIELDS = gql `
|
|
|
118
136
|
}
|
|
119
137
|
`;
|
|
120
138
|
export const QUESTION_FIELDS = gql `
|
|
139
|
+
${QUESTION_UCAT_FIELDS}
|
|
121
140
|
${QUESTION_UKMLA_FIELDS}
|
|
122
141
|
${HIGHLIGHT_FIELDS}
|
|
123
142
|
${QUESTION_CATEGORY_FIELDS}
|
|
@@ -165,6 +184,7 @@ export const QUESTION_FIELDS = gql `
|
|
|
165
184
|
}
|
|
166
185
|
...QuestionUkmlaFields
|
|
167
186
|
...QuestionCategoryFields
|
|
187
|
+
...QuestionUcatFields
|
|
168
188
|
}
|
|
169
189
|
`;
|
|
170
190
|
// used in cache updator
|
|
@@ -36,13 +36,13 @@ export const getQuestionTypeName = (typeId) => {
|
|
|
36
36
|
[EQuestionType.EXTENDED_MATCHING_ANSWER]: 'QuestionEMQ',
|
|
37
37
|
[EQuestionType.RANKING_ANSWER]: 'QuestionRanking',
|
|
38
38
|
[EQuestionType.SELECT_THREE_ANSWER]: 'QuestionSelect3',
|
|
39
|
-
[EQuestionType.VERBAL_READING_COMPREHENSION]: '
|
|
40
|
-
[EQuestionType.VERBAL_VERACITY]: '
|
|
41
|
-
[EQuestionType.
|
|
42
|
-
[EQuestionType.
|
|
43
|
-
[EQuestionType.
|
|
44
|
-
[EQuestionType.SJT_SINGLE_CHOICE]: '
|
|
45
|
-
[EQuestionType.SJT_TWO_ANSWERS]: '
|
|
39
|
+
[EQuestionType.VERBAL_READING_COMPREHENSION]: 'QuestionSBA',
|
|
40
|
+
[EQuestionType.VERBAL_VERACITY]: 'QuestionSBA',
|
|
41
|
+
[EQuestionType.QUANTITATIVE_REASONING_SBA]: 'QuestionSBA',
|
|
42
|
+
[EQuestionType.DECISION_MAKING_SBA]: 'QuestionSBA',
|
|
43
|
+
[EQuestionType.DECISION_MAKING_YES_NO]: 'QuestionMultiA',
|
|
44
|
+
[EQuestionType.SJT_SINGLE_CHOICE]: 'QuestionSBA',
|
|
45
|
+
[EQuestionType.SJT_TWO_ANSWERS]: 'QuestionSelect3',
|
|
46
46
|
};
|
|
47
47
|
return mappedObj[typeId] ?? 'QuestionSBA';
|
|
48
48
|
};
|