@quesmed/types-rn 2.6.160 → 2.6.162
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/Job.d.ts +4 -1
- package/models/Job.js +5 -2
- package/package.json +1 -1
package/models/Job.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EMockTestType } from './MockTest';
|
|
2
2
|
import { IPicture } from './Picture';
|
|
3
3
|
import { EEntitlementType, EProductType } from './Product';
|
|
4
|
-
import { EQuestionType, IQuestionChoice } from './Question';
|
|
4
|
+
import { EQuestionType, IQuestionAnswer, IQuestionChoice } from './Question';
|
|
5
5
|
import { IUser } from './User';
|
|
6
6
|
export declare enum EJobPriority {
|
|
7
7
|
LOW = 1,
|
|
@@ -96,6 +96,8 @@ export interface IJobRecordQuestion {
|
|
|
96
96
|
conceptId?: number | null;
|
|
97
97
|
explanation?: string | null;
|
|
98
98
|
learningPoint?: string | null;
|
|
99
|
+
answer: Exclude<IQuestionAnswer, 'string'>;
|
|
100
|
+
themes?: number[];
|
|
99
101
|
entitlementIds?: EEntitlementType[];
|
|
100
102
|
conditionIds?: number[];
|
|
101
103
|
presentationIds?: number[];
|
|
@@ -118,6 +120,7 @@ export interface IJobRecordMockTest {
|
|
|
118
120
|
explanation?: string | null;
|
|
119
121
|
learningPoint?: string | null;
|
|
120
122
|
typeId: EQuestionType;
|
|
123
|
+
answer: Exclude<IQuestionAnswer, 'string'>;
|
|
121
124
|
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
122
125
|
explanation?: IQuestionChoice['explanation'];
|
|
123
126
|
}>;
|
package/models/Job.js
CHANGED
|
@@ -88,11 +88,14 @@ var EJobRole;
|
|
|
88
88
|
EJobRole[EJobRole["SENIOR_EDITOR"] = 3] = "SENIOR_EDITOR";
|
|
89
89
|
})(EJobRole = exports.EJobRole || (exports.EJobRole = {}));
|
|
90
90
|
const IsJobRecordQuestion = (record) => {
|
|
91
|
-
return !!record &&
|
|
91
|
+
return (!!record &&
|
|
92
|
+
typeof record === 'object' &&
|
|
93
|
+
'question' in record &&
|
|
94
|
+
'entitlementIds' in record);
|
|
92
95
|
};
|
|
93
96
|
exports.IsJobRecordQuestion = IsJobRecordQuestion;
|
|
94
97
|
const IsJobRecordMockTest = (record) => {
|
|
95
|
-
return !!record && typeof record === 'object' && '
|
|
98
|
+
return !!record && typeof record === 'object' && 'question' in record;
|
|
96
99
|
};
|
|
97
100
|
exports.IsJobRecordMockTest = IsJobRecordMockTest;
|
|
98
101
|
const IsJobRecordStation = (record) => {
|