@quesmed/types-rn 2.6.19 → 2.6.21
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/models/Marksheet.d.ts +2 -2
- package/models/Psa.d.ts +0 -6
- package/models/Question.d.ts +10 -12
- package/models/Question.js +0 -2
- package/models/User.d.ts +2 -3
- package/package.json +1 -1
- package/resolvers/mutation/restricted/questionDiscussion.js +0 -6
- package/resolvers/query/restricted/marksheet.js +3 -1066
- package/utils/commonFunctions.d.ts +2 -3
- package/utils/commonFunctions.js +23 -191
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/object.d.ts +1 -0
- package/utils/object.js +20 -0
package/models/Marksheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IBuildConfigData, IPreBuildMarksheet } from '../resolvers/mutation/restricted/marksheet';
|
|
2
2
|
import { EProductType } from './Product';
|
|
3
|
-
import {
|
|
3
|
+
import { IPrescribeMark, IQuestion, IQuestionChoice, IQuestionQAAnswer } from './Question';
|
|
4
4
|
import { ETopicType } from './Topic';
|
|
5
5
|
import { Id } from './Type';
|
|
6
6
|
import { IUser } from './User';
|
|
@@ -92,7 +92,7 @@ export interface IMarksheet {
|
|
|
92
92
|
builderConfig?: IBuildConfigData;
|
|
93
93
|
productId: EProductType;
|
|
94
94
|
}
|
|
95
|
-
export type IMarksheetMarkJSONB = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] |
|
|
95
|
+
export type IMarksheetMarkJSONB = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | [IPrescribeMark] | null;
|
|
96
96
|
export interface IMarksheetMark {
|
|
97
97
|
id: Id;
|
|
98
98
|
createdAt: number | Date;
|
package/models/Psa.d.ts
CHANGED
|
@@ -16,21 +16,15 @@ export interface IQuestionPrescription {
|
|
|
16
16
|
id: Id;
|
|
17
17
|
questionId: Id;
|
|
18
18
|
doseId: Id;
|
|
19
|
-
doseDisplay: string;
|
|
20
19
|
doseVisible: boolean;
|
|
21
20
|
drugId: Id;
|
|
22
|
-
drugDisplay: string;
|
|
23
21
|
drugVisible: boolean;
|
|
24
22
|
routeId: Id;
|
|
25
|
-
routeDisplay: string;
|
|
26
23
|
routeVisible: boolean;
|
|
27
24
|
frequencyId: Id;
|
|
28
|
-
frequencyDisplay: string;
|
|
29
25
|
frequencyVisible: boolean;
|
|
30
26
|
durationId: Id;
|
|
31
|
-
durationDisplay: string;
|
|
32
27
|
durationVisible: boolean;
|
|
33
28
|
unitId: Id;
|
|
34
|
-
unitDisplay: string;
|
|
35
29
|
unitVisible: boolean;
|
|
36
30
|
}
|
package/models/Question.d.ts
CHANGED
|
@@ -25,9 +25,7 @@ export declare enum EQuestionType {
|
|
|
25
25
|
PRESCRIPTION_ANSWER = 4,
|
|
26
26
|
EXTENDED_MATCHING_ANSWER = 5,
|
|
27
27
|
SELECT_THREE_ANSWER = 6,
|
|
28
|
-
RANKING_ANSWER = 7
|
|
29
|
-
MRCP_PART_1 = 8,
|
|
30
|
-
MRCP_PART_2 = 9
|
|
28
|
+
RANKING_ANSWER = 7
|
|
31
29
|
}
|
|
32
30
|
export declare enum EQuestionLike {
|
|
33
31
|
NONE = 0,
|
|
@@ -62,7 +60,7 @@ export interface IQuestionCommentLike {
|
|
|
62
60
|
comment: IQuestionComment;
|
|
63
61
|
likeTrueDislikeFalse: boolean;
|
|
64
62
|
}
|
|
65
|
-
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] |
|
|
63
|
+
export type IQuestionAnswer = string | [string] | [IQuestionQAAnswer] | [string[], string[]] | IPrescribeMark[] | [string, string][] | [string, string, string] | string[];
|
|
66
64
|
export type IQuestionAll = IQuestion | IQuestionSBA | IQuestionQA | IQuestionMultiQ | IQuestionPrescribe | IQuestionEMQ | IQuestionSelect3 | IQuestionRanking;
|
|
67
65
|
export interface IQuestion {
|
|
68
66
|
id: Id;
|
|
@@ -197,8 +195,8 @@ export interface IQuestionRanking extends IQuestion {
|
|
|
197
195
|
}
|
|
198
196
|
export declare function isQuestionPrescribe(data: IQuestionAll): data is IQuestionPrescribe;
|
|
199
197
|
export interface IQuestionPrescribe extends IQuestion {
|
|
200
|
-
answer:
|
|
201
|
-
prescribeAnswer:
|
|
198
|
+
answer: IPrescribeMark[];
|
|
199
|
+
prescribeAnswer: IQuestionPrescription[];
|
|
202
200
|
}
|
|
203
201
|
export type IPrescribeAnswerData<T> = {
|
|
204
202
|
value: T;
|
|
@@ -213,10 +211,10 @@ export interface IPrescribeAnswer {
|
|
|
213
211
|
duration: IPrescribeAnswerData<string>;
|
|
214
212
|
}
|
|
215
213
|
export interface IPrescribeMark {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
214
|
+
drugId: number;
|
|
215
|
+
doseId: number;
|
|
216
|
+
unitId: number;
|
|
217
|
+
routeId: number;
|
|
218
|
+
frequencyId: number;
|
|
219
|
+
durationId: number;
|
|
222
220
|
}
|
package/models/Question.js
CHANGED
|
@@ -21,8 +21,6 @@ var EQuestionType;
|
|
|
21
21
|
EQuestionType[EQuestionType["EXTENDED_MATCHING_ANSWER"] = 5] = "EXTENDED_MATCHING_ANSWER";
|
|
22
22
|
EQuestionType[EQuestionType["SELECT_THREE_ANSWER"] = 6] = "SELECT_THREE_ANSWER";
|
|
23
23
|
EQuestionType[EQuestionType["RANKING_ANSWER"] = 7] = "RANKING_ANSWER";
|
|
24
|
-
EQuestionType[EQuestionType["MRCP_PART_1"] = 8] = "MRCP_PART_1";
|
|
25
|
-
EQuestionType[EQuestionType["MRCP_PART_2"] = 9] = "MRCP_PART_2";
|
|
26
24
|
})(EQuestionType = exports.EQuestionType || (exports.EQuestionType = {}));
|
|
27
25
|
var EQuestionLike;
|
|
28
26
|
(function (EQuestionLike) {
|
package/models/User.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ICard } from './Card';
|
|
2
2
|
import { IConcept } from './Concept';
|
|
3
|
-
import { IMarksheet
|
|
3
|
+
import { IMarksheet } from './Marksheet';
|
|
4
4
|
import { INotification } from './Notification';
|
|
5
5
|
import { IOsceStation } from './OsceStation';
|
|
6
6
|
import { IQuestion, IQuestionHighlights } from './Question';
|
|
@@ -168,10 +168,9 @@ export interface IUserFlaggedQuestion {
|
|
|
168
168
|
updatedAt: number | Date;
|
|
169
169
|
deletedAt: number | Date;
|
|
170
170
|
questionId: Id;
|
|
171
|
-
question: IQuestion
|
|
171
|
+
question: Pick<IQuestion, 'id' | 'question' | 'conceptId' | 'typeId' | 'concept'>;
|
|
172
172
|
userId: Id;
|
|
173
173
|
markId: Id;
|
|
174
|
-
mark: IMarksheetMark;
|
|
175
174
|
}
|
|
176
175
|
export interface IUserProgress {
|
|
177
176
|
id: Id;
|
package/package.json
CHANGED
|
@@ -436,8 +436,6 @@ const getQuestionHighlightsFragment = (typeId) => {
|
|
|
436
436
|
case models_1.EQuestionType.RANKING_ANSWER:
|
|
437
437
|
return exports.QUESTION_RANKING_HIGHLIGHT_FIELDS;
|
|
438
438
|
case models_1.EQuestionType.SINGLE_BEST_ANSWER:
|
|
439
|
-
case models_1.EQuestionType.MRCP_PART_1:
|
|
440
|
-
case models_1.EQuestionType.MRCP_PART_2:
|
|
441
439
|
default:
|
|
442
440
|
return exports.QUESTION_SBA_HIGHLIGHT_FIELDS;
|
|
443
441
|
}
|
|
@@ -458,8 +456,6 @@ const getQuestionTypeName = (typeId) => {
|
|
|
458
456
|
case models_1.EQuestionType.RANKING_ANSWER:
|
|
459
457
|
return 'QuestionRanking';
|
|
460
458
|
case models_1.EQuestionType.SINGLE_BEST_ANSWER:
|
|
461
|
-
case models_1.EQuestionType.MRCP_PART_1:
|
|
462
|
-
case models_1.EQuestionType.MRCP_PART_2:
|
|
463
459
|
default:
|
|
464
460
|
return 'QuestionSBA';
|
|
465
461
|
}
|
|
@@ -480,8 +476,6 @@ const getQuestionFragment = (typeId) => {
|
|
|
480
476
|
case models_1.EQuestionType.RANKING_ANSWER:
|
|
481
477
|
return exports.QUESTION_RANKING_COMMENT_FIELDS;
|
|
482
478
|
case models_1.EQuestionType.SINGLE_BEST_ANSWER:
|
|
483
|
-
case models_1.EQuestionType.MRCP_PART_1:
|
|
484
|
-
case models_1.EQuestionType.MRCP_PART_2:
|
|
485
479
|
default:
|
|
486
480
|
return exports.QUESTION_SBA_COMMENT_FIELDS;
|
|
487
481
|
}
|