@quesmed/types 2.6.29 → 2.6.31

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 (55) hide show
  1. package/dist/cjs/resolvers/fragments/chapter.js +3 -18
  2. package/dist/cjs/resolvers/fragments/concept.d.ts +1 -2
  3. package/dist/cjs/resolvers/fragments/concept.js +18 -57
  4. package/dist/cjs/resolvers/fragments/index.d.ts +2 -0
  5. package/dist/cjs/resolvers/fragments/index.js +2 -0
  6. package/dist/cjs/resolvers/fragments/marksheet.d.ts +14 -0
  7. package/dist/cjs/resolvers/fragments/marksheet.js +127 -127
  8. package/dist/cjs/resolvers/fragments/mockTest.d.ts +6 -0
  9. package/dist/cjs/resolvers/fragments/mockTest.js +27 -1
  10. package/dist/cjs/resolvers/fragments/osce.d.ts +3 -0
  11. package/dist/cjs/resolvers/fragments/osce.js +23 -1
  12. package/dist/cjs/resolvers/fragments/question.d.ts +5 -0
  13. package/dist/cjs/resolvers/fragments/question.js +176 -0
  14. package/dist/cjs/resolvers/fragments/topic.d.ts +2 -0
  15. package/dist/cjs/resolvers/fragments/topic.js +25 -1
  16. package/dist/cjs/resolvers/fragments/video.d.ts +1 -0
  17. package/dist/cjs/resolvers/fragments/video.js +17 -28
  18. package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +0 -8
  19. package/dist/cjs/resolvers/mutation/restricted/marksheet.js +18 -4128
  20. package/dist/cjs/resolvers/mutation/restricted/mockTest.d.ts +2 -3
  21. package/dist/cjs/resolvers/mutation/restricted/mockTest.js +22 -13
  22. package/dist/cjs/resolvers/mutation/restricted/osce.d.ts +46 -2
  23. package/dist/cjs/resolvers/mutation/restricted/osce.js +47 -1
  24. package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.d.ts +6 -21
  25. package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +27 -532
  26. package/dist/cjs/resolvers/query/restricted/marksheet.js +5 -2025
  27. package/dist/cjs/resolvers/query/restricted/question.js +3 -932
  28. package/dist/mjs/resolvers/fragments/chapter.js +3 -18
  29. package/dist/mjs/resolvers/fragments/concept.d.ts +1 -2
  30. package/dist/mjs/resolvers/fragments/concept.js +18 -57
  31. package/dist/mjs/resolvers/fragments/index.d.ts +2 -0
  32. package/dist/mjs/resolvers/fragments/index.js +2 -0
  33. package/dist/mjs/resolvers/fragments/marksheet.d.ts +14 -0
  34. package/dist/mjs/resolvers/fragments/marksheet.js +126 -126
  35. package/dist/mjs/resolvers/fragments/mockTest.d.ts +6 -0
  36. package/dist/mjs/resolvers/fragments/mockTest.js +26 -0
  37. package/dist/mjs/resolvers/fragments/osce.d.ts +3 -0
  38. package/dist/mjs/resolvers/fragments/osce.js +22 -0
  39. package/dist/mjs/resolvers/fragments/question.d.ts +5 -0
  40. package/dist/mjs/resolvers/fragments/question.js +173 -0
  41. package/dist/mjs/resolvers/fragments/topic.d.ts +2 -0
  42. package/dist/mjs/resolvers/fragments/topic.js +24 -0
  43. package/dist/mjs/resolvers/fragments/video.d.ts +1 -0
  44. package/dist/mjs/resolvers/fragments/video.js +16 -27
  45. package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +0 -8
  46. package/dist/mjs/resolvers/mutation/restricted/marksheet.js +14 -4124
  47. package/dist/mjs/resolvers/mutation/restricted/mockTest.d.ts +2 -3
  48. package/dist/mjs/resolvers/mutation/restricted/mockTest.js +20 -11
  49. package/dist/mjs/resolvers/mutation/restricted/osce.d.ts +46 -2
  50. package/dist/mjs/resolvers/mutation/restricted/osce.js +45 -1
  51. package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +6 -21
  52. package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +26 -530
  53. package/dist/mjs/resolvers/query/restricted/marksheet.js +5 -2025
  54. package/dist/mjs/resolvers/query/restricted/question.js +3 -932
  55. package/package.json +6 -1
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QUESTION_WITH_COMMENT_FIELDS = exports.QUESTION_WITH_HIGHLIGHT_FIELDS = exports.QUESTION_FIELDS = exports.QUESTION_CATEGORY_FIELDS = exports.QUESTION_COMMENT_FIELDS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const concept_1 = require("./concept");
6
+ const picture_1 = require("./picture");
7
+ exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
8
+ fragment QuestionCommentFields on QuestionComment {
9
+ id
10
+ createdAt
11
+ comment
12
+ parentId
13
+ likes
14
+ user {
15
+ id
16
+ displayName
17
+ }
18
+ dislikes
19
+ isLikedByMe
20
+ questionId
21
+ replies {
22
+ id
23
+ createdAt
24
+ comment
25
+ parentId
26
+ user {
27
+ id
28
+ displayName
29
+ }
30
+ likes
31
+ dislikes
32
+ isLikedByMe
33
+ questionId
34
+ }
35
+ }
36
+ `;
37
+ exports.QUESTION_CATEGORY_FIELDS = (0, client_1.gql) `
38
+ fragment QuestionCategoryFields on Question {
39
+ ... on QuestionSBA {
40
+ sbaAnswer: answer
41
+ }
42
+ ... on QuestionQA {
43
+ qaAnswer: answer {
44
+ dose
45
+ units
46
+ }
47
+ }
48
+ ... on QuestionEMQ {
49
+ cases {
50
+ id
51
+ questionId
52
+ case
53
+ explanation
54
+ label
55
+ }
56
+ emqAnswer: answer
57
+ }
58
+ ... on QuestionMultiA {
59
+ multiAnswer: answer
60
+ }
61
+ ... on QuestionRanking {
62
+ rankingAnswer: answer
63
+ }
64
+ ... on QuestionSelect3 {
65
+ select3Answer: answer
66
+ }
67
+ ... on QuestionPrescription {
68
+ prescribeAnswer: answer {
69
+ dose {
70
+ value
71
+ label
72
+ visible
73
+ }
74
+ drug {
75
+ value
76
+ label
77
+ visible
78
+ }
79
+ route {
80
+ value
81
+ label
82
+ visible
83
+ }
84
+ frequency {
85
+ value
86
+ label
87
+ visible
88
+ }
89
+ duration {
90
+ value
91
+ label
92
+ visible
93
+ }
94
+ unit {
95
+ value
96
+ label
97
+ visible
98
+ }
99
+ }
100
+ }
101
+ }
102
+ `;
103
+ exports.QUESTION_FIELDS = (0, client_1.gql) `
104
+ ${exports.QUESTION_CATEGORY_FIELDS}
105
+ ${exports.QUESTION_COMMENT_FIELDS}
106
+ ${concept_1.CONCEPT_FIELDS}
107
+ ${picture_1.PICTURE_FIELDS}
108
+ fragment QuestionFields on Question {
109
+ id
110
+ conceptId
111
+ difficulty
112
+ dislikes
113
+ explanation
114
+ isLikedByMe
115
+ likes
116
+ question
117
+ totalVotes
118
+ typeId
119
+ psaSectionId
120
+ highlights {
121
+ start
122
+ end
123
+ text
124
+ part
125
+ tag
126
+ color
127
+ }
128
+ choices {
129
+ id
130
+ explanation
131
+ name
132
+ label
133
+ answer
134
+ votes
135
+ picture {
136
+ ...PictureFields
137
+ }
138
+ }
139
+ comments {
140
+ ...QuestionCommentFields
141
+ }
142
+ concept {
143
+ ...ConceptFields
144
+ }
145
+ pictures {
146
+ ...PictureFields
147
+ }
148
+ ...QuestionCategoryFields
149
+ }
150
+ `;
151
+ // used in cache updator
152
+ exports.QUESTION_WITH_HIGHLIGHT_FIELDS = (0, client_1.gql) `
153
+ fragment QuestionWithHighlightFields on Question {
154
+ highlights {
155
+ start
156
+ end
157
+ text
158
+ part
159
+ tag
160
+ color
161
+ }
162
+ }
163
+ `;
164
+ // used in cache updator
165
+ exports.QUESTION_WITH_COMMENT_FIELDS = (0, client_1.gql) `
166
+ ${exports.QUESTION_COMMENT_FIELDS}
167
+ fragment QuestionWithCommentFields on Question {
168
+ id
169
+ likes
170
+ dislikes
171
+ isLikedByMe
172
+ comments {
173
+ ...QuestionCommentFields
174
+ }
175
+ }
176
+ `;
@@ -1 +1,3 @@
1
1
  export declare const TOPIC_FIELDS: import("@apollo/client").DocumentNode;
2
+ export declare const TOPIC_VIDEO_STATUS_STATS_FRAGMENT: import("@apollo/client").DocumentNode;
3
+ export declare const TOPIC_CONCEPT_STATUS_STATS_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOPIC_FIELDS = void 0;
3
+ exports.TOPIC_CONCEPT_STATUS_STATS_FRAGMENT = exports.TOPIC_VIDEO_STATUS_STATS_FRAGMENT = exports.TOPIC_FIELDS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.TOPIC_FIELDS = (0, client_1.gql) `
6
6
  fragment TopicFields on Topic {
7
7
  id
8
8
  name
9
+ demo
10
+ typeId
11
+ entitlement {
12
+ id
13
+ name
14
+ }
9
15
  totalQuestions
10
16
  correctQuestions
11
17
  incorrectQuestions
@@ -16,3 +22,21 @@ exports.TOPIC_FIELDS = (0, client_1.gql) `
16
22
  dailyFeedCards
17
23
  }
18
24
  `;
25
+ // used in cache updator
26
+ exports.TOPIC_VIDEO_STATUS_STATS_FRAGMENT = (0, client_1.gql) `
27
+ fragment TopicVideoStatusStats on Topic {
28
+ unwatchedVideos
29
+ completedVideos
30
+ revisingVideos
31
+ urgentVideos
32
+ }
33
+ `;
34
+ // used in cache updator
35
+ exports.TOPIC_CONCEPT_STATUS_STATS_FRAGMENT = (0, client_1.gql) `
36
+ fragment TopicConceptStatusStats on Topic {
37
+ unreadConcepts
38
+ completedConcepts
39
+ revisingConcepts
40
+ urgentConcepts
41
+ }
42
+ `;
@@ -1,2 +1,3 @@
1
1
  export declare const VIDEO_FILE_FIELDS: import("@apollo/client").DocumentNode;
2
2
  export declare const VIDEO_FIELDS: import("@apollo/client").DocumentNode;
3
+ export declare const VIDEO_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VIDEO_FIELDS = exports.VIDEO_FILE_FIELDS = void 0;
3
+ exports.VIDEO_STATUS_FRAGMENT = exports.VIDEO_FIELDS = exports.VIDEO_FILE_FIELDS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const picture_1 = require("./picture");
6
6
  exports.VIDEO_FILE_FIELDS = (0, client_1.gql) `
@@ -14,45 +14,34 @@ exports.VIDEO_FILE_FIELDS = (0, client_1.gql) `
14
14
  `;
15
15
  exports.VIDEO_FIELDS = (0, client_1.gql) `
16
16
  ${picture_1.PICTURE_FIELDS}
17
+ ${exports.VIDEO_FILE_FIELDS}
17
18
  fragment VideoFields on Video {
18
19
  id
20
+ demo
21
+ status
19
22
  title
20
23
  museId
24
+ startTime
25
+ endTime
21
26
  thumbnail
22
- views
23
- concepts {
24
- id
25
- createdAt
26
- updatedAt
27
- name
28
- chapterId
29
- chapter {
30
- id
31
- createdAt
32
- updatedAt
33
- explanation
34
- typeId
35
- pictures {
36
- ...PictureFields
37
- }
38
- files {
39
- ...VideoFileFields
40
- }
41
- }
42
- topicId
43
- topic {
44
- id
45
- name
46
- }
47
- }
48
27
  live
49
28
  description
50
29
  duration
51
30
  startTime
52
31
  endTime
32
+ viewsToday
33
+ concepts {
34
+ id
35
+ name
36
+ }
53
37
  files {
54
38
  ...VideoFileFields
55
39
  }
56
- viewsToday
40
+ }
41
+ `;
42
+ // used in cache updator
43
+ exports.VIDEO_STATUS_FRAGMENT = (0, client_1.gql) `
44
+ fragment VideoStatus on Video {
45
+ status
57
46
  }
58
47
  `;
@@ -89,7 +89,6 @@ export interface IRemoveFlaggedQuestionVar {
89
89
  marksheetId?: number;
90
90
  }
91
91
  export type IRemoveFlaggedQuestionData = RestrictedData<(graphqlNormalize & IUserFlaggedQuestion)[], 'removeFlaggedQuestion'>;
92
- export declare const MARK_FLAGGED_FIELD: import("@apollo/client").DocumentNode;
93
92
  export declare const updateCacheAddFlaggedQuestion: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IAddFlaggedQuestionData>) => void;
94
93
  export declare const optimisticAddFlaggedQuestion: (id: number, markId: number) => IAddFlaggedQuestionData;
95
94
  export declare const updateCacheRemoveFlaggedQuestion: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IRemoveFlaggedQuestionData>) => void;
@@ -198,18 +197,14 @@ export declare const MODIFY_MARKSHEET: import("@apollo/client").DocumentNode;
198
197
  * MODIFY_BUILDER_CONFIG
199
198
  */
200
199
  export declare const MODIFY_BUILDER_CONFIG: import("@apollo/client").DocumentNode;
201
- export declare const MODIFY_BUILDER_CONFIG_FRAGMENT: import("@apollo/client").DocumentNode;
202
200
  /**
203
201
  * MODIFY_TOPIC_SELECTION
204
202
  */
205
203
  export declare const MODIFY_TOPIC_SELECTION: import("@apollo/client").DocumentNode;
206
- export declare const MODIFY_TOPIC_SELECTION_FRAGMENT: import("@apollo/client").DocumentNode;
207
- export declare const MODIFY_CURRENT_MARK_FRAGMENT: import("@apollo/client").DocumentNode;
208
204
  /**
209
205
  * MODIFY_MARKSHEET_STATE
210
206
  */
211
207
  export declare const MODIFY_MARKSHEET_STATE: import("@apollo/client").DocumentNode;
212
- export declare const MODIFY_MARKSHEET_STATE_FRAGMENT: import("@apollo/client").DocumentNode;
213
208
  /**
214
209
  * modifyMarksheetMark
215
210
  */
@@ -229,11 +224,8 @@ export interface IModifyMarksheetMarkVar {
229
224
  export type IModifyMarksheetMarkData = RestrictedData<graphqlNormalize & IMarksheetMark, 'modifyMarksheetMark'>;
230
225
  export declare const MODIFY_MARKSHEET_MARK: import("@apollo/client").DocumentNode;
231
226
  export declare const MODIFY_MARKSHEET_MARK_STRIKED: import("@apollo/client").DocumentNode;
232
- export declare const MODIFY_MARKSHEET_MARK_STRIKED_FRAGMENT: import("@apollo/client").DocumentNode;
233
227
  export declare const MODIFY_MARKSHEET_MARK_QUESTIONCHOICEID: import("@apollo/client").DocumentNode;
234
- export declare const MODIFY_MARKSHEET_MARK_QUESTIONCHOICEID_FRAGMENT: import("@apollo/client").DocumentNode;
235
228
  export declare const MODIFY_CURRENT_MARKSHEET_MARK: import("@apollo/client").DocumentNode;
236
- export declare const MODIFY_CURRENT_MARKSHEET_MARK_FRAGMENT: import("@apollo/client").DocumentNode;
237
229
  /**
238
230
  * leaveMarksheet
239
231
  */