@quesmed/types-rn 2.6.83 → 2.6.84

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 CHANGED
@@ -20,8 +20,9 @@ export declare enum IAccessLevel {
20
20
  EXPIRED = "expired"
21
21
  }
22
22
  export declare enum ETheme {
23
- LIGHT = 0,
24
- DARK = 1
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["LIGHT"] = 0] = "LIGHT";
17
- ETheme[ETheme["DARK"] = 1] = "DARK";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.83",
3
+ "version": "2.6.84",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -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: (topicType: ETopicType, productType: EProductType) => {
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 = (topicType, productType) => {
126
- const entitlement = topicType === models_1.ETopicType.CLINICAL
127
- ? clinicalEntitlementMap[productType]
128
- : topicEntitlementMap[topicType];
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
  }