@quesmed/types-rn 2.6.83 → 2.6.85
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/User.d.ts +3 -2
- package/models/User.js +3 -2
- package/package.json +1 -1
- package/resolvers/constants.d.ts +2 -2
- package/resolvers/constants.js +38 -4
- package/resolvers/query/restricted/chapter.d.ts +7 -0
- package/resolvers/query/restricted/chapter.js +14 -0
- package/resolvers/query/restricted/index.d.ts +1 -1
- package/resolvers/query/restricted/index.js +1 -1
- package/resolvers/query/restricted/conceptExplanation.d.ts +0 -12
- package/resolvers/query/restricted/conceptExplanation.js +0 -11
package/models/User.d.ts
CHANGED
|
@@ -20,8 +20,9 @@ export declare enum IAccessLevel {
|
|
|
20
20
|
EXPIRED = "expired"
|
|
21
21
|
}
|
|
22
22
|
export declare enum ETheme {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
AUTO = 0,
|
|
24
|
+
LIGHT = 1,
|
|
25
|
+
DARK = 2
|
|
25
26
|
}
|
|
26
27
|
export type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
|
|
27
28
|
export declare const classYears: IClassYear[];
|
package/models/User.js
CHANGED
|
@@ -13,8 +13,9 @@ var IAccessLevel;
|
|
|
13
13
|
})(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
|
|
14
14
|
var ETheme;
|
|
15
15
|
(function (ETheme) {
|
|
16
|
-
ETheme[ETheme["
|
|
17
|
-
ETheme[ETheme["
|
|
16
|
+
ETheme[ETheme["AUTO"] = 0] = "AUTO";
|
|
17
|
+
ETheme[ETheme["LIGHT"] = 1] = "LIGHT";
|
|
18
|
+
ETheme[ETheme["DARK"] = 2] = "DARK";
|
|
18
19
|
})(ETheme = exports.ETheme || (exports.ETheme = {}));
|
|
19
20
|
exports.classYears = [
|
|
20
21
|
'Year 1',
|
package/package.json
CHANGED
package/resolvers/constants.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EMockTestType, EProductType, ETopicType } from '../models';
|
|
1
|
+
import { EMockTestType, EOsceType, EPaceType, EProductType, ETopicType } from '../models';
|
|
2
2
|
import { DB_TYPE } from './enums';
|
|
3
3
|
export declare const productMapping: Partial<Record<EProductType, {
|
|
4
4
|
db: DB_TYPE;
|
|
5
5
|
topicType: ETopicType[];
|
|
6
6
|
mockType: EMockTestType[];
|
|
7
7
|
}>>;
|
|
8
|
-
export declare const getEntitlementFromTopicType: (
|
|
8
|
+
export declare const getEntitlementFromTopicType: (typeId: ETopicType | EOsceType | EPaceType, productType: EProductType) => {
|
|
9
9
|
id: number;
|
|
10
10
|
name: string;
|
|
11
11
|
};
|
package/resolvers/constants.js
CHANGED
|
@@ -114,6 +114,24 @@ const topicEntitlementMap = {
|
|
|
114
114
|
[models_1.ETopicType.INTERVIEW_IMT]: models_1.EEntitlementType.INTERVIEW_IMT,
|
|
115
115
|
[models_1.ETopicType.INTERVIEW_RADIOLOGY]: models_1.EEntitlementType.INTERVIEW_RADIOLOGY,
|
|
116
116
|
};
|
|
117
|
+
const osceEntitlementMap = {
|
|
118
|
+
[models_1.EOsceType.HISTORY_TAKING]: models_1.EEntitlementType.HISTORY_TAKING,
|
|
119
|
+
[models_1.EOsceType.COMMUNICATION_SKILLS]: models_1.EEntitlementType.COMMUNICATION_SKILLS,
|
|
120
|
+
[models_1.EOsceType.EXAMINATION]: models_1.EEntitlementType.EXAMINATION,
|
|
121
|
+
[models_1.EOsceType.PROCEDURE]: models_1.EEntitlementType.PROCEDURE,
|
|
122
|
+
[models_1.EOsceType.INTERPRETATION]: models_1.EEntitlementType.INTERPRETATION,
|
|
123
|
+
[models_1.EOsceType.ABCDE]: models_1.EEntitlementType.ABCDE,
|
|
124
|
+
[models_1.EOsceType.PRESCRIBING]: models_1.EEntitlementType.PRESCRIBING,
|
|
125
|
+
[models_1.EOsceType.MIXED]: models_1.EEntitlementType.MIXED,
|
|
126
|
+
};
|
|
127
|
+
const paceEntitlementMap = {
|
|
128
|
+
[models_1.EPaceType.ABDOMINAL]: models_1.EEntitlementType.ABDOMINAL,
|
|
129
|
+
[models_1.EPaceType.CARDIOVASCULAR]: models_1.EEntitlementType.CARDIOVASCULAR,
|
|
130
|
+
[models_1.EPaceType.COMMUNICATION]: models_1.EEntitlementType.COMMUNICATION,
|
|
131
|
+
[models_1.EPaceType.CONSULTATION]: models_1.EEntitlementType.CONSULTATION,
|
|
132
|
+
[models_1.EPaceType.NEUROLOGY]: models_1.EEntitlementType.NEUROLOGY,
|
|
133
|
+
[models_1.EPaceType.RESPIRATORY]: models_1.EEntitlementType.RESPIRATORY,
|
|
134
|
+
};
|
|
117
135
|
const clinicalEntitlementMap = {
|
|
118
136
|
[models_1.EProductType.MEDICAL_SCIENCES]: models_1.EEntitlementType.CLINICAL_SUBSET,
|
|
119
137
|
[models_1.EProductType.QBANK]: models_1.EEntitlementType.CLINICAL,
|
|
@@ -122,10 +140,26 @@ const clinicalEntitlementMap = {
|
|
|
122
140
|
[models_1.EProductType.MRCP_PART1]: models_1.EEntitlementType.MRCP_PART_1,
|
|
123
141
|
[models_1.EProductType.MRCP_PART2]: models_1.EEntitlementType.MRCP_PART_2,
|
|
124
142
|
};
|
|
125
|
-
const getEntitlementFromTopicType = (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
:
|
|
143
|
+
const getEntitlementFromTopicType = (typeId, productType) => {
|
|
144
|
+
let entitlement;
|
|
145
|
+
switch (productType) {
|
|
146
|
+
case models_1.EProductType.PACES: {
|
|
147
|
+
entitlement = paceEntitlementMap[typeId];
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case models_1.EProductType.OSCE:
|
|
151
|
+
case models_1.EProductType.PLAB2: {
|
|
152
|
+
entitlement = osceEntitlementMap[typeId];
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
default: {
|
|
156
|
+
entitlement =
|
|
157
|
+
typeId === models_1.ETopicType.CLINICAL
|
|
158
|
+
? clinicalEntitlementMap[productType]
|
|
159
|
+
: topicEntitlementMap[typeId];
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
129
163
|
if (!entitlement) {
|
|
130
164
|
return { id: 0, name: 'Unknown' };
|
|
131
165
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
2
|
+
import { IChapter } from '../../../models';
|
|
3
|
+
export interface IChapterVar {
|
|
4
|
+
id: number;
|
|
5
|
+
}
|
|
6
|
+
export type IChapterData = RestrictedData<graphqlNormalize & IChapter, 'chapter'>;
|
|
7
|
+
export declare const CHAPTER: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAPTER = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
exports.CHAPTER = (0, client_1.gql) `
|
|
6
|
+
query chapter($id: Int!) {
|
|
7
|
+
restricted {
|
|
8
|
+
chapter(id: $id) {
|
|
9
|
+
id
|
|
10
|
+
explanation
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
@@ -14,7 +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("./
|
|
17
|
+
__exportStar(require("./chapter"), exports);
|
|
18
18
|
__exportStar(require("./concepts"), exports);
|
|
19
19
|
__exportStar(require("./global"), exports);
|
|
20
20
|
__exportStar(require("./marksheet"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
2
|
-
export interface IQuesBookDict {
|
|
3
|
-
topicId: number;
|
|
4
|
-
conceptId: number;
|
|
5
|
-
chapterId: number;
|
|
6
|
-
explanation: string;
|
|
7
|
-
}
|
|
8
|
-
export interface IConceptExplanationVar {
|
|
9
|
-
chapterId: number;
|
|
10
|
-
}
|
|
11
|
-
export type IConceptExplanationData = RestrictedData<graphqlNormalize & string, 'conceptExplanation'>;
|
|
12
|
-
export declare const CONCEPT_EXPLANATION: import("@apollo/client").DocumentNode;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONCEPT_EXPLANATION = void 0;
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
exports.CONCEPT_EXPLANATION = (0, client_1.gql) `
|
|
6
|
-
query conceptExplanation($chapterId: Int!) {
|
|
7
|
-
restricted {
|
|
8
|
-
conceptExplanation(chapterId: $chapterId)
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
`;
|