@quesmed/types-rn 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.
@@ -106,7 +106,8 @@ export declare enum EAppType {
106
106
  MRCP = 3,
107
107
  INTERVIEW = 4,
108
108
  MSRA = 5,
109
- PLAB = 6
109
+ PLAB = 6,
110
+ UCAT = 7
110
111
  }
111
112
  export declare enum EProductDuration {
112
113
  ALL = 0,
package/models/Product.js CHANGED
@@ -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 | IQuestionVerbalVeracity | IQuestionVerbalReading | IQuestionDecisionSBA | IQuestionDecisionYesNo | IQuestionQuantitativeSBA | IQuestionSjtSingleChoice | IQuestionSjtTwoAnswer;
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?: Pick<IChapter, 'id' | 'explanation'>;
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 data.typeId === EQuestionType.MULTIPLE_ANSWERS;
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
  }
package/models/Ucat.d.ts CHANGED
@@ -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;
package/models/User.d.ts CHANGED
@@ -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/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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.132",
3
+ "version": "2.6.133",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -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
@@ -125,6 +125,9 @@ exports.USER_FIELDS = (0, client_1.gql) `
125
125
  plab1SubscriptionEndDate
126
126
  plab2SubscriptionEndDate
127
127
 
128
+ # ucat
129
+ ucatSubscriptionEndDate
130
+
128
131
  # user-specific keys
129
132
  # marksheets
130
133
  # marksheetsCount
@@ -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]: '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
+ [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
  };