@quesmed/types-rn 2.2.92 → 2.2.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.2.92",
3
+ "version": "2.2.94",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -47,6 +47,7 @@ exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
47
47
  id
48
48
  createdAt
49
49
  comment
50
+ parentId
50
51
  likes
51
52
  user {
52
53
  id
@@ -59,6 +60,7 @@ exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
59
60
  id
60
61
  createdAt
61
62
  comment
63
+ parentId
62
64
  user {
63
65
  id
64
66
  displayName
@@ -91,6 +91,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
91
91
  createdAt
92
92
  comment
93
93
  likes
94
+ parentId
94
95
  user {
95
96
  id
96
97
  displayName
@@ -101,6 +102,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
101
102
  replies {
102
103
  id
103
104
  createdAt
105
+ parentId
104
106
  comment
105
107
  user {
106
108
  id
@@ -207,6 +209,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
207
209
  id
208
210
  createdAt
209
211
  comment
212
+ parentId
210
213
  likes
211
214
  user {
212
215
  id
@@ -219,6 +222,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
219
222
  id
220
223
  createdAt
221
224
  comment
225
+ parentId
222
226
  user {
223
227
  id
224
228
  displayName
@@ -327,6 +331,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
327
331
  id
328
332
  createdAt
329
333
  comment
334
+ parentId
330
335
  likes
331
336
  user {
332
337
  id
@@ -339,6 +344,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
339
344
  id
340
345
  createdAt
341
346
  comment
347
+ parentId
342
348
  user {
343
349
  id
344
350
  displayName
@@ -444,6 +450,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
444
450
  id
445
451
  createdAt
446
452
  comment
453
+ parentId
447
454
  likes
448
455
  user {
449
456
  id
@@ -456,6 +463,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
456
463
  id
457
464
  createdAt
458
465
  comment
466
+ parentId
459
467
  user {
460
468
  id
461
469
  displayName
@@ -656,6 +664,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
656
664
  id
657
665
  createdAt
658
666
  comment
667
+ parentId
659
668
  likes
660
669
  user {
661
670
  id
@@ -668,6 +677,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
668
677
  id
669
678
  createdAt
670
679
  comment
680
+ parentId
671
681
  user {
672
682
  id
673
683
  displayName
@@ -773,6 +783,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
773
783
  id
774
784
  createdAt
775
785
  comment
786
+ parentId
776
787
  likes
777
788
  user {
778
789
  id
@@ -785,6 +796,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
785
796
  id
786
797
  createdAt
787
798
  comment
799
+ parentId
788
800
  user {
789
801
  id
790
802
  displayName
@@ -893,6 +905,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
893
905
  id
894
906
  createdAt
895
907
  comment
908
+ parentId
896
909
  likes
897
910
  user {
898
911
  id
@@ -905,6 +918,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
905
918
  id
906
919
  createdAt
907
920
  comment
921
+ parentId
908
922
  user {
909
923
  id
910
924
  displayName
@@ -1010,6 +1024,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
1010
1024
  id
1011
1025
  createdAt
1012
1026
  comment
1027
+ parentId
1013
1028
  likes
1014
1029
  user {
1015
1030
  id
@@ -1022,6 +1037,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
1022
1037
  id
1023
1038
  createdAt
1024
1039
  comment
1040
+ parentId
1025
1041
  user {
1026
1042
  id
1027
1043
  displayName
@@ -1227,6 +1243,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1227
1243
  id
1228
1244
  createdAt
1229
1245
  comment
1246
+ parentId
1230
1247
  likes
1231
1248
  user {
1232
1249
  id
@@ -1239,6 +1256,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1239
1256
  id
1240
1257
  createdAt
1241
1258
  comment
1259
+ parentId
1242
1260
  user {
1243
1261
  id
1244
1262
  displayName
@@ -1344,6 +1362,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1344
1362
  id
1345
1363
  createdAt
1346
1364
  comment
1365
+ parentId
1347
1366
  likes
1348
1367
  user {
1349
1368
  id
@@ -1356,6 +1375,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1356
1375
  id
1357
1376
  createdAt
1358
1377
  comment
1378
+ parentId
1359
1379
  user {
1360
1380
  id
1361
1381
  displayName
@@ -1464,6 +1484,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1464
1484
  id
1465
1485
  createdAt
1466
1486
  comment
1487
+ parentId
1467
1488
  likes
1468
1489
  user {
1469
1490
  id
@@ -1476,6 +1497,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1476
1497
  id
1477
1498
  createdAt
1478
1499
  comment
1500
+ parentId
1479
1501
  user {
1480
1502
  id
1481
1503
  displayName
@@ -1581,6 +1603,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1581
1603
  id
1582
1604
  createdAt
1583
1605
  comment
1606
+ parentId
1584
1607
  likes
1585
1608
  user {
1586
1609
  id
@@ -1593,6 +1616,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
1593
1616
  id
1594
1617
  createdAt
1595
1618
  comment
1619
+ parentId
1596
1620
  user {
1597
1621
  id
1598
1622
  displayName
@@ -35,7 +35,7 @@ export interface IQuestionCommentsVar {
35
35
  }
36
36
  export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionComments'>;
37
37
  export declare const QUESTION_COMMENT_LIKE: import("@apollo/client").DocumentNode;
38
- export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar) => IQuestionCommentsLikeData;
38
+ export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar, parentId: number | null) => IQuestionCommentsLikeData;
39
39
  export interface IQuestionCommentsLikeVar {
40
40
  commentId: Id;
41
41
  like: EQuestionLike;
@@ -366,15 +366,19 @@ exports.QUESTION_COMMENT_LIKE = (0, client_1.gql) `
366
366
  }
367
367
  }
368
368
  `;
369
- const optimisticCommentLike = (comments, input) => {
369
+ const optimisticCommentLike = (comments, input, parentId) => {
370
370
  const { commentId, like } = input;
371
- const comment = comments.find(({ id }) => Number(id) === Number(commentId)) ||
371
+ const topLevelComment = comments.find(({ id }) => Number(id) === Number(parentId || commentId)) ||
372
372
  {};
373
+ const comment = parentId && topLevelComment.replies
374
+ ? topLevelComment.replies.find(({ id }) => Number(id) === Number(commentId)) || {}
375
+ : topLevelComment;
373
376
  return {
374
377
  restricted: {
375
378
  questionCommentLike: {
376
379
  ...comment,
377
- parentId: comment.parentId ? comment.parentId : 0,
380
+ replies: parentId ? [] : comment.replies,
381
+ id: Number(comment.id),
378
382
  __typename: 'QuestionComment',
379
383
  ...(0, exports.getLikeData)(like, comment),
380
384
  },
@@ -96,6 +96,7 @@ exports.MARKSHEET = (0, client_1.gql) `
96
96
  id
97
97
  createdAt
98
98
  comment
99
+ parentId
99
100
  likes
100
101
  user {
101
102
  id
@@ -108,6 +109,7 @@ exports.MARKSHEET = (0, client_1.gql) `
108
109
  id
109
110
  createdAt
110
111
  comment
112
+ parentId
111
113
  user {
112
114
  id
113
115
  displayName
@@ -213,6 +215,7 @@ exports.MARKSHEET = (0, client_1.gql) `
213
215
  id
214
216
  createdAt
215
217
  comment
218
+ parentId
216
219
  likes
217
220
  user {
218
221
  id
@@ -225,6 +228,7 @@ exports.MARKSHEET = (0, client_1.gql) `
225
228
  id
226
229
  createdAt
227
230
  comment
231
+ parentId
228
232
  user {
229
233
  id
230
234
  displayName
@@ -333,6 +337,7 @@ exports.MARKSHEET = (0, client_1.gql) `
333
337
  id
334
338
  createdAt
335
339
  comment
340
+ parentId
336
341
  likes
337
342
  user {
338
343
  id
@@ -345,6 +350,7 @@ exports.MARKSHEET = (0, client_1.gql) `
345
350
  id
346
351
  createdAt
347
352
  comment
353
+ parentId
348
354
  user {
349
355
  id
350
356
  displayName
@@ -450,6 +456,7 @@ exports.MARKSHEET = (0, client_1.gql) `
450
456
  id
451
457
  createdAt
452
458
  comment
459
+ parentId
453
460
  likes
454
461
  user {
455
462
  id
@@ -462,6 +469,7 @@ exports.MARKSHEET = (0, client_1.gql) `
462
469
  id
463
470
  createdAt
464
471
  comment
472
+ parentId
465
473
  user {
466
474
  id
467
475
  displayName
@@ -647,6 +655,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
647
655
  id
648
656
  createdAt
649
657
  comment
658
+ parentId
650
659
  likes
651
660
  user {
652
661
  id
@@ -659,6 +668,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
659
668
  id
660
669
  createdAt
661
670
  comment
671
+ parentId
662
672
  user {
663
673
  id
664
674
  displayName
@@ -771,6 +781,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
771
781
  id
772
782
  createdAt
773
783
  comment
784
+ parentId
774
785
  likes
775
786
  user {
776
787
  id
@@ -783,6 +794,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
783
794
  id
784
795
  createdAt
785
796
  comment
797
+ parentId
786
798
  user {
787
799
  id
788
800
  displayName
@@ -888,6 +900,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
888
900
  id
889
901
  createdAt
890
902
  comment
903
+ parentId
891
904
  likes
892
905
  user {
893
906
  id
@@ -900,6 +913,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
900
913
  id
901
914
  createdAt
902
915
  comment
916
+ parentId
903
917
  user {
904
918
  id
905
919
  displayName
@@ -1008,6 +1022,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
1008
1022
  id
1009
1023
  createdAt
1010
1024
  comment
1025
+ parentId
1011
1026
  likes
1012
1027
  user {
1013
1028
  id
@@ -1020,6 +1035,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
1020
1035
  id
1021
1036
  createdAt
1022
1037
  comment
1038
+ parentId
1023
1039
  user {
1024
1040
  id
1025
1041
  displayName
@@ -1125,6 +1141,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
1125
1141
  id
1126
1142
  createdAt
1127
1143
  comment
1144
+ parentId
1128
1145
  likes
1129
1146
  user {
1130
1147
  id
@@ -1137,6 +1154,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
1137
1154
  id
1138
1155
  createdAt
1139
1156
  comment
1157
+ parentId
1140
1158
  user {
1141
1159
  id
1142
1160
  displayName
@@ -1330,6 +1348,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1330
1348
  id
1331
1349
  createdAt
1332
1350
  comment
1351
+ parentId
1333
1352
  likes
1334
1353
  user {
1335
1354
  id
@@ -1342,6 +1361,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1342
1361
  id
1343
1362
  createdAt
1344
1363
  comment
1364
+ parentId
1345
1365
  user {
1346
1366
  id
1347
1367
  displayName
@@ -1447,6 +1467,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1447
1467
  id
1448
1468
  createdAt
1449
1469
  comment
1470
+ parentId
1450
1471
  likes
1451
1472
  user {
1452
1473
  id
@@ -1459,6 +1480,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1459
1480
  id
1460
1481
  createdAt
1461
1482
  comment
1483
+ parentId
1462
1484
  user {
1463
1485
  id
1464
1486
  displayName
@@ -1567,6 +1589,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1567
1589
  id
1568
1590
  createdAt
1569
1591
  comment
1592
+ parentId
1570
1593
  likes
1571
1594
  user {
1572
1595
  id
@@ -1579,6 +1602,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1579
1602
  id
1580
1603
  createdAt
1581
1604
  comment
1605
+ parentId
1582
1606
  user {
1583
1607
  id
1584
1608
  displayName
@@ -1684,6 +1708,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1684
1708
  id
1685
1709
  createdAt
1686
1710
  comment
1711
+ parentId
1687
1712
  likes
1688
1713
  user {
1689
1714
  id
@@ -1696,6 +1721,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
1696
1721
  id
1697
1722
  createdAt
1698
1723
  comment
1724
+ parentId
1699
1725
  user {
1700
1726
  id
1701
1727
  displayName
@@ -39,6 +39,7 @@ exports.QUESTION = (0, client_1.gql) `
39
39
  id
40
40
  createdAt
41
41
  comment
42
+ parentId
42
43
  likes
43
44
  user {
44
45
  id
@@ -51,6 +52,7 @@ exports.QUESTION = (0, client_1.gql) `
51
52
  id
52
53
  createdAt
53
54
  comment
55
+ parentId
54
56
  user {
55
57
  id
56
58
  displayName
@@ -156,6 +158,7 @@ exports.QUESTION = (0, client_1.gql) `
156
158
  id
157
159
  createdAt
158
160
  comment
161
+ parentId
159
162
  likes
160
163
  user {
161
164
  id
@@ -168,6 +171,7 @@ exports.QUESTION = (0, client_1.gql) `
168
171
  id
169
172
  createdAt
170
173
  comment
174
+ parentId
171
175
  user {
172
176
  id
173
177
  displayName
@@ -276,6 +280,7 @@ exports.QUESTION = (0, client_1.gql) `
276
280
  id
277
281
  createdAt
278
282
  comment
283
+ parentId
279
284
  likes
280
285
  user {
281
286
  id
@@ -288,6 +293,7 @@ exports.QUESTION = (0, client_1.gql) `
288
293
  id
289
294
  createdAt
290
295
  comment
296
+ parentId
291
297
  user {
292
298
  id
293
299
  displayName
@@ -393,6 +399,7 @@ exports.QUESTION = (0, client_1.gql) `
393
399
  id
394
400
  createdAt
395
401
  comment
402
+ parentId
396
403
  likes
397
404
  user {
398
405
  id
@@ -405,6 +412,7 @@ exports.QUESTION = (0, client_1.gql) `
405
412
  id
406
413
  createdAt
407
414
  comment
415
+ parentId
408
416
  user {
409
417
  id
410
418
  displayName