@quesmed/types-rn 2.5.37 → 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;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateQuestionHighlights = exports.ADD_QUESTION_HIGHLIGHT = exports.optimisticQuestionCommentRemove = exports.updateQuestionCommentsRemove = exports.QUESTION_COMMENT_REMOVE = exports.optimisticCommentLike = exports.QUESTION_COMMENT_LIKE = exports.optimisticQuestionComment = exports.updateQuestionComments = exports.QUESTION_COMMENTS = exports.optimisticQuestionLike = exports.QUESTION_LIKE = exports.getQuestionTypeName = exports.getQuestionHighlightsFragment = exports.getLikeData = exports.QUESTION_PRESCRIPTION_COMMENT_FIELDS = exports.QUESTION_MULTIA_COMMENT_FIELDS = exports.QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS = exports.QUESTION_MULTIA_HIGHLIGHT_FIELDS = exports.QUESTION_SBA_HIGHLIGHT_FIELDS = exports.QUESTION_QA_HIGHLIGHT_FIELDS = exports.QUESTION_QA_COMMENT_FIELDS = exports.QUESTION_SBA_COMMENT_FIELDS = void 0;
3
+ exports.updateQuestionHighlights = exports.ADD_QUESTION_HIGHLIGHT = exports.optimisticQuestionCommentRemove = exports.updateQuestionCommentsRemove = exports.QUESTION_COMMENT_REMOVE = exports.optimisticCommentLike = exports.QUESTION_COMMENT_LIKE = exports.optimisticQuestionComment = exports.updateQuestionComments = exports.QUESTION_COMMENTS = exports.optimisticQuestionLike = exports.QUESTION_LIKE = exports.getQuestionTypeName = exports.getQuestionHighlightsFragment = exports.getLikeData = exports.QUESTION_PRESCRIPTION_COMMENT_FIELDS = exports.QUESTION_MULTIA_COMMENT_FIELDS = exports.QUESTION_RANKING_HIGHLIGHT_FIELDS = exports.QUESTION_SELECT3_HIGHLIGHT_FIELDS = exports.QUESTION_EMQ_HIGHLIGHT_FIELDS = exports.QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS = exports.QUESTION_MULTIA_HIGHLIGHT_FIELDS = exports.QUESTION_SBA_HIGHLIGHT_FIELDS = exports.QUESTION_QA_HIGHLIGHT_FIELDS = exports.QUESTION_RANKING_COMMENT_FIELDS = exports.QUESTION_SELECT3_COMMENT_FIELDS = exports.QUESTION_EMQ_COMMENT_FIELDS = exports.QUESTION_QA_COMMENT_FIELDS = exports.QUESTION_SBA_COMMENT_FIELDS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const models_1 = require("../../../models");
6
6
  exports.QUESTION_SBA_COMMENT_FIELDS = (0, client_1.gql) `
@@ -91,6 +91,138 @@ exports.QUESTION_QA_COMMENT_FIELDS = (0, client_1.gql) `
91
91
  }
92
92
  }
93
93
  `;
94
+ exports.QUESTION_EMQ_COMMENT_FIELDS = (0, client_1.gql) `
95
+ fragment QuestionEMQComments on QuestionEMQ {
96
+ id
97
+ likes
98
+ dislikes
99
+ isLikedByMe
100
+ highlights {
101
+ start
102
+ end
103
+ text
104
+ part
105
+ tag
106
+ color
107
+ }
108
+ comments {
109
+ id
110
+ createdAt
111
+ comment
112
+ parentId
113
+ likes
114
+ user {
115
+ id
116
+ displayName
117
+ }
118
+ dislikes
119
+ isLikedByMe
120
+ questionId
121
+ replies {
122
+ id
123
+ createdAt
124
+ comment
125
+ parentId
126
+ user {
127
+ id
128
+ displayName
129
+ }
130
+ likes
131
+ dislikes
132
+ isLikedByMe
133
+ questionId
134
+ }
135
+ }
136
+ }
137
+ `;
138
+ exports.QUESTION_SELECT3_COMMENT_FIELDS = (0, client_1.gql) `
139
+ fragment QuestionSelect3Comments on QuestionSelect3 {
140
+ id
141
+ likes
142
+ dislikes
143
+ isLikedByMe
144
+ highlights {
145
+ start
146
+ end
147
+ text
148
+ part
149
+ tag
150
+ color
151
+ }
152
+ comments {
153
+ id
154
+ createdAt
155
+ comment
156
+ parentId
157
+ likes
158
+ user {
159
+ id
160
+ displayName
161
+ }
162
+ dislikes
163
+ isLikedByMe
164
+ questionId
165
+ replies {
166
+ id
167
+ createdAt
168
+ comment
169
+ parentId
170
+ user {
171
+ id
172
+ displayName
173
+ }
174
+ likes
175
+ dislikes
176
+ isLikedByMe
177
+ questionId
178
+ }
179
+ }
180
+ }
181
+ `;
182
+ exports.QUESTION_RANKING_COMMENT_FIELDS = (0, client_1.gql) `
183
+ fragment QuestionRankingComments on QuestionRanking {
184
+ id
185
+ likes
186
+ dislikes
187
+ isLikedByMe
188
+ highlights {
189
+ start
190
+ end
191
+ text
192
+ part
193
+ tag
194
+ color
195
+ }
196
+ comments {
197
+ id
198
+ createdAt
199
+ comment
200
+ parentId
201
+ likes
202
+ user {
203
+ id
204
+ displayName
205
+ }
206
+ dislikes
207
+ isLikedByMe
208
+ questionId
209
+ replies {
210
+ id
211
+ createdAt
212
+ comment
213
+ parentId
214
+ user {
215
+ id
216
+ displayName
217
+ }
218
+ likes
219
+ dislikes
220
+ isLikedByMe
221
+ questionId
222
+ }
223
+ }
224
+ }
225
+ `;
94
226
  exports.QUESTION_QA_HIGHLIGHT_FIELDS = (0, client_1.gql) `
95
227
  fragment QuestionQAHighlights on QuestionQA {
96
228
  highlights {
@@ -139,6 +271,42 @@ exports.QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS = (0, client_1.gql) `
139
271
  }
140
272
  }
141
273
  `;
274
+ exports.QUESTION_EMQ_HIGHLIGHT_FIELDS = (0, client_1.gql) `
275
+ fragment QuestionMultiAHighlights on QuestionMultiA {
276
+ highlights {
277
+ start
278
+ end
279
+ text
280
+ part
281
+ tag
282
+ color
283
+ }
284
+ }
285
+ `;
286
+ exports.QUESTION_SELECT3_HIGHLIGHT_FIELDS = (0, client_1.gql) `
287
+ fragment QuestionMultiAHighlights on QuestionMultiA {
288
+ highlights {
289
+ start
290
+ end
291
+ text
292
+ part
293
+ tag
294
+ color
295
+ }
296
+ }
297
+ `;
298
+ exports.QUESTION_RANKING_HIGHLIGHT_FIELDS = (0, client_1.gql) `
299
+ fragment QuestionMultiAHighlights on QuestionMultiA {
300
+ highlights {
301
+ start
302
+ end
303
+ text
304
+ part
305
+ tag
306
+ color
307
+ }
308
+ }
309
+ `;
142
310
  exports.QUESTION_MULTIA_COMMENT_FIELDS = (0, client_1.gql) `
143
311
  fragment QuestionMultiAComments on QuestionMultiA {
144
312
  id
@@ -260,7 +428,15 @@ const getQuestionHighlightsFragment = (typeId) => {
260
428
  return exports.QUESTION_PRESCRIPTION_HIGHLIGHT_FIELDS;
261
429
  case models_1.EQuestionType.MULTIPLE_ANSWERS:
262
430
  return exports.QUESTION_MULTIA_HIGHLIGHT_FIELDS;
431
+ case models_1.EQuestionType.EXTENDED_MATCHING_ANSWER:
432
+ return exports.QUESTION_EMQ_HIGHLIGHT_FIELDS;
433
+ case models_1.EQuestionType.SELECT_THREE_ANSWER:
434
+ return exports.QUESTION_SELECT3_HIGHLIGHT_FIELDS;
435
+ case models_1.EQuestionType.RANKING_ANSWER:
436
+ return exports.QUESTION_RANKING_HIGHLIGHT_FIELDS;
263
437
  case models_1.EQuestionType.SINGLE_BEST_ANSWER:
438
+ case models_1.EQuestionType.MRCP_PART_1:
439
+ case models_1.EQuestionType.MRCP_PART_2:
264
440
  default:
265
441
  return exports.QUESTION_SBA_HIGHLIGHT_FIELDS;
266
442
  }
@@ -274,7 +450,15 @@ const getQuestionTypeName = (typeId) => {
274
450
  return 'QuestionPrescription';
275
451
  case models_1.EQuestionType.MULTIPLE_ANSWERS:
276
452
  return 'QuestionMultiA';
453
+ case models_1.EQuestionType.EXTENDED_MATCHING_ANSWER:
454
+ return 'QuestionEMQ';
455
+ case models_1.EQuestionType.SELECT_THREE_ANSWER:
456
+ return 'QuestionSelect3';
457
+ case models_1.EQuestionType.RANKING_ANSWER:
458
+ return 'QuestionRanking';
277
459
  case models_1.EQuestionType.SINGLE_BEST_ANSWER:
460
+ case models_1.EQuestionType.MRCP_PART_1:
461
+ case models_1.EQuestionType.MRCP_PART_2:
278
462
  default:
279
463
  return 'QuestionSBA';
280
464
  }
@@ -288,7 +472,15 @@ const getQuestionFragment = (typeId) => {
288
472
  return exports.QUESTION_PRESCRIPTION_COMMENT_FIELDS;
289
473
  case models_1.EQuestionType.MULTIPLE_ANSWERS:
290
474
  return exports.QUESTION_MULTIA_COMMENT_FIELDS;
475
+ case models_1.EQuestionType.EXTENDED_MATCHING_ANSWER:
476
+ return exports.QUESTION_EMQ_COMMENT_FIELDS;
477
+ case models_1.EQuestionType.SELECT_THREE_ANSWER:
478
+ return exports.QUESTION_SELECT3_COMMENT_FIELDS;
479
+ case models_1.EQuestionType.RANKING_ANSWER:
480
+ return exports.QUESTION_RANKING_COMMENT_FIELDS;
291
481
  case models_1.EQuestionType.SINGLE_BEST_ANSWER:
482
+ case models_1.EQuestionType.MRCP_PART_1:
483
+ case models_1.EQuestionType.MRCP_PART_2:
292
484
  default:
293
485
  return exports.QUESTION_SBA_COMMENT_FIELDS;
294
486
  }