@quesmed/types-rn 2.2.35 → 2.2.38

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.35",
3
+ "version": "2.2.38",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -117,6 +117,50 @@ export interface IModifyMarksheetInfo {
117
117
  input: IQbankInfoInput;
118
118
  }
119
119
  export declare type IModifyMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'modifyMarksheetInfo'>;
120
+ export declare const optimisticModifyMarksheetBuilderConfig: (marksheetId: number, builderConfig: IBuildConfigData, client?: ApolloClient<any> | undefined) => {
121
+ restricted: {
122
+ __typename: string;
123
+ modifyMarksheetInfo: {
124
+ builderConfig: {
125
+ numberOfQuestions?: number | undefined;
126
+ difficulty?: number[] | undefined;
127
+ unseen?: boolean | undefined;
128
+ seenIncorrect?: boolean | undefined;
129
+ seenCorrect?: boolean | undefined;
130
+ secondsPerQuestion?: number | undefined;
131
+ isTest?: boolean | undefined;
132
+ };
133
+ __typename?: string | undefined;
134
+ id: number;
135
+ createdAt: number | Date;
136
+ updatedAt: number | Date;
137
+ deletedAt: number | Date;
138
+ startedAt: number | Date;
139
+ type: import("../../../models").EMarksheetType;
140
+ endedAt: number | Date;
141
+ topicIds: number[];
142
+ topicNames?: string[] | undefined;
143
+ source: string;
144
+ userId: number;
145
+ user?: IUser | undefined;
146
+ marks: import("../../../models").IMarksheetMark[];
147
+ mockTestId: number | null;
148
+ correct?: number | undefined;
149
+ incorrect?: number | undefined;
150
+ totalQuestions?: number | undefined;
151
+ isTestMarksheet?: boolean | undefined;
152
+ solo: boolean;
153
+ agoraId: string;
154
+ users: IUser[];
155
+ state: EMarksheetState;
156
+ completed: boolean;
157
+ timeTaken: number;
158
+ currentMarkId?: number | undefined;
159
+ topicConceptData?: string | undefined;
160
+ preBuildData?: IPreBuildMarksheet | undefined;
161
+ };
162
+ };
163
+ };
120
164
  export declare const MODIFY_MARKSHEET_INFO: import("@apollo/client").DocumentNode;
121
165
  /**
122
166
  * leaveMarksheet
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.START_OR_JOIN_MARKSHEET = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
3
+ exports.END_MARKSHEET = exports.LEAVE_MARKSHEET = exports.MODIFY_MARKSHEET_INFO = exports.optimisticModifyMarksheetBuilderConfig = exports.START_OR_JOIN_MARKSHEET = exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const restricted_1 = require("../../query/restricted");
6
6
  exports.BUILD_MARKSHEET = (0, client_1.gql) `
@@ -14,6 +14,10 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
14
14
  agoraId
15
15
  topicIds
16
16
  completed
17
+ topicIds
18
+ topicNames
19
+ mockTestId
20
+ totalQuestions
17
21
  solo
18
22
  state
19
23
  currentMarkId
@@ -1244,27 +1248,577 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
1244
1248
  restricted {
1245
1249
  startOrJoinMarksheet(agoraId: $agoraId, solo: $solo) {
1246
1250
  id
1247
- createdAt
1248
- startedAt
1249
- agoraId
1251
+ topicConceptData
1252
+ currentMarkId
1253
+ completed
1254
+ topicIds
1255
+ topicNames
1256
+ mockTestId
1257
+ totalQuestions
1250
1258
  solo
1259
+ agoraId
1251
1260
  state
1252
- endedAt
1253
- source
1254
1261
  user {
1255
1262
  id
1256
1263
  displayName
1257
1264
  }
1258
- state
1259
1265
  users {
1260
1266
  id
1261
1267
  displayName
1262
1268
  }
1263
- completed
1264
- }
1265
- }
1266
- }
1267
- `;
1269
+ builderConfig {
1270
+ difficulty
1271
+ isTest
1272
+ numberOfQuestions
1273
+ secondsPerQuestion
1274
+ unseen
1275
+ seenCorrect
1276
+ seenIncorrect
1277
+ }
1278
+ preBuildData {
1279
+ buildRef
1280
+ seenCorrect
1281
+ seenIncorrect
1282
+ unseen
1283
+ }
1284
+ createdAt
1285
+ startedAt
1286
+ endedAt
1287
+ isTestMarksheet
1288
+ source
1289
+ correct
1290
+ incorrect
1291
+ marks {
1292
+ id
1293
+ flagged
1294
+ index
1295
+ questionChoiceId
1296
+ marksheetId
1297
+ timeTaken
1298
+ isAnswered
1299
+ mark
1300
+ question {
1301
+ ... on QuestionSBA {
1302
+ conceptId
1303
+ difficulty
1304
+ dislikes
1305
+ explanation
1306
+ id
1307
+ isLikedByMe
1308
+ likes
1309
+ question
1310
+ totalVotes
1311
+ typeId
1312
+ choices {
1313
+ id
1314
+ explanation
1315
+ name
1316
+ label
1317
+ answer
1318
+ votes
1319
+ picture {
1320
+ id
1321
+ createdAt
1322
+ updatedAt
1323
+ name
1324
+ caption
1325
+ path
1326
+ path512
1327
+ path256
1328
+ }
1329
+ }
1330
+ comments {
1331
+ id
1332
+ createdAt
1333
+ comment
1334
+ likes
1335
+ user {
1336
+ id
1337
+ displayName
1338
+ }
1339
+ dislikes
1340
+ isLikedByMe
1341
+ questionId
1342
+ replies {
1343
+ id
1344
+ createdAt
1345
+ comment
1346
+ user {
1347
+ id
1348
+ displayName
1349
+ }
1350
+ likes
1351
+ dislikes
1352
+ isLikedByMe
1353
+ questionId
1354
+ }
1355
+ }
1356
+ concept {
1357
+ id
1358
+ name
1359
+ chapter {
1360
+ id
1361
+ explanation
1362
+ pictures {
1363
+ id
1364
+ createdAt
1365
+ updatedAt
1366
+ name
1367
+ caption
1368
+ path
1369
+ path512
1370
+ path256
1371
+ topicId
1372
+ topic {
1373
+ id
1374
+ name
1375
+ typeId
1376
+ }
1377
+ }
1378
+ }
1379
+ videos {
1380
+ id
1381
+ title
1382
+ museId
1383
+ startTime
1384
+ endTime
1385
+ thumbnail
1386
+ concepts {
1387
+ id
1388
+ name
1389
+ }
1390
+ live
1391
+ description
1392
+ duration
1393
+ }
1394
+ }
1395
+ pictures {
1396
+ id
1397
+ createdAt
1398
+ updatedAt
1399
+ name
1400
+ caption
1401
+ path
1402
+ path512
1403
+ path256
1404
+ topicId
1405
+ topic {
1406
+ id
1407
+ name
1408
+ typeId
1409
+ }
1410
+ }
1411
+ difficulty
1412
+ psaSectionId
1413
+ likes
1414
+ dislikes
1415
+ isLikedByMe
1416
+ sbaAnswer: answer
1417
+ }
1418
+ ... on QuestionQA {
1419
+ conceptId
1420
+ difficulty
1421
+ dislikes
1422
+ explanation
1423
+ id
1424
+ isLikedByMe
1425
+ likes
1426
+ question
1427
+ totalVotes
1428
+ typeId
1429
+ choices {
1430
+ id
1431
+ explanation
1432
+ name
1433
+ label
1434
+ answer
1435
+ votes
1436
+ picture {
1437
+ id
1438
+ createdAt
1439
+ updatedAt
1440
+ name
1441
+ caption
1442
+ path
1443
+ path512
1444
+ path256
1445
+ }
1446
+ }
1447
+ comments {
1448
+ id
1449
+ createdAt
1450
+ comment
1451
+ likes
1452
+ user {
1453
+ id
1454
+ displayName
1455
+ }
1456
+ dislikes
1457
+ isLikedByMe
1458
+ questionId
1459
+ replies {
1460
+ id
1461
+ createdAt
1462
+ comment
1463
+ user {
1464
+ id
1465
+ displayName
1466
+ }
1467
+ likes
1468
+ dislikes
1469
+ isLikedByMe
1470
+ questionId
1471
+ }
1472
+ }
1473
+ concept {
1474
+ id
1475
+ name
1476
+ chapter {
1477
+ id
1478
+ explanation
1479
+ pictures {
1480
+ id
1481
+ createdAt
1482
+ updatedAt
1483
+ name
1484
+ caption
1485
+ path
1486
+ path512
1487
+ path256
1488
+ topicId
1489
+ topic {
1490
+ id
1491
+ name
1492
+ typeId
1493
+ }
1494
+ }
1495
+ }
1496
+ videos {
1497
+ id
1498
+ title
1499
+ museId
1500
+ startTime
1501
+ endTime
1502
+ thumbnail
1503
+ concepts {
1504
+ id
1505
+ name
1506
+ }
1507
+ live
1508
+ description
1509
+ duration
1510
+ }
1511
+ }
1512
+ pictures {
1513
+ id
1514
+ createdAt
1515
+ updatedAt
1516
+ name
1517
+ caption
1518
+ path
1519
+ path512
1520
+ path256
1521
+ topicId
1522
+ topic {
1523
+ id
1524
+ name
1525
+ typeId
1526
+ }
1527
+ }
1528
+ difficulty
1529
+ psaSectionId
1530
+ likes
1531
+ dislikes
1532
+ isLikedByMe
1533
+ qaAnswer: answer {
1534
+ dose
1535
+ units
1536
+ }
1537
+ }
1538
+ ... on QuestionMultiA {
1539
+ conceptId
1540
+ difficulty
1541
+ dislikes
1542
+ explanation
1543
+ id
1544
+ isLikedByMe
1545
+ likes
1546
+ question
1547
+ totalVotes
1548
+ typeId
1549
+ choices {
1550
+ id
1551
+ explanation
1552
+ name
1553
+ label
1554
+ answer
1555
+ votes
1556
+ picture {
1557
+ id
1558
+ createdAt
1559
+ updatedAt
1560
+ name
1561
+ caption
1562
+ path
1563
+ path512
1564
+ path256
1565
+ }
1566
+ }
1567
+ comments {
1568
+ id
1569
+ createdAt
1570
+ comment
1571
+ likes
1572
+ user {
1573
+ id
1574
+ displayName
1575
+ }
1576
+ dislikes
1577
+ isLikedByMe
1578
+ questionId
1579
+ replies {
1580
+ id
1581
+ createdAt
1582
+ comment
1583
+ user {
1584
+ id
1585
+ displayName
1586
+ }
1587
+ likes
1588
+ dislikes
1589
+ isLikedByMe
1590
+ questionId
1591
+ }
1592
+ }
1593
+ concept {
1594
+ id
1595
+ name
1596
+ chapter {
1597
+ id
1598
+ explanation
1599
+ pictures {
1600
+ id
1601
+ createdAt
1602
+ updatedAt
1603
+ name
1604
+ caption
1605
+ path
1606
+ path512
1607
+ path256
1608
+ topicId
1609
+ topic {
1610
+ id
1611
+ name
1612
+ typeId
1613
+ }
1614
+ }
1615
+ }
1616
+ videos {
1617
+ id
1618
+ title
1619
+ museId
1620
+ startTime
1621
+ endTime
1622
+ thumbnail
1623
+ concepts {
1624
+ id
1625
+ name
1626
+ }
1627
+ live
1628
+ description
1629
+ duration
1630
+ }
1631
+ }
1632
+ pictures {
1633
+ id
1634
+ createdAt
1635
+ updatedAt
1636
+ name
1637
+ caption
1638
+ path
1639
+ path512
1640
+ path256
1641
+ topicId
1642
+ topic {
1643
+ id
1644
+ name
1645
+ typeId
1646
+ }
1647
+ }
1648
+ difficulty
1649
+ psaSectionId
1650
+ likes
1651
+ dislikes
1652
+ isLikedByMe
1653
+ multiAnswer: answer
1654
+ }
1655
+ ... on QuestionPrescription {
1656
+ conceptId
1657
+ difficulty
1658
+ dislikes
1659
+ explanation
1660
+ id
1661
+ isLikedByMe
1662
+ likes
1663
+ question
1664
+ totalVotes
1665
+ typeId
1666
+ choices {
1667
+ id
1668
+ explanation
1669
+ name
1670
+ label
1671
+ answer
1672
+ votes
1673
+ picture {
1674
+ id
1675
+ createdAt
1676
+ updatedAt
1677
+ name
1678
+ caption
1679
+ path
1680
+ path512
1681
+ path256
1682
+ }
1683
+ }
1684
+ comments {
1685
+ id
1686
+ createdAt
1687
+ comment
1688
+ likes
1689
+ user {
1690
+ id
1691
+ displayName
1692
+ }
1693
+ dislikes
1694
+ isLikedByMe
1695
+ questionId
1696
+ replies {
1697
+ id
1698
+ createdAt
1699
+ comment
1700
+ user {
1701
+ id
1702
+ displayName
1703
+ }
1704
+ likes
1705
+ dislikes
1706
+ isLikedByMe
1707
+ questionId
1708
+ }
1709
+ }
1710
+ concept {
1711
+ id
1712
+ name
1713
+ chapter {
1714
+ id
1715
+ explanation
1716
+ pictures {
1717
+ id
1718
+ createdAt
1719
+ updatedAt
1720
+ name
1721
+ caption
1722
+ path
1723
+ path512
1724
+ path256
1725
+ topicId
1726
+ topic {
1727
+ id
1728
+ name
1729
+ typeId
1730
+ }
1731
+ }
1732
+ }
1733
+ videos {
1734
+ id
1735
+ title
1736
+ museId
1737
+ startTime
1738
+ endTime
1739
+ thumbnail
1740
+ concepts {
1741
+ id
1742
+ name
1743
+ }
1744
+ live
1745
+ description
1746
+ duration
1747
+ }
1748
+ }
1749
+ pictures {
1750
+ id
1751
+ createdAt
1752
+ updatedAt
1753
+ name
1754
+ caption
1755
+ path
1756
+ path512
1757
+ path256
1758
+ topicId
1759
+ topic {
1760
+ id
1761
+ name
1762
+ typeId
1763
+ }
1764
+ }
1765
+ difficulty
1766
+ psaSectionId
1767
+ likes
1768
+ dislikes
1769
+ isLikedByMe
1770
+ prescribeAnswer: answer {
1771
+ dose {
1772
+ value
1773
+ display
1774
+ }
1775
+ drug {
1776
+ value
1777
+ display
1778
+ }
1779
+ route {
1780
+ value
1781
+ display
1782
+ }
1783
+ frequency {
1784
+ display
1785
+ value
1786
+ }
1787
+ duration {
1788
+ display
1789
+ value
1790
+ }
1791
+ units {
1792
+ display
1793
+ value
1794
+ }
1795
+ }
1796
+ }
1797
+ }
1798
+ }
1799
+ }
1800
+ }
1801
+ }
1802
+ `;
1803
+ const optimisticModifyMarksheetBuilderConfig = (marksheetId, builderConfig, client) => {
1804
+ const data = client?.readQuery({
1805
+ variables: { id: Number(marksheetId) },
1806
+ query: restricted_1.MARKSHEET,
1807
+ });
1808
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1809
+ const { marksheet } = data.restricted;
1810
+ const newBuilderConfig = { ...marksheet.builderConfig, ...builderConfig };
1811
+ return {
1812
+ restricted: {
1813
+ __typename: 'RestrictedMutation',
1814
+ modifyMarksheetInfo: {
1815
+ ...marksheet,
1816
+ builderConfig: newBuilderConfig,
1817
+ },
1818
+ },
1819
+ };
1820
+ };
1821
+ exports.optimisticModifyMarksheetBuilderConfig = optimisticModifyMarksheetBuilderConfig;
1268
1822
  exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
1269
1823
  mutation ModifyMarksheetInfo($input: ModifyMarksheetInfoInput) {
1270
1824
  restricted {
@@ -10,9 +10,17 @@ exports.MARKSHEET = (0, client_1.gql) `
10
10
  topicConceptData
11
11
  currentMarkId
12
12
  completed
13
+ topicIds
14
+ topicNames
15
+ mockTestId
16
+ totalQuestions
13
17
  solo
14
18
  agoraId
15
19
  state
20
+ user {
21
+ id
22
+ displayName
23
+ }
16
24
  users {
17
25
  id
18
26
  displayName