@quesmed/types-rn 2.6.128 → 2.6.130
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/index.d.ts +9 -1
- package/index.js +8 -0
- package/models/Content.d.ts +5 -0
- package/models/OsceStation.d.ts +2 -2
- package/models/Product.d.ts +11 -2
- package/models/Product.js +9 -0
- package/models/Question.d.ts +53 -3
- package/models/Question.js +14 -1
- package/models/Ucat.d.ts +17 -0
- package/models/Ucat.js +2 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/resolvers/enums.d.ts +2 -1
- package/resolvers/enums.js +1 -0
- package/resolvers/mutation/admin/content.d.ts +8 -0
- package/resolvers/mutation/admin/content.js +14 -1
- package/resolvers/mutation/restricted/questionDiscussion.js +7 -0
- package/resolvers/query/admin/dashboard.d.ts +2 -0
- package/resolvers/query/admin/dashboard.js +4 -0
- package/utils/commonFunctions.js +22 -1
package/index.d.ts
CHANGED
|
@@ -30,7 +30,15 @@ export declare enum EGrammarType {
|
|
|
30
30
|
SJT_QUESTION = 10,
|
|
31
31
|
RA_QUESTION = 11,
|
|
32
32
|
PACES = 12,
|
|
33
|
-
PACE_TEMPLATE = 13
|
|
33
|
+
PACE_TEMPLATE = 13,
|
|
34
|
+
QUESTION_STEM = 14,
|
|
35
|
+
VERBAL_VERACITY = 15,
|
|
36
|
+
VERBAL_READING_COMPREHENSION = 16,
|
|
37
|
+
QUANTITATIVE_REASONING_SBA = 17,
|
|
38
|
+
DECISION_MAKING_SBA = 18,
|
|
39
|
+
DECISION_MAKING_YES_NO = 19,
|
|
40
|
+
SJT_SINGLE_CHOICE = 20,
|
|
41
|
+
SJT_TWO_ANSWERS = 21
|
|
34
42
|
}
|
|
35
43
|
export declare const FCM_TOPICS: {
|
|
36
44
|
GLOBAL: string;
|
package/index.js
CHANGED
|
@@ -63,6 +63,14 @@ var EGrammarType;
|
|
|
63
63
|
EGrammarType[EGrammarType["RA_QUESTION"] = 11] = "RA_QUESTION";
|
|
64
64
|
EGrammarType[EGrammarType["PACES"] = 12] = "PACES";
|
|
65
65
|
EGrammarType[EGrammarType["PACE_TEMPLATE"] = 13] = "PACE_TEMPLATE";
|
|
66
|
+
EGrammarType[EGrammarType["QUESTION_STEM"] = 14] = "QUESTION_STEM";
|
|
67
|
+
EGrammarType[EGrammarType["VERBAL_VERACITY"] = 15] = "VERBAL_VERACITY";
|
|
68
|
+
EGrammarType[EGrammarType["VERBAL_READING_COMPREHENSION"] = 16] = "VERBAL_READING_COMPREHENSION";
|
|
69
|
+
EGrammarType[EGrammarType["QUANTITATIVE_REASONING_SBA"] = 17] = "QUANTITATIVE_REASONING_SBA";
|
|
70
|
+
EGrammarType[EGrammarType["DECISION_MAKING_SBA"] = 18] = "DECISION_MAKING_SBA";
|
|
71
|
+
EGrammarType[EGrammarType["DECISION_MAKING_YES_NO"] = 19] = "DECISION_MAKING_YES_NO";
|
|
72
|
+
EGrammarType[EGrammarType["SJT_SINGLE_CHOICE"] = 20] = "SJT_SINGLE_CHOICE";
|
|
73
|
+
EGrammarType[EGrammarType["SJT_TWO_ANSWERS"] = 21] = "SJT_TWO_ANSWERS";
|
|
66
74
|
})(EGrammarType = exports.EGrammarType || (exports.EGrammarType = {}));
|
|
67
75
|
exports.FCM_TOPICS = {
|
|
68
76
|
GLOBAL: 'global',
|
package/models/Content.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EGrammarType } from '..';
|
|
2
2
|
import { EDifficultyType } from './Difficulty';
|
|
3
|
+
import { IEntitlementType } from './Product';
|
|
3
4
|
import { IQuestion } from './Question';
|
|
4
5
|
import { Id } from './Type';
|
|
5
6
|
export declare enum EBatchType {
|
|
@@ -28,6 +29,8 @@ export interface IBatch {
|
|
|
28
29
|
id: string;
|
|
29
30
|
editorId: Id;
|
|
30
31
|
type: EBatchType;
|
|
32
|
+
entitlementId: Id;
|
|
33
|
+
entitlement?: IEntitlementType;
|
|
31
34
|
comment: string | null;
|
|
32
35
|
createdAt: Date | number;
|
|
33
36
|
updatedAt: Date | number;
|
|
@@ -86,6 +89,7 @@ export interface FileData {
|
|
|
86
89
|
export interface IForcedChecks {
|
|
87
90
|
question: boolean;
|
|
88
91
|
topic: boolean;
|
|
92
|
+
theme: boolean;
|
|
89
93
|
ukmlaTopic: boolean;
|
|
90
94
|
concept: boolean;
|
|
91
95
|
station: boolean;
|
|
@@ -95,6 +99,7 @@ export interface IForcedChecks {
|
|
|
95
99
|
export interface IForcedInserts {
|
|
96
100
|
question: boolean;
|
|
97
101
|
topic: boolean;
|
|
102
|
+
theme: boolean;
|
|
98
103
|
ukmlaTopic: boolean;
|
|
99
104
|
concept: boolean;
|
|
100
105
|
station: boolean;
|
package/models/OsceStation.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IConcept } from './Concept';
|
|
2
2
|
import { EDifficultyType } from './Difficulty';
|
|
3
3
|
import { IUserStationNote } from './Note';
|
|
4
|
-
import { IPaceScore } from './Paces';
|
|
4
|
+
import { EPaceType, IPaceScore } from './Paces';
|
|
5
5
|
import { IPicture } from './Picture';
|
|
6
6
|
import { IEntitlement } from './Product';
|
|
7
7
|
import { ITopic } from './Topic';
|
|
@@ -50,7 +50,7 @@ export interface IOsceStation {
|
|
|
50
50
|
deletedAt: number | Date;
|
|
51
51
|
name: string;
|
|
52
52
|
hiddenName: string;
|
|
53
|
-
osceTypeId:
|
|
53
|
+
osceTypeId: EOsceType | EPaceType;
|
|
54
54
|
entitlement: IEntitlement;
|
|
55
55
|
osceType?: IOsceType;
|
|
56
56
|
difficulty: EDifficultyType;
|
package/models/Product.d.ts
CHANGED
|
@@ -39,7 +39,12 @@ export declare enum EProductType {
|
|
|
39
39
|
NEUROLOGY = 32,
|
|
40
40
|
RESPIRATORY = 33,
|
|
41
41
|
PLAB1 = 34,
|
|
42
|
-
PLAB2 = 35
|
|
42
|
+
PLAB2 = 35,
|
|
43
|
+
UCAT = 48,
|
|
44
|
+
VERBAL = 49,
|
|
45
|
+
DECISION_MAKING = 50,
|
|
46
|
+
QUANTITATIVE_REASONING = 51,
|
|
47
|
+
SITUATIONAL_JUDGEMENT = 52
|
|
43
48
|
}
|
|
44
49
|
export declare enum EEntitlementType {
|
|
45
50
|
ALL = 0,
|
|
@@ -72,7 +77,11 @@ export declare enum EEntitlementType {
|
|
|
72
77
|
INTERVIEW_IMT = 42,
|
|
73
78
|
INTERVIEW_RADIOLOGY = 43,
|
|
74
79
|
INTERVIEW_PAEDIATRICS = 46,
|
|
75
|
-
PLAB_1 = 44
|
|
80
|
+
PLAB_1 = 44,
|
|
81
|
+
VERBAL = 49,
|
|
82
|
+
DECISION_MAKING = 50,
|
|
83
|
+
QUANTITATIVE_REASONING = 51,
|
|
84
|
+
SITUATIONAL_JUDGEMENT = 52
|
|
76
85
|
}
|
|
77
86
|
export interface IProduct {
|
|
78
87
|
id: Id;
|
package/models/Product.js
CHANGED
|
@@ -43,6 +43,11 @@ var EProductType;
|
|
|
43
43
|
EProductType[EProductType["RESPIRATORY"] = 33] = "RESPIRATORY";
|
|
44
44
|
EProductType[EProductType["PLAB1"] = 34] = "PLAB1";
|
|
45
45
|
EProductType[EProductType["PLAB2"] = 35] = "PLAB2";
|
|
46
|
+
EProductType[EProductType["UCAT"] = 48] = "UCAT";
|
|
47
|
+
EProductType[EProductType["VERBAL"] = 49] = "VERBAL";
|
|
48
|
+
EProductType[EProductType["DECISION_MAKING"] = 50] = "DECISION_MAKING";
|
|
49
|
+
EProductType[EProductType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
|
|
50
|
+
EProductType[EProductType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
|
|
46
51
|
})(EProductType = exports.EProductType || (exports.EProductType = {}));
|
|
47
52
|
var EEntitlementType;
|
|
48
53
|
(function (EEntitlementType) {
|
|
@@ -77,6 +82,10 @@ var EEntitlementType;
|
|
|
77
82
|
EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
|
|
78
83
|
EEntitlementType[EEntitlementType["INTERVIEW_PAEDIATRICS"] = 46] = "INTERVIEW_PAEDIATRICS";
|
|
79
84
|
EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
|
|
85
|
+
EEntitlementType[EEntitlementType["VERBAL"] = 49] = "VERBAL";
|
|
86
|
+
EEntitlementType[EEntitlementType["DECISION_MAKING"] = 50] = "DECISION_MAKING";
|
|
87
|
+
EEntitlementType[EEntitlementType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
|
|
88
|
+
EEntitlementType[EEntitlementType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
|
|
80
89
|
})(EEntitlementType = exports.EEntitlementType || (exports.EEntitlementType = {}));
|
|
81
90
|
var EAppType;
|
|
82
91
|
(function (EAppType) {
|
package/models/Question.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IChapter } from './Chapter';
|
|
1
2
|
import { IConcept } from './Concept';
|
|
2
3
|
import { ICondition } from './Condition';
|
|
3
4
|
import { EDifficultyType } from './Difficulty';
|
|
@@ -6,6 +7,7 @@ import { IPicture } from './Picture';
|
|
|
6
7
|
import { IPresentation } from './Presentation';
|
|
7
8
|
import { ITopic } from './Topic';
|
|
8
9
|
import { Id } from './Type';
|
|
10
|
+
import { ITheme } from './Ucat';
|
|
9
11
|
import { IUkmlaTopic } from './UkmlaTopic';
|
|
10
12
|
import { EUserLearningPoint, IUser } from './User';
|
|
11
13
|
export declare enum EPsaSectionType {
|
|
@@ -18,6 +20,11 @@ export declare enum EPsaSectionType {
|
|
|
18
20
|
DRUG_MONITORING = 7,
|
|
19
21
|
DATA_INTERPRETATION = 8
|
|
20
22
|
}
|
|
23
|
+
export declare enum EVeracityAnswer {
|
|
24
|
+
TRUE = "a",
|
|
25
|
+
FALSE = "b",
|
|
26
|
+
UNCERTAIN = "c"
|
|
27
|
+
}
|
|
21
28
|
export declare enum EQuestionType {
|
|
22
29
|
SINGLE_BEST_ANSWER = 1,
|
|
23
30
|
QUESTION_ANSWER = 2,
|
|
@@ -26,7 +33,14 @@ export declare enum EQuestionType {
|
|
|
26
33
|
EXTENDED_MATCHING_ANSWER = 5,
|
|
27
34
|
SELECT_THREE_ANSWER = 6,
|
|
28
35
|
RANKING_ANSWER = 7,
|
|
29
|
-
SBA_WITH_MULTIPLE_CHOICES = 8
|
|
36
|
+
SBA_WITH_MULTIPLE_CHOICES = 8,
|
|
37
|
+
VERBAL_VERACITY = 9,
|
|
38
|
+
VERBAL_READING_COMPREHENSION = 10,
|
|
39
|
+
QUANTITATIVE_REASONING_SBA = 11,
|
|
40
|
+
DECISION_MAKING_SBA = 12,
|
|
41
|
+
DECISION_MAKING_YES_NO = 13,
|
|
42
|
+
SJT_SINGLE_CHOICE = 14,
|
|
43
|
+
SJT_TWO_ANSWERS = 15
|
|
30
44
|
}
|
|
31
45
|
export declare enum EQuestionLike {
|
|
32
46
|
NONE = 0,
|
|
@@ -61,8 +75,8 @@ export interface IQuestionCommentLike {
|
|
|
61
75
|
comment: IQuestionComment;
|
|
62
76
|
likeTrueDislikeFalse: boolean;
|
|
63
77
|
}
|
|
64
|
-
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeMark[] | [string, string][] | [string, string, string] | string[];
|
|
65
|
-
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking;
|
|
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 | IQuestionVerbalVeracity | IQuestionVerbalReading | IQuestionDecisionSBA | IQuestionDecisionYesNo | IQuestionQuantitativeSBA | IQuestionSjtSingleChoice | IQuestionSjtTwoAnswer;
|
|
66
80
|
export interface IQuestion {
|
|
67
81
|
id: Id;
|
|
68
82
|
createdAt: Date | number;
|
|
@@ -71,7 +85,10 @@ export interface IQuestion {
|
|
|
71
85
|
deleted: Boolean;
|
|
72
86
|
typeId: EQuestionType;
|
|
73
87
|
conceptId: Id;
|
|
88
|
+
stemId: Id | null;
|
|
74
89
|
public: boolean;
|
|
90
|
+
stem?: Pick<IChapter, 'id' | 'explanation'>;
|
|
91
|
+
themes?: ITheme[];
|
|
75
92
|
concept?: IConcept;
|
|
76
93
|
conditions?: ICondition[];
|
|
77
94
|
presentations?: IPresentation[];
|
|
@@ -142,6 +159,11 @@ export interface IQuestionEntitlement {
|
|
|
142
159
|
entitlementId: Id;
|
|
143
160
|
questionId: Id;
|
|
144
161
|
}
|
|
162
|
+
export interface IQuestionTheme {
|
|
163
|
+
id: Id;
|
|
164
|
+
themeId: Id;
|
|
165
|
+
questionId: Id;
|
|
166
|
+
}
|
|
145
167
|
export declare function isQuestionSBA(data: IQuestionAll): data is IQuestionSBA;
|
|
146
168
|
export interface IQuestionSBA extends IQuestion {
|
|
147
169
|
answer: [string];
|
|
@@ -176,6 +198,34 @@ export interface IQuestionRanking extends IQuestion {
|
|
|
176
198
|
answer: string[];
|
|
177
199
|
rankingAnswer: string[];
|
|
178
200
|
}
|
|
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
|
+
export interface IQuestionSjtTwoAnswer extends IQuestion {
|
|
226
|
+
answer: [string, string];
|
|
227
|
+
sjtTwoAnswer: [string, string];
|
|
228
|
+
}
|
|
179
229
|
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
180
230
|
export interface IQuestionPrescribe extends IQuestion {
|
|
181
231
|
answer: IPrescribeMark[];
|
package/models/Question.js
CHANGED
|
@@ -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.EPsaSectionType = void 0;
|
|
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;
|
|
4
4
|
var EPsaSectionType;
|
|
5
5
|
(function (EPsaSectionType) {
|
|
6
6
|
EPsaSectionType[EPsaSectionType["PRESCRIBING"] = 1] = "PRESCRIBING";
|
|
@@ -12,6 +12,12 @@ var EPsaSectionType;
|
|
|
12
12
|
EPsaSectionType[EPsaSectionType["DRUG_MONITORING"] = 7] = "DRUG_MONITORING";
|
|
13
13
|
EPsaSectionType[EPsaSectionType["DATA_INTERPRETATION"] = 8] = "DATA_INTERPRETATION";
|
|
14
14
|
})(EPsaSectionType = exports.EPsaSectionType || (exports.EPsaSectionType = {}));
|
|
15
|
+
var EVeracityAnswer;
|
|
16
|
+
(function (EVeracityAnswer) {
|
|
17
|
+
EVeracityAnswer["TRUE"] = "a";
|
|
18
|
+
EVeracityAnswer["FALSE"] = "b";
|
|
19
|
+
EVeracityAnswer["UNCERTAIN"] = "c";
|
|
20
|
+
})(EVeracityAnswer = exports.EVeracityAnswer || (exports.EVeracityAnswer = {}));
|
|
15
21
|
var EQuestionType;
|
|
16
22
|
(function (EQuestionType) {
|
|
17
23
|
EQuestionType[EQuestionType["SINGLE_BEST_ANSWER"] = 1] = "SINGLE_BEST_ANSWER";
|
|
@@ -22,6 +28,13 @@ var EQuestionType;
|
|
|
22
28
|
EQuestionType[EQuestionType["SELECT_THREE_ANSWER"] = 6] = "SELECT_THREE_ANSWER";
|
|
23
29
|
EQuestionType[EQuestionType["RANKING_ANSWER"] = 7] = "RANKING_ANSWER";
|
|
24
30
|
EQuestionType[EQuestionType["SBA_WITH_MULTIPLE_CHOICES"] = 8] = "SBA_WITH_MULTIPLE_CHOICES";
|
|
31
|
+
EQuestionType[EQuestionType["VERBAL_VERACITY"] = 9] = "VERBAL_VERACITY";
|
|
32
|
+
EQuestionType[EQuestionType["VERBAL_READING_COMPREHENSION"] = 10] = "VERBAL_READING_COMPREHENSION";
|
|
33
|
+
EQuestionType[EQuestionType["QUANTITATIVE_REASONING_SBA"] = 11] = "QUANTITATIVE_REASONING_SBA";
|
|
34
|
+
EQuestionType[EQuestionType["DECISION_MAKING_SBA"] = 12] = "DECISION_MAKING_SBA";
|
|
35
|
+
EQuestionType[EQuestionType["DECISION_MAKING_YES_NO"] = 13] = "DECISION_MAKING_YES_NO";
|
|
36
|
+
EQuestionType[EQuestionType["SJT_SINGLE_CHOICE"] = 14] = "SJT_SINGLE_CHOICE";
|
|
37
|
+
EQuestionType[EQuestionType["SJT_TWO_ANSWERS"] = 15] = "SJT_TWO_ANSWERS";
|
|
25
38
|
})(EQuestionType = exports.EQuestionType || (exports.EQuestionType = {}));
|
|
26
39
|
var EQuestionLike;
|
|
27
40
|
(function (EQuestionLike) {
|
package/models/Ucat.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export interface ITheme {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
public: boolean;
|
|
13
|
+
entitlementId: EEntitlementType;
|
|
14
|
+
entitlement?: IEntitlement;
|
|
15
|
+
createdAt: number | Date;
|
|
16
|
+
updatedAt: number | Date;
|
|
17
|
+
}
|
package/models/Ucat.js
ADDED
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __exportStar(require("./Todo"), exports);
|
|
|
47
47
|
__exportStar(require("./Token"), exports);
|
|
48
48
|
__exportStar(require("./Topic"), exports);
|
|
49
49
|
__exportStar(require("./Type"), exports);
|
|
50
|
+
__exportStar(require("./Ucat"), exports);
|
|
50
51
|
__exportStar(require("./UkmlaTopic"), exports);
|
|
51
52
|
__exportStar(require("./University"), exports);
|
|
52
53
|
__exportStar(require("./User"), exports);
|
package/package.json
CHANGED
package/resolvers/enums.d.ts
CHANGED
package/resolvers/enums.js
CHANGED
|
@@ -27,6 +27,14 @@ export interface IValidateQuestionsVar {
|
|
|
27
27
|
}
|
|
28
28
|
export type IValidateQuestionsData = AdminData<IContentResult, 'validateQuestions'>;
|
|
29
29
|
export declare const VALIDATE_QUESTIONS: import("@apollo/client").DocumentNode;
|
|
30
|
+
export interface IUcatQueOptions extends IContentArgs {
|
|
31
|
+
entitlementId: EEntitlementType;
|
|
32
|
+
}
|
|
33
|
+
export interface IValidateUcatQuestionsVar {
|
|
34
|
+
input: IUcatQueOptions;
|
|
35
|
+
}
|
|
36
|
+
export type IValidateUcatQuestionsData = AdminData<IContentResult, 'validateUcatQuestions'>;
|
|
37
|
+
export declare const VALIDATE_UCAT_QUESTIONS: import("@apollo/client").DocumentNode;
|
|
30
38
|
export interface IMockOptions extends IContentArgs {
|
|
31
39
|
mockTypeId: EMockTestType;
|
|
32
40
|
topicTypeId: ETopicType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REDIS_CALL = exports.GET_PRODUCT_TRANSACTIONS = exports.CONTACT_SYNC_STATUS = exports.CONTACT_SYNC = exports.CLONE_CONTENT = exports.DELETE_IMAGES = exports.QUEUE_STATUS = exports.DELETE_RECORDS = exports.DOWNLOAD_IMAGES = exports.UPLOAD_FILES = exports.DELETE_FILES = exports.ES3Folder = exports.UPLOAD_IMAGES = exports.PUBLIC_BATCH = exports.UPDATE_BATCH = exports.IMPORT_BATCH = exports.VALIDATE_MOCKTEST = exports.VALIDATE_QUESTIONS = exports.VALIDATE_STATIONS = exports.VALIDATE_BOOK = void 0;
|
|
3
|
+
exports.REDIS_CALL = exports.GET_PRODUCT_TRANSACTIONS = exports.CONTACT_SYNC_STATUS = exports.CONTACT_SYNC = exports.CLONE_CONTENT = exports.DELETE_IMAGES = exports.QUEUE_STATUS = exports.DELETE_RECORDS = exports.DOWNLOAD_IMAGES = exports.UPLOAD_FILES = exports.DELETE_FILES = exports.ES3Folder = exports.UPLOAD_IMAGES = exports.PUBLIC_BATCH = exports.UPDATE_BATCH = exports.IMPORT_BATCH = exports.VALIDATE_MOCKTEST = exports.VALIDATE_UCAT_QUESTIONS = exports.VALIDATE_QUESTIONS = exports.VALIDATE_STATIONS = exports.VALIDATE_BOOK = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.VALIDATE_BOOK = (0, client_1.gql) `
|
|
6
6
|
mutation ValidateBook($input: ValidateBookInput!) {
|
|
@@ -41,6 +41,19 @@ exports.VALIDATE_QUESTIONS = (0, client_1.gql) `
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
44
|
+
exports.VALIDATE_UCAT_QUESTIONS = (0, client_1.gql) `
|
|
45
|
+
mutation ValidateUcatQuestions($input: ValidateUcatQuestionInput!) {
|
|
46
|
+
admin {
|
|
47
|
+
validateUcatQuestions(input: $input) {
|
|
48
|
+
batchId
|
|
49
|
+
logFile
|
|
50
|
+
status
|
|
51
|
+
message
|
|
52
|
+
errors
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
44
57
|
exports.VALIDATE_MOCKTEST = (0, client_1.gql) `
|
|
45
58
|
mutation validateMockTest($input: ValidateMockTestInput!) {
|
|
46
59
|
admin {
|
|
@@ -40,6 +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]: 'QuestionVerbalComprehension',
|
|
44
|
+
[models_1.EQuestionType.VERBAL_VERACITY]: 'QuestionVerbalVeracity',
|
|
45
|
+
[models_1.EQuestionType.DECISION_MAKING_SBA]: 'QuestionDecisionMakingSBA',
|
|
46
|
+
[models_1.EQuestionType.DECISION_MAKING_YES_NO]: 'QuestionDecisionMakingYesNo',
|
|
47
|
+
[models_1.EQuestionType.QUANTITATIVE_REASONING_SBA]: 'QuestionQuantitativeReasoningSBA',
|
|
48
|
+
[models_1.EQuestionType.SJT_SINGLE_CHOICE]: 'QuestionSJTSingleChoice',
|
|
49
|
+
[models_1.EQuestionType.SJT_TWO_ANSWERS]: 'QuestionSJTTwoAnswers',
|
|
43
50
|
};
|
|
44
51
|
return mappedObj[typeId] ?? 'QuestionSBA';
|
|
45
52
|
};
|
|
@@ -36,6 +36,7 @@ export type IEarningsVar = {
|
|
|
36
36
|
subType: ESubType;
|
|
37
37
|
source: ESubSource;
|
|
38
38
|
universityId: number | null;
|
|
39
|
+
useNetEarning: boolean;
|
|
39
40
|
};
|
|
40
41
|
export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
|
|
41
42
|
export declare const USER_STATUS: import("@apollo/client").DocumentNode;
|
|
@@ -133,6 +134,7 @@ export type IEarningsGraphVar = {
|
|
|
133
134
|
source: ESubSource;
|
|
134
135
|
universityId: number | null;
|
|
135
136
|
force: boolean;
|
|
137
|
+
useNetEarning: boolean;
|
|
136
138
|
};
|
|
137
139
|
export type IEarningsGraphData = AdminData<Array<ITimeSeriesData>, 'earningsGraph'>;
|
|
138
140
|
export declare const QUESTION_STATS: import("@apollo/client").DocumentNode;
|
|
@@ -24,6 +24,7 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
24
24
|
$force: Boolean!
|
|
25
25
|
$source: Int
|
|
26
26
|
$universityId: Int
|
|
27
|
+
$useNetEarning: Boolean
|
|
27
28
|
) {
|
|
28
29
|
admin {
|
|
29
30
|
earnings(
|
|
@@ -34,6 +35,7 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
34
35
|
to: $to
|
|
35
36
|
force: $force
|
|
36
37
|
source: $source
|
|
38
|
+
useNetEarning: $useNetEarning
|
|
37
39
|
) {
|
|
38
40
|
entitlement {
|
|
39
41
|
id
|
|
@@ -182,6 +184,7 @@ exports.EARNINGS_GRAPH = (0, client_1.gql) `
|
|
|
182
184
|
$source: Int
|
|
183
185
|
$universityId: Int
|
|
184
186
|
$force: Boolean
|
|
187
|
+
$useNetEarning: Boolean
|
|
185
188
|
) {
|
|
186
189
|
admin {
|
|
187
190
|
earningsGraph(
|
|
@@ -191,6 +194,7 @@ exports.EARNINGS_GRAPH = (0, client_1.gql) `
|
|
|
191
194
|
source: $source
|
|
192
195
|
universityId: $universityId
|
|
193
196
|
force: $force
|
|
197
|
+
useNetEarning: $useNetEarning
|
|
194
198
|
) {
|
|
195
199
|
month
|
|
196
200
|
count
|
package/utils/commonFunctions.js
CHANGED
|
@@ -54,6 +54,11 @@ function correctMark(mark) {
|
|
|
54
54
|
if ([
|
|
55
55
|
models_1.EQuestionType.SINGLE_BEST_ANSWER,
|
|
56
56
|
models_1.EQuestionType.SBA_WITH_MULTIPLE_CHOICES,
|
|
57
|
+
models_1.EQuestionType.VERBAL_VERACITY,
|
|
58
|
+
models_1.EQuestionType.VERBAL_READING_COMPREHENSION,
|
|
59
|
+
models_1.EQuestionType.DECISION_MAKING_SBA,
|
|
60
|
+
models_1.EQuestionType.QUANTITATIVE_REASONING_SBA,
|
|
61
|
+
models_1.EQuestionType.SJT_SINGLE_CHOICE,
|
|
57
62
|
].includes(mark.question.typeId)) {
|
|
58
63
|
const answer = flatAnswer;
|
|
59
64
|
const attempt = flatAttempt;
|
|
@@ -79,7 +84,10 @@ function correctMark(mark) {
|
|
|
79
84
|
data.incorrect = true;
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
|
-
else if (
|
|
87
|
+
else if ([
|
|
88
|
+
models_1.EQuestionType.MULTIPLE_ANSWERS,
|
|
89
|
+
models_1.EQuestionType.DECISION_MAKING_YES_NO,
|
|
90
|
+
].includes(mark.question.typeId)) {
|
|
83
91
|
const [answerA, answerB] = answer.map((x) => x.sort());
|
|
84
92
|
let [attemptA, attemptB] = [[], []];
|
|
85
93
|
if (Array.isArray(jsonAnswer) &&
|
|
@@ -182,6 +190,19 @@ function correctMark(mark) {
|
|
|
182
190
|
}
|
|
183
191
|
}
|
|
184
192
|
}
|
|
193
|
+
else if (models_1.EQuestionType.SJT_TWO_ANSWERS === mark.question.typeId) {
|
|
194
|
+
const twoAnswer = answer;
|
|
195
|
+
const attempt = jsonAnswer;
|
|
196
|
+
if (twoAnswer.length !== 2 || attempt.length !== 2) {
|
|
197
|
+
data.incorrect = true;
|
|
198
|
+
}
|
|
199
|
+
else if (twoAnswer.join(',') !== attempt.join(',')) {
|
|
200
|
+
data.incorrect = true;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
data.correct = true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
185
206
|
}
|
|
186
207
|
catch (e) {
|
|
187
208
|
console.error(e);
|