@quesmed/types 2.6.60 → 2.6.62

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.
@@ -1,4 +1,7 @@
1
1
  import { Id } from './Type';
2
+ /**
3
+ * TODO:: Refactor so that it only has product and not entitlements
4
+ */
2
5
  export declare enum EProductType {
3
6
  ALL = 0,
4
7
  QBANK = 1,
@@ -15,6 +18,25 @@ export declare enum EProductType {
15
18
  INTERVIEW_CST = 12,
16
19
  INTERVIEW_IMT = 13,
17
20
  INTERVIEW_RADIOLOGY = 14,
21
+ CLINICAL = 15,
22
+ DATA_INTERPRETATION = 16,
23
+ CLINICAL_SUBSET = 17,
24
+ CLINICAL_PROBLEM_SOLVING = 18,
25
+ PROFESSIONAL_DILEMMA = 19,
26
+ HISTORY_TAKING = 20,
27
+ COMMUNICATION_SKILLS = 21,
28
+ EXAMINATION = 22,
29
+ PROCEDURE = 23,
30
+ INTERPRETATION = 24,
31
+ ABCDE = 25,
32
+ PRESCRIBING = 26,
33
+ MIXED = 27,
34
+ ABDOMINAL = 28,
35
+ CARDIOVASCULAR = 29,
36
+ COMMUNICATION = 30,
37
+ CONSULTATION = 31,
38
+ NEUROLOGY = 32,
39
+ RESPIRATORY = 33,
18
40
  PLAB1 = 34,
19
41
  PLAB2 = 35
20
42
  }
@@ -41,7 +63,12 @@ export declare enum EEntitlementType {
41
63
  ANATOMY = 36,
42
64
  PRE_CLINICAL = 37,
43
65
  MRCP_PART_1 = 38,
44
- MRCP_PART_2 = 39
66
+ MRCP_PART_2 = 39,
67
+ INTERVIEW_ANAESTHETICS = 40,
68
+ INTERVIEW_CST = 41,
69
+ INTERVIEW_IMT = 42,
70
+ INTERVIEW_RADIOLOGY = 43,
71
+ PLAB_1 = 44
45
72
  }
46
73
  export interface IProduct {
47
74
  id: Id;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EAppType = exports.EEntitlementType = exports.EProductType = void 0;
4
+ /**
5
+ * TODO:: Refactor so that it only has product and not entitlements
6
+ */
4
7
  var EProductType;
5
8
  (function (EProductType) {
6
9
  EProductType[EProductType["ALL"] = 0] = "ALL";
@@ -18,6 +21,25 @@ var EProductType;
18
21
  EProductType[EProductType["INTERVIEW_CST"] = 12] = "INTERVIEW_CST";
19
22
  EProductType[EProductType["INTERVIEW_IMT"] = 13] = "INTERVIEW_IMT";
20
23
  EProductType[EProductType["INTERVIEW_RADIOLOGY"] = 14] = "INTERVIEW_RADIOLOGY";
24
+ EProductType[EProductType["CLINICAL"] = 15] = "CLINICAL";
25
+ EProductType[EProductType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
26
+ EProductType[EProductType["CLINICAL_SUBSET"] = 17] = "CLINICAL_SUBSET";
27
+ EProductType[EProductType["CLINICAL_PROBLEM_SOLVING"] = 18] = "CLINICAL_PROBLEM_SOLVING";
28
+ EProductType[EProductType["PROFESSIONAL_DILEMMA"] = 19] = "PROFESSIONAL_DILEMMA";
29
+ EProductType[EProductType["HISTORY_TAKING"] = 20] = "HISTORY_TAKING";
30
+ EProductType[EProductType["COMMUNICATION_SKILLS"] = 21] = "COMMUNICATION_SKILLS";
31
+ EProductType[EProductType["EXAMINATION"] = 22] = "EXAMINATION";
32
+ EProductType[EProductType["PROCEDURE"] = 23] = "PROCEDURE";
33
+ EProductType[EProductType["INTERPRETATION"] = 24] = "INTERPRETATION";
34
+ EProductType[EProductType["ABCDE"] = 25] = "ABCDE";
35
+ EProductType[EProductType["PRESCRIBING"] = 26] = "PRESCRIBING";
36
+ EProductType[EProductType["MIXED"] = 27] = "MIXED";
37
+ EProductType[EProductType["ABDOMINAL"] = 28] = "ABDOMINAL";
38
+ EProductType[EProductType["CARDIOVASCULAR"] = 29] = "CARDIOVASCULAR";
39
+ EProductType[EProductType["COMMUNICATION"] = 30] = "COMMUNICATION";
40
+ EProductType[EProductType["CONSULTATION"] = 31] = "CONSULTATION";
41
+ EProductType[EProductType["NEUROLOGY"] = 32] = "NEUROLOGY";
42
+ EProductType[EProductType["RESPIRATORY"] = 33] = "RESPIRATORY";
21
43
  EProductType[EProductType["PLAB1"] = 34] = "PLAB1";
22
44
  EProductType[EProductType["PLAB2"] = 35] = "PLAB2";
23
45
  })(EProductType = exports.EProductType || (exports.EProductType = {}));
@@ -46,6 +68,11 @@ var EEntitlementType;
46
68
  EEntitlementType[EEntitlementType["PRE_CLINICAL"] = 37] = "PRE_CLINICAL";
47
69
  EEntitlementType[EEntitlementType["MRCP_PART_1"] = 38] = "MRCP_PART_1";
48
70
  EEntitlementType[EEntitlementType["MRCP_PART_2"] = 39] = "MRCP_PART_2";
71
+ EEntitlementType[EEntitlementType["INTERVIEW_ANAESTHETICS"] = 40] = "INTERVIEW_ANAESTHETICS";
72
+ EEntitlementType[EEntitlementType["INTERVIEW_CST"] = 41] = "INTERVIEW_CST";
73
+ EEntitlementType[EEntitlementType["INTERVIEW_IMT"] = 42] = "INTERVIEW_IMT";
74
+ EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
75
+ EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
49
76
  })(EEntitlementType = exports.EEntitlementType || (exports.EEntitlementType = {}));
50
77
  var EAppType;
51
78
  (function (EAppType) {
@@ -10,22 +10,11 @@ export interface IUpsertChapterNoteVar {
10
10
  chapterId: number;
11
11
  note: string;
12
12
  }
13
- export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
13
+ export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
14
14
  export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
15
15
  export declare const optimisticUpsertChapterNote: (data: IUpsertChapterNoteVar & {
16
16
  userId: number;
17
- }) => {
18
- restricted: {
19
- upsertChapterNote: {
20
- createdAt: Date;
21
- updatedAt: Date;
22
- chapterId: number;
23
- note: string;
24
- userId: number;
25
- __typename: string;
26
- };
27
- };
28
- };
17
+ }) => IUpsertChapterNoteData;
29
18
  /**
30
19
  * addChapterHighlight
31
20
  */
@@ -39,16 +39,18 @@ const updateCacheOnUpsertChapterNote = (cache, result, options) => {
39
39
  };
40
40
  exports.updateCacheOnUpsertChapterNote = updateCacheOnUpsertChapterNote;
41
41
  const optimisticUpsertChapterNote = (data) => {
42
- return {
42
+ const payload = {
43
43
  restricted: {
44
44
  upsertChapterNote: {
45
45
  __typename: 'UserChapterNote',
46
46
  ...data,
47
+ id: Date.now(),
47
48
  createdAt: new Date(),
48
49
  updatedAt: new Date(),
49
50
  },
50
51
  },
51
52
  };
53
+ return payload;
52
54
  };
53
55
  exports.optimisticUpsertChapterNote = optimisticUpsertChapterNote;
54
56
  exports.ADD_CHAPTER_HIGHLIGHT = (0, client_1.gql) `
@@ -149,19 +149,8 @@ export interface IUpsertStationNoteVar {
149
149
  stationId: number;
150
150
  note: string;
151
151
  }
152
- export type IUpsertStationNoteData = RestrictedData<IUserStationNote, 'upsertStationNote'>;
152
+ export type IUpsertStationNoteData = RestrictedData<graphqlNormalize & Omit<IUserStationNote, 'station'>, 'upsertStationNote'>;
153
153
  export declare const updateCacheOnUpsertStationNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertStationNoteData>, options: ApolloUpdateOptions<IUpsertStationNoteVar>) => void;
154
154
  export declare const optimisticUpsertStationNote: (data: IUpsertStationNoteVar & {
155
155
  userId: number;
156
- }) => {
157
- restricted: {
158
- upsertStationNote: {
159
- createdAt: Date;
160
- updatedAt: Date;
161
- stationId: number;
162
- note: string;
163
- userId: number;
164
- __typename: string;
165
- };
166
- };
167
- };
156
+ }) => IUpsertStationNoteData;
@@ -52,7 +52,11 @@ exports.CREATE_OR_JOIN_OSCE_MARKSHEET = (0, client_1.gql) `
52
52
  exports.BUILD_OSCE_MARKSHEET = (0, client_1.gql) `
53
53
  ${fragments_1.OSCE_STATION_FIELDS}
54
54
  ${fragments_1.OSCE_MARKSHEET_FIELDS}
55
- mutation BuildOsceMarksheet($osceStationId: Int!, $osceMarksheetId: Int, $entitlementId: Int) {
55
+ mutation BuildOsceMarksheet(
56
+ $osceStationId: Int!
57
+ $osceMarksheetId: Int
58
+ $entitlementId: Int
59
+ ) {
56
60
  restricted {
57
61
  buildOsceMarksheet(
58
62
  osceStationId: $osceStationId
@@ -332,15 +336,17 @@ const updateCacheOnUpsertStationNote = (cache, result, options) => {
332
336
  };
333
337
  exports.updateCacheOnUpsertStationNote = updateCacheOnUpsertStationNote;
334
338
  const optimisticUpsertStationNote = (data) => {
335
- return {
339
+ const payload = {
336
340
  restricted: {
337
341
  upsertStationNote: {
338
342
  __typename: 'UserStationNote',
339
343
  ...data,
344
+ id: Date.now(),
340
345
  createdAt: new Date(),
341
346
  updatedAt: new Date(),
342
347
  },
343
348
  },
344
349
  };
350
+ return payload;
345
351
  };
346
352
  exports.optimisticUpsertStationNote = optimisticUpsertStationNote;
@@ -1 +1,2 @@
1
1
  export declare function getRandom<T>(arr: T[], n?: number): T[];
2
+ export declare function randomInt(min?: number, max?: number): number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRandom = void 0;
3
+ exports.randomInt = exports.getRandom = void 0;
4
4
  function getRandom(arr, n) {
5
5
  if (n === undefined || n === null) {
6
6
  n = arr.length;
@@ -18,3 +18,7 @@ function getRandom(arr, n) {
18
18
  return result;
19
19
  }
20
20
  exports.getRandom = getRandom;
21
+ function randomInt(min = 1, max = 100) {
22
+ return Math.floor(Math.random() * (max - min + 1)) + min;
23
+ }
24
+ exports.randomInt = randomInt;
@@ -1,4 +1,7 @@
1
1
  import { Id } from './Type';
2
+ /**
3
+ * TODO:: Refactor so that it only has product and not entitlements
4
+ */
2
5
  export declare enum EProductType {
3
6
  ALL = 0,
4
7
  QBANK = 1,
@@ -15,6 +18,25 @@ export declare enum EProductType {
15
18
  INTERVIEW_CST = 12,
16
19
  INTERVIEW_IMT = 13,
17
20
  INTERVIEW_RADIOLOGY = 14,
21
+ CLINICAL = 15,
22
+ DATA_INTERPRETATION = 16,
23
+ CLINICAL_SUBSET = 17,
24
+ CLINICAL_PROBLEM_SOLVING = 18,
25
+ PROFESSIONAL_DILEMMA = 19,
26
+ HISTORY_TAKING = 20,
27
+ COMMUNICATION_SKILLS = 21,
28
+ EXAMINATION = 22,
29
+ PROCEDURE = 23,
30
+ INTERPRETATION = 24,
31
+ ABCDE = 25,
32
+ PRESCRIBING = 26,
33
+ MIXED = 27,
34
+ ABDOMINAL = 28,
35
+ CARDIOVASCULAR = 29,
36
+ COMMUNICATION = 30,
37
+ CONSULTATION = 31,
38
+ NEUROLOGY = 32,
39
+ RESPIRATORY = 33,
18
40
  PLAB1 = 34,
19
41
  PLAB2 = 35
20
42
  }
@@ -41,7 +63,12 @@ export declare enum EEntitlementType {
41
63
  ANATOMY = 36,
42
64
  PRE_CLINICAL = 37,
43
65
  MRCP_PART_1 = 38,
44
- MRCP_PART_2 = 39
66
+ MRCP_PART_2 = 39,
67
+ INTERVIEW_ANAESTHETICS = 40,
68
+ INTERVIEW_CST = 41,
69
+ INTERVIEW_IMT = 42,
70
+ INTERVIEW_RADIOLOGY = 43,
71
+ PLAB_1 = 44
45
72
  }
46
73
  export interface IProduct {
47
74
  id: Id;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * TODO:: Refactor so that it only has product and not entitlements
3
+ */
1
4
  export var EProductType;
2
5
  (function (EProductType) {
3
6
  EProductType[EProductType["ALL"] = 0] = "ALL";
@@ -15,6 +18,25 @@ export var EProductType;
15
18
  EProductType[EProductType["INTERVIEW_CST"] = 12] = "INTERVIEW_CST";
16
19
  EProductType[EProductType["INTERVIEW_IMT"] = 13] = "INTERVIEW_IMT";
17
20
  EProductType[EProductType["INTERVIEW_RADIOLOGY"] = 14] = "INTERVIEW_RADIOLOGY";
21
+ EProductType[EProductType["CLINICAL"] = 15] = "CLINICAL";
22
+ EProductType[EProductType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
23
+ EProductType[EProductType["CLINICAL_SUBSET"] = 17] = "CLINICAL_SUBSET";
24
+ EProductType[EProductType["CLINICAL_PROBLEM_SOLVING"] = 18] = "CLINICAL_PROBLEM_SOLVING";
25
+ EProductType[EProductType["PROFESSIONAL_DILEMMA"] = 19] = "PROFESSIONAL_DILEMMA";
26
+ EProductType[EProductType["HISTORY_TAKING"] = 20] = "HISTORY_TAKING";
27
+ EProductType[EProductType["COMMUNICATION_SKILLS"] = 21] = "COMMUNICATION_SKILLS";
28
+ EProductType[EProductType["EXAMINATION"] = 22] = "EXAMINATION";
29
+ EProductType[EProductType["PROCEDURE"] = 23] = "PROCEDURE";
30
+ EProductType[EProductType["INTERPRETATION"] = 24] = "INTERPRETATION";
31
+ EProductType[EProductType["ABCDE"] = 25] = "ABCDE";
32
+ EProductType[EProductType["PRESCRIBING"] = 26] = "PRESCRIBING";
33
+ EProductType[EProductType["MIXED"] = 27] = "MIXED";
34
+ EProductType[EProductType["ABDOMINAL"] = 28] = "ABDOMINAL";
35
+ EProductType[EProductType["CARDIOVASCULAR"] = 29] = "CARDIOVASCULAR";
36
+ EProductType[EProductType["COMMUNICATION"] = 30] = "COMMUNICATION";
37
+ EProductType[EProductType["CONSULTATION"] = 31] = "CONSULTATION";
38
+ EProductType[EProductType["NEUROLOGY"] = 32] = "NEUROLOGY";
39
+ EProductType[EProductType["RESPIRATORY"] = 33] = "RESPIRATORY";
18
40
  EProductType[EProductType["PLAB1"] = 34] = "PLAB1";
19
41
  EProductType[EProductType["PLAB2"] = 35] = "PLAB2";
20
42
  })(EProductType || (EProductType = {}));
@@ -43,6 +65,11 @@ export var EEntitlementType;
43
65
  EEntitlementType[EEntitlementType["PRE_CLINICAL"] = 37] = "PRE_CLINICAL";
44
66
  EEntitlementType[EEntitlementType["MRCP_PART_1"] = 38] = "MRCP_PART_1";
45
67
  EEntitlementType[EEntitlementType["MRCP_PART_2"] = 39] = "MRCP_PART_2";
68
+ EEntitlementType[EEntitlementType["INTERVIEW_ANAESTHETICS"] = 40] = "INTERVIEW_ANAESTHETICS";
69
+ EEntitlementType[EEntitlementType["INTERVIEW_CST"] = 41] = "INTERVIEW_CST";
70
+ EEntitlementType[EEntitlementType["INTERVIEW_IMT"] = 42] = "INTERVIEW_IMT";
71
+ EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
72
+ EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
46
73
  })(EEntitlementType || (EEntitlementType = {}));
47
74
  export var EAppType;
48
75
  (function (EAppType) {
@@ -10,22 +10,11 @@ export interface IUpsertChapterNoteVar {
10
10
  chapterId: number;
11
11
  note: string;
12
12
  }
13
- export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
13
+ export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
14
14
  export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
15
15
  export declare const optimisticUpsertChapterNote: (data: IUpsertChapterNoteVar & {
16
16
  userId: number;
17
- }) => {
18
- restricted: {
19
- upsertChapterNote: {
20
- createdAt: Date;
21
- updatedAt: Date;
22
- chapterId: number;
23
- note: string;
24
- userId: number;
25
- __typename: string;
26
- };
27
- };
28
- };
17
+ }) => IUpsertChapterNoteData;
29
18
  /**
30
19
  * addChapterHighlight
31
20
  */
@@ -35,16 +35,18 @@ export const updateCacheOnUpsertChapterNote = (cache, result, options) => {
35
35
  });
36
36
  };
37
37
  export const optimisticUpsertChapterNote = (data) => {
38
- return {
38
+ const payload = {
39
39
  restricted: {
40
40
  upsertChapterNote: {
41
41
  __typename: 'UserChapterNote',
42
42
  ...data,
43
+ id: Date.now(),
43
44
  createdAt: new Date(),
44
45
  updatedAt: new Date(),
45
46
  },
46
47
  },
47
48
  };
49
+ return payload;
48
50
  };
49
51
  export const ADD_CHAPTER_HIGHLIGHT = gql `
50
52
  ${HIGHLIGHT_FIELDS}
@@ -149,19 +149,8 @@ export interface IUpsertStationNoteVar {
149
149
  stationId: number;
150
150
  note: string;
151
151
  }
152
- export type IUpsertStationNoteData = RestrictedData<IUserStationNote, 'upsertStationNote'>;
152
+ export type IUpsertStationNoteData = RestrictedData<graphqlNormalize & Omit<IUserStationNote, 'station'>, 'upsertStationNote'>;
153
153
  export declare const updateCacheOnUpsertStationNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertStationNoteData>, options: ApolloUpdateOptions<IUpsertStationNoteVar>) => void;
154
154
  export declare const optimisticUpsertStationNote: (data: IUpsertStationNoteVar & {
155
155
  userId: number;
156
- }) => {
157
- restricted: {
158
- upsertStationNote: {
159
- createdAt: Date;
160
- updatedAt: Date;
161
- stationId: number;
162
- note: string;
163
- userId: number;
164
- __typename: string;
165
- };
166
- };
167
- };
156
+ }) => IUpsertStationNoteData;
@@ -1,6 +1,6 @@
1
1
  import { gql } from '@apollo/client';
2
2
  import { EProductType, } from '../../../models';
3
- import { OSCE_STATION_FIELDS, COMPLETED_OSCE_MARKSHEET_FRAGMENT, COMPLETED_OSCE_STATION_FRAGMENT, OSCE_MARKSHEET_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, UPSERT_STATION_NOTE_FRAGMENT, } from '../../fragments';
3
+ import { COMPLETED_OSCE_MARKSHEET_FRAGMENT, COMPLETED_OSCE_STATION_FRAGMENT, OSCE_MARKSHEET_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, OSCE_STATION_FIELDS, UPSERT_STATION_NOTE_FRAGMENT, } from '../../fragments';
4
4
  export const START_OSCE_MATCHMAKING = gql `
5
5
  mutation StartOsceMatchmaking($sessionId: String!) {
6
6
  restricted {
@@ -49,7 +49,11 @@ export const CREATE_OR_JOIN_OSCE_MARKSHEET = gql `
49
49
  export const BUILD_OSCE_MARKSHEET = gql `
50
50
  ${OSCE_STATION_FIELDS}
51
51
  ${OSCE_MARKSHEET_FIELDS}
52
- mutation BuildOsceMarksheet($osceStationId: Int!, $osceMarksheetId: Int, $entitlementId: Int) {
52
+ mutation BuildOsceMarksheet(
53
+ $osceStationId: Int!
54
+ $osceMarksheetId: Int
55
+ $entitlementId: Int
56
+ ) {
53
57
  restricted {
54
58
  buildOsceMarksheet(
55
59
  osceStationId: $osceStationId
@@ -325,14 +329,16 @@ export const updateCacheOnUpsertStationNote = (cache, result, options) => {
325
329
  });
326
330
  };
327
331
  export const optimisticUpsertStationNote = (data) => {
328
- return {
332
+ const payload = {
329
333
  restricted: {
330
334
  upsertStationNote: {
331
335
  __typename: 'UserStationNote',
332
336
  ...data,
337
+ id: Date.now(),
333
338
  createdAt: new Date(),
334
339
  updatedAt: new Date(),
335
340
  },
336
341
  },
337
342
  };
343
+ return payload;
338
344
  };
@@ -1 +1,2 @@
1
1
  export declare function getRandom<T>(arr: T[], n?: number): T[];
2
+ export declare function randomInt(min?: number, max?: number): number;
@@ -14,3 +14,6 @@ export function getRandom(arr, n) {
14
14
  }
15
15
  return result;
16
16
  }
17
+ export function randomInt(min = 1, max = 100) {
18
+ return Math.floor(Math.random() * (max - min + 1)) + min;
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.60",
3
+ "version": "2.6.62",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",