@quesmed/types-rn 2.6.219 → 2.6.221
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 +15 -11
- package/models/Job.js +1 -0
- package/models/Psa.d.ts +1 -0
- package/models/Question.d.ts +3 -3
- package/package.json +1 -1
- package/resolvers/fragments/question.d.ts +0 -1
- package/resolvers/fragments/question.js +4 -14
- package/resolvers/fragments/record.d.ts +0 -1
- package/resolvers/fragments/record.js +1 -22
- package/resolvers/mutation/admin/question.d.ts +1 -0
- package/resolvers/query/admin/index.d.ts +0 -1
- package/resolvers/query/admin/index.js +0 -1
- package/resolvers/query/admin/question.d.ts +0 -7
- package/resolvers/query/admin/question.js +0 -131
package/models/Job.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Id } from '../models';
|
|
1
|
+
import { IChapter, IOsceStation, IQuestionPrescription, Id } from '../models';
|
|
2
2
|
import { EMockTestType } from './MockTest';
|
|
3
3
|
import { IPicture } from './Picture';
|
|
4
4
|
import { EEntitlementType, EProductType } from './Product';
|
|
5
|
-
import { EQuestionType, IQuestionAnswer, IQuestionChoice, IQuestionComment } from './Question';
|
|
5
|
+
import { EQuestionType, IQuestion, IQuestionAnswer, IQuestionCase, IQuestionChoice, IQuestionComment } from './Question';
|
|
6
6
|
import { IUser } from './User';
|
|
7
7
|
export declare enum EJobPriority {
|
|
8
8
|
LOW = 1,
|
|
@@ -62,7 +62,8 @@ export declare enum ELightGalleryType {
|
|
|
62
62
|
EXAMINER = 6,
|
|
63
63
|
CANDIDATE = 7,
|
|
64
64
|
WALKTHROUGH = 8,
|
|
65
|
-
ACTOR = 9
|
|
65
|
+
ACTOR = 9,
|
|
66
|
+
CHOICE_EXPLANATION = 10
|
|
66
67
|
}
|
|
67
68
|
export declare enum EJobRemarkStatus {
|
|
68
69
|
ALL = 0,
|
|
@@ -130,6 +131,10 @@ export interface IJobRecordQuestion {
|
|
|
130
131
|
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
131
132
|
explanation?: IQuestionChoice['explanation'];
|
|
132
133
|
}>;
|
|
134
|
+
prescriptions?: Array<Omit<IQuestionPrescription, 'id'>>;
|
|
135
|
+
cases?: Array<Pick<IQuestionCase, 'label' | 'case'> & {
|
|
136
|
+
explanation?: IQuestionCase['explanation'];
|
|
137
|
+
}>;
|
|
133
138
|
irtParameters?: IRTParameters | null;
|
|
134
139
|
}
|
|
135
140
|
export interface IJobRecordChapter {
|
|
@@ -157,6 +162,10 @@ export interface IJobRecordMockTest {
|
|
|
157
162
|
choices: Array<Pick<IQuestionChoice, 'label' | 'name' | 'answer'> & {
|
|
158
163
|
explanation?: IQuestionChoice['explanation'];
|
|
159
164
|
}>;
|
|
165
|
+
prescriptions?: Array<Omit<IQuestionPrescription, 'id'>>;
|
|
166
|
+
cases?: Array<Pick<IQuestionCase, 'label' | 'case'> & {
|
|
167
|
+
explanation?: IQuestionCase['explanation'];
|
|
168
|
+
}>;
|
|
160
169
|
irtParameters?: IRTParameters | null;
|
|
161
170
|
}
|
|
162
171
|
export interface IJobRecordMetricsSummary {
|
|
@@ -171,12 +180,6 @@ export interface IJobRecordMetricsSummary {
|
|
|
171
180
|
dislikes: number;
|
|
172
181
|
public: boolean;
|
|
173
182
|
}
|
|
174
|
-
export interface IJobRecordChoiceVote {
|
|
175
|
-
id: Id;
|
|
176
|
-
label: string;
|
|
177
|
-
votes: number;
|
|
178
|
-
percentage: number;
|
|
179
|
-
}
|
|
180
183
|
export interface IJobRecordChoiceSummary {
|
|
181
184
|
id: Id;
|
|
182
185
|
label: string;
|
|
@@ -197,12 +200,13 @@ export interface IJobRecord {
|
|
|
197
200
|
createdBy: IUser['id'];
|
|
198
201
|
createdByUser: Pick<IUser, 'id' | 'firstName' | 'lastName' | 'username' | 'accessLevel'>;
|
|
199
202
|
questionId: number | null;
|
|
203
|
+
question?: IQuestion;
|
|
200
204
|
stationId: number | null;
|
|
205
|
+
station?: IOsceStation;
|
|
201
206
|
chapterId: number | null;
|
|
207
|
+
chapter?: IChapter;
|
|
202
208
|
remarks: IJobRemark[];
|
|
203
209
|
assets: IJobAsset[];
|
|
204
|
-
metricsSummary: IJobRecordMetricsSummary | null;
|
|
205
|
-
choiceSummary: IJobRecordChoiceSummary[] | null;
|
|
206
210
|
referenceCount: number;
|
|
207
211
|
}
|
|
208
212
|
export interface IJobMetaData {
|
package/models/Job.js
CHANGED
|
@@ -91,6 +91,7 @@ var ELightGalleryType;
|
|
|
91
91
|
ELightGalleryType[ELightGalleryType["CANDIDATE"] = 7] = "CANDIDATE";
|
|
92
92
|
ELightGalleryType[ELightGalleryType["WALKTHROUGH"] = 8] = "WALKTHROUGH";
|
|
93
93
|
ELightGalleryType[ELightGalleryType["ACTOR"] = 9] = "ACTOR";
|
|
94
|
+
ELightGalleryType[ELightGalleryType["CHOICE_EXPLANATION"] = 10] = "CHOICE_EXPLANATION";
|
|
94
95
|
})(ELightGalleryType = exports.ELightGalleryType || (exports.ELightGalleryType = {}));
|
|
95
96
|
var EJobRemarkStatus;
|
|
96
97
|
(function (EJobRemarkStatus) {
|
package/models/Psa.d.ts
CHANGED
package/models/Question.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ICondition } from './Condition';
|
|
|
4
4
|
import { IQuestionRevision } from './Content';
|
|
5
5
|
import { EDifficultyType } from './Difficulty';
|
|
6
6
|
import { IHighlightNode } from './Highlight';
|
|
7
|
-
import { IJobRecord
|
|
7
|
+
import { IJobRecord } from './Job';
|
|
8
8
|
import { IPicture } from './Picture';
|
|
9
9
|
import { IPresentation } from './Presentation';
|
|
10
10
|
import { ITopic } from './Topic';
|
|
@@ -89,6 +89,7 @@ export interface IQuestion {
|
|
|
89
89
|
conceptId: Id;
|
|
90
90
|
stemId: Id | null;
|
|
91
91
|
public: boolean;
|
|
92
|
+
enabled: number;
|
|
92
93
|
stem?: IChapter;
|
|
93
94
|
themes?: ITheme[];
|
|
94
95
|
concept?: IConcept;
|
|
@@ -118,8 +119,6 @@ export interface IQuestion {
|
|
|
118
119
|
revisions?: IQuestionRevision[];
|
|
119
120
|
entitlements?: IQuestionEntitlement[];
|
|
120
121
|
jobRecord?: IJobRecord | null;
|
|
121
|
-
metricsSummary?: IJobRecordMetricsSummary | null;
|
|
122
|
-
choiceSummary?: IJobRecordChoiceSummary[] | null;
|
|
123
122
|
}
|
|
124
123
|
export interface IQuestionChoice {
|
|
125
124
|
id: Id;
|
|
@@ -131,6 +130,7 @@ export interface IQuestionChoice {
|
|
|
131
130
|
answer: boolean;
|
|
132
131
|
votes: number;
|
|
133
132
|
picture?: IPicture | null;
|
|
133
|
+
pictures?: IPicture[] | null;
|
|
134
134
|
}
|
|
135
135
|
export interface IQuestionCase {
|
|
136
136
|
id: Id;
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const QUESTION_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
2
1
|
export declare const QUESTION_COMMENT_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
2
|
export declare const QUESTION_UKMLA_FIELDS: import("@apollo/client").DocumentNode;
|
|
4
3
|
export declare const QUESTION_UCAT_FIELDS: import("@apollo/client").DocumentNode;
|
|
@@ -1,24 +1,11 @@
|
|
|
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_UCAT_FIELDS = exports.QUESTION_UKMLA_FIELDS = exports.QUESTION_COMMENT_FIELDS =
|
|
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
5
|
const chapter_1 = require("./chapter");
|
|
6
6
|
const concept_1 = require("./concept");
|
|
7
7
|
const highlight_1 = require("./highlight");
|
|
8
8
|
const picture_1 = require("./picture");
|
|
9
|
-
const record_1 = require("./record");
|
|
10
|
-
exports.QUESTION_STATISTICS_FRAGMENT = (0, client_1.gql) `
|
|
11
|
-
${record_1.JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
|
|
12
|
-
${record_1.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
|
|
13
|
-
fragment QuestionStatistics on Question {
|
|
14
|
-
metricsSummary {
|
|
15
|
-
...JobRecordMetricsSummary
|
|
16
|
-
}
|
|
17
|
-
choiceSummary {
|
|
18
|
-
...JobRecordChoiceSummary
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
9
|
exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
|
|
23
10
|
fragment QuestionCommentFields on QuestionComment {
|
|
24
11
|
id
|
|
@@ -193,6 +180,9 @@ exports.QUESTION_FIELDS = (0, client_1.gql) `
|
|
|
193
180
|
picture {
|
|
194
181
|
...PictureFields
|
|
195
182
|
}
|
|
183
|
+
pictures {
|
|
184
|
+
...PictureFields
|
|
185
|
+
}
|
|
196
186
|
}
|
|
197
187
|
comments {
|
|
198
188
|
...QuestionCommentFields
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
2
2
|
export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
3
3
|
export declare const JOB_ASSET_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
4
|
-
export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
5
4
|
export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
6
5
|
export declare const JOB_RECORD_QUESTION_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
7
6
|
export declare const JOB_RECORD_CHAPTER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.
|
|
3
|
+
exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_ASSET_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
|
|
6
6
|
fragment JobUser on User {
|
|
@@ -56,15 +56,6 @@ exports.JOB_ASSET_FRAGMENT = (0, client_1.gql) `
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
`;
|
|
59
|
-
exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
60
|
-
fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
|
|
61
|
-
id
|
|
62
|
-
total
|
|
63
|
-
correct
|
|
64
|
-
incorrect
|
|
65
|
-
percentage
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
59
|
exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
69
60
|
fragment JobRecordChoiceSummary on JobRecordChoiceSummary {
|
|
70
61
|
id
|
|
@@ -74,18 +65,6 @@ exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
|
74
65
|
questionId
|
|
75
66
|
}
|
|
76
67
|
`;
|
|
77
|
-
// export const JOB_RECORD_STATISTICS_FRAGMENT = gql`
|
|
78
|
-
// ${JOB_RECORD_METRICS_SUMMARY_FRAGMENT}
|
|
79
|
-
// ${JOB_RECORD_CHOICE_SUMMARY_FRAGMENT}
|
|
80
|
-
// fragment JobRecordStatistics on JobRecord {
|
|
81
|
-
// metricsSummary {
|
|
82
|
-
// ...JobRecordMetricsSummary
|
|
83
|
-
// }
|
|
84
|
-
// choiceSummary {
|
|
85
|
-
// ...JobRecordChoiceSummary
|
|
86
|
-
// }
|
|
87
|
-
// }
|
|
88
|
-
// `;
|
|
89
68
|
exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
|
|
90
69
|
fragment JobRecordQuestion on JobRecordQuestion {
|
|
91
70
|
question
|
|
@@ -19,5 +19,4 @@ __exportStar(require("./dashboard"), exports);
|
|
|
19
19
|
__exportStar(require("./database"), exports);
|
|
20
20
|
__exportStar(require("./getUserToken"), exports);
|
|
21
21
|
__exportStar(require("./job"), exports);
|
|
22
|
-
__exportStar(require("./question"), exports);
|
|
23
22
|
__exportStar(require("./record"), exports);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IQuestion, Id } from '../../../models';
|
|
2
|
-
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
|
-
export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
|
|
4
|
-
export interface IAdminQuestionVar {
|
|
5
|
-
id: Id;
|
|
6
|
-
}
|
|
7
|
-
export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADMIN_QUESTION = void 0;
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const fragments_1 = require("../../fragments");
|
|
6
|
-
exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
7
|
-
${fragments_1.QUESTION_STATISTICS_FRAGMENT}
|
|
8
|
-
${fragments_1.QUESTION_CATEGORY_FIELDS}
|
|
9
|
-
${fragments_1.QUESTION_COMMENT_FIELDS}
|
|
10
|
-
${fragments_1.PICTURE_FIELDS}
|
|
11
|
-
query QuestionData($id: Int!) {
|
|
12
|
-
admin {
|
|
13
|
-
question(id: $id) {
|
|
14
|
-
...QuestionCategoryFields
|
|
15
|
-
...QuestionStatistics
|
|
16
|
-
id
|
|
17
|
-
public
|
|
18
|
-
conceptId
|
|
19
|
-
difficulty
|
|
20
|
-
question
|
|
21
|
-
learningPoint
|
|
22
|
-
explanation
|
|
23
|
-
createdAt
|
|
24
|
-
updatedAt
|
|
25
|
-
typeId
|
|
26
|
-
likes
|
|
27
|
-
dislikes
|
|
28
|
-
totalVotes
|
|
29
|
-
stem {
|
|
30
|
-
id
|
|
31
|
-
explanation
|
|
32
|
-
summary
|
|
33
|
-
typeId
|
|
34
|
-
pictures {
|
|
35
|
-
...PictureFields
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
presentations {
|
|
39
|
-
id
|
|
40
|
-
name
|
|
41
|
-
topicId
|
|
42
|
-
topic {
|
|
43
|
-
id
|
|
44
|
-
name
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
conditions {
|
|
48
|
-
id
|
|
49
|
-
name
|
|
50
|
-
topicId
|
|
51
|
-
topic {
|
|
52
|
-
id
|
|
53
|
-
name
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
entitlements {
|
|
57
|
-
id
|
|
58
|
-
entitlementId
|
|
59
|
-
questionId
|
|
60
|
-
}
|
|
61
|
-
pictures {
|
|
62
|
-
...PictureFields
|
|
63
|
-
}
|
|
64
|
-
comments {
|
|
65
|
-
...QuestionCommentFields
|
|
66
|
-
}
|
|
67
|
-
revisions {
|
|
68
|
-
id
|
|
69
|
-
questionId
|
|
70
|
-
createdAt
|
|
71
|
-
updatedAt
|
|
72
|
-
conceptId
|
|
73
|
-
difficulty
|
|
74
|
-
typeId
|
|
75
|
-
question
|
|
76
|
-
explanation
|
|
77
|
-
learningPoint
|
|
78
|
-
answer
|
|
79
|
-
choices {
|
|
80
|
-
id
|
|
81
|
-
name
|
|
82
|
-
explanation
|
|
83
|
-
label
|
|
84
|
-
answer
|
|
85
|
-
votes
|
|
86
|
-
updatedAt
|
|
87
|
-
}
|
|
88
|
-
cases {
|
|
89
|
-
id
|
|
90
|
-
questionId
|
|
91
|
-
case
|
|
92
|
-
explanation
|
|
93
|
-
label
|
|
94
|
-
updatedAt
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
choices {
|
|
98
|
-
id
|
|
99
|
-
name
|
|
100
|
-
explanation
|
|
101
|
-
label
|
|
102
|
-
answer
|
|
103
|
-
votes
|
|
104
|
-
updatedAt
|
|
105
|
-
picture {
|
|
106
|
-
...PictureFields
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
topic {
|
|
110
|
-
id
|
|
111
|
-
name
|
|
112
|
-
}
|
|
113
|
-
concept {
|
|
114
|
-
id
|
|
115
|
-
name
|
|
116
|
-
topicId
|
|
117
|
-
}
|
|
118
|
-
jobRecord {
|
|
119
|
-
id
|
|
120
|
-
jobId
|
|
121
|
-
createdByUser {
|
|
122
|
-
id
|
|
123
|
-
firstName
|
|
124
|
-
lastName
|
|
125
|
-
username
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
`;
|