@quesmed/types 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/dist/cjs/models/User.d.ts +3 -2
- package/dist/cjs/models/User.js +3 -2
- package/dist/cjs/resolvers/constants.d.ts +2 -2
- package/dist/cjs/resolvers/constants.js +38 -4
- package/dist/cjs/resolvers/query/restricted/chapter.d.ts +7 -0
- package/dist/cjs/resolvers/query/restricted/chapter.js +14 -0
- package/dist/cjs/resolvers/query/restricted/index.d.ts +1 -1
- package/dist/cjs/resolvers/query/restricted/index.js +1 -1
- package/dist/mjs/models/User.d.ts +3 -2
- package/dist/mjs/models/User.js +3 -2
- package/dist/mjs/resolvers/constants.d.ts +2 -2
- package/dist/mjs/resolvers/constants.js +39 -5
- package/dist/mjs/resolvers/query/restricted/chapter.d.ts +7 -0
- package/dist/mjs/resolvers/query/restricted/chapter.js +11 -0
- package/dist/mjs/resolvers/query/restricted/index.d.ts +1 -1
- package/dist/mjs/resolvers/query/restricted/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/resolvers/query/restricted/conceptExplanation.d.ts +0 -12
- package/dist/cjs/resolvers/query/restricted/conceptExplanation.js +0 -11
- package/dist/mjs/resolvers/query/restricted/conceptExplanation.d.ts +0 -12
- package/dist/mjs/resolvers/query/restricted/conceptExplanation.js +0 -8
|
@@ -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/dist/cjs/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',
|
|
@@ -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
|
};
|
|
@@ -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);
|
|
@@ -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/dist/mjs/models/User.js
CHANGED
|
@@ -10,8 +10,9 @@ export var IAccessLevel;
|
|
|
10
10
|
})(IAccessLevel || (IAccessLevel = {}));
|
|
11
11
|
export var ETheme;
|
|
12
12
|
(function (ETheme) {
|
|
13
|
-
ETheme[ETheme["
|
|
14
|
-
ETheme[ETheme["
|
|
13
|
+
ETheme[ETheme["AUTO"] = 0] = "AUTO";
|
|
14
|
+
ETheme[ETheme["LIGHT"] = 1] = "LIGHT";
|
|
15
|
+
ETheme[ETheme["DARK"] = 2] = "DARK";
|
|
15
16
|
})(ETheme || (ETheme = {}));
|
|
16
17
|
export const classYears = [
|
|
17
18
|
'Year 1',
|
|
@@ -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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EEntitlementType, EMockTestType, EProductType, ETopicType, } from '../models';
|
|
1
|
+
import { EEntitlementType, EMockTestType, EOsceType, EPaceType, EProductType, ETopicType, } from '../models';
|
|
2
2
|
import { titleCase } from '../utils';
|
|
3
3
|
import { DB_TYPE } from './enums';
|
|
4
4
|
const ALL_TOPIC_TYPE_WITHOUT_ANATOMY = [
|
|
@@ -111,6 +111,24 @@ const topicEntitlementMap = {
|
|
|
111
111
|
[ETopicType.INTERVIEW_IMT]: EEntitlementType.INTERVIEW_IMT,
|
|
112
112
|
[ETopicType.INTERVIEW_RADIOLOGY]: EEntitlementType.INTERVIEW_RADIOLOGY,
|
|
113
113
|
};
|
|
114
|
+
const osceEntitlementMap = {
|
|
115
|
+
[EOsceType.HISTORY_TAKING]: EEntitlementType.HISTORY_TAKING,
|
|
116
|
+
[EOsceType.COMMUNICATION_SKILLS]: EEntitlementType.COMMUNICATION_SKILLS,
|
|
117
|
+
[EOsceType.EXAMINATION]: EEntitlementType.EXAMINATION,
|
|
118
|
+
[EOsceType.PROCEDURE]: EEntitlementType.PROCEDURE,
|
|
119
|
+
[EOsceType.INTERPRETATION]: EEntitlementType.INTERPRETATION,
|
|
120
|
+
[EOsceType.ABCDE]: EEntitlementType.ABCDE,
|
|
121
|
+
[EOsceType.PRESCRIBING]: EEntitlementType.PRESCRIBING,
|
|
122
|
+
[EOsceType.MIXED]: EEntitlementType.MIXED,
|
|
123
|
+
};
|
|
124
|
+
const paceEntitlementMap = {
|
|
125
|
+
[EPaceType.ABDOMINAL]: EEntitlementType.ABDOMINAL,
|
|
126
|
+
[EPaceType.CARDIOVASCULAR]: EEntitlementType.CARDIOVASCULAR,
|
|
127
|
+
[EPaceType.COMMUNICATION]: EEntitlementType.COMMUNICATION,
|
|
128
|
+
[EPaceType.CONSULTATION]: EEntitlementType.CONSULTATION,
|
|
129
|
+
[EPaceType.NEUROLOGY]: EEntitlementType.NEUROLOGY,
|
|
130
|
+
[EPaceType.RESPIRATORY]: EEntitlementType.RESPIRATORY,
|
|
131
|
+
};
|
|
114
132
|
const clinicalEntitlementMap = {
|
|
115
133
|
[EProductType.MEDICAL_SCIENCES]: EEntitlementType.CLINICAL_SUBSET,
|
|
116
134
|
[EProductType.QBANK]: EEntitlementType.CLINICAL,
|
|
@@ -119,10 +137,26 @@ const clinicalEntitlementMap = {
|
|
|
119
137
|
[EProductType.MRCP_PART1]: EEntitlementType.MRCP_PART_1,
|
|
120
138
|
[EProductType.MRCP_PART2]: EEntitlementType.MRCP_PART_2,
|
|
121
139
|
};
|
|
122
|
-
export const getEntitlementFromTopicType = (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
:
|
|
140
|
+
export const getEntitlementFromTopicType = (typeId, productType) => {
|
|
141
|
+
let entitlement;
|
|
142
|
+
switch (productType) {
|
|
143
|
+
case EProductType.PACES: {
|
|
144
|
+
entitlement = paceEntitlementMap[typeId];
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case EProductType.OSCE:
|
|
148
|
+
case EProductType.PLAB2: {
|
|
149
|
+
entitlement = osceEntitlementMap[typeId];
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
default: {
|
|
153
|
+
entitlement =
|
|
154
|
+
typeId === ETopicType.CLINICAL
|
|
155
|
+
? clinicalEntitlementMap[productType]
|
|
156
|
+
: topicEntitlementMap[typeId];
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
126
160
|
if (!entitlement) {
|
|
127
161
|
return { id: 0, name: 'Unknown' };
|
|
128
162
|
}
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -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
|
-
`;
|
|
@@ -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;
|