@quesmed/types-rn 2.6.133 → 2.6.135
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/MockTest.d.ts +6 -1
- package/models/MockTest.js +5 -0
- package/models/Question.d.ts +2 -0
- package/models/User.d.ts +4 -1
- package/models/User.js +1 -0
- package/package.json +1 -1
- package/resolvers/constants.js +14 -1
- package/resolvers/fragments/question.js +2 -0
- package/resolvers/mutation/restricted/marksheet.d.ts +19 -3
- package/resolvers/mutation/restricted/marksheet.js +11 -1
- package/resolvers/query/restricted/analytics.d.ts +17 -0
- package/resolvers/query/restricted/analytics.js +30 -0
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
package/models/MockTest.d.ts
CHANGED
|
@@ -10,7 +10,12 @@ export declare enum EMockTestType {
|
|
|
10
10
|
ANATOMY_SPOTTER = 5,
|
|
11
11
|
UKMLA = 6,
|
|
12
12
|
MRCP = 7,
|
|
13
|
-
UKMLA_FULL = 8
|
|
13
|
+
UKMLA_FULL = 8,
|
|
14
|
+
FULL_MOCK = 9,
|
|
15
|
+
VERBAL_REASONING = 10,
|
|
16
|
+
DECISION_MAKING = 11,
|
|
17
|
+
QUANTITATIVE_REASONING = 12,
|
|
18
|
+
SITUATIONAL_JUDGEMENT = 13
|
|
14
19
|
}
|
|
15
20
|
export interface IMockTestType {
|
|
16
21
|
id: EMockTestType;
|
package/models/MockTest.js
CHANGED
|
@@ -12,4 +12,9 @@ var EMockTestType;
|
|
|
12
12
|
EMockTestType[EMockTestType["UKMLA"] = 6] = "UKMLA";
|
|
13
13
|
EMockTestType[EMockTestType["MRCP"] = 7] = "MRCP";
|
|
14
14
|
EMockTestType[EMockTestType["UKMLA_FULL"] = 8] = "UKMLA_FULL";
|
|
15
|
+
EMockTestType[EMockTestType["FULL_MOCK"] = 9] = "FULL_MOCK";
|
|
16
|
+
EMockTestType[EMockTestType["VERBAL_REASONING"] = 10] = "VERBAL_REASONING";
|
|
17
|
+
EMockTestType[EMockTestType["DECISION_MAKING"] = 11] = "DECISION_MAKING";
|
|
18
|
+
EMockTestType[EMockTestType["QUANTITATIVE_REASONING"] = 12] = "QUANTITATIVE_REASONING";
|
|
19
|
+
EMockTestType[EMockTestType["SITUATIONAL_JUDGEMENT"] = 13] = "SITUATIONAL_JUDGEMENT";
|
|
15
20
|
})(EMockTestType = exports.EMockTestType || (exports.EMockTestType = {}));
|
package/models/Question.d.ts
CHANGED
package/models/User.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare enum IAccessLevel {
|
|
|
20
20
|
TUTOR = "tutor",
|
|
21
21
|
DEMO = "demo",
|
|
22
22
|
EXPIRED = "expired",
|
|
23
|
-
EDITOR = "editor"
|
|
23
|
+
EDITOR = "editor",
|
|
24
|
+
MARKETING = "marketing"
|
|
24
25
|
}
|
|
25
26
|
export declare enum ETheme {
|
|
26
27
|
AUTO = 0,
|
|
@@ -198,6 +199,7 @@ export interface IUserCompletedQuestion {
|
|
|
198
199
|
correct: boolean;
|
|
199
200
|
question: IQuestion;
|
|
200
201
|
concept: IConcept;
|
|
202
|
+
timeTaken: number;
|
|
201
203
|
}
|
|
202
204
|
export interface IUserCompletedCard {
|
|
203
205
|
id: Id;
|
|
@@ -254,6 +256,7 @@ export interface IUserQuestionsFirstAttempt {
|
|
|
254
256
|
userId: Id;
|
|
255
257
|
questionId: Id;
|
|
256
258
|
answer: boolean;
|
|
259
|
+
timeTaken: number;
|
|
257
260
|
}
|
|
258
261
|
export interface IUserConceptStatus {
|
|
259
262
|
id: Id;
|
package/models/User.js
CHANGED
|
@@ -13,6 +13,7 @@ var IAccessLevel;
|
|
|
13
13
|
IAccessLevel["DEMO"] = "demo";
|
|
14
14
|
IAccessLevel["EXPIRED"] = "expired";
|
|
15
15
|
IAccessLevel["EDITOR"] = "editor";
|
|
16
|
+
IAccessLevel["MARKETING"] = "marketing";
|
|
16
17
|
})(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
|
|
17
18
|
var ETheme;
|
|
18
19
|
(function (ETheme) {
|
package/package.json
CHANGED
package/resolvers/constants.js
CHANGED
|
@@ -111,7 +111,13 @@ exports.productMapping = {
|
|
|
111
111
|
[models_1.EProductType.UCAT]: {
|
|
112
112
|
db: enums_1.DB_TYPE.UCAT,
|
|
113
113
|
topicType: [],
|
|
114
|
-
mockType: [
|
|
114
|
+
mockType: [
|
|
115
|
+
models_1.EMockTestType.FULL_MOCK,
|
|
116
|
+
models_1.EMockTestType.VERBAL_REASONING,
|
|
117
|
+
models_1.EMockTestType.DECISION_MAKING,
|
|
118
|
+
models_1.EMockTestType.QUANTITATIVE_REASONING,
|
|
119
|
+
models_1.EMockTestType.SITUATIONAL_JUDGEMENT,
|
|
120
|
+
],
|
|
115
121
|
},
|
|
116
122
|
};
|
|
117
123
|
const topicEntitlementMap = {
|
|
@@ -125,6 +131,7 @@ const topicEntitlementMap = {
|
|
|
125
131
|
[models_1.ETopicType.INTERVIEW_IMT]: models_1.EEntitlementType.INTERVIEW_IMT,
|
|
126
132
|
[models_1.ETopicType.INTERVIEW_RADIOLOGY]: models_1.EEntitlementType.INTERVIEW_RADIOLOGY,
|
|
127
133
|
[models_1.ETopicType.INTERVIEW_PAEDIATRICS]: models_1.EEntitlementType.INTERVIEW_PAEDIATRICS,
|
|
134
|
+
[models_1.ETopicType.UCAT]: models_1.EEntitlementType.VERBAL_REASONING,
|
|
128
135
|
};
|
|
129
136
|
const osceEntitlementMap = {
|
|
130
137
|
[models_1.EOsceType.HISTORY_TAKING]: models_1.EEntitlementType.HISTORY_TAKING,
|
|
@@ -159,6 +166,12 @@ const getEntitlementFromTopicType = (typeId, productType, entitlementInfo) => {
|
|
|
159
166
|
entitlement = paceEntitlementMap[typeId];
|
|
160
167
|
break;
|
|
161
168
|
}
|
|
169
|
+
case models_1.EProductType.UCAT: {
|
|
170
|
+
if (entitlementInfo) {
|
|
171
|
+
entitlement = entitlementInfo;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
162
175
|
case models_1.EProductType.OSCE:
|
|
163
176
|
case models_1.EProductType.PLAB2: {
|
|
164
177
|
entitlement = osceEntitlementMap[typeId];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApolloCache, ApolloClient } from '@apollo/client';
|
|
2
2
|
import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
|
|
3
|
-
import { EDifficultyType, Id } from '../../../models';
|
|
3
|
+
import { EDifficultyType, EEntitlementType, Id } from '../../../models';
|
|
4
4
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
5
5
|
import { EMarksheetAction, EMarksheetState, EStudyAction, IMarksheet, IMarksheetMark } from './../../../models/Marksheet';
|
|
6
6
|
import { IUser, IUserFlaggedQuestion } from './../../../models/User';
|
|
@@ -31,6 +31,22 @@ export interface IBuildMarksheetVar {
|
|
|
31
31
|
}
|
|
32
32
|
export type IBuildMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildMarksheet'>;
|
|
33
33
|
export declare const BUILD_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
|
+
/**
|
|
35
|
+
* buildUcatMarksheet
|
|
36
|
+
*/
|
|
37
|
+
export interface IBuildUcatMarksheetInput {
|
|
38
|
+
topicIds: number[];
|
|
39
|
+
conceptIds: number[];
|
|
40
|
+
entitlementId: EEntitlementType;
|
|
41
|
+
setCount: number;
|
|
42
|
+
duration: number;
|
|
43
|
+
marksheetId?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IBuildUcatMarksheetVar {
|
|
46
|
+
input: IBuildUcatMarksheetInput;
|
|
47
|
+
}
|
|
48
|
+
export type IBuildUcatMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'buildUcatMarksheet'>;
|
|
49
|
+
export declare const BUILD_UCAT_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
50
|
/**
|
|
35
51
|
* reBuildMarksheet
|
|
36
52
|
*/
|
|
@@ -188,7 +204,7 @@ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: numbe
|
|
|
188
204
|
currentMarkId?: number | undefined;
|
|
189
205
|
topicConceptData?: string | undefined;
|
|
190
206
|
preBuildData?: IPreBuildMarksheet | undefined;
|
|
191
|
-
entitlementId: import("../../../models").EProductType |
|
|
207
|
+
entitlementId: import("../../../models").EProductType | EEntitlementType;
|
|
192
208
|
};
|
|
193
209
|
};
|
|
194
210
|
};
|
|
@@ -281,7 +297,7 @@ export declare const optimisticEndMarksheet: (marksheet: IMarksheet) => {
|
|
|
281
297
|
topicConceptData?: string | undefined;
|
|
282
298
|
preBuildData?: IPreBuildMarksheet | undefined;
|
|
283
299
|
builderConfig?: IBuildConfigData | undefined;
|
|
284
|
-
entitlementId: import("../../../models").EProductType |
|
|
300
|
+
entitlementId: import("../../../models").EProductType | EEntitlementType;
|
|
285
301
|
__typename: string;
|
|
286
302
|
};
|
|
287
303
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TOGGLE_STRIKE_OPTIONS = exports.optimisticEndMarksheet = exports.updateCacheOnEndMarksheet = exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_CURRENT_MARKSHEET_MARK = exports.MODIFY_MARKSHEET_MARK_QUESTIONCHOICEID = exports.MODIFY_MARKSHEET_MARK_STRIKED = exports.MODIFY_MARKSHEET_MARK = exports.MODIFY_MARKSHEET_STATE = exports.MODIFY_TOPIC_SELECTION = exports.MODIFY_BUILDER_CONFIG = exports.MODIFY_MARKSHEET = exports.optimisticModifyMarksheetBuilderConfig = exports.START_OR_JOIN_MARKSHEET = exports.optimisticRemoveFlaggedQuestion = exports.updateCacheRemoveFlaggedQuestion = exports.optimisticAddFlaggedQuestion = exports.updateCacheAddFlaggedQuestion = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.QUICK_BUILD_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = exports.BUILD_QUESTION_MARKSHEET = void 0;
|
|
3
|
+
exports.TOGGLE_STRIKE_OPTIONS = exports.optimisticEndMarksheet = exports.updateCacheOnEndMarksheet = exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_CURRENT_MARKSHEET_MARK = exports.MODIFY_MARKSHEET_MARK_QUESTIONCHOICEID = exports.MODIFY_MARKSHEET_MARK_STRIKED = exports.MODIFY_MARKSHEET_MARK = exports.MODIFY_MARKSHEET_STATE = exports.MODIFY_TOPIC_SELECTION = exports.MODIFY_BUILDER_CONFIG = exports.MODIFY_MARKSHEET = exports.optimisticModifyMarksheetBuilderConfig = exports.START_OR_JOIN_MARKSHEET = exports.optimisticRemoveFlaggedQuestion = exports.updateCacheRemoveFlaggedQuestion = exports.optimisticAddFlaggedQuestion = exports.updateCacheAddFlaggedQuestion = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.QUICK_BUILD_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_UCAT_MARKSHEET = exports.BUILD_MARKSHEET = exports.BUILD_QUESTION_MARKSHEET = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const marksheet_1 = require("../../fragments/marksheet");
|
|
6
6
|
const restricted_1 = require("../../query/restricted");
|
|
@@ -24,6 +24,16 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
|
+
exports.BUILD_UCAT_MARKSHEET = (0, client_1.gql) `
|
|
28
|
+
${marksheet_1.MARKSHEET_FIELDS}
|
|
29
|
+
mutation BuildUcatMarksheet($input: BuildUcatMarksheetInput!) {
|
|
30
|
+
restricted {
|
|
31
|
+
buildUcatMarksheet(input: $input) {
|
|
32
|
+
...MarksheetFields
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
27
37
|
/**
|
|
28
38
|
* reBuildMarksheet
|
|
29
39
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RestrictedData } from '../../types';
|
|
2
|
+
export type IUcatAnalyticsVar = {
|
|
3
|
+
updatedAt?: Date | number;
|
|
4
|
+
};
|
|
5
|
+
export interface IUcatAnalytics {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
timeTaken: number;
|
|
9
|
+
avgTimeTaken: number;
|
|
10
|
+
total: number;
|
|
11
|
+
completed: number;
|
|
12
|
+
score: number;
|
|
13
|
+
avgScore: number;
|
|
14
|
+
stats: IUcatAnalytics[];
|
|
15
|
+
}
|
|
16
|
+
export type IUcatAnalyticsData = RestrictedData<IUcatAnalytics, 'ucatAnalytics'>;
|
|
17
|
+
export declare const UCAT_ANALYTICS: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UCAT_ANALYTICS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.UCAT_ANALYTICS = (0, client_1.gql) `
|
|
6
|
+
query UcatAnalytics($updatedAt: Date) {
|
|
7
|
+
restricted {
|
|
8
|
+
ucatAnalytics(updatedAt: $updatedAt) {
|
|
9
|
+
id
|
|
10
|
+
name
|
|
11
|
+
timeTaken
|
|
12
|
+
avgTimeTaken
|
|
13
|
+
total
|
|
14
|
+
completed
|
|
15
|
+
score
|
|
16
|
+
avgScore
|
|
17
|
+
stats {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
timeTaken
|
|
21
|
+
avgTimeTaken
|
|
22
|
+
total
|
|
23
|
+
completed
|
|
24
|
+
score
|
|
25
|
+
avgScore
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./analytics"), exports);
|
|
17
18
|
__exportStar(require("./chapter"), exports);
|
|
18
19
|
__exportStar(require("./concepts"), exports);
|
|
19
20
|
__exportStar(require("./global"), exports);
|