@quesmed/types 1.0.2 → 1.0.6

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.
Files changed (180) hide show
  1. package/gql_input_output_types/User.d.ts +12 -0
  2. package/gql_input_output_types/User.js +2 -0
  3. package/gql_input_output_types/index.d.ts +74 -0
  4. package/gql_input_output_types/index.js +2 -0
  5. package/index.d.ts +16 -0
  6. package/index.js +20 -0
  7. package/models/Card.d.ts +15 -0
  8. package/models/Card.js +2 -0
  9. package/models/Chapter.d.ts +12 -0
  10. package/models/Chapter.js +2 -0
  11. package/models/Concept.d.ts +23 -0
  12. package/models/Concept.js +2 -0
  13. package/models/File.d.ts +10 -0
  14. package/models/File.js +2 -0
  15. package/models/Marksheet.d.ts +43 -0
  16. package/models/Marksheet.js +9 -0
  17. package/models/MockTest.d.ts +18 -0
  18. package/models/MockTest.js +2 -0
  19. package/models/OsceMarksheet.d.ts +55 -0
  20. package/models/OsceMarksheet.js +19 -0
  21. package/models/OsceStation.d.ts +39 -0
  22. package/models/OsceStation.js +12 -0
  23. package/models/Picture.d.ts +33 -0
  24. package/models/Picture.js +2 -0
  25. package/models/Promo.d.ts +14 -0
  26. package/models/Promo.js +2 -0
  27. package/models/Question.d.ts +54 -0
  28. package/models/Question.js +10 -0
  29. package/models/Subscription.d.ts +11 -0
  30. package/models/Subscription.js +2 -0
  31. package/models/Todo.d.ts +24 -0
  32. package/models/Todo.js +2 -0
  33. package/models/Token.d.ts +7 -0
  34. package/models/Token.js +2 -0
  35. package/models/{Topic.ts → Topic.d.ts} +4 -5
  36. package/models/Topic.js +2 -0
  37. package/models/Type.d.ts +7 -0
  38. package/models/Type.js +2 -0
  39. package/models/University.d.ts +5 -0
  40. package/models/University.js +2 -0
  41. package/models/User.d.ts +73 -0
  42. package/models/User.js +2 -0
  43. package/models/Video.d.ts +19 -0
  44. package/models/Video.js +2 -0
  45. package/models/{index.ts → index.d.ts} +0 -0
  46. package/models/index.js +31 -0
  47. package/package.json +6 -6
  48. package/resolvers/mutation/admin/algoliaSync.d.ts +10 -0
  49. package/resolvers/mutation/admin/algoliaSync.js +2 -0
  50. package/resolvers/mutation/admin/{index.ts → index.d.ts} +0 -0
  51. package/resolvers/mutation/admin/index.js +14 -0
  52. package/resolvers/mutation/admin/token.d.ts +24 -0
  53. package/resolvers/mutation/admin/token.js +2 -0
  54. package/resolvers/mutation/{index.ts → index.d.ts} +0 -0
  55. package/resolvers/mutation/index.js +14 -0
  56. package/resolvers/mutation/restricted/{agora.ts → agora.d.ts} +4 -6
  57. package/resolvers/mutation/restricted/agora.js +2 -0
  58. package/resolvers/mutation/restricted/contactUs.d.ts +16 -0
  59. package/resolvers/mutation/restricted/contactUs.js +2 -0
  60. package/resolvers/mutation/restricted/{index.ts → index.d.ts} +0 -0
  61. package/resolvers/mutation/restricted/index.js +22 -0
  62. package/resolvers/mutation/restricted/marksheet.d.ts +43 -0
  63. package/resolvers/mutation/restricted/marksheet.js +2 -0
  64. package/resolvers/mutation/restricted/mockTest.d.ts +15 -0
  65. package/resolvers/mutation/restricted/mockTest.js +2 -0
  66. package/resolvers/mutation/restricted/osce.d.ts +52 -0
  67. package/resolvers/mutation/restricted/osce.js +2 -0
  68. package/resolvers/mutation/restricted/questionDiscussion.d.ts +28 -0
  69. package/resolvers/mutation/restricted/questionDiscussion.js +2 -0
  70. package/resolvers/mutation/restricted/todo.d.ts +43 -0
  71. package/resolvers/mutation/restricted/todo.js +2 -0
  72. package/resolvers/mutation/restricted/token.d.ts +21 -0
  73. package/resolvers/mutation/restricted/token.js +2 -0
  74. package/resolvers/mutation/restricted/users.d.ts +25 -0
  75. package/resolvers/mutation/restricted/users.js +2 -0
  76. package/resolvers/mutation/restricted/{video.ts → video.d.ts} +3 -5
  77. package/resolvers/mutation/restricted/video.js +2 -0
  78. package/resolvers/mutation/stripe.d.ts +2 -0
  79. package/resolvers/mutation/stripe.js +2 -0
  80. package/resolvers/mutation/users.d.ts +30 -0
  81. package/resolvers/mutation/users.js +2 -0
  82. package/resolvers/mutation/validUserToken/{index.ts → index.d.ts} +0 -0
  83. package/resolvers/mutation/validUserToken/index.js +13 -0
  84. package/resolvers/mutation/validUserToken/user.d.ts +8 -0
  85. package/resolvers/mutation/validUserToken/user.js +2 -0
  86. package/resolvers/query/admin/getUserToken.d.ts +4 -0
  87. package/resolvers/query/admin/getUserToken.js +2 -0
  88. package/resolvers/query/admin/{index.ts → index.d.ts} +0 -0
  89. package/resolvers/query/admin/index.js +13 -0
  90. package/resolvers/query/{index.ts → index.d.ts} +0 -0
  91. package/resolvers/query/index.js +17 -0
  92. package/resolvers/query/restricted/anatomy.d.ts +3 -0
  93. package/resolvers/query/restricted/anatomy.js +2 -0
  94. package/resolvers/query/restricted/{index.ts → index.d.ts} +0 -0
  95. package/resolvers/query/restricted/index.js +22 -0
  96. package/resolvers/query/restricted/marksheet.d.ts +59 -0
  97. package/resolvers/query/restricted/marksheet.js +2 -0
  98. package/resolvers/query/restricted/mockTests.d.ts +9 -0
  99. package/resolvers/query/restricted/mockTests.js +2 -0
  100. package/resolvers/query/restricted/osce.d.ts +35 -0
  101. package/resolvers/query/restricted/osce.js +2 -0
  102. package/resolvers/query/restricted/quesBook.d.ts +3 -0
  103. package/resolvers/query/restricted/quesBook.js +2 -0
  104. package/resolvers/query/restricted/todos.d.ts +28 -0
  105. package/resolvers/query/restricted/todos.js +2 -0
  106. package/resolvers/query/restricted/topics.d.ts +20 -0
  107. package/resolvers/query/restricted/topics.js +2 -0
  108. package/resolvers/query/restricted/university.d.ts +15 -0
  109. package/resolvers/query/restricted/university.js +2 -0
  110. package/resolvers/query/restricted/user.d.ts +25 -0
  111. package/resolvers/query/restricted/user.js +2 -0
  112. package/resolvers/query/restricted/video.d.ts +10 -0
  113. package/resolvers/query/restricted/video.js +2 -0
  114. package/resolvers/query/sampleCards.d.ts +6 -0
  115. package/resolvers/query/sampleCards.js +2 -0
  116. package/resolvers/query/sampleQuestions.d.ts +6 -0
  117. package/resolvers/query/sampleQuestions.js +2 -0
  118. package/resolvers/query/{university.ts → university.d.ts} +2 -4
  119. package/resolvers/query/university.js +2 -0
  120. package/resolvers/query/user.d.ts +12 -0
  121. package/resolvers/query/user.js +2 -0
  122. package/resolvers/query/video.d.ts +14 -0
  123. package/resolvers/query/video.js +2 -0
  124. package/resolvers/subscription/{index.ts → index.d.ts} +0 -0
  125. package/resolvers/subscription/index.js +13 -0
  126. package/resolvers/subscription/osce.d.ts +44 -0
  127. package/resolvers/subscription/osce.js +24 -0
  128. package/utils/uuid4.d.ts +107 -0
  129. package/utils/uuid4.js +287 -0
  130. package/gql_input_output_types/User.ts +0 -12
  131. package/gql_input_output_types/index.ts +0 -87
  132. package/index.ts +0 -18
  133. package/models/Card.ts +0 -16
  134. package/models/Chapter.ts +0 -13
  135. package/models/Concept.ts +0 -25
  136. package/models/File.ts +0 -11
  137. package/models/Marksheet.ts +0 -48
  138. package/models/MockTest.ts +0 -20
  139. package/models/OsceMarksheet.ts +0 -61
  140. package/models/OsceStation.ts +0 -44
  141. package/models/Picture.ts +0 -37
  142. package/models/Promo.ts +0 -16
  143. package/models/Question.ts +0 -62
  144. package/models/Subscription.ts +0 -12
  145. package/models/Todo.ts +0 -26
  146. package/models/Token.ts +0 -8
  147. package/models/Type.ts +0 -5
  148. package/models/University.ts +0 -5
  149. package/models/User.ts +0 -78
  150. package/models/Video.ts +0 -20
  151. package/resolvers/mutation/admin/algoliaSync.ts +0 -19
  152. package/resolvers/mutation/admin/token.ts +0 -32
  153. package/resolvers/mutation/restricted/contactUs.ts +0 -18
  154. package/resolvers/mutation/restricted/marksheet.ts +0 -57
  155. package/resolvers/mutation/restricted/mockTest.ts +0 -21
  156. package/resolvers/mutation/restricted/osce.ts +0 -72
  157. package/resolvers/mutation/restricted/questionDiscussion.ts +0 -39
  158. package/resolvers/mutation/restricted/todo.ts +0 -55
  159. package/resolvers/mutation/restricted/token.ts +0 -28
  160. package/resolvers/mutation/restricted/users.ts +0 -31
  161. package/resolvers/mutation/stripe.ts +0 -3
  162. package/resolvers/mutation/users.ts +0 -38
  163. package/resolvers/mutation/validUserToken/user.ts +0 -11
  164. package/resolvers/query/admin/getUserToken.ts +0 -5
  165. package/resolvers/query/restricted/anatomy.ts +0 -5
  166. package/resolvers/query/restricted/marksheet.ts +0 -71
  167. package/resolvers/query/restricted/mockTests.ts +0 -13
  168. package/resolvers/query/restricted/osce.ts +0 -52
  169. package/resolvers/query/restricted/quesBook.ts +0 -4
  170. package/resolvers/query/restricted/todos.ts +0 -35
  171. package/resolvers/query/restricted/topics.ts +0 -25
  172. package/resolvers/query/restricted/university.ts +0 -16
  173. package/resolvers/query/restricted/user.ts +0 -31
  174. package/resolvers/query/restricted/video.ts +0 -13
  175. package/resolvers/query/sampleCards.ts +0 -7
  176. package/resolvers/query/sampleQuestions.ts +0 -7
  177. package/resolvers/query/user.ts +0 -17
  178. package/resolvers/query/video.ts +0 -20
  179. package/resolvers/subscription/osce.ts +0 -68
  180. package/utils/uuid4.ts +0 -286
@@ -0,0 +1,12 @@
1
+ export interface ILoginUserRes {
2
+ token: string;
3
+ stripeCustomerPortalUrl: string;
4
+ message: string;
5
+ }
6
+ export interface IWithToken {
7
+ token: string;
8
+ }
9
+ export interface ILoginWithExpiredSupportRes {
10
+ activeUser: IWithToken | null;
11
+ expiredUser: IWithToken | null;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,74 @@
1
+ import { IChapter, Id, IVideo } from '../models';
2
+ import { RegisterUserInput } from '../resolvers/mutation/users';
3
+ export interface TokenI {
4
+ firstName: string;
5
+ lastName: string;
6
+ username: string;
7
+ iat: number;
8
+ exp: number;
9
+ }
10
+ export interface UserTopicQuestionsInfo {
11
+ question: number;
12
+ correctQuestions: number;
13
+ incorrectQuestions: number;
14
+ }
15
+ export interface UserTopicCardsInfo {
16
+ cardCount: number;
17
+ ConfidentCards: number;
18
+ ReviewCards: number;
19
+ LearnCards: number;
20
+ }
21
+ export interface TodoInfo {
22
+ todoId: Id;
23
+ cardId: Id;
24
+ question: string;
25
+ explanation: string;
26
+ score: number;
27
+ timeTaken: number;
28
+ dailyTask: boolean;
29
+ source: string;
30
+ }
31
+ export interface ISearchConcepts {
32
+ id: number;
33
+ name: string;
34
+ chapter: IChapter;
35
+ topicId: number;
36
+ videos: IVideo[];
37
+ }
38
+ export interface IQuesBook {
39
+ id: number;
40
+ name: string;
41
+ concepts: ISearchConcepts[];
42
+ }
43
+ export interface LineItemI {
44
+ price: string;
45
+ quantity: number;
46
+ }
47
+ export interface CheckoutSessionArgsI {
48
+ priceId: string;
49
+ data: RegisterUserInput;
50
+ }
51
+ export interface IUniversityCalculation {
52
+ universityId: number;
53
+ specialityTopicId: number;
54
+ specialityTopicCorrect: number;
55
+ totalCorrect: number;
56
+ totalIncorrect: number;
57
+ totalCount: number;
58
+ rank: number;
59
+ }
60
+ export interface IUniversityCalculationMap {
61
+ [key: number]: IUniversityCalculation;
62
+ }
63
+ export interface IQuestionLike {
64
+ like: number;
65
+ dislike: number;
66
+ }
67
+ export interface ICheckoutSessionRes {
68
+ sessionId: string;
69
+ tempUserId: number;
70
+ }
71
+ export interface WithError {
72
+ error: string;
73
+ isError: boolean;
74
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/index.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ export declare const ERRORS: {
2
+ TOKEN_INVALID: string;
3
+ TOKEN_MISSING: string;
4
+ TOKEN_EXPIRED: string;
5
+ SUBSCRIPTION_EXPIRED: string;
6
+ PERMISSION_INVALID: string;
7
+ };
8
+ export declare const FCM_TOPICS: {
9
+ GLOBAL: string;
10
+ QBANK: string;
11
+ OSCE: string;
12
+ };
13
+ export declare enum EPlatformId {
14
+ QBANK = 0,
15
+ OSCE = 1
16
+ }
package/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EPlatformId = exports.FCM_TOPICS = exports.ERRORS = void 0;
4
+ exports.ERRORS = {
5
+ TOKEN_INVALID: 'Invalid token.',
6
+ TOKEN_MISSING: 'Missing token.',
7
+ TOKEN_EXPIRED: 'Expired token.',
8
+ SUBSCRIPTION_EXPIRED: 'Expired subscription.',
9
+ PERMISSION_INVALID: 'Invalid permission.',
10
+ };
11
+ exports.FCM_TOPICS = {
12
+ GLOBAL: 'global',
13
+ QBANK: 'qbank',
14
+ OSCE: 'osce',
15
+ };
16
+ var EPlatformId;
17
+ (function (EPlatformId) {
18
+ EPlatformId[EPlatformId["QBANK"] = 0] = "QBANK";
19
+ EPlatformId[EPlatformId["OSCE"] = 1] = "OSCE";
20
+ })(EPlatformId = exports.EPlatformId || (exports.EPlatformId = {}));
@@ -0,0 +1,15 @@
1
+ import { IConcept } from './Concept';
2
+ import { ICardPicture } from './Picture';
3
+ import { ITopic } from './Topic';
4
+ import { Id } from './Type';
5
+ export interface ICard {
6
+ id: Id;
7
+ createdAt: Date | string;
8
+ updatedAt: Date | string;
9
+ topic: ITopic;
10
+ conceptId: Id;
11
+ concept: IConcept;
12
+ question: string;
13
+ explanation: string;
14
+ pictures: ICardPicture[];
15
+ }
package/models/Card.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IFile } from './File';
2
+ import { IChapterPicture } from './Picture';
3
+ import { Id } from './Type';
4
+ export interface IChapter {
5
+ id: Id;
6
+ createdAt: string | Date;
7
+ updatedAt: string | Date;
8
+ explanation: string;
9
+ clinical: boolean;
10
+ pictures: IChapterPicture[];
11
+ files: IFile[];
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { IChapter } from './Chapter';
2
+ import { ITopic } from './Topic';
3
+ import { Id } from './Type';
4
+ import { IVideo } from './Video';
5
+ export interface IConcept {
6
+ id: Id;
7
+ createdAt: string | Date;
8
+ updatedAt: string | Date;
9
+ name: string;
10
+ chapterId: Id;
11
+ chapter: IChapter;
12
+ topicId: Id;
13
+ topic?: ITopic;
14
+ videos?: IVideo[];
15
+ }
16
+ export interface IAnatomyConcept {
17
+ id: number;
18
+ name: string;
19
+ totalCards: number;
20
+ ConfidentCards: number;
21
+ ReviewCards: number;
22
+ LearnCards: number;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { Id } from './Type';
2
+ export interface IFile {
3
+ id: Id;
4
+ createdAt: string | Date;
5
+ updatedAt: string | Date;
6
+ title: string;
7
+ url: string;
8
+ videoId?: number;
9
+ chapterId?: number;
10
+ }
package/models/File.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ import { IQuestion } from './Question';
2
+ import { Id } from './Type';
3
+ export interface IMarksheet {
4
+ id: Id;
5
+ createdAt: Date | string;
6
+ endedAt: Date | string;
7
+ source: string;
8
+ marks: IMarksheetMark[];
9
+ }
10
+ export declare enum EQuestionLike {
11
+ LIKE = 0,
12
+ DISLIKE = 1,
13
+ REMOVE = 2
14
+ }
15
+ export interface IMarksheetMark {
16
+ id: Id;
17
+ index: number;
18
+ questionChoiceId: Id;
19
+ timeTaken: number;
20
+ question: IQuestion;
21
+ mark?: string;
22
+ flagged: boolean;
23
+ like: number;
24
+ dislike: number;
25
+ isLikeByMe: string;
26
+ discussion: IDiscussion[];
27
+ }
28
+ export interface IDiscussion {
29
+ username: string;
30
+ userId: Id;
31
+ createdAt: Date | string;
32
+ comment: string;
33
+ like: number;
34
+ dislike: number;
35
+ isLikeByMe: string;
36
+ commentId: number;
37
+ questionId: number;
38
+ reply: IDiscussion[];
39
+ }
40
+ export interface ILikeDislikeCount {
41
+ like: number;
42
+ dislike: number;
43
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EQuestionLike = void 0;
4
+ var EQuestionLike;
5
+ (function (EQuestionLike) {
6
+ EQuestionLike[EQuestionLike["LIKE"] = 0] = "LIKE";
7
+ EQuestionLike[EQuestionLike["DISLIKE"] = 1] = "DISLIKE";
8
+ EQuestionLike[EQuestionLike["REMOVE"] = 2] = "REMOVE";
9
+ })(EQuestionLike = exports.EQuestionLike || (exports.EQuestionLike = {}));
@@ -0,0 +1,18 @@
1
+ import { IQuestion } from './Question';
2
+ import { Id } from './Type';
3
+ export interface IMockTest {
4
+ id: Id;
5
+ title: string;
6
+ clinical: boolean;
7
+ questions: IQuestion[];
8
+ }
9
+ export interface IUserMockTest {
10
+ id: Id;
11
+ title: string;
12
+ correct: number;
13
+ incorrect: number;
14
+ totalQuestions: number;
15
+ lastMarksheetId?: Id;
16
+ lastMarksheetStartedAt?: Date | string;
17
+ lastMarksheetEndedAt?: Date | string;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,55 @@
1
+ import { IOsceGroup } from '../resolvers/subscription';
2
+ import { IOsceStation, IOsceStationMark, IOsceType } from './OsceStation';
3
+ import { Id } from './Type';
4
+ export interface IOsceMarksheetMark {
5
+ id: Id;
6
+ mark: boolean;
7
+ osceMarksheetId: Id;
8
+ osceMarksheet?: IOsceMarksheet;
9
+ osceStationMarkId: Id;
10
+ osceStationMark?: IOsceStationMark;
11
+ }
12
+ export declare enum EOsceRoles {
13
+ CANDIDATE = 0,
14
+ ACTOR = 1,
15
+ EXAMINER = 2,
16
+ OBSERVER = 3
17
+ }
18
+ export declare enum EOsceMarksheetAction {
19
+ START = 0,
20
+ PAUSE = 1,
21
+ END = 2,
22
+ CONNECT = 3,
23
+ DISCONNECT = 4,
24
+ SELECT = 5
25
+ }
26
+ export interface IOsceMarksheet {
27
+ id: Id;
28
+ createdAt: Date | string;
29
+ updatedAt: Date | string;
30
+ timeTaken: number;
31
+ osceStationId: Id;
32
+ osceStation?: IOsceStation;
33
+ userId: Id;
34
+ solo: boolean;
35
+ role: EOsceRoles;
36
+ score: number;
37
+ globalScore: number;
38
+ feedback: string;
39
+ agoraId: string;
40
+ readingTime: number;
41
+ stationTime: number;
42
+ feedbackTime: number;
43
+ marks: IOsceMarksheetMark[];
44
+ users: IOsceGroup['members'];
45
+ }
46
+ export interface IDashboardOsce {
47
+ types: IOsceTypeDashboard[];
48
+ avgScore: number;
49
+ completed: number;
50
+ total: number;
51
+ }
52
+ export interface IOsceTypeDashboard extends IOsceType {
53
+ completed: number;
54
+ total: number;
55
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EOsceMarksheetAction = exports.EOsceRoles = void 0;
4
+ var EOsceRoles;
5
+ (function (EOsceRoles) {
6
+ EOsceRoles[EOsceRoles["CANDIDATE"] = 0] = "CANDIDATE";
7
+ EOsceRoles[EOsceRoles["ACTOR"] = 1] = "ACTOR";
8
+ EOsceRoles[EOsceRoles["EXAMINER"] = 2] = "EXAMINER";
9
+ EOsceRoles[EOsceRoles["OBSERVER"] = 3] = "OBSERVER";
10
+ })(EOsceRoles = exports.EOsceRoles || (exports.EOsceRoles = {}));
11
+ var EOsceMarksheetAction;
12
+ (function (EOsceMarksheetAction) {
13
+ EOsceMarksheetAction[EOsceMarksheetAction["START"] = 0] = "START";
14
+ EOsceMarksheetAction[EOsceMarksheetAction["PAUSE"] = 1] = "PAUSE";
15
+ EOsceMarksheetAction[EOsceMarksheetAction["END"] = 2] = "END";
16
+ EOsceMarksheetAction[EOsceMarksheetAction["CONNECT"] = 3] = "CONNECT";
17
+ EOsceMarksheetAction[EOsceMarksheetAction["DISCONNECT"] = 4] = "DISCONNECT";
18
+ EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 5] = "SELECT";
19
+ })(EOsceMarksheetAction = exports.EOsceMarksheetAction || (exports.EOsceMarksheetAction = {}));
@@ -0,0 +1,39 @@
1
+ import { IConcept } from './Concept';
2
+ import { Id } from './Type';
3
+ export interface IOsceType {
4
+ id: Id;
5
+ name: string;
6
+ }
7
+ export interface IOsceStationMark {
8
+ id: Id;
9
+ osceStationId: Id;
10
+ header: string;
11
+ name: string;
12
+ }
13
+ export declare enum EOsceType {
14
+ HISTORY_TAKING = 1,
15
+ COMMUNICATION_SKILLS = 2,
16
+ CLINICAL = 3,
17
+ PRACTICAL = 4,
18
+ DATA_INTERPRETATION = 5,
19
+ INTEGRATED = 6
20
+ }
21
+ export interface IOsceStation {
22
+ id: Id;
23
+ createdAt: Date | string;
24
+ updatedAt: Date | string;
25
+ name: string;
26
+ osceTypeId: Id;
27
+ osceType?: IOsceType;
28
+ difficulty: number;
29
+ candidateBrief: string;
30
+ examinerBrief: string;
31
+ actorBrief: string;
32
+ explanation: string;
33
+ marks: IOsceStationMark[];
34
+ concepts?: IConcept[];
35
+ }
36
+ export interface IOsceStationItem extends IOsceStation {
37
+ attempted: boolean;
38
+ score: number;
39
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EOsceType = void 0;
4
+ var EOsceType;
5
+ (function (EOsceType) {
6
+ EOsceType[EOsceType["HISTORY_TAKING"] = 1] = "HISTORY_TAKING";
7
+ EOsceType[EOsceType["COMMUNICATION_SKILLS"] = 2] = "COMMUNICATION_SKILLS";
8
+ EOsceType[EOsceType["CLINICAL"] = 3] = "CLINICAL";
9
+ EOsceType[EOsceType["PRACTICAL"] = 4] = "PRACTICAL";
10
+ EOsceType[EOsceType["DATA_INTERPRETATION"] = 5] = "DATA_INTERPRETATION";
11
+ EOsceType[EOsceType["INTEGRATED"] = 6] = "INTEGRATED";
12
+ })(EOsceType = exports.EOsceType || (exports.EOsceType = {}));
@@ -0,0 +1,33 @@
1
+ import { ITopic } from './Topic';
2
+ import { Id } from './Type';
3
+ export interface IPicture {
4
+ id: Id;
5
+ createdAt: string | Date;
6
+ updatedAt: string | Date;
7
+ name: string;
8
+ caption: string;
9
+ path: string;
10
+ path512: string;
11
+ path256: string;
12
+ topicId: Id;
13
+ topic: ITopic;
14
+ }
15
+ export interface IQuestionPicture {
16
+ id: Id;
17
+ pictureId: Id;
18
+ questionId: Id;
19
+ choiceId: Id | null;
20
+ picture: IPicture;
21
+ }
22
+ export interface ICardPicture {
23
+ id: Id;
24
+ pictureId: Id;
25
+ cardId: Id;
26
+ picture: IPicture;
27
+ }
28
+ export interface IChapterPicture {
29
+ id: Id;
30
+ pictureId: Id;
31
+ chapterId: Id;
32
+ picture: IPicture;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { Id } from './Type';
2
+ export interface ICoupon {
3
+ id: Id;
4
+ createdAt: string | Date;
5
+ name: string;
6
+ affiliateId: Id;
7
+ }
8
+ export interface IPromoReport {
9
+ id: Id;
10
+ date: string | Date;
11
+ couponId: Id;
12
+ userId: Id;
13
+ subscriptionId: Id;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,54 @@
1
+ import { IConcept } from './Concept';
2
+ import { IQuestionPicture } from './Picture';
3
+ import { Id } from './Type';
4
+ export declare enum EQuestionType {
5
+ SINGLE_BEST_ANSWER = 1,
6
+ QUESTION_ANSWER = 2,
7
+ MULTIPLE_ANSWERS = 3,
8
+ PRESCRIPTION_ANSWER = 4
9
+ }
10
+ export interface IQuestion {
11
+ id: Id;
12
+ typeId: Id;
13
+ conceptId: Id;
14
+ public: boolean;
15
+ concept?: IConcept;
16
+ question: string;
17
+ explanation?: string;
18
+ answer: any;
19
+ totalVotes: number;
20
+ choices: IQuestionChoice[];
21
+ pictures: IQuestionPicture[];
22
+ }
23
+ export interface IQuestionChoice {
24
+ id: Id;
25
+ name: string;
26
+ explanation: string;
27
+ label: string;
28
+ answer: boolean;
29
+ votes: number;
30
+ }
31
+ export interface IQuestionSBA extends IQuestion {
32
+ answer: [string];
33
+ sbaAnswer: [string];
34
+ }
35
+ export interface IQuestionQA extends IQuestion {
36
+ answer: [string];
37
+ qaAnswer: [string];
38
+ }
39
+ export interface IQuestionMultiQ extends IQuestion {
40
+ answer: [string[], string[]];
41
+ multiAnswer: [string[], string[]];
42
+ }
43
+ export interface IQuestionPrescribe extends IQuestion {
44
+ answer: IPrescribeAnswer[];
45
+ prescribeAnswer: IPrescribeAnswer[];
46
+ }
47
+ export interface IPrescribeAnswer {
48
+ dose: number;
49
+ drug: string;
50
+ route: string;
51
+ units: string;
52
+ duration: string;
53
+ frequency: string;
54
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EQuestionType = void 0;
4
+ var EQuestionType;
5
+ (function (EQuestionType) {
6
+ EQuestionType[EQuestionType["SINGLE_BEST_ANSWER"] = 1] = "SINGLE_BEST_ANSWER";
7
+ EQuestionType[EQuestionType["QUESTION_ANSWER"] = 2] = "QUESTION_ANSWER";
8
+ EQuestionType[EQuestionType["MULTIPLE_ANSWERS"] = 3] = "MULTIPLE_ANSWERS";
9
+ EQuestionType[EQuestionType["PRESCRIPTION_ANSWER"] = 4] = "PRESCRIPTION_ANSWER";
10
+ })(EQuestionType = exports.EQuestionType || (exports.EQuestionType = {}));
@@ -0,0 +1,11 @@
1
+ import { Id } from './Type';
2
+ export interface ISubscription {
3
+ id: Id;
4
+ createdAt: string | Date;
5
+ name: string;
6
+ description?: string;
7
+ price: number;
8
+ stripePriceId: string;
9
+ duration: number;
10
+ public: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { ICard } from './Card';
2
+ import { Id } from './Type';
3
+ export interface ITodo {
4
+ id: Id;
5
+ createdAt: Date | string;
6
+ updatedAt: Date | string;
7
+ userId: Id;
8
+ dailyTask: boolean;
9
+ marks: ITodoMark[];
10
+ source: string;
11
+ }
12
+ export interface ITodoMark {
13
+ id: Id;
14
+ todoId: Id;
15
+ cardId: Id;
16
+ card: ICard;
17
+ score: number;
18
+ timeTaken: number;
19
+ }
20
+ export interface IPreBuildTodo {
21
+ unseen: number;
22
+ seen: number;
23
+ buildRef: number;
24
+ }
package/models/Todo.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { Id } from './Type';
2
+ export interface IToken {
3
+ id: Id;
4
+ userId: Id;
5
+ token: string;
6
+ deviceId: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,8 @@
1
1
  import { IConcept } from './Concept';
2
2
  import { Id } from './Type';
3
-
4
3
  export interface ITopic {
5
- id: Id;
6
- name: string;
7
- clinical: boolean;
8
- concepts?: IConcept[];
4
+ id: Id;
5
+ name: string;
6
+ clinical: boolean;
7
+ concepts?: IConcept[];
9
8
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export declare type Id = number;
2
+ export declare type Count = {
3
+ count: number;
4
+ }[];
5
+ export declare type Sum = {
6
+ sum: number;
7
+ }[];
package/models/Type.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface IUniversity {
2
+ id: number;
3
+ name: string;
4
+ country: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });