@quesmed/types 2.5.38 → 2.5.39

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,7 +1,7 @@
1
1
  import { ApolloCache, DocumentNode } from '@apollo/client';
2
2
  import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
3
- import { EQuestionLike, EQuestionType, Id, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights } from '../../../models';
4
- import { graphqlNormalize, RestrictedData } from '../../types';
3
+ import { EQuestionLike, EQuestionType, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights, Id } from '../../../models';
4
+ import { RestrictedData, graphqlNormalize } from '../../types';
5
5
  interface LikeData {
6
6
  likes?: number;
7
7
  dislikes?: number;
@@ -9,10 +9,16 @@ interface LikeData {
9
9
  }
10
10
  export declare const QUESTION_SBA_COMMENT_FIELDS: DocumentNode;
11
11
  export declare const QUESTION_QA_COMMENT_FIELDS: DocumentNode;
12
+ export declare const QUESTION_EMQ_COMMENT_FIELDS: DocumentNode;
13
+ export declare const QUESTION_SELECT3_COMMENT_FIELDS: DocumentNode;
14
+ export declare const QUESTION_RANKING_COMMENT_FIELDS: DocumentNode;
12
15
  export declare const QUESTION_QA_HIGHLIGHT_FIELDS: DocumentNode;
13
16
  export declare const QUESTION_SBA_HIGHLIGHT_FIELDS: DocumentNode;
14
17
  export declare const QUESTION_MULTIA_HIGHLIGHT_FIELDS: DocumentNode;
15
18
  export declare const QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS: DocumentNode;
19
+ export declare const QUESTION_EMQ_HIGHLIGHT_FIELDS: DocumentNode;
20
+ export declare const QUESTION_SELECT3_HIGHLIGHT_FIELDS: DocumentNode;
21
+ export declare const QUESTION_RANKING_HIGHLIGHT_FIELDS: DocumentNode;
16
22
  export declare const QUESTION_MULTIA_COMMENT_FIELDS: DocumentNode;
17
23
  export declare const QUESTION_PRESCRIPTION_COMMENT_FIELDS: DocumentNode;
18
24
  export declare const getLikeData: (like: EQuestionLike, item: LikeData) => LikeData;
@@ -88,6 +88,138 @@ export const QUESTION_QA_COMMENT_FIELDS = gql `
88
88
  }
89
89
  }
90
90
  `;
91
+ export const QUESTION_EMQ_COMMENT_FIELDS = gql `
92
+ fragment QuestionEMQComments on QuestionEMQ {
93
+ id
94
+ likes
95
+ dislikes
96
+ isLikedByMe
97
+ highlights {
98
+ start
99
+ end
100
+ text
101
+ part
102
+ tag
103
+ color
104
+ }
105
+ comments {
106
+ id
107
+ createdAt
108
+ comment
109
+ parentId
110
+ likes
111
+ user {
112
+ id
113
+ displayName
114
+ }
115
+ dislikes
116
+ isLikedByMe
117
+ questionId
118
+ replies {
119
+ id
120
+ createdAt
121
+ comment
122
+ parentId
123
+ user {
124
+ id
125
+ displayName
126
+ }
127
+ likes
128
+ dislikes
129
+ isLikedByMe
130
+ questionId
131
+ }
132
+ }
133
+ }
134
+ `;
135
+ export const QUESTION_SELECT3_COMMENT_FIELDS = gql `
136
+ fragment QuestionSelect3Comments on QuestionSelect3 {
137
+ id
138
+ likes
139
+ dislikes
140
+ isLikedByMe
141
+ highlights {
142
+ start
143
+ end
144
+ text
145
+ part
146
+ tag
147
+ color
148
+ }
149
+ comments {
150
+ id
151
+ createdAt
152
+ comment
153
+ parentId
154
+ likes
155
+ user {
156
+ id
157
+ displayName
158
+ }
159
+ dislikes
160
+ isLikedByMe
161
+ questionId
162
+ replies {
163
+ id
164
+ createdAt
165
+ comment
166
+ parentId
167
+ user {
168
+ id
169
+ displayName
170
+ }
171
+ likes
172
+ dislikes
173
+ isLikedByMe
174
+ questionId
175
+ }
176
+ }
177
+ }
178
+ `;
179
+ export const QUESTION_RANKING_COMMENT_FIELDS = gql `
180
+ fragment QuestionRankingComments on QuestionRanking {
181
+ id
182
+ likes
183
+ dislikes
184
+ isLikedByMe
185
+ highlights {
186
+ start
187
+ end
188
+ text
189
+ part
190
+ tag
191
+ color
192
+ }
193
+ comments {
194
+ id
195
+ createdAt
196
+ comment
197
+ parentId
198
+ likes
199
+ user {
200
+ id
201
+ displayName
202
+ }
203
+ dislikes
204
+ isLikedByMe
205
+ questionId
206
+ replies {
207
+ id
208
+ createdAt
209
+ comment
210
+ parentId
211
+ user {
212
+ id
213
+ displayName
214
+ }
215
+ likes
216
+ dislikes
217
+ isLikedByMe
218
+ questionId
219
+ }
220
+ }
221
+ }
222
+ `;
91
223
  export const QUESTION_QA_HIGHLIGHT_FIELDS = gql `
92
224
  fragment QuestionQAHighlights on QuestionQA {
93
225
  highlights {
@@ -136,6 +268,42 @@ export const QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS = gql `
136
268
  }
137
269
  }
138
270
  `;
271
+ export const QUESTION_EMQ_HIGHLIGHT_FIELDS = gql `
272
+ fragment QuestionMultiAHighlights on QuestionMultiA {
273
+ highlights {
274
+ start
275
+ end
276
+ text
277
+ part
278
+ tag
279
+ color
280
+ }
281
+ }
282
+ `;
283
+ export const QUESTION_SELECT3_HIGHLIGHT_FIELDS = gql `
284
+ fragment QuestionMultiAHighlights on QuestionMultiA {
285
+ highlights {
286
+ start
287
+ end
288
+ text
289
+ part
290
+ tag
291
+ color
292
+ }
293
+ }
294
+ `;
295
+ export const QUESTION_RANKING_HIGHLIGHT_FIELDS = gql `
296
+ fragment QuestionMultiAHighlights on QuestionMultiA {
297
+ highlights {
298
+ start
299
+ end
300
+ text
301
+ part
302
+ tag
303
+ color
304
+ }
305
+ }
306
+ `;
139
307
  export const QUESTION_MULTIA_COMMENT_FIELDS = gql `
140
308
  fragment QuestionMultiAComments on QuestionMultiA {
141
309
  id
@@ -256,7 +424,15 @@ export const getQuestionHighlightsFragment = (typeId) => {
256
424
  return QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS;
257
425
  case EQuestionType.MULTIPLE_ANSWERS:
258
426
  return QUESTION_MULTIA_HIGHLIGHT_FIELDS;
427
+ case EQuestionType.EXTENDED_MATCHING_ANSWER:
428
+ return QUESTION_EMQ_HIGHLIGHT_FIELDS;
429
+ case EQuestionType.SELECT_THREE_ANSWER:
430
+ return QUESTION_SELECT3_HIGHLIGHT_FIELDS;
431
+ case EQuestionType.RANKING_ANSWER:
432
+ return QUESTION_RANKING_HIGHLIGHT_FIELDS;
259
433
  case EQuestionType.SINGLE_BEST_ANSWER:
434
+ case EQuestionType.MRCP_PART_1:
435
+ case EQuestionType.MRCP_PART_2:
260
436
  default:
261
437
  return QUESTION_SBA_HIGHLIGHT_FIELDS;
262
438
  }
@@ -269,7 +445,15 @@ export const getQuestionTypeName = (typeId) => {
269
445
  return 'QuestionPrescription';
270
446
  case EQuestionType.MULTIPLE_ANSWERS:
271
447
  return 'QuestionMultiA';
448
+ case EQuestionType.EXTENDED_MATCHING_ANSWER:
449
+ return 'QuestionEMQ';
450
+ case EQuestionType.SELECT_THREE_ANSWER:
451
+ return 'QuestionSelect3';
452
+ case EQuestionType.RANKING_ANSWER:
453
+ return 'QuestionRanking';
272
454
  case EQuestionType.SINGLE_BEST_ANSWER:
455
+ case EQuestionType.MRCP_PART_1:
456
+ case EQuestionType.MRCP_PART_2:
273
457
  default:
274
458
  return 'QuestionSBA';
275
459
  }
@@ -282,7 +466,15 @@ const getQuestionFragment = (typeId) => {
282
466
  return QUESTION_PRESCRIPTION_COMMENT_FIELDS;
283
467
  case EQuestionType.MULTIPLE_ANSWERS:
284
468
  return QUESTION_MULTIA_COMMENT_FIELDS;
469
+ case EQuestionType.EXTENDED_MATCHING_ANSWER:
470
+ return QUESTION_EMQ_COMMENT_FIELDS;
471
+ case EQuestionType.SELECT_THREE_ANSWER:
472
+ return QUESTION_SELECT3_COMMENT_FIELDS;
473
+ case EQuestionType.RANKING_ANSWER:
474
+ return QUESTION_RANKING_COMMENT_FIELDS;
285
475
  case EQuestionType.SINGLE_BEST_ANSWER:
476
+ case EQuestionType.MRCP_PART_1:
477
+ case EQuestionType.MRCP_PART_2:
286
478
  default:
287
479
  return QUESTION_SBA_COMMENT_FIELDS;
288
480
  }