@quesmed/types 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.
Files changed (41) hide show
  1. package/dist/cjs/index.d.ts +9 -1
  2. package/dist/cjs/index.js +8 -0
  3. package/dist/cjs/models/Content.d.ts +5 -0
  4. package/dist/cjs/models/OsceStation.d.ts +2 -2
  5. package/dist/cjs/models/Product.d.ts +11 -2
  6. package/dist/cjs/models/Product.js +9 -0
  7. package/dist/cjs/models/Question.d.ts +53 -3
  8. package/dist/cjs/models/Question.js +14 -1
  9. package/dist/cjs/models/Ucat.d.ts +17 -0
  10. package/dist/cjs/models/Ucat.js +2 -0
  11. package/dist/cjs/models/index.d.ts +1 -0
  12. package/dist/cjs/models/index.js +1 -0
  13. package/dist/cjs/resolvers/enums.d.ts +2 -1
  14. package/dist/cjs/resolvers/enums.js +1 -0
  15. package/dist/cjs/resolvers/mutation/admin/content.d.ts +8 -0
  16. package/dist/cjs/resolvers/mutation/admin/content.js +14 -1
  17. package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +7 -0
  18. package/dist/cjs/resolvers/query/admin/dashboard.d.ts +2 -0
  19. package/dist/cjs/resolvers/query/admin/dashboard.js +4 -0
  20. package/dist/cjs/utils/commonFunctions.js +22 -1
  21. package/dist/mjs/index.d.ts +9 -1
  22. package/dist/mjs/index.js +8 -0
  23. package/dist/mjs/models/Content.d.ts +5 -0
  24. package/dist/mjs/models/OsceStation.d.ts +2 -2
  25. package/dist/mjs/models/Product.d.ts +11 -2
  26. package/dist/mjs/models/Product.js +9 -0
  27. package/dist/mjs/models/Question.d.ts +53 -3
  28. package/dist/mjs/models/Question.js +13 -0
  29. package/dist/mjs/models/Ucat.d.ts +17 -0
  30. package/dist/mjs/models/Ucat.js +1 -0
  31. package/dist/mjs/models/index.d.ts +1 -0
  32. package/dist/mjs/models/index.js +1 -0
  33. package/dist/mjs/resolvers/enums.d.ts +2 -1
  34. package/dist/mjs/resolvers/enums.js +1 -0
  35. package/dist/mjs/resolvers/mutation/admin/content.d.ts +8 -0
  36. package/dist/mjs/resolvers/mutation/admin/content.js +13 -0
  37. package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +7 -0
  38. package/dist/mjs/resolvers/query/admin/dashboard.d.ts +2 -0
  39. package/dist/mjs/resolvers/query/admin/dashboard.js +4 -0
  40. package/dist/mjs/utils/commonFunctions.js +22 -1
  41. package/package.json +1 -1
@@ -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/dist/cjs/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',
@@ -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;
@@ -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: Id;
53
+ osceTypeId: EOsceType | EPaceType;
54
54
  entitlement: IEntitlement;
55
55
  osceType?: IOsceType;
56
56
  difficulty: EDifficultyType;
@@ -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;
@@ -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) {
@@ -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[];
@@ -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) {
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -31,6 +31,7 @@ export * from './Todo';
31
31
  export * from './Token';
32
32
  export * from './Topic';
33
33
  export * from './Type';
34
+ export * from './Ucat';
34
35
  export * from './UkmlaTopic';
35
36
  export * from './University';
36
37
  export * from './User';
@@ -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);
@@ -5,5 +5,6 @@ export declare enum ESortOrder {
5
5
  export declare enum DB_TYPE {
6
6
  ALL = 0,
7
7
  FINALS = 1,
8
- MRCP = 2
8
+ MRCP = 2,
9
+ UCAT = 3
9
10
  }
@@ -11,4 +11,5 @@ var DB_TYPE;
11
11
  DB_TYPE[DB_TYPE["ALL"] = 0] = "ALL";
12
12
  DB_TYPE[DB_TYPE["FINALS"] = 1] = "FINALS";
13
13
  DB_TYPE[DB_TYPE["MRCP"] = 2] = "MRCP";
14
+ DB_TYPE[DB_TYPE["UCAT"] = 3] = "UCAT";
14
15
  })(DB_TYPE = exports.DB_TYPE || (exports.DB_TYPE = {}));
@@ -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
@@ -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 (models_1.EQuestionType.MULTIPLE_ANSWERS === mark.question.typeId) {
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);
@@ -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/dist/mjs/index.js CHANGED
@@ -34,6 +34,14 @@ export var EGrammarType;
34
34
  EGrammarType[EGrammarType["RA_QUESTION"] = 11] = "RA_QUESTION";
35
35
  EGrammarType[EGrammarType["PACES"] = 12] = "PACES";
36
36
  EGrammarType[EGrammarType["PACE_TEMPLATE"] = 13] = "PACE_TEMPLATE";
37
+ EGrammarType[EGrammarType["QUESTION_STEM"] = 14] = "QUESTION_STEM";
38
+ EGrammarType[EGrammarType["VERBAL_VERACITY"] = 15] = "VERBAL_VERACITY";
39
+ EGrammarType[EGrammarType["VERBAL_READING_COMPREHENSION"] = 16] = "VERBAL_READING_COMPREHENSION";
40
+ EGrammarType[EGrammarType["QUANTITATIVE_REASONING_SBA"] = 17] = "QUANTITATIVE_REASONING_SBA";
41
+ EGrammarType[EGrammarType["DECISION_MAKING_SBA"] = 18] = "DECISION_MAKING_SBA";
42
+ EGrammarType[EGrammarType["DECISION_MAKING_YES_NO"] = 19] = "DECISION_MAKING_YES_NO";
43
+ EGrammarType[EGrammarType["SJT_SINGLE_CHOICE"] = 20] = "SJT_SINGLE_CHOICE";
44
+ EGrammarType[EGrammarType["SJT_TWO_ANSWERS"] = 21] = "SJT_TWO_ANSWERS";
37
45
  })(EGrammarType || (EGrammarType = {}));
38
46
  export const FCM_TOPICS = {
39
47
  GLOBAL: 'global',
@@ -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;
@@ -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: Id;
53
+ osceTypeId: EOsceType | EPaceType;
54
54
  entitlement: IEntitlement;
55
55
  osceType?: IOsceType;
56
56
  difficulty: EDifficultyType;
@@ -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;
@@ -40,6 +40,11 @@ export var EProductType;
40
40
  EProductType[EProductType["RESPIRATORY"] = 33] = "RESPIRATORY";
41
41
  EProductType[EProductType["PLAB1"] = 34] = "PLAB1";
42
42
  EProductType[EProductType["PLAB2"] = 35] = "PLAB2";
43
+ EProductType[EProductType["UCAT"] = 48] = "UCAT";
44
+ EProductType[EProductType["VERBAL"] = 49] = "VERBAL";
45
+ EProductType[EProductType["DECISION_MAKING"] = 50] = "DECISION_MAKING";
46
+ EProductType[EProductType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
47
+ EProductType[EProductType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
43
48
  })(EProductType || (EProductType = {}));
44
49
  export var EEntitlementType;
45
50
  (function (EEntitlementType) {
@@ -74,6 +79,10 @@ export var EEntitlementType;
74
79
  EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
75
80
  EEntitlementType[EEntitlementType["INTERVIEW_PAEDIATRICS"] = 46] = "INTERVIEW_PAEDIATRICS";
76
81
  EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
82
+ EEntitlementType[EEntitlementType["VERBAL"] = 49] = "VERBAL";
83
+ EEntitlementType[EEntitlementType["DECISION_MAKING"] = 50] = "DECISION_MAKING";
84
+ EEntitlementType[EEntitlementType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
85
+ EEntitlementType[EEntitlementType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
77
86
  })(EEntitlementType || (EEntitlementType = {}));
78
87
  export var EAppType;
79
88
  (function (EAppType) {
@@ -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[];
@@ -9,6 +9,12 @@ export var EPsaSectionType;
9
9
  EPsaSectionType[EPsaSectionType["DRUG_MONITORING"] = 7] = "DRUG_MONITORING";
10
10
  EPsaSectionType[EPsaSectionType["DATA_INTERPRETATION"] = 8] = "DATA_INTERPRETATION";
11
11
  })(EPsaSectionType || (EPsaSectionType = {}));
12
+ export var EVeracityAnswer;
13
+ (function (EVeracityAnswer) {
14
+ EVeracityAnswer["TRUE"] = "a";
15
+ EVeracityAnswer["FALSE"] = "b";
16
+ EVeracityAnswer["UNCERTAIN"] = "c";
17
+ })(EVeracityAnswer || (EVeracityAnswer = {}));
12
18
  export var EQuestionType;
13
19
  (function (EQuestionType) {
14
20
  EQuestionType[EQuestionType["SINGLE_BEST_ANSWER"] = 1] = "SINGLE_BEST_ANSWER";
@@ -19,6 +25,13 @@ export var EQuestionType;
19
25
  EQuestionType[EQuestionType["SELECT_THREE_ANSWER"] = 6] = "SELECT_THREE_ANSWER";
20
26
  EQuestionType[EQuestionType["RANKING_ANSWER"] = 7] = "RANKING_ANSWER";
21
27
  EQuestionType[EQuestionType["SBA_WITH_MULTIPLE_CHOICES"] = 8] = "SBA_WITH_MULTIPLE_CHOICES";
28
+ EQuestionType[EQuestionType["VERBAL_VERACITY"] = 9] = "VERBAL_VERACITY";
29
+ EQuestionType[EQuestionType["VERBAL_READING_COMPREHENSION"] = 10] = "VERBAL_READING_COMPREHENSION";
30
+ EQuestionType[EQuestionType["QUANTITATIVE_REASONING_SBA"] = 11] = "QUANTITATIVE_REASONING_SBA";
31
+ EQuestionType[EQuestionType["DECISION_MAKING_SBA"] = 12] = "DECISION_MAKING_SBA";
32
+ EQuestionType[EQuestionType["DECISION_MAKING_YES_NO"] = 13] = "DECISION_MAKING_YES_NO";
33
+ EQuestionType[EQuestionType["SJT_SINGLE_CHOICE"] = 14] = "SJT_SINGLE_CHOICE";
34
+ EQuestionType[EQuestionType["SJT_TWO_ANSWERS"] = 15] = "SJT_TWO_ANSWERS";
22
35
  })(EQuestionType || (EQuestionType = {}));
23
36
  export var EQuestionLike;
24
37
  (function (EQuestionLike) {
@@ -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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -31,6 +31,7 @@ export * from './Todo';
31
31
  export * from './Token';
32
32
  export * from './Topic';
33
33
  export * from './Type';
34
+ export * from './Ucat';
34
35
  export * from './UkmlaTopic';
35
36
  export * from './University';
36
37
  export * from './User';
@@ -31,6 +31,7 @@ export * from './Todo';
31
31
  export * from './Token';
32
32
  export * from './Topic';
33
33
  export * from './Type';
34
+ export * from './Ucat';
34
35
  export * from './UkmlaTopic';
35
36
  export * from './University';
36
37
  export * from './User';
@@ -5,5 +5,6 @@ export declare enum ESortOrder {
5
5
  export declare enum DB_TYPE {
6
6
  ALL = 0,
7
7
  FINALS = 1,
8
- MRCP = 2
8
+ MRCP = 2,
9
+ UCAT = 3
9
10
  }
@@ -8,4 +8,5 @@ export var DB_TYPE;
8
8
  DB_TYPE[DB_TYPE["ALL"] = 0] = "ALL";
9
9
  DB_TYPE[DB_TYPE["FINALS"] = 1] = "FINALS";
10
10
  DB_TYPE[DB_TYPE["MRCP"] = 2] = "MRCP";
11
+ DB_TYPE[DB_TYPE["UCAT"] = 3] = "UCAT";
11
12
  })(DB_TYPE || (DB_TYPE = {}));
@@ -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;
@@ -38,6 +38,19 @@ export const VALIDATE_QUESTIONS = gql `
38
38
  }
39
39
  }
40
40
  `;
41
+ export const VALIDATE_UCAT_QUESTIONS = gql `
42
+ mutation ValidateUcatQuestions($input: ValidateUcatQuestionInput!) {
43
+ admin {
44
+ validateUcatQuestions(input: $input) {
45
+ batchId
46
+ logFile
47
+ status
48
+ message
49
+ errors
50
+ }
51
+ }
52
+ }
53
+ `;
41
54
  export const VALIDATE_MOCKTEST = gql `
42
55
  mutation validateMockTest($input: ValidateMockTestInput!) {
43
56
  admin {
@@ -36,6 +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]: 'QuestionVerbalComprehension',
40
+ [EQuestionType.VERBAL_VERACITY]: 'QuestionVerbalVeracity',
41
+ [EQuestionType.DECISION_MAKING_SBA]: 'QuestionDecisionMakingSBA',
42
+ [EQuestionType.DECISION_MAKING_YES_NO]: 'QuestionDecisionMakingYesNo',
43
+ [EQuestionType.QUANTITATIVE_REASONING_SBA]: 'QuestionQuantitativeReasoningSBA',
44
+ [EQuestionType.SJT_SINGLE_CHOICE]: 'QuestionSJTSingleChoice',
45
+ [EQuestionType.SJT_TWO_ANSWERS]: 'QuestionSJTTwoAnswers',
39
46
  };
40
47
  return mappedObj[typeId] ?? 'QuestionSBA';
41
48
  };
@@ -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;
@@ -21,6 +21,7 @@ export const EARNINGS = gql `
21
21
  $force: Boolean!
22
22
  $source: Int
23
23
  $universityId: Int
24
+ $useNetEarning: Boolean
24
25
  ) {
25
26
  admin {
26
27
  earnings(
@@ -31,6 +32,7 @@ export const EARNINGS = gql `
31
32
  to: $to
32
33
  force: $force
33
34
  source: $source
35
+ useNetEarning: $useNetEarning
34
36
  ) {
35
37
  entitlement {
36
38
  id
@@ -179,6 +181,7 @@ export const EARNINGS_GRAPH = gql `
179
181
  $source: Int
180
182
  $universityId: Int
181
183
  $force: Boolean
184
+ $useNetEarning: Boolean
182
185
  ) {
183
186
  admin {
184
187
  earningsGraph(
@@ -188,6 +191,7 @@ export const EARNINGS_GRAPH = gql `
188
191
  source: $source
189
192
  universityId: $universityId
190
193
  force: $force
194
+ useNetEarning: $useNetEarning
191
195
  ) {
192
196
  month
193
197
  count
@@ -49,6 +49,11 @@ export function correctMark(mark) {
49
49
  if ([
50
50
  EQuestionType.SINGLE_BEST_ANSWER,
51
51
  EQuestionType.SBA_WITH_MULTIPLE_CHOICES,
52
+ EQuestionType.VERBAL_VERACITY,
53
+ EQuestionType.VERBAL_READING_COMPREHENSION,
54
+ EQuestionType.DECISION_MAKING_SBA,
55
+ EQuestionType.QUANTITATIVE_REASONING_SBA,
56
+ EQuestionType.SJT_SINGLE_CHOICE,
52
57
  ].includes(mark.question.typeId)) {
53
58
  const answer = flatAnswer;
54
59
  const attempt = flatAttempt;
@@ -74,7 +79,10 @@ export function correctMark(mark) {
74
79
  data.incorrect = true;
75
80
  }
76
81
  }
77
- else if (EQuestionType.MULTIPLE_ANSWERS === mark.question.typeId) {
82
+ else if ([
83
+ EQuestionType.MULTIPLE_ANSWERS,
84
+ EQuestionType.DECISION_MAKING_YES_NO,
85
+ ].includes(mark.question.typeId)) {
78
86
  const [answerA, answerB] = answer.map((x) => x.sort());
79
87
  let [attemptA, attemptB] = [[], []];
80
88
  if (Array.isArray(jsonAnswer) &&
@@ -177,6 +185,19 @@ export function correctMark(mark) {
177
185
  }
178
186
  }
179
187
  }
188
+ else if (EQuestionType.SJT_TWO_ANSWERS === mark.question.typeId) {
189
+ const twoAnswer = answer;
190
+ const attempt = jsonAnswer;
191
+ if (twoAnswer.length !== 2 || attempt.length !== 2) {
192
+ data.incorrect = true;
193
+ }
194
+ else if (twoAnswer.join(',') !== attempt.join(',')) {
195
+ data.incorrect = true;
196
+ }
197
+ else {
198
+ data.correct = true;
199
+ }
200
+ }
180
201
  }
181
202
  catch (e) {
182
203
  console.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.128",
3
+ "version": "2.6.130",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",