@quesmed/types 1.4.28 → 1.4.32

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/index.js CHANGED
@@ -63,7 +63,7 @@ exports.medicalWords = [
63
63
  ['Abrasion', 'Abscess', 'Acute', 'Amnesia', 'Anterior', 'Axillary'],
64
64
  ['Benign', 'Biopsy', 'Botox', 'Bladder', 'Body', 'Bradykinin'],
65
65
  ['Chronic', 'Contusion', 'Cystic', 'Complement', 'CT'],
66
- ['Defibrillator', 'Dermis', 'DNA', 'Dorsal'],
66
+ ['Defibrillator', 'Dermis', 'DNA', 'Dorsal', 'Dominant'],
67
67
  ['Edema', 'Embolism', 'Epidermis', 'Endoscope'],
68
68
  ['Fracture', 'Fibrillation', 'Flutter', 'Fever', 'Fungal', 'Fibrosis'],
69
69
  ['Gland', 'Gastro', 'Gas', 'Gallbladder'],
@@ -76,8 +76,8 @@ exports.medicalWords = [
76
76
  ['Neoplasia', 'NICU', 'Nightshift'],
77
77
  ['Outpatient', 'Osteoporosis', 'Otitis', 'Odor'],
78
78
  ['Prognosis', 'Power', 'Poisoning', 'Pudendal', 'Polyps', 'Prone'],
79
- ['QRS', 'Qwave'],
80
- ['Relapse', 'Rhinoplasty', 'Retrograde', 'RNA'],
79
+ ['QRS', 'Qwave', 'Quaternary'],
80
+ ['Relapse', 'Rhinoplasty', 'Retrograde', 'RNA', 'Recessive'],
81
81
  [
82
82
  'Suture',
83
83
  'Serotonin',
@@ -98,14 +98,19 @@ exports.medicalWords = [
98
98
  ['Uveitis', 'Uremic', 'Urology', 'Upright', 'Uwave'],
99
99
  ['Viral', 'Vaccine', 'Vitamin', 'Versicolor', 'Ventral'],
100
100
  ['Wilsons', 'WBC', 'Womb'],
101
- ['X-ray'],
101
+ ['X-ray', 'Xeno', 'X-linked'],
102
102
  ['Yellow', 'Yersinia', 'Yeast'],
103
- ['Zika', 'Zebras', 'Zygomatic', 'Zline'],
103
+ ['Zika', 'Zebras', 'Zygomatic', 'Z-line'],
104
104
  ];
105
105
  function generateDisplayName(firstName, lastName) {
106
- const firstNameChar = firstName.toLowerCase().charCodeAt(0) - 97 ||
107
- Math.round(Math.random() * 26);
108
- const lastNameChar = lastName.toLowerCase().charCodeAt(0) - 97 || Math.round(Math.random() * 26);
106
+ let firstNameChar = firstName.toLowerCase().charCodeAt(0) - 97;
107
+ if (isNaN(firstNameChar) || firstNameChar > 25 || firstNameChar < 0) {
108
+ firstNameChar = Math.round(Math.random() * 25);
109
+ }
110
+ let lastNameChar = lastName.toLowerCase().charCodeAt(0) - 97 || Math.round(Math.random() * 25);
111
+ if (isNaN(lastNameChar) || lastNameChar > 25 || lastNameChar < 0) {
112
+ lastNameChar = Math.round(Math.random() * 25);
113
+ }
109
114
  let displayName;
110
115
  const medWordsFirstName = (0, random_1.getRandom)(exports.medicalWords[firstNameChar], 2);
111
116
  if (firstNameChar === lastNameChar) {
package/index.mjs CHANGED
@@ -38,7 +38,7 @@ export const medicalWords = [
38
38
  ['Abrasion', 'Abscess', 'Acute', 'Amnesia', 'Anterior', 'Axillary'],
39
39
  ['Benign', 'Biopsy', 'Botox', 'Bladder', 'Body', 'Bradykinin'],
40
40
  ['Chronic', 'Contusion', 'Cystic', 'Complement', 'CT'],
41
- ['Defibrillator', 'Dermis', 'DNA', 'Dorsal'],
41
+ ['Defibrillator', 'Dermis', 'DNA', 'Dorsal', 'Dominant'],
42
42
  ['Edema', 'Embolism', 'Epidermis', 'Endoscope'],
43
43
  ['Fracture', 'Fibrillation', 'Flutter', 'Fever', 'Fungal', 'Fibrosis'],
44
44
  ['Gland', 'Gastro', 'Gas', 'Gallbladder'],
@@ -51,8 +51,8 @@ export const medicalWords = [
51
51
  ['Neoplasia', 'NICU', 'Nightshift'],
52
52
  ['Outpatient', 'Osteoporosis', 'Otitis', 'Odor'],
53
53
  ['Prognosis', 'Power', 'Poisoning', 'Pudendal', 'Polyps', 'Prone'],
54
- ['QRS', 'Qwave'],
55
- ['Relapse', 'Rhinoplasty', 'Retrograde', 'RNA'],
54
+ ['QRS', 'Qwave', 'Quaternary'],
55
+ ['Relapse', 'Rhinoplasty', 'Retrograde', 'RNA', 'Recessive'],
56
56
  [
57
57
  'Suture',
58
58
  'Serotonin',
@@ -73,14 +73,19 @@ export const medicalWords = [
73
73
  ['Uveitis', 'Uremic', 'Urology', 'Upright', 'Uwave'],
74
74
  ['Viral', 'Vaccine', 'Vitamin', 'Versicolor', 'Ventral'],
75
75
  ['Wilsons', 'WBC', 'Womb'],
76
- ['X-ray'],
76
+ ['X-ray', 'Xeno', 'X-linked'],
77
77
  ['Yellow', 'Yersinia', 'Yeast'],
78
- ['Zika', 'Zebras', 'Zygomatic', 'Zline'],
78
+ ['Zika', 'Zebras', 'Zygomatic', 'Z-line'],
79
79
  ];
80
80
  export function generateDisplayName(firstName, lastName) {
81
- const firstNameChar = firstName.toLowerCase().charCodeAt(0) - 97 ||
82
- Math.round(Math.random() * 26);
83
- const lastNameChar = lastName.toLowerCase().charCodeAt(0) - 97 || Math.round(Math.random() * 26);
81
+ let firstNameChar = firstName.toLowerCase().charCodeAt(0) - 97;
82
+ if (isNaN(firstNameChar) || firstNameChar > 25 || firstNameChar < 0) {
83
+ firstNameChar = Math.round(Math.random() * 25);
84
+ }
85
+ let lastNameChar = lastName.toLowerCase().charCodeAt(0) - 97 || Math.round(Math.random() * 25);
86
+ if (isNaN(lastNameChar) || lastNameChar > 25 || lastNameChar < 0) {
87
+ lastNameChar = Math.round(Math.random() * 25);
88
+ }
84
89
  let displayName;
85
90
  const medWordsFirstName = getRandom(medicalWords[firstNameChar], 2);
86
91
  if (firstNameChar === lastNameChar) {
@@ -34,7 +34,8 @@ export declare enum EOsceMarksheetAction {
34
34
  CONNECT = 5,
35
35
  DISCONNECT = 6,
36
36
  SELECT = 7,
37
- LEFT = 8
37
+ LEFT = 8,
38
+ KICK = 9
38
39
  }
39
40
  export interface IOsceMarksheet {
40
41
  id: Id;
@@ -20,4 +20,5 @@ var EOsceMarksheetAction;
20
20
  EOsceMarksheetAction[EOsceMarksheetAction["DISCONNECT"] = 6] = "DISCONNECT";
21
21
  EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
22
22
  EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
23
+ EOsceMarksheetAction[EOsceMarksheetAction["KICK"] = 9] = "KICK";
23
24
  })(EOsceMarksheetAction = exports.EOsceMarksheetAction || (exports.EOsceMarksheetAction = {}));
@@ -17,4 +17,5 @@ export var EOsceMarksheetAction;
17
17
  EOsceMarksheetAction[EOsceMarksheetAction["DISCONNECT"] = 6] = "DISCONNECT";
18
18
  EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
19
19
  EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
20
+ EOsceMarksheetAction[EOsceMarksheetAction["KICK"] = 9] = "KICK";
20
21
  })(EOsceMarksheetAction || (EOsceMarksheetAction = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.4.28",
3
+ "version": "1.4.32",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -26,7 +26,7 @@ exports.BLOG_POST = (0, client_1.gql) `
26
26
  exports.BLOG_POSTS = (0, client_1.gql) `
27
27
  ${blog_1.BLOG_POST_FIELDS}
28
28
  query BlogPosts($tags: [Int]!) {
29
- blogPosts(tags: $tags) {
29
+ blogPosts(tagIds: $tags) {
30
30
  ...BlogPostFields
31
31
  relatedBlogPosts {
32
32
  ...BlogPostFields
@@ -23,7 +23,7 @@ export const BLOG_POST = gql `
23
23
  export const BLOG_POSTS = gql `
24
24
  ${BLOG_POST_FIELDS}
25
25
  query BlogPosts($tags: [Int]!) {
26
- blogPosts(tags: $tags) {
26
+ blogPosts(tagIds: $tags) {
27
27
  ...BlogPostFields
28
28
  relatedBlogPosts {
29
29
  ...BlogPostFields
@@ -4,8 +4,7 @@ export * from './blog';
4
4
  export * from './book';
5
5
  export * from './feedback';
6
6
  export * as restricted from './restricted';
7
- export * from './sampleCards';
8
- export * from './sampleQuestions';
7
+ export * from './sample';
9
8
  export * from './subscription';
10
9
  export * from './university';
11
10
  export * from './user';
@@ -29,8 +29,7 @@ __exportStar(require("./blog"), exports);
29
29
  __exportStar(require("./book"), exports);
30
30
  __exportStar(require("./feedback"), exports);
31
31
  exports.restricted = __importStar(require("./restricted"));
32
- __exportStar(require("./sampleCards"), exports);
33
- __exportStar(require("./sampleQuestions"), exports);
32
+ __exportStar(require("./sample"), exports);
34
33
  __exportStar(require("./subscription"), exports);
35
34
  __exportStar(require("./university"), exports);
36
35
  __exportStar(require("./user"), exports);
@@ -4,8 +4,7 @@ export * from './blog';
4
4
  export * from './book';
5
5
  export * from './feedback';
6
6
  export * as restricted from './restricted';
7
- export * from './sampleCards';
8
- export * from './sampleQuestions';
7
+ export * from './sample';
9
8
  export * from './subscription';
10
9
  export * from './university';
11
10
  export * from './user';
@@ -0,0 +1,26 @@
1
+ import { IMarksheet, IOsceMarksheet, ITodo } from '../../models';
2
+ import { graphqlNormalize, RootData } from '../types';
3
+ export declare const SAMPLE_CONTENT: import("@apollo/client").DocumentNode;
4
+ export declare type ISampleContentVar = null;
5
+ interface ISampleContent {
6
+ marksheets: IMarksheet[];
7
+ todos: ITodo[];
8
+ osceMarksheets: IOsceMarksheet[];
9
+ }
10
+ export declare type ISampleContentData = RootData<graphqlNormalize & ISampleContent, 'sampleContent'>;
11
+ export declare const SAMPLE_MARKSHEET: import("@apollo/client").DocumentNode;
12
+ export interface ISampleMarksheetVar {
13
+ marksheetId: number;
14
+ }
15
+ export declare type ISampleMarksheetData = RootData<graphqlNormalize & IMarksheet, 'sampleMarksheet'>;
16
+ export declare const SAMPLE_TODO: import("@apollo/client").DocumentNode;
17
+ export interface ISampleTodoVar {
18
+ todoId: number;
19
+ }
20
+ export declare type ISampleTodoData = RootData<graphqlNormalize & ITodo, 'sampleTodo'>;
21
+ export declare const SAMPLE_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
22
+ export interface ISampleOsceMarksheetVar {
23
+ osceMarksheetId: number;
24
+ }
25
+ export declare type ISampleOsceMarksheetData = RootData<graphqlNormalize & IOsceMarksheet, 'sampleOsceMarksheet'>;
26
+ export {};
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SAMPLE_OSCE_MARKSHEET = exports.SAMPLE_TODO = exports.SAMPLE_MARKSHEET = exports.SAMPLE_CONTENT = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../fragments");
6
+ exports.SAMPLE_CONTENT = (0, client_1.gql) `
7
+ query SampleContent {
8
+ sampleContent {
9
+ marksheets {
10
+ id
11
+ source
12
+ }
13
+ todos {
14
+ id
15
+ source
16
+ }
17
+ osceMarksheets {
18
+ id
19
+ osceStation {
20
+ name
21
+ }
22
+ }
23
+ }
24
+ }
25
+ `;
26
+ exports.SAMPLE_MARKSHEET = (0, client_1.gql) `
27
+ query SampleMarksheet($marksheetId: Int!) {
28
+ sampleMarksheet(marksheetId: $marksheetId) {
29
+ id
30
+ endedAt
31
+ source
32
+ marks {
33
+ id
34
+ index
35
+ questionChoiceId
36
+ timeTaken
37
+ question {
38
+ id
39
+ typeId
40
+ conceptId
41
+ concept {
42
+ name
43
+ chapter {
44
+ explanation
45
+ }
46
+ }
47
+ question
48
+ totalVotes
49
+ choices {
50
+ id
51
+ name
52
+ explanation
53
+ label
54
+ answer
55
+ votes
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ `;
62
+ exports.SAMPLE_TODO = (0, client_1.gql) `
63
+ query SampleTodo($todoId: Int!) {
64
+ sampleTodo(todoId: $todoId) {
65
+ id
66
+ dailyTask
67
+ source
68
+ marks {
69
+ id
70
+ cardId
71
+ score
72
+ timeTaken
73
+ card {
74
+ id
75
+ question
76
+ concept {
77
+ name
78
+ chapter {
79
+ explanation
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ `;
87
+ exports.SAMPLE_OSCE_MARKSHEET = (0, client_1.gql) `
88
+ ${fragments_1.OSCE_STATION_FIELDS}
89
+ ${fragments_1.OSCE_MARKSHEET_FIELDS}
90
+ query SampleOsceMarksheet($osceMarksheetId: Int!) {
91
+ sampleOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
92
+ ...OsceMarksheetFields
93
+ osceStation {
94
+ ...OsceStationFields
95
+ }
96
+ }
97
+ }
98
+ `;
@@ -0,0 +1,95 @@
1
+ import { gql } from '@apollo/client';
2
+ import { OSCE_MARKSHEET_FIELDS, OSCE_STATION_FIELDS } from '../fragments';
3
+ export const SAMPLE_CONTENT = gql `
4
+ query SampleContent {
5
+ sampleContent {
6
+ marksheets {
7
+ id
8
+ source
9
+ }
10
+ todos {
11
+ id
12
+ source
13
+ }
14
+ osceMarksheets {
15
+ id
16
+ osceStation {
17
+ name
18
+ }
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ export const SAMPLE_MARKSHEET = gql `
24
+ query SampleMarksheet($marksheetId: Int!) {
25
+ sampleMarksheet(marksheetId: $marksheetId) {
26
+ id
27
+ endedAt
28
+ source
29
+ marks {
30
+ id
31
+ index
32
+ questionChoiceId
33
+ timeTaken
34
+ question {
35
+ id
36
+ typeId
37
+ conceptId
38
+ concept {
39
+ name
40
+ chapter {
41
+ explanation
42
+ }
43
+ }
44
+ question
45
+ totalVotes
46
+ choices {
47
+ id
48
+ name
49
+ explanation
50
+ label
51
+ answer
52
+ votes
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ `;
59
+ export const SAMPLE_TODO = gql `
60
+ query SampleTodo($todoId: Int!) {
61
+ sampleTodo(todoId: $todoId) {
62
+ id
63
+ dailyTask
64
+ source
65
+ marks {
66
+ id
67
+ cardId
68
+ score
69
+ timeTaken
70
+ card {
71
+ id
72
+ question
73
+ concept {
74
+ name
75
+ chapter {
76
+ explanation
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ `;
84
+ export const SAMPLE_OSCE_MARKSHEET = gql `
85
+ ${OSCE_STATION_FIELDS}
86
+ ${OSCE_MARKSHEET_FIELDS}
87
+ query SampleOsceMarksheet($osceMarksheetId: Int!) {
88
+ sampleOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
89
+ ...OsceMarksheetFields
90
+ osceStation {
91
+ ...OsceStationFields
92
+ }
93
+ }
94
+ }
95
+ `;
@@ -1,5 +1,6 @@
1
1
  import { EOsceMarksheetAction, EOsceRoles, IClassYear, Id, IOsceMarksheetUser, IUser } from '../../models';
2
2
  import { RootData } from '../types';
3
+ import { EClassYearGroup } from './../../models/User';
3
4
  export declare const OSCE_ROLE_CHANGE_KEY = "OSCE_ROLE_CHANGE";
4
5
  export declare const OSCE_MARKSHEET_ACTION_KEY = "OSCE_MARKSHEET_ACTION";
5
6
  export declare const OSCE_MATCHMAKING_KEY = "OSCE_MATCHMAKING";
@@ -40,6 +41,7 @@ export interface IOsceMatchmakingAction {
40
41
  matchedUsers: number;
41
42
  userId: Id;
42
43
  classYear: IClassYear;
44
+ classYearGroup: EClassYearGroup;
43
45
  lastSyncAt: number;
44
46
  startedAt: number;
45
47
  grouped: boolean;
@@ -1,6 +0,0 @@
1
- import { ITodo } from '../../models';
2
- export interface ISampleCardsVar {
3
- filter: 'sample-clinical-quescards' | 'sample-pre-clinical-quescards';
4
- }
5
- export interface ISampleCardsData extends ITodo {
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { IMarksheet } from '../../models';
2
- export interface ISampleQuestionsVar {
3
- filter: 'sample-clinical-questions' | 'sample-pre-clinical-questions';
4
- }
5
- export interface ISampleQuestionsData extends IMarksheet {
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export {};